Review logic gates, discuss decoders, LED displays Flip ...
Transcript of Review logic gates, discuss decoders, LED displays Flip ...
Based with permission on lectures by John Getty
Page 1
Today Displays, Memory and Microprocessors
• Review logic gates, discuss decoders, LED displays • Flip flops and their applications • Microprocessors (in 1 slide) • Arduino microcontroller
Based with permission on lectures by John Getty
Page 2
Review of Logic Gates U2A
7409N
1
23A
B Q Q A B= ⋅
U3A7432N1
23A
B Q
U1A7405N21A Q Q A=
Q A B= +
Schematic symbol
B QA
U4A
7400N
1
23 A B Q⋅ =
Algebraic example
AND
OR
NOT
NAND
Based with permission on lectures by John Getty
Things made from gates: Adder: A digital circuit that adds two
binary numbers. Multiplexer: Connects a “bus” (bundle of
wires) to an “address” specified by a binary number.
Decoder: Uses logic to translate one pattern of bits to another, related pattern of bits.
Anything that looks like a TRUTH TABLE.
Phsx 262 Laboratory Electronics II Spring 11 Lecture 8 Page 3
Based with permission on lectures by John Getty
Page 4
7-Segment LED Display a
b
c
d
e
f g
dp MAN71A
Connected to +5V
330ohm
Based with permission on lectures by John Getty
Page 5
BCD Binary Coded Decimal maps a four bit binary code directly to decimal numbers.
A3 A2 A1 A0 Dec
0 0 0 0 0 0 0 0 1 1 0 0 1 0 2 0 0 1 1 3 0 1 0 0 4 0 1 0 1 5 0 1 1 0 6 0 1 1 1 7 1 0 0 0 8 1 0 0 1 9 1 0 1 0 Undef … … … … Undef 1 1 1 1 Undef
Great for using binary to provide the human interface, but is really inefficient binary “packing” so is rarely used internally in circuits.
Chips are available that perform the conversion binary àBCD -->binary.
Based with permission on lectures by John Getty
Page 6
BCD Decoder-Driver
330ohm
+5V
…
…
An LED is on when
chip output goes low.
7-Segment LED Display
BCD Decoder-Driver
BCD Decoder-Driver
7-Segment LED Display
Based with permission on lectures by John Getty
Page 7
Truth Table - BCD Decoder
Based with permission on lectures by John Getty
Page 8
Combinational versus Sequential Combinational logic:
Output state of the circuit depends only on the present input states.
Can be described by a truth table.
Sequential Logic:
Output state depends on both the present input states and on previous history.
A Sequential Logic circuit has memory!
Based with permission on lectures by John Getty
Page 9
RS Flip-Flop
The state only changes when one of the inputs (R or S, but not both) are briefly toggled low (FALSE).
normally S ' =1 and R ' =1
then Q1= S '⋅Q '
0=Q '
0
and Q '1= R '⋅Q
0=Q
0
Inputs Outputs
Q’
S’
R’
Q
Based with permission on lectures by John Getty
Page 10
State Table for RS FF
Q’
S’
R’
Q
R’ S’ Q Q’ 1 1 1/0 0/1 0 1 0 1 1 0 1 0 0 0 1 1
Inputs Outputs
A transition to any of these three states results in a
definite output.
Based with permission on lectures by John Getty
Page 11
State Table for RS FF
Q’
S’
R’
Q
R’ S’ Q Q’ 1 1 1/0 0/1 0 1 0 1 1 0 1 0 0 0 1 1
Inputs Outputs
What happens when we make this transition?
Based with permission on lectures by John Getty
Page 12
State Table for RS FF
Q’
S’
R’
Q
R’ S’ Q Q’ 1 1 1/0 0/1 0 1 0 1 1 0 1 0 0 0 1 1
Inputs Outputs
Or either of these?
Based with permission on lectures by John Getty
Things you can make from flip-flops
Phsx 262 Laboratory Electronics II Spring 11 Lecture 8 Page 13
Register: Storage within a microprocessor for a “word” of 1 or more bytes.
Address pointer: A register that is used to specify an address to a multiplexer. The result is an “address bus”.
Counter: A sequence of bits representing a binary number that increments (or decrements) in response to a clock signal.
Based with permission on lectures by John Getty
Page 14
Clocked Flip-Flop: Divide by 2
Timing Diagram
f
f/2
Toggle-Connected Flip-Flop
4013 is a CMOS D-type clocked FF, positive edge triggered. This device from Multisym labels the reset pin as C for “clear.”
Based with permission on lectures by John Getty
Page 15
Ripple Counter Divided by 2n
f
f/2
f/4
f/8
f/16
Divided by 2 Clock plus n flip-flops
D1 2 Q1 5 Q’1 6
PR’1 4 CP1 3 CLR’1 1
7474
D2 12 Q2 9 Q’2 8
PR’2 10 CP2 11 CLR’2 13
7474
D1 2 Q1 5 Q’1 6
PR’1 4 CP1 3 CLR’1 1
7474
D2 12 Q2 9 Q’2 8
PR’2 10 CP2 11 CLR’2 13
7474 Clock 1kHz
CLK CLK/16 =
62.5 Hz
Vcc For 7474,
pin 7=GND pin 14 = Vcc
CLK2 CLK4 CLK8 CLK16
CLK CLK2 CLK4 CKL8
CLK16
Based with permission on lectures by John Getty
Microprocessors
Page 16
Based with permission on lectures by John Getty
Arduino
Page 17
Based with permission on lectures by John Getty
Arduino
Page 18
Arduino home page: http://www.arduino.cc Arduino language reference: http://arduino.cc/en/Reference/HomePage Arduino examples: http://arduino.cc/en/Tutorial/HomePage