Friday, October 28, 2016

Ring Counter

A ring counter is circuit made up of N flip flops as shown in the figure below. It is used to generate N unique states from the N flip flops in a simple way. We can generate N unique states from counters too, but that would need more complex circuit than a simple ring counter.



As shown in the figure above the output of the last flip flop becomes the input to the serial input of the first flip flop. As shown in the truth table below, when we start the sequence from 1000 as the output of the flip flops, each clock pulse causes the 1 bit to shift to the next flip flop. Thus in any state the output of only one flip flop is going to be high, thus uniquely identifying the sate as highlighted in the truth table.



An N state ring counter will need N flip flops.

The video below shows the operation of a ring counter .

Jhonson Counter

A jhonson counter is a digital circuit made of flip flops as show in the figure below. It is also called a twisted ring counter as in a jhonson counter the negation of the last flip flops is connected as the serial input to the first flip flop.



A johson counter is designed with N flip flops and will hae 2N unique states. The Q' output of the last flip flop i fed as input to the first flip flop. Thus if we start with all the flip flops in the clear state, then at the first clock pulse the negation of "0" that is "1" is fed as input to the first flip flop. Thus output of first flipflop becomes 1, this operation continues for N clock pulses, making all the outputs as 1. Then again the process is repeated for N clock pulses for it to reach the initial state again as depicted in the truth table below. The highlighted cells in each row indicate the unique combination to recognize that state.
A jhonson counter can generate 2N unique states for N flip flops which is double the number generated by a ring counter.



The videos below shows the working of a jhonson counter.


The circuit and simulation was created using the software "DEEDS"

Sunday, October 9, 2016

Simulink:Creating different waveforms

In simulink, if we need to generate different waveforms,like sawtooth,square,sine etc we can make use of the signal generator block. The signal generator block is available under main simulink blocks and looks as shown below.

height="" />

To choose the type of waveform to be generated double click on the block to open the menu as shown



In the menu we can choose the



After choosing the waveform and entering the other details of the waveform, click on OK. The ffiure below shows a sawtooth waveform of 1Hz frequency and amplitude of 1.




Follow by Email