Programmable Timers
10-6
Am186™CC/CH/CU Microcontrollers User’s Manual
TxCMPA value is reached (timer is now comparing against TxCMPB). The RIU bit is 0 when
the TxCMPB value is reached (timer is now comparing against TxCMPA).
10.5.5
Software Polling
Software can poll the MC bit in the T0CON, T1CON, and T2CON registers to monitor timer
status rather than using interrupts. This bit must be cleared by software.
10.5.6
Generating Waveforms
When programmed to use both compare values (ALT bit in TxCON is 1), Timer 0 and Timer
1 can generate waveforms on the associated TMROUT pin. The TxCMPA value determines
the duration of the High phase of the output waveform. The TxCMPB value determines the
duration of the Low phase of the output waveform. For more information, see the timer
examples available on the AMD website at ftp.amd.com.
10.5.7
Pulse Width Demodulation
For many applications, such as bar-code reading, it is necessary to measure the width of
a signal in both its High and Low phases. The Am186CC/CH/CU microcontrollers provide
a pulse width demodulation (PWD) option to fulfill this need. The PWD bit in the System
Configuration (SYSCON) register enables the PWD option. Note that the Am186CC/CH/
CU microcontrollers do not support analog-to-digital conversion.
Figure 10-1 on page 10-1 shows the routing of signals when pulse width demodulation is
either enabled or disabled. The waveform for PWD mode is input on the INT8/PWD pin.
This pin is of type Schmitt trigger in both normal interrupt and PWD modes. Note that this
pin is multiplexed with PIO6 and defaults to the PIO function at external and internal reset.
In PWD mode, software uses Timer 0 and Timer 1 to measure the High and Low pulse
width of the input signal. Interrupt 8 (Channel 13, type 1dh) and interrupt 7 (Channel 12,
type 1ch) notify software of the transitions of the measured input signal.
Timer 0 starts its count on the Low-to-High transition on the PWD input and counts the High
signal duration. Timer 1 starts its count on the High-to-Low transition on the PWD input
and counts the Low signal duration. The Low-to-High transition of the PWD input generates
an interrupt request using Channel 13 (type 1dh). The High-to-Low transition of the PWD
input generates an interrupt request using Channel 12 (type 1ch).
Figure 10-2 shows the behavior of the PWD function for a typical input waveform.
Figure 10-2
Pulse Width Demodulation Example
(1)
(3)
(1)
(3)
(2)
(2)
(4)
(4)
1. A Channel 13 (INT8) interrupt request is generated.
2. Timer 0 counts during the high phase of the input signal.
3. A Channel 12 (INT7) interrupt request is generated.
4. Timer 1 counts during the low phase of the input signal.
Содержание Am186 CC
Страница 1: ...Am186 CC CH CU Microcontrollers User s Manual Order 21914B...
Страница 4: ...iv Am186 CC CH CU Microcontrollers User s Manual...
Страница 18: ...Table of Contents xviii Am186 CC CH CU Microcontrollers User s Manual...
Страница 24: ...Introduction xxiv Am186 CC CH CU Microcontrollers User s Manual...
Страница 39: ...Architectural Overview Am186 CC CH CU Microcontrollers User s Manual 1 15 Figure 1 6 32 Channel Linecard CH CC...
Страница 40: ...Architectural Overview 1 16 Am186 CC CH CU Microcontrollers User s Manual...
Страница 86: ...System Overview 3 36 Am186 CC CH CU Microcontrollers User s Manual...
Страница 92: ...Emulator Support 4 6 Am186 CC CH CU Microcontrollers User s Manual...
Страница 112: ...DRAM Controller 6 8 Am186 CC CH CU Microcontrollers User s Manual...
Страница 134: ...Interrupts 7 22 Am186 CC CH CU Microcontrollers User s Manual...
Страница 186: ...Programmable I O Signals 9 8 Am186 CC CH CU Microcontrollers User s Manual...
Страница 200: ...Watchdog Timer 11 6 Am186 CC CH CU Microcontrollers User s Manual...
Страница 232: ...Asynchronous Serial Ports UARTs 13 24 Am186 CC CH CU Microcontrollers User s Manual...
Страница 242: ...Synchronous Serial Port SSI 14 10 Am186 CC CH CU Microcontrollers User s Manual...
Страница 264: ...High Level Data Link Control HDLC 15 22 Am186 CC CH CU Microcontrollers User s Manual...
Страница 332: ...Universal Serial Bus USB 18 34 Am186 CC CH CU Microcontrollers User s Manual...
Страница 348: ...Register Summary A 16 Am186 CC CH CU Microcontrollers User s Manual...
Страница 376: ...Index Index 18 Am186 CC CH CU Microcontrollers User s Manual...