Documente Academic
Documente Profesional
Documente Cultură
Venue Change: Laboratory 1 will be held in the White Lab Tutorials will be handed out during the tut session and must be completed and handed in by your next lecture (Thursday Lectures) It is a DP requirement to attend at least 50% of all labs and tutorials
Textbooks
There is no set textbook for this course, however, these books maybe useful for certain sections of work:
Logic and Computer Fundamentals (Mano & Kine) The Art of Electronics (Horowitz & Hill)
Digital Circuits
There are two main classes of digital circuits:
Combinational Circuits Sequential Circuits
Combinational Circuits
Have no memory Output only depends on the inputs To reverse engineer the circuit:
Cycle through all the inputs and note the outputs for each input
INPUT
OUTPUT
Sequential Circuits
Have memory Output is a function of inputs and the state of the circuit Cannot just use inputs and outputs to determine the circuits construction
INPUT OUTPUT
Multiplexers
Are selector devices Take multiple inputs and output one signal based on the value of the select signals Have:
n inputs 1 output log2n selection lines Examples: 74HC157; 74HC153; 74HC356
Digital Electronics EEE3017W R. Verrinder (2008)
Sel1 0 0 1 1
Sel2 0 1 0 1
Multiplexers cont.
Encoder
In3 In2 In1 In0 Out1 Out0
0 0 1
0 1 0
1 0 0
0 0 0
0 1 1
1 0 1
Decoders
Does the reverse of an encoder Different types of decoder:
n-to-2n decoder 7 segment display decoder BCD decoder
n-to-2n decoders convert binary information from n encoded bits to 2n unique outputs Examples:74HC137; 74HC42; 74HC139
Digital Electronics EEE3017W R. Verrinder (2008)
0 0 1 1
0 1 0 1
0 0 0 1
0 0 1 0
0 1 0 0
1 0 0 0
10
A +B Sum
Sum: Carry: Problem!
Digital Electronics EEE3017W R. Verrinder (2008)
0 1 1 0 0 Carry 1 1
AB A.B
11
Problem!
Adds two bits together but cant handle an input carry bit This is why it is called a half adder
12
2 outputs
Sum Carry Out
13
14
RS Flip-flops
Have memory
Made by cross-coupling
two:
NAND gates NOR gates
Pull S LOW and Q goes HIGH and stays HIGH until R pulled LOW
15
D-type Flip-Flops
Have following inputs:
D Clock (CLK) S R
On clock edge, the value on D is transferred to Q and stays there R and S are used to put device into known state
Digital Electronics EEE3017W R. Verrinder (2008)
X 0 1
0 h h
No Change 0 1
16
JK Flip-flops
Operation similar to Dtype except has two inputs J and K When J is HIGH, flip-flop is SET When K is HIGH, flip-flop is RESET If both J and K are high, output simply TOGGLES
Next State of Q
No change
0
1
1
0
0
1
1
Digital Electronics EEE3017W R. Verrinder (2008)
Toggle
17
Counters
Go through a set sequence of states when pulses are applied to the input Different types:
Ripple counters Synchronous counters Johnson counters Decade counters. Up-down counters Ring counters
18
Ripple Counter
Made using flip-flops which can complement their outputs 2nd flip-flop only toggles when first flip-flop has changed state Outputs do not all change at the same time
19
Shift Registers
0 1 1 0 0 1 101
Data is put in load input For every clock pulse, data is shifted 1 bit to the right Used to implement:
Parallel to serial conversion Used often in microprocessors Serial to parallel conversion
Digital Electronics EEE3017W R. Verrinder (2008)
20
System Inputs
21
Enter values in next state column given inputs and current state Simplify using standard logic reduction tools
Digital Electronics EEE3017W R. Verrinder (2008)
0
1 1 1 1
1
0 0 1 1
1
0 1 0 1
22
Example 1
1. Design a counter that counts in the following sequence: 0 1 2 repeat The counter must not be a ripple type
23
Example 1 - Solution
Firstly there are no external inputs Use two D-type flip flops as This gives us 4 possible states. This is fine as we just use dont care conditions for the unwanted state To create the combinational logic use a Present state Next State Diagram
Digital Electronics EEE3017W R. Verrinder (2008)
24
0 0 1 1
0 1 0 1
0 1 0 X
25
1 X
D0 Q 0 Q1
Digital Electronics EEE3017W R. Verrinder (2008)
(Q 0 Q1 )
26
27