1 / 26

8254 SOFTWARE PROGRAMMABLE TIMER/COUNTER

8254 SOFTWARE PROGRAMMABLE TIMER/COUNTER. Difference between 8253 and 8254. Read back command This command allows the user to check the count value , programmed Mode, and current states of the OUT pin. Each of the three counter has 3 pins associated CLK: input clock frequency- 8 MHz

silas
Download Presentation

8254 SOFTWARE PROGRAMMABLE TIMER/COUNTER

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. 8254 SOFTWARE PROGRAMMABLE TIMER/COUNTER

  2. Difference between 8253 and 8254

  3. Read back command • This command allows the user to check the count value, programmed Mode, and current states of the OUT pin

  4. Each of the three counter has 3 pins associated • CLK: input clock frequency- 8 MHz • OUT • GATE: Enable (high) or disable (low) the counter

  5. The 8254 solves one of most common problem in any microcomputer system the generation of accurate time delays under software control. • Instead of setting up timing loops in system software, the programmer configures the 8254 to match his requirements, initializes one of the counters of the 8254 with the desired quantity, then upon command the 8254 will count out the delay and interrupt the CPU when it has completed its tasks. • It is easy to see that the software overhead is minimum and variable length delays can be easily accommodated.

  6. 8254 has 3 counters that can operate independently. • To operate a counter a count has to be loaded in its register and on command it decrements the count and when the count reaches zero a pulse is sent the 8086 (CPU) i.e, an interrupt can be sent to 8086 saying that count has reached zero. • It can be either a BCD or a Binary counter. • It can be programmed to work in different modes.

  7. Each of the three counters must be programmed separately • Control byte must be first written into the control register. The 8254 must be initialized before use • The programmer can not only write the value of the count into the 8254, but read the content of the counter at any given time as well • All counters are down counters

  8. Initializing an 8254 programmable peripheral device Steps:- • Determine the system base address for the device. • Determine the internal addresses for each of the control registers, ports, timers, status registers, etc .,

  9. Add each of the internal addresses to the system base address to determine the system address of each of the parts of the device.

  10. control word

  11. 8254 counter modes and applications

  12. Note The following conventions apply to all mode timing diagrams: 1. Counters are programmed for binary (not BCD) counting and for reading/writing least significant byte (LSB) only. 2. The counter is always selected (CS always low). 3. CW stands for ``Control Word''; CW = 10 means a control word of 10 HEX is written to the counter. 4. LSB stands for ``Least Significant Byte'' of count. 5. Numbers below diagrams are count values. The lower number is the least significant byte. The upper number is the most significant byte. Since the counter is programmed to read/write LSB only, the most significant byte cannot be read. • N stands for an undefined count. • Vertical lines show transitions between count values.

  13. Mode 0-Interrupt on terminal count

  14. Mode 0-example

  15. Mode 1- Hardware-Retriggerable one-shot

  16. Mode 1: example

  17. Mode 2- Timed interrupt generator

  18. Mode 2- examples

  19. Mode3-square-wave mode

  20. Mode 3- examples

  21. Mode 4- Software-Triggered strobe

  22. Mode 4- Examples

  23. Mode 5- hardware-Triggered strobe

  24. Mode 5- Examples

More Related