Difference between revisions of "Arcane mixing techniques"
From Gender and Tech Resources
m (→Resistors) |
m (→Debugging notes) |
||
Line 216: | Line 216: | ||
* It can be very frustrating. Don't kill any acquaintances either. | * It can be very frustrating. Don't kill any acquaintances either. | ||
* Check minimisations and pinouts. | * Check minimisations and pinouts. | ||
− | * On rare occasions it is not me/you/us or what I/you/we did, and it is one of the components (a bent and curled pin, faulty chip, split wire (inside the insulation), faulty test equipment). If that turns out to be the case, don't kill producer associated people. | + | * On rare occasions it is not me/you/us or what I/you/we did, and it is one of the components (a bent and curled pin, faulty chip, split wire (inside the insulation), faulty test equipment). If that turns out to be the case, don't kill component producer associated people. Or anybody else for that matter. |
== Serpent == | == Serpent == |
Revision as of 18:38, 31 August 2015
Contents
Digital techniques basics
For conceptual basics from the atomic level up see Semiconductors, Diodes and Transistors https://www.youtube.com/watch?v=wPHG0DCWcC0 AND An Introduction to Logic Gates https://www.youtube.com/watch?t=10&v=95kv5BF2Z9E.
Digital gates
AND
The AND
gate behaves in the same way as the logical and operator: Output is true when both inputs are true and any otherwise false:
Input 1 | Input 2 | Output |
---|---|---|
0 | 0 | 0 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 1 |
OR
The OR
gate behaves like a logical inclusive or: Output is true if either or both of the inputs are true and false if both inputs are false:
Input 1 | Input 2 | Output |
---|---|---|
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 1 |
XOR
The XOR
(exclusive-OR) gate acts as a logical either/or: the output is true if the inputs are different, and false if the inputs are the same:
Input 1 | Input 2 | Output |
---|---|---|
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 0 |
NOT
A logical inverter, alias NOT
gate, has only one input and reverses logic state:
Input 1 | Output |
---|---|
0 | 1 |
1 | 0 |
NAND
A NAND
gate works like an AND
gate followed by a NOT
gate:
Input 1 | Input 2 | Output |
---|---|---|
0 | 0 | 1 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 0 |
NOR
The NOR
gate is a combination OR
gate followed by an inverter:
Input 1 | Input 2 | Output |
---|---|---|
0 | 0 | 1 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 0 |
XNOR
XNOR
(exclusive-NOR) gate is a combination of an XOR
gate followed by an inverter:
Input 1 | Input 2 | Output |
---|---|---|
0 | 0 | 1 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 1 |
Universal gates
The NAND
and the NOR
gate can be considered to be "universal" because you can make any of the basic operations out of its combinations: an inverter, an OR
gate or an AND
gate. Non-inverting gates do not have this versatility since they can not make an invert.
Wiring notes
- Create (or have at hand) a circuit diagram before starting any wiring. Sketchy is okay.
- Use the longer outer rows for +5V on one side and ground on the other side.
- First wire power to the circuit using a common colour (red) for +5V and another (black) for ground.
- Power off while wiring circuits on the board.
- Maintain a clean household. In general designs tend to get complex and can become difficult to debug. The gate circuits are not but serpent definitely qualifies and good practice can not start soon enough (see Morgan's laws).
- Strip insulation off wires no more than necessary to prevent wires from accidentally touching each other.
- Do not push wires too far into holes to prevent causing open circuits or short circuits.
Building gate circuits
Inverter circuit
+ 5V ---------------------------+---------------------------->> | -------- | 1 KΩ | -------- |--------------- LED | / --------- |/ SW 1 ----------| 33 KΩ |-----| pn2222 --------- |\ \ | GND ---------------------------+---------------------------->>
NAND circuit
If another transistor is added in series with the transistor in the inverter circuit, a NAND
gate is created.
+ 5V ---------------------------+---------------------------->> | -------- | 1 KΩ | -------- |--------------- LED | / --------- |/ SW 1 ----------| 33 KΩ |-----| pn2222 --------- |\ \ | / --------- |/ SW 2 ----------| 33 KΩ |-----| pn2222 --------- |\ \ | GND ---------------------------+---------------------------->>
NOR circuit
If another transistor is added in parallel with the transistor in the inverter circuit a NOR
gate is the result. IOW, a NOR
looks like two NOT
s sharing a single pull-up transistor of 1 KΩ.
+ 5V ---------------------------+---------------------------->> | -------- | 1 KΩ | -------- | +------------ LED ___|__|_ / \ --------- |/ pn2222 \| --------- SW 1 -----| 33 KΩ |-----| |-----| 33 KΩ |----- SW 2 --------- |\ pn2222 /| --------- \_________/ | GND ---------------------------+---------------------------->>
Boolean algebra
Minimisation with Morgan's laws
K-map groupings
Don't care conditions
Debugging notes
- If the errors show patterns of consistency, it's somewhere in the logic.
- If inconsistent, it's probably a loose connection.
- Test each component separately.
- Don't kill friends.
- Check power and GND for all appropriate pins.
- It can be frustrating. Don't kill family members.
- Check pin connections if done as specified in (sketchy) circuit diagram and that they aren't tied together.
- It can be very frustrating. Don't kill any acquaintances either.
- Check minimisations and pinouts.
- On rare occasions it is not me/you/us or what I/you/we did, and it is one of the components (a bent and curled pin, faulty chip, split wire (inside the insulation), faulty test equipment). If that turns out to be the case, don't kill component producer associated people. Or anybody else for that matter.
Serpent
Resources
Breadboards
You can buy solderless breadboards in a shop or online. Mind that you pick scalable like the SD-12 so you can hook up breadboards together and they become reuseful for other projects such as prototyping our own greenhouse sprinkler management systems.
Alternatively, start gathering and collecting IDC ribbon connectors (Floppy drive cables, old HD cables, SCSI cables) to build your own breadboards with. To do this, you will also need a solder iron, hot glue, wire (for example telephone wire will do), a small screw driver, and a clamp. This board will also be scalable. Fine grained scalable. :D
I'll do both. Buy a few, and make a few.
Power supply
Switches for input
Light emitting diodes (LEDs)
Building gate circuits
Transistors
Transistors are three pin devices. The amount of current that can flow between the collector and emitter is a function of the current flowing through the base of the transistor. If no current is flowing through the base of the transistor, no current will flow through the collector and emitter. With the transistor operating in digital mode, it will be configured to carry the maximum (on) or minimum (off) current from the collector to the emitter that the circuit will allow.
- 2 pn2222
or
- 2 2n2222
Resistors
The resistors are sized to insure that the inverter circuit operates in digital mode:
- 1 1 KΩ resistor
- 2 33 kΩ resistor
Capacitors
Chips
TTL Logic
TTL (transistor-transistor-logic) chips were developed with use of transistor switches for logical operations and defines the binary values as:
- 0 V to 0.8 V = logic 0
- 2 V to 5 V = logic 1
The 7400 series logic chips have been manufactured since the 1960s and were used to design and build computers but they are no longer used for that. They still have many uses in teaching digital logic. They are easy to obtain and fairly inexpensive. They draw a lot of power and must be supplied with +5 volts. Individual gates may draw 3 to 4 mA. The low power Schottky versions of TTL chips draw only 20% of the power, but are more expensive. These chips have LS in the middle of their model number. Below are a number of datasheets from specific manufacturers. Other manufacturers may also exist (see bottom of datasheet).
- 7400 (Quad 2-Input NAND gate) http://pdf1.alldatasheet.com/datasheet-pdf/view/12608/ONSEMI/7400.html
- 7402 (NOR, haven't found it yet)
- 7404 (Triple voltage regulator) http://pdf1.alldatasheet.com/datasheet-pdf/view/23714/STMICROELECTRONICS/7404.html
- 7410 (Triple 3-Input NAND gate) http://pdf1.alldatasheet.com/datasheet-pdf/view/7823/NSC/7410.html
- 74151 (Data Selectors/Multiplexers) http://pdf1.alldatasheet.com/datasheet-pdf/view/7831/NSC/74151.html
- 74175 (Hex/Quad D Flip-Flops with Clear) http://pdf1.alldatasheet.com/datasheet-pdf/view/27396/TI/SN74175N.html
- Timer (haven't found one yet)
CMOS Logic
CMOS (complementary metal oxide semiconductor) chips are lower in power requirements (drawing about 1 mA) and operate with a wide range of supply voltages (typically 3 to 18 volts). The CMOS model number will have a C in the middle of it. A bigh drawback is extreme sensitivity to static electricity - they must be carefully protected from static discharges.
NMOS and PMOS Logic
PMOS and NMOS (p- and n-channel metal oxide semiconductors) offer the advantage of higher component density than TTL chips. They too are sensitive to damage from electrical discharge.