Download Some Transistors Stuff, Analog-to-Digital

Document related concepts

Solar micro-inverter wikipedia , lookup

Electrical substation wikipedia , lookup

Pulse-width modulation wikipedia , lookup

Islanding wikipedia , lookup

Immunity-aware programming wikipedia , lookup

Variable-frequency drive wikipedia , lookup

Flip-flop (electronics) wikipedia , lookup

Current source wikipedia , lookup

Rectifier wikipedia , lookup

Alternating current wikipedia , lookup

Power inverter wikipedia , lookup

Stray voltage wikipedia , lookup

Two-port network wikipedia , lookup

Metadyne wikipedia , lookup

Resistive opto-isolator wikipedia , lookup

Voltage optimisation wikipedia , lookup

Mains electricity wikipedia , lookup

Power MOSFET wikipedia , lookup

Voltage regulator wikipedia , lookup

History of the transistor wikipedia , lookup

Power electronics wikipedia , lookup

Transistor wikipedia , lookup

Analog-to-digital converter wikipedia , lookup

Integrating ADC wikipedia , lookup

Switched-mode power supply wikipedia , lookup

Opto-isolator wikipedia , lookup

Schmitt trigger wikipedia , lookup

Current mirror wikipedia , lookup

CMOS wikipedia , lookup

Buck converter wikipedia , lookup

Transcript
Transistor Odds and Ends
PHY 201 (Blum)
1
RTL NOR
PHY 201 (Blum)
2
NOT from NOR
PHY 201 (Blum)
3
OR from NOR
PHY 201 (Blum)
4
AND from NOR
PHY 201 (Blum)
5
Other Logic Families
• As one has an increasing number of logic gates one
has to be concerned with their power performance
and stability.
• The logic gates can be made out of various
combinations of resistors, diodes, and transistors.
They differ in power and stability.
• Let us examine an inverter from the TTL (transistortransistor logic) family.
PHY 201 (Blum)
6
TTL Inverter
PHY 201 (Blum)
7
TTL Inverter
PHY 201 (Blum)
8
On-Off
• Recall that a transistor can be thought of a
switch.
– When the switch is off, the transistor has very high
resistance.
– When the switch is on, the transistor has relatively
low resistance.
• It “transfers resistances.”
PHY 201 (Blum)
9
Transistor etymology
PHY 201 (Blum)
10
Totem Pole
• The right-hand side of the TTL inverter is an
arrangement of transistors known as a totem pole.
• The transistors are arranged to that one is on and
one is off.
• The inverter output is just above the lower transistor
in the totem pole.
– If the lower transistor is on, there is little voltage drop
across the lower transistor and so the output voltage is
close to 0 (ground).
PHY 201 (Blum)
11
Totem Pole (Cont.)
– If the lower transistor is off, then there is a large
voltage drop across the lower transistor and so
the output voltage is high.
• One is almost directly connected to the high
or the ground giving this arrangement good
power/stability characteristics.
PHY 201 (Blum)
12
Similar arrangement/Opposite idea
• In the totem pole arrangement, one guarantees that
one of the two transistors is on and the other is off –
giving a low-resistance connection to high or low as
the case may be.
• If we arrange for a third possibility that both
transistors are off, then there is a high resistance
between the output and both the high and the low.
• This high-resistance or high-impedance state is
neither high nor low, but effectively disconnected.
PHY 201 (Blum)
13
Poor Man’s TriState (Enabled Data Low)
PHY 201 (Blum)
14
Poor Man’s TriState (Enabled Data High)
PHY 201 (Blum)
15
Poor Man’s TriState (Not Enabled)
PHY 201 (Blum)
16
Poor Man’s TriState (Not Enabled)
PHY 201 (Blum)
17
Same idea as the tri-state buffer
• This circuit has the essential ingredients to make a
tri-state buffer.
• Recall that tri-state buffers are used in conjunction
with buses.
• When one has several devices that could place their
information on the bus (“drive the bus”) only one of
them should.
– If two devices attempt to drive the bus to opposite voltage
levels, there will be a short.
PHY 201 (Blum)
18
Three State Logic
PHY 201 (Blum)
A
E
Output
0
0
Z (High impedance)
0
1
0
1
0
Z (High impedance)
1
1
1
19
Tri-state buffer
Compare the Electronics Workbench
tri-state buffer to the previous circuit
made of transistors and logic gates.
PHY 201 (Blum)
20
In the high impedance state
PHY 201 (Blum)
21
In the high impedance state
PHY 201 (Blum)
22
In the “enabled” state
PHY 201 (Blum)
23
In the “enabled” state
PHY 201 (Blum)
24
Sequential Logic
• Whereas combinatorial logic depends only on the
current inputs, sequential logic can also depend on
the previous “state” of the system.
• Circuitry designed to hold a high or low state is
known as a flip-flop.
• A flip-flop is the smallest unit of RAM – random
access memory.
• Recall there are two basic categories of RAM:
dynamic RAM (DRAM) and static RAM (SRAM).
PHY 201 (Blum)
25
Flip Flops
• Flip-flops serve as the elementary units for memory
in digital systems. Two features are needed:
• 1. The circuit must be able to “hold” either state (a
high or low output) and not simply reflect the input
at any given time.
• 2. But in some circumstances, we must be able to
change (to “set” and “reset”) the values.
PHY 201 (Blum)
26
Remembrance of states past
• The way in which the previous state
information is held is different for different
types of memory
• In DRAM (dynamic random access memory),
the state (1 or 0) is held by a charge (or lack
thereof) remaining on a capacitor
– Charges tend to leak off of capacitors, which is
why DRAM must be periodically refreshed
PHY 201 (Blum)
27
Simple DRAM (Reset)
PHY 201 (Blum)
28
Simple DRAM (Set)
PHY 201 (Blum)
29
Simple DRAM (Hold)
PHY 201 (Blum)
30
Simple DRAM (Hold)
PHY 201 (Blum)
31
Simple DRAM (Reset)
PHY 201 (Blum)
32
Simple DRAM (Hold)
PHY 201 (Blum)
33
Simple DRAM (Hold)
PHY 201 (Blum)
34
Analog-to-Digital Converter
ADC
Simple Digital to Analog Converter
V1
5V
.111
corresponds to
7/8
J1
Key = A
J2
Key = B
7/8 of 5 is 4.375
J3
Key = C
R1
1.0k
R2
2.0k
R4
4.02k
R3
4.02k
+
-
PHY 202 (Blum)
4.377
V
U1
DC 10M
36
Simple Digital to Analog Converter
V1
5V
.100
corresponds to
1/2
J1
Key = A
J2
Key = B
1/2 of 5 is 2.5
J3
Key = C
R1
1.0k
R2
2.0k
R4
4.02k
R3
4.02k
+
-
PHY 202 (Blum)
2.503
V
U1
DC 10M
37
Analog-to-Digital
• We have seen a simple digital-to-analog
converter, now we consider the reverse process
• For this purpose we introduce a new circuit
element — the comparator
• A digital comparator would compare two binary
inputs A and B and determine if A is larger than B
(as well as if A = B).
• An analog comparator would determine whether
voltage A is larger than voltage B
PHY 202 (Blum)
38
PHY 202 (Blum)
39
Comparator (analog)
U1
V1
3.1 V
COMPARATOR_VIRTUAL
V2
3V
R1
1.0k
+
-
4.651
V
U2
DC 10M
+ Input higher than – input, output is high
PHY 202 (Blum)
40
Comparator (analog)
U1
V1
2.9 V
COMPARATOR_VIRTUAL
V2
3V
R1
1.0k
+
-
0.000
V
U2
DC 10M
+ Input lower than – input, output is low
PHY 202 (Blum)
41
1-bit analog-digital converter
R1
1.0k
V2
2.4 V
V1
5V
U1
COMPARATOR_VIRTUAL
R2
1.0k
Reference Voltage
PHY 202 (Blum)
Input voltage
X1
2.5 V
Input voltage is
less than half of
reference
voltage, result is
low.
42
1-bit analog-digital converter
R1
1.0k
V2
2.6 V
V1
5V
U1
COMPARATOR_VIRTUAL
R2
1.0k
Reference Voltage
PHY 202 (Blum)
Input voltage
X1
2.5 V
Input voltage is
more than half
of reference
voltage, result is
high.
43
Toward a 2-bit analog-digital converter
R1
1.0k
V2
4V
V1
5V
R2
1.0k
U1
X1
2.5 V
Greater than 3/4
COMPARATOR_VIRTUAL
U2
X2
2.5 V
Greater than 1/2
R4
1.0k
COMPARATOR_VIRTUAL
U3
X3
2.5 V
Greater than 1/4
R5
1.0k
PHY 202 (Blum)
COMPARATOR_VIRTUAL
44
Toward a 2-bit analog-digital converter
R1
1.0k
V2
2.6 V
V1
5V
R2
1.0k
U1
X1
2.5 V
Greater than 3/4
COMPARATOR_VIRTUAL
U2
X2
2.5 V
Greater than 1/2
R4
1.0k
COMPARATOR_VIRTUAL
U3
X3
2.5 V
Greater than 1/4
R5
1.0k
PHY 202 (Blum)
COMPARATOR_VIRTUAL
45
Toward a 2-bit analog-digital converter
R1
1.0k
V2
2.2 V
V1
5V
R2
1.0k
U1
X1
2.5 V
Greater than 3/4
COMPARATOR_VIRTUAL
U2
X2
2.5 V
Greater than 1/2
R4
1.0k
COMPARATOR_VIRTUAL
U3
X3
2.5 V
Greater than 1/4
R5
1.0k
PHY 202 (Blum)
COMPARATOR_VIRTUAL
46
Toward a 2-bit analog-digital converter
R1
1.0k
V2
1.1 V
V1
5V
R2
1.0k
U1
X1
2.5 V
Greater than 3/4
COMPARATOR_VIRTUAL
U2
X2
2.5 V
Greater than 1/2
R4
1.0k
COMPARATOR_VIRTUAL
U3
X3
2.5 V
Greater than 1/4
R5
1.0k
PHY 202 (Blum)
COMPARATOR_VIRTUAL
47
Finish this truth table
>3/4
Comparator
>1/2
Comparator
>1/4
Comparator
0
0
0
0
0
1
0
1
0
0
1
1
1
0
0
1
0
1
1
1
0
1
1
1
½’s place
¼’s place
Doesn’t occur
PHY 202 (Blum)
48
Integrated circuit version
Warning: may need to
flip switch back and
forth.
PHY 202 (Blum)
49
3.7 / 5 (in Scientific Mode)
PHY 202 (Blum)
50
*
PHY 202 (Blum)
2
x^y
8
=
51
Binary Mode
PHY 202 (Blum)
52
Compare
PHY 202 (Blum)
53
Scientific Mode
PHY 202 (Blum)
54
Digital Comparators
PHY 201 (Blum)
What is it?
• A comparator is circuitry that compares two
inputs A and B, determining whether the
following conditions are true or false
–A=B
–A>B
–A<B
–AB
–AB
–AB
PHY 201 (Blum)
Two will do
• Actually the first two will suffice, since the
others are easily related to these
–A<B
–AB
–AB
–AB
PHY 201 (Blum)




(NOT(A > B)) AND (NOT(A = B))
(A > B) OR (A = B)
NOT(A > B)
NOT(A = B)
One-bit comparator
Input
PHY 201 (Blum)
Output
A
B
=
>
0
0
1
0
0
1
0
0
1
0
0
1
1
1
1
0
Gate version
PHY 201 (Blum)
Comparing word equality
• To compare if two words are equal, you pair
up the bits holding the same position in each
word, and each individual pair must be equal
for the words to be equal.
– 1100 and 1110  {(1,1), (1,1), (0,1), (0,0)} are
not equal
– 1100 and 1100  {(1,1), (1,1), (0,0), (0,0)} are
equal
PHY 201 (Blum)
Comparing word inequality
• Assume unsigned integers, then
– If the most significant bit of word A is greater than
the most significant bit of word B, then word A is
greater than word B.
– If the most significant bit of word A is less than the
most significant bit of word B, then word A is less
than word B.
– If the most significant bit of word A is equal to the
most significant bit of word B, then we must
compare the next most significant bits.
PHY 201 (Blum)
And so on
• If the most significant bits are equal, one
compares the next-most significant bits.
• Then if the next most significant bits are
equal, one compares the next-next-most
significant bits, and so on.
• It seems that one must know the outcome of
testing the more significant bits before one
proceeds to the less significant bits.
PHY 201 (Blum)
4-bit comparator
PHY 201 (Blum)