8253 Programmable interval timer General Info. Three independent 16 bit (count DOWN) counters. One control word register (WRITE only) (Each of the above have an individual memory address) Tri-state data buffer. Counter # Address (Hex) -------------------------------- 0 1F8 1 1F9 2 1FA Control Word Reg 1fB Each counter may be run in one of six modes. Mode Number Description ----------------------------------------------- 0 Interrupt on final count. 1 Programmable one-shot. 2 Rate generator. 3 Square wave Rate generator. 4 Software triggered mode. 5 Hardware triggered mode. To program: Send a control word to control word register. Load Counter with count value. --------------------------------- Each counter can be loaded with a minimum count of 1 and a max count of FFFF (hex). A count of 0 is equal to FFFF (hex) + 1. Modes 2 and 3 have a minimum count of 2. If you are loading a two byte # into a counter the LSB will stop the counter, the MSB will start the counter with the new value. To create a control word: ------------------------- A Control word has eight bits. MSB LSB D7 D6 D5 D4 D3 D2 D1 D0 D7 and D6 These select a counter. D7 D6 Counter selected ----------------------------- 0 0 0 0 1 1 1 0 2 D5 and D4 D5 D4 READ / WRITE MODE ------------------------------- 0 0 Counter latch command. 0 1 Read/Write LSB only. 1 0 Read/Write MSB only. 1 1 Read/Write LSB first then MSB. D3,D2 and D1 Select count mode D3 D2 D1 Mode of counting -------------------------------- 0 0 0 0 0 0 1 1 X 1 0 2 X 1 1 3 1 0 0 4 1 0 1 5 (X = Don't care) D0 -------- 0 Binary counter 16 bits 1 BCD (binary coded decimal) (4 decades)
fred1144