html5-img
1 / 39

EE24C Digital Electronics Projects

EE24C Digital Electronics Projects. Counters and Registers. Definitions. A synchronous circuit is a sequential circuit whose input/output changes are synchronized by a reference signal called clock signal. Basic synchronous circuits include:

erol
Download Presentation

EE24C Digital Electronics Projects

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. EE24C Digital Electronics Projects Counters and Registers

  2. Definitions • A synchronous circuit is a sequential circuit whose input/output changes are synchronized by a reference signal called clock signal. • Basic synchronous circuits include: • Counters (sequential circuits configure in a specific form in order to count clock ticks). • Registers (for elementary storage and shift operations) • Random-Access Memories (RAMs) for Read/write operations.

  3. Basic Synchronous Circuits • Characteristics: • Clocked by stable clock signal (crystal oscillator) • Set of input and output data lines • Set of control signals • Can be described using FSMs • Can be implemented using basic synchronous cells (DFFs and JKFFs). • Exist as MSI (medium scale integrated) circuits. • Their designs often require the use of some combinational elements.

  4. Parallel Load Register • Characteristics: • A n-bit parallel load register is an ordered set of n FFs that are used to store n-bit word. • It has n-bit input and n-bit Output Data • A set of control signals: Load (LD), Clear (CLR)

  5. Inputs: X = (xn-1, xn-2,…x0), xi{0,1} LD, CLR {0,1} Outputs: Z = (zn-1,…, z0) zi{0,1} State: S = (Sn-1, …, S0), Si{0,1} Figure: N-bit parallel register. Function: State Transition and Output functions

  6. How can we design a n-bit register from the specification given previously? • By analyzing the specification, it appears that DFFs can be used in order to implement the Load operation. • The outputs of the register change according to the values of the two control signals LD and CLR  Use of a MUX • We must avoid the condition LD = CLR=1.

  7. 4-Bit parallel Register: Parallel load registers exist in different MSI flavors.

  8. Multibit registers and latches • 74x175

  9. 8-bit (octal) register • 74x374 • 3-state output Active on a high level.

  10. Other octal registers • 74x273 • asynchronous clear • 74x377 • clock enable

  11. Octal latch • 74x373 • Output enable • Latch-enable input “C” or “G” • Register vs. latch, what’s the difference? • Register: edge-triggered behavior • Latch: output follows input when G is asserted

  12. Shift Registers • There are many situations in digital systems design where it’s useful to be able to shift the contents of a register to the left or the right. • A right-shift operation changes the register states as follows: • (0, zn-1, zn-2, ……..z1)  (zn-1, zn-2, ………..z1, z0), • A left shift performs the transformation: • (zn-2, ………..z1, z0,0)  (zn-1, zn-2, ………..z1, z0)

  13. A shift register is an n-bit register with a provision for shifting its stored data by one bit position at each clock ticks. • We have different configurations: • Serial-in/Serial-out shift register • Serial-in/Parallel-out shift register (for serial-to-parallel conversion) • Parallel-in/Serial-out shift register (for parallel-to-serial conversion)

  14. A register organized to allow left- or right-shift operations of this kind is called a shift register. The following shows a block diagram of a universal registers with load and shift features.

  15. The high-level specification of the universal register is given as follows

  16. More details about the control signals:

  17. The following figure shows a 4-bit bidirectional shift register

  18. Serial-in, serial-out

  19. Serial-to-parallel conversion • Use a serial-in, parallel-out shift register

  20. mux Parallel-to-serial conversion • Use parallel-in, serial-out shift register

  21. Do both • Parallel-in, parallel-out shift register

  22. “Universal” shift register74x194 • Shift left • Shift right • Load • Hold

  23. One stage of ’194

  24. Counters • A counter is a simple sequential machine designed to cycle through a predetermined sequence of p distinct states S0, S1,…..Sp-1 in response to pulses on an input line. The p states usually represent k consecutive numbers; the state transitions can be thus described by the expression Si+1 Si + 1 (modulo k). (Si = s(t) and Si+1 = s(t+1) • Each input pulse increments the state by 1; the machine can therefore be viewed as counting the input pulses. • Counters come in many different varieties depending on the number codes used, the modulus p, and the timing mode (synchronous or asynchronous)

  25. State diagram of a modulo-p counter:

  26. Counter specification:

  27. Type of counter (up or down): The simplest counters can be obtained by minor modifications of an ordinary register or a shift register. The next figure shows a modulo-16 binary counter composed of four JK flip-flops. This circuit counts the pulses on the count enable line. Note that the output of each flip-flop may alter the state of its right neighbour, so that the "carry" signal ripple through the counter from left to right. This type of counter is therefore called ripple counter (asynchronous) counter.

  28. Figure: A modulo-16 ripple counter: (a) logic diagram; (b) symbol.

  29. A counter is basically a serial-input parallel-output device. As in the case of shift registers, it can be useful to have a parallel load capability. Another refinement that is occasionally useful is to permit the counter to be decremented as well as incremented (Up-Down counter). Counters are also available whose modulus can be altered by means of modulus-select control lines; such counters are frequently termed programmable.

  30. The specification of a binary counter with parallel in puts is given as follows:

  31. An illustration of a modulo-16 binary counter of this type is given in the figure below. A modulo-16 binary counter with parallel input.

  32. 74x163 MSI 4-bit counter A parallel-load up/down counter

  33. Counter operation • Free-running 16 • Count if ENP andENT both asserted. • Load if LD is asserted(overrides counting). • Clear if CLR is asserted (overrides loading and counting). • All operations take place on rising CLK edge. • RCO is asserted if ENT is asserted andCount = 15.

  34. Free-running 4-bit ’163 counter • “divide-by-16” counter

  35. Modified counting sequence • Load 0101 (5) after Count = 15 • 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 5, 6, … • “divide-by-11” counter

  36. trick to save gate inputs Another way • Clear after Count = 1010 (10) • 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0, 1, 2, 3, … • “modulo-11” or “divide-by-11” counter

  37. Counting from 3 to 12

  38. Cascading counters • RCO (ripple carry out) is asserted in state 15, if ENT is asserted.

  39. Decoding binary-counter states

More Related