
A8351601 Series
(July, 2002, Version 1.0)
9
AMIC Technology, Inc.
IP:
Interrupt Priority Register.
Bit Addressable.
7
-
6
-
5
4
PS
3
2
1
0
PT2
PT1
PX1
PT0
PX0
Register Description:
-
-
PT2
PS
PT1
PX1
PT0
PX0
IP.7
IP.6
IP.5
IP.4
IP.3
IP.2
IP.1
IP.0
Not implemented, reserve for future use
(3)
Not implemented, reserve for future use
(3)
Defines Timer 2 interrupt priority level
Defines Serial Port interrupt priority level
Defines Timer 1 interrupt priority level
Defines External Interrupt 1 priority level
Defines Timer 0 interrupt priority level
Defines External Interrupt 0 priority level
Notes:
1. In order to assign higher priority to an interrupt the corresponding bit in the IP register must be set to 1. While an
interrupt service is in progress, it cannot be interrupted by a lower or same level interrupt.
2. Priority within level is only to resolve simultaneous requests of the same priority level. From high to low, interrupt sources
are listed below:
IE0 > TF0 > IE1 > TF1 > RI or TI > TF2 or EXF2
3. User software should not write 1s to reserved bits. These bits may be used in future products to invoke new features.
TCON:
Timer/Counter Control Register. Bit Addressable.
7
6
5
4
3
2
1
0
TF1
TR1
TF0
TR0
IE1
IT1
IE0
IT0
Register Description:
TF1
IP.7
Timer 1 overflow flag. Set by hardware when the Timer/Counter 1 overflows.
Cleared by hardware as processor vectors to the interrupt service routine.
Timer 1 run control bit. Set/Cleared by software to turn Timer/Counter 1 ON/OFF.
Timer 0 overflow flag. Set by hardware when the Timer/Counter 0 overflows.
Cleared by hardware as processor vectors to the interrupt service routine.
Timer 0 run control bit. Set/Cleared by software to turn Timer/Counter 0 ON/OFF.
External Interrupt 1 edge flag. Set by hardware when the External Interrupt edge is
detected. Cleared by hardware when interrupt is processed.
Interrupt 1 type control bit. Set/Cleared by software specify falling edge/low level triggered
External Interrupt.
External Interrupt 0 edge flag. Set by hardware when the External Interrupt edge is
detected. Cleared by hardware when interrupt is processed.
Interrupt 0 type control bit. Set/Cleared by software specify falling edge/low level triggered
External Interrupt.
TR1
TF0
IP.6
IP.5
TR0
IE1
IP.4
IP.3
IT1
IP.2
IE0
IP.1
IT0
IP.0
TMOD:
Timer/Counter Mode Control Register. Not Bit Addressable.
Timer 1
Timer 0
GATE
C/
T
M1
M0
GATE
C/
T
M1
M0
GATE
When TRx (in TCON) is set and GATE=1, TIMER/COUNTERx will run only while INTx pin is high (hardware
control). When GATE=0, TIMER/COUNTERx will run only while TRx=1 (software control).
Timer or Counter selector. Cleared for Timer operation (input from internal system clock). Set for Counter
operation (input from Tx input pin).
Mode selector bit.
(1)
Mode selector bit.
(1)
C/
T
M1
M0