1 sequential circuits registers and counters. 2 master slave flip flops

25
1 Sequential Circuits Registers and Counters

Upload: shawn-mosley

Post on 23-Dec-2015

231 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: 1 Sequential Circuits Registers and Counters. 2 Master Slave Flip Flops

1

Sequential Circuits

Registers and Counters

Page 2: 1 Sequential Circuits Registers and Counters. 2 Master Slave Flip Flops

2

Master Slave Flip Flops

Page 3: 1 Sequential Circuits Registers and Counters. 2 Master Slave Flip Flops

3

Types of Sequential Circuits

• Two types of sequential circuits:

• Synchronous: The behavior of the circuit depends on the input signal at discrete instances of time (also called clocked)

• Asynchronous: The behavior of the circuit depends on the input signals at any instance of time and the order of the inputs change

Page 4: 1 Sequential Circuits Registers and Counters. 2 Master Slave Flip Flops

4

Master-Slave Flip-Flop

The rising edge of the clock loads new data into the master, while the slave continues to hold previous data. The falling edge of the clock loads the new master data into the slave.

At C = 1, Master is Enabled and Slave is disabledC = 0, Slave is enabled and Master is disabled

Y Q

y

C C

Q

Master Slave

Page 5: 1 Sequential Circuits Registers and Counters. 2 Master Slave Flip Flops

5

Registers

Page 6: 1 Sequential Circuits Registers and Counters. 2 Master Slave Flip Flops

6

Registers• Several flip-flops grouped together with a common clock to form a register. • Each flip-flop can store one bit of information,• A register with n flip-flops can store/load n bits of information (e.g. to store data in the CPU) OR to transferring data between registers is a common operation in digital systems

Shift Register: A register that allows each of the flip -flops to pass the stored

information to its adjacent neighbour

Some of shift registers are:

• Parallel In parallel out (PIPO)• Serial In Serial Out register (SISO)• Serial In Parallel Out (SIPO)• Parallel In Serial Out (PISO)

Page 7: 1 Sequential Circuits Registers and Counters. 2 Master Slave Flip Flops

7

4-bit register - (PIPO)

The common clock input triggers all flip flops on the positive edge of each pulse, and the binary data available at the four inputs are transferred into the register (Loading/ up loading). The four outputs can be sampled at any time to obtain the binary Information stored in the register.

Page 8: 1 Sequential Circuits Registers and Counters. 2 Master Slave Flip Flops

8

4-bit register (SISO) / Shift register

• The bits will arrive in serial - one bit at a time• The Input is applied to first flip-flop and shifted along one at each clock event

Page 9: 1 Sequential Circuits Registers and Counters. 2 Master Slave Flip Flops

9

Figure 2.2 illustrates entry of the four bits 1010 into the register. Figure

2.3 shows the four bits (1010) being serially shifted out of the register and

replaced by all zeros.

Page 10: 1 Sequential Circuits Registers and Counters. 2 Master Slave Flip Flops

10

Page 11: 1 Sequential Circuits Registers and Counters. 2 Master Slave Flip Flops

11

Page 12: 1 Sequential Circuits Registers and Counters. 2 Master Slave Flip Flops

SIPO Register

12

RESET is an input to CLEAR the FF

One application of shift registers is converting between “serial data” and “parallel data”

Accepts data serially.

Outputs of all stages are available simultaneously

Page 13: 1 Sequential Circuits Registers and Counters. 2 Master Slave Flip Flops

13

PISO Register

Bits are load simultaneously, but output is Shifted serially.

Page 14: 1 Sequential Circuits Registers and Counters. 2 Master Slave Flip Flops

14

Counters

Page 15: 1 Sequential Circuits Registers and Counters. 2 Master Slave Flip Flops

15

Counters

• A counter is essentially a register that goes though a predetermined sequence of binary states.

• It counts in binary from 0 to 2ⁿ-1, where n is the number of FFs

• The output value increases by one on each clock cycle

• After the largest value, the output “wraps around” back to 0

• Counters can act as simple clocks to keep track of “time”. They also used to record how many times something has happened or how many steps have been performed in some computation?

• All processors in the computers contain a Program Counter, or PC to keep track of the instruction currently being executed and after each clock cycle the next instruction will be executed.

Page 16: 1 Sequential Circuits Registers and Counters. 2 Master Slave Flip Flops

16

Classification of counters:

Asynchronous (ripple) counter

Up and Down counter

Synchronous counter

Page 17: 1 Sequential Circuits Registers and Counters. 2 Master Slave Flip Flops

17

Only the first flip-flop is clocked by an external clock. All subsequent flip- flops are clocked by the output of the preceding flip-flop.

It is called ripple-counters because of the way the clock pulse ripples it way through the flip-flops

They also known by Frequency Division (to lower the hertz)

Asynchronous (ripple) counter

Page 18: 1 Sequential Circuits Registers and Counters. 2 Master Slave Flip Flops

18

FF0 changes state at the rising edge of each clock pulse, but FF1 changes only when triggered by the rising edge of the (complement of Q signal) output of FF0 (positive edge –triggering)  

Asynchronous Up counter

Timing diagram0

0

0

1

0

0

Page 19: 1 Sequential Circuits Registers and Counters. 2 Master Slave Flip Flops

19

Down counter   To convert the above Up Counter to Down counter change the ripple of the

clock to be taken from Q of FF0 to trigger FF1 instead of and so on

Page 20: 1 Sequential Circuits Registers and Counters. 2 Master Slave Flip Flops

20

Synchronous Counters

All flip-flops are clocked simultaneously by an external clock.

Synchronous counters are an example of state machine design because they have a set of states and a set of transition rules for moving between those states after each clocked event

complement

No change

complement complement complement

complement No change complement

Page 21: 1 Sequential Circuits Registers and Counters. 2 Master Slave Flip Flops

21

Random Access Memory (RAM)

Stores binary information in groups of bits called words. The data consists of n lines (for n-bit words). Data input lines provide the

information to be stored (written) into the memory, while data output lines carry the information out (read) from the memory.

The address consists of k lines which specify which word (among the 2k words available) to be selected for reading or writing.

The control lines Read and Write (usually combined into a single control line ) specifies the direction of transfer of the data.

Static RAMs use flip-flops as the memory cells

Page 22: 1 Sequential Circuits Registers and Counters. 2 Master Slave Flip Flops

22

The control lines Read and Write (usually combined into a single control line ) specifies the direction of transfer of the data

Page 23: 1 Sequential Circuits Registers and Counters. 2 Master Slave Flip Flops

23

H.WThe submission has to be by the end of this weekWrite your full name and the group number on the answer sheet 1- Draw the state diagram of T Flip Flop

2- From the below block diagram of a counter :

a) What kind of triggering is used?

b) With the aid of timing diagram clarify the sequence of the main states Qs that is possible by this counter assuming their initial states are 0

c) What is the new result if we replace the JK flip flop with the T flip flop in this counter and why?

Page 24: 1 Sequential Circuits Registers and Counters. 2 Master Slave Flip Flops

24

H.W

3- From the following logic circuit draw the timing diagram for ‘Q’. Assume ‘Q’ has an initial value of ‘0’

Page 25: 1 Sequential Circuits Registers and Counters. 2 Master Slave Flip Flops

25

4- From this circuit find out the boolean expression of the next states of each Flip flop and the output of the circuit (Y), then complete its excitation Table.

5- Write at least 4 pages to highlight the basics definitions and operation of RAM