💾 Archived View for hanicef.me › document › ascii-circuits captured on 2022-07-16 at 13:30:21. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
(C) Gustaf Alhäll, released under CC BY 4.0
Original document can be found at hanicef.me
License can be found at creativecommons.org
Plain ASCII-text is the oldest form of readable data that exist, and is thus the most widely supported one. However, it's also the most limited one, in the sense that it only can display text and nothing else. This can be problematic for things that cannot be explained clearly with text only.
Because of this, I've developed a system for writing circuit diagrams in ASCII. It is designed so most people will be able to read the circuits without requiring any kind of knowledge beforehand.
Note that this specification is informal, and doesn't have a definition for full compliance.
Wires uses - and | for horizontal and vertical wires, respectively. Wire connections are represented with +.
A ----+ | | C
Crossing wires are simply represented with a -; this means that horizontal wires always go above vertical ones.
C | A ----- B | D
Ground is written simply as GND.
5V -- GND
Diodes are written as |>| and |<|.
5V --|>|-- GND
For an LED, add the text "LED" above it.
LED 5V --|>|-- GND
Resistors are written as /\/.
5V --/\/-- GND
Capacitors are written as ||. Polarized capacitors are written as )| and |(.
5V --||--|(-- GND
Transistors are written as such:
B | ___ C --/ \-- E
For NPN and PNP transistors, add < or > on the appropriate side:
B | ___ C --/ \>-- E B | ___ C --/ \<-- E
Buffers are written as |> and <|.
5V --|>-- GND
Tri-state buffers are written likewise, but has a vertical wire going in sideways.
A | 5V --|>-- GND
NOT gates are written as |>o and o<|.
5V --|>o-- GND
All other gates are formatted as |X), where X is the name of the logic gate.
A ---+ |AND)--- GND B ---+ A ---+ |OR)--- GND B ---+ A ---+ |XOR)--- GND B ---+ A ---+ |NAND)--- GND B ---+ A ---+ |NOR)--- GND B ---+ A ---+ |XNOR)--- GND B ---+
Operational amplifiers are written as such:
C | A ---NEG| + |OPAMP>--- GND B ---POS| - | D
Chips are written as large rectangles; connections to the chip is labelled inside the chip, not outside. If an input or output is reversed, add an underscore above it.
+-----+ ---|S Q|--- | | ---|>CLK | | _| ---|R Q|--- +-----+