Typewriter User Manual
8- 16 MC68340 USER’S MANUAL MOTOROLA
8.3.8 Timer Bypass
In this mode, the counter and prescaler cannot be enabled. However TGATE≈ and
TOUTx can be used for I/O. This mode can be selected by programming the CR MODE
bits to 111.
TGATE≈ can be used as a simple input port when the CR is configured as follows:
CR
1514131211109876543210
SWR IE2 IE1 IE0 TGE PCLK CPE CLK POT2 POT1 POT0 MODE2 MODE1 MODE0 OC1 OC0
TGATE≈ AS A SIMPLE INPUT
XX0XXX1XXXX111XX
X-Don’t care
When
TGATE≈ is asserted, the SR ON bit is set. When TGATE≈ is negated, the ON bit is
cleared. The value of the TGL bit in the SR reflects the level of
TGATE≈. TGATE≈ can
also be used as an input port that generates interrupts on a low-to-high transition of
TGATE≈ when the CR is configured as follows:
CR
1514131211109876543210
SWR IE2 IE1 IE0 TGE
PCLK
CPE CLK POT2 POT1 POT0 MODE2 MODE1 MODE0 OC1 OC0
TGATE≈ AS AN INPUT/INTERRUPT
XX1X1X1XXXX111XX
When TGATE≈ is negated, the SR TG bit is set, and the programmed IRQx signal is
asserted to the CPU32. The TG bit can only be cleared by writing a one to this bit position.
The value of the SR TGL bit reflects the level of
TGATE≈.
Additionally, TOUTx can be used as a simple output port when the CR is configured as
follows:
CR
1514131211109876543210
SWR IE2 IE1 IE0 TGE
PCLK
CPE CLK POT2 POT1 POT0 MODE2 MODE1 MODE0 OC1 OC0
TGATE≈ AS A SIMPLE OUTPUT
0XXXXX1XXXX111OC1OC0
SWR must be a zero to change the value of TOUTx. Changing the value of the CR OCx
bits determines the level of TOUTx as shown in Table 8-1.
Frees
cale Semiconductor,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...