Review logic gates, discuss decoders, LED displays Flip ...

18
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

Transcript of Review logic gates, discuss decoders, LED displays Flip ...

Page 1: 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

Page 2: Review logic gates, discuss decoders, LED displays Flip ...

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

Page 3: Review logic gates, discuss decoders, LED displays Flip ...

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

Page 4: Review logic gates, discuss decoders, LED displays Flip ...

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

Page 5: Review logic gates, discuss decoders, LED displays Flip ...

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.

Page 6: Review logic gates, discuss decoders, LED displays Flip ...

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

Page 7: Review logic gates, discuss decoders, LED displays Flip ...

Based with permission on lectures by John Getty

Page 7

Truth Table - BCD Decoder

Page 8: Review logic gates, discuss decoders, LED displays Flip ...

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!

Page 9: Review logic gates, discuss decoders, LED displays Flip ...

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

Page 10: Review logic gates, discuss decoders, LED displays Flip ...

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.

Page 11: Review logic gates, discuss decoders, LED displays Flip ...

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?

Page 12: Review logic gates, discuss decoders, LED displays Flip ...

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?

Page 13: Review logic gates, discuss decoders, LED displays Flip ...

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.

Page 14: Review logic gates, discuss decoders, LED displays Flip ...

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.”

Page 15: Review logic gates, discuss decoders, LED displays Flip ...

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

Page 16: Review logic gates, discuss decoders, LED displays Flip ...

Based with permission on lectures by John Getty

Microprocessors

Page 16

Page 17: Review logic gates, discuss decoders, LED displays Flip ...

Based with permission on lectures by John Getty

Arduino

Page 17

Page 18: Review logic gates, discuss decoders, LED displays Flip ...

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