Intel 80C188XL, 80C186XL 9.3.2Synchronization and Maximum Frequency, 9.3.3Real-TimeClock

Models: 80C186XL 80C188XL

1 405
Download 405 pages 42.62 Kb
Page 246
Image 246
9.3.2Synchronization and Maximum Frequency

TIMER/COUNTER UNIT

9.3.2Synchronization and Maximum Frequency

All timer inputs are latched and synchronized with the CPU clock. Because of the internal logic required to synchronize the external signals, and the multiplexing of the counter element, the Timer/Counter Unit can operate only up to ¼ of the CLKOUT frequency. Clocking at greater fre- quencies will result in missed clocks.

9.3.2.1Timer/Counter Unit Application Examples

The following examples are possible applications of the Timer/Counter Unit. They include a real- time clock, a square wave generator and a digital one-shot.

9.3.3Real-Time Clock

Example 9-1 contains sample code to configure Timer 2 to generate an interrupt request every 10 milliseconds. The CPU then increments memory-based clock variables.

9.3.4Square-Wave Generator

Asquare-wave generator can be useful to act as a system clock tick. Example 9-2 illustrates how to configure Timer 1 to operate this way.

9.3.5Digital One-Shot

Example 9-3 configures Timer 1 to act as a digital one-shot.

9-17

Page 246
Image 246
Intel 80C188XL, 80C186XL 9.3.2Synchronization and Maximum Frequency, 9.3.3Real-TimeClock, 9.3.4Square-WaveGenerator