upc eetac_1

Week 7

Week 8: Counters and registers

Week 9



[14/11]

Guided activities #8

[P7]  Standard sequential circuits: synchronous counters as a FSM with state enumeration (Plan X)

 

- Specifications: Symbol, inputs and outputs, output codes, timing diagram, function table, state diagram

Examine other comercial counters and new features:

- Counters type 74LS169, 74LS163, etc. counting code and features such as control inputs and outputs, reversibility, parallel load, expansion, etc.

- Counters for different binary codes: binary, Gray, one-hot, Johnson, etc.

- Plan: using a FSM enumerating all the states with labels

This is a BCD_Counter_mod100, an example of chaining (rippling) counters in Proteus (plan C2).


[18/11]

Laboratory #8

[P7]  Examples of designing counters

Plan X:  Standard sequential circuits: synchronous counters as a FSM with state enumeration

Plan Y: Standard sequential circuits: synchronous counters as a FSM with STD_LOGIC_VECTOR signals and arithmetic libraries

 

-Plan X. State diagram, FSM architecture: 

--> Drawing of the state register, number of bits depending of the encoding (one-hot, binary sequential, Gray, etc.)

--> CC1, CC2 truth tables and their behavioural (flow chart) description (using labels for current_state and next_state signals).

Run a tutorial on how to build a 1-digit BCD counter using the state enumeration technique.

- Development: VHDL file

- Test bench to determine whether the counter works as expected.

This is an example of a 1-digit BCD counter that you can run in Proteus unzipping all the files in a folder like:

L:\CSD\P6\Counter_BCD_1digit\


-Plan Y. State diagram, FSM architecture,  use of the arithmetic library and STD_LOGIC_VECTOR signals (flat single-file project).

Run the tutorial on the Counter_mod16.

This is a key building block: the multifunctional/universal 16-bit binary counter: reversible, parallel load, rippling signals for count expansion, etc.

A synchronous (CLK) reversible (UD_L) expandable (CE and TC16) 4-bit binary counter type 74ALS169 with parallel (LD, D_in) inputs) to work as well as a data register.

Run the real prototype in a DE0 board from Digilent - Altera.

 


[19/11]

Lecture #8

P7]  Standard sequential circuits: synchronous counters as a hierarchy of components (plan C2).

 Additional standard sequential blocks: data and shift registers (Plan Y)

 

Questionnaire #Q2.1 on P5 -P6.   

Let's develop and test the Counter_mod12 as a tutorial that yourself can follow. Comparison of alternative plans for designing counters.

- The Plan X (flat single-file project) as an enumerated FSM  like the Counter_BCD_1digit or the other examples in P6.

- The Plan Y (flat single-file project) as a FSM using the arithmetic library and STD_LOGIC_VECTOR signals.

- The Plan C2 (hierarchical multiple-file project) using the building block Counter_mod16. Count truncation, counter expandability.


 Other related projects for you to practise: Data register: the key component for saving data. Plan Y, which makes this device identical to the parallel load (LD) feature of the Counter_mod16. Shift register  (type 74LS194). Plan Y, where the parallel input - parallel output is also identical to the data register.

[P7] - [P8] Advanced project demonstration: Designing a digital timer.

Analysis of the Hour_Counter in P7.  Repeat and adapt the plan C2 based on truncating and chaining components Counter_mod16 to obtain a larger counter.

Run the HH:MM:SS example real-time clock available in Proteus and realise how many more counters can be organised in the same way applying the plan Z ideas on counter truncation and hiearchical design.