6 Data Bus Buffer: Control Logic: This block contains the logic to buffer the data bus to the microprocessor and to the internal registers. It has 8 input pins, usually labelled as D7..D0, where D7 is the MSB.Control Logic:The control section has five signals: Read, Write, Chip select and the address lines A0 and A1.In peripheral I/O mode read and write signals are connected to IOR and IOW while in memory mapped these are connected to MEMR and MEMW.
7 Control word Register: The control word register and counters are selected according to signals on lines A0 and A1 as shown below:CS A1 A0 SelectCounter 0Counter 1Counter 2Control Reg.Control word Register:This register is accessed when lines A0 and A1 are at logic 1.It is used to write command word which specifies the counter to be used, its mode and either read or write format.
10 Mode 0: Interrupt on Terminal Count The output will start off zero. The count is loaded and the timer will start to count down.When the count has reached zero the output will be set high, and remain high until the next count has been reloaded.This can be used as an interrupt.Mode 1: Programmable One-ShotThe output will go low following the rising edge of the gate input.The counter will count and the output will go high once the counter has reached zero.
11 Mode 2: Rate GeneratorThis mode is used to generate a pulse equal to the clock period at a given interval.When count is loaded the OUT stays high until the count reaches 1 and the the OUT goes low for one clock period.The count is reloaded automatically and the pulse is generated continuously.Mode 3: Square Wave GeneratorThis mode is similar to mode 2. However, the duration of the high and low clock pulses of the output will be different from mode 2.
12 Mode 4: Software Triggered Pulse. Suppose n is the number loaded into the counter (the COUNT message), the output will be:high for n/2 counts, and low for n/2 counts, if n is even.high for (n+1)/2 counts, and low (n-1)/2 for counts, if n is oddMode 4: Software Triggered Pulse.The output will remain high until the timer has counted to zero, at which point the output will pulse low and then go high again.
13 Mode 5: Hardware Triggered Pulse The counter will start counting once the gate input goes high, when the counter reaches zero the output will pulse low and then go high again.
Your consent to our cookies if you continue to use this website.