Timer Bypass - Motorola MC68340 User Manual

Integrated processor with dma
Hide thumbs Also See for MC68340:
Table of Contents

Advertisement

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
15
14
13
12
SWR
IE2
IE1
IE0
TGATE AS A SIMPLE INPUT
X
X
0
X
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
15
14
13
12
SWR
IE2
IE1
IE0
TGATE AS AN INPUT/INTERRUPT
X
X
1
X
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
15
14
13
12
SWR
IE2
IE1
IE0
TGATE AS A SIMPLE OUTPUT
0
X
X
X
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.
8-16
Freescale Semiconductor, Inc.
11
10
9
8
TGE
PCLK
CPE
CLK
X
X
1
X
11
10
9
8
TGE
CPE
CLK
PCLK
1
X
1
X
11
10
9
8
TGE
CPE
CLK
PCLK
X
X
1
X
MC68340 USER'S MANUAL
For More Information On This Product,
Go to: www.freescale.com
7
6
5
4
POT2
POT1
POT0
MODE2 MODE1 MODE0
X
X
X
1
7
6
5
4
POT2
POT1
POT0
MODE2 MODE1 MODE0
X
X
X
1
7
6
5
4
POT2
POT1
POT0
MODE2 MODE1 MODE0
X
X
X
1
3
2
1
0
OC1
OC0
1
1
X
X
3
2
1
0
OC1
OC0
1
1
X
X
3
2
1
0
OC1
OC0
1
1
OC1
OC0
MOTOROLA

Advertisement

Table of Contents
loading

Table of Contents