19
4428E–8051–02/08
AT/TS80C31X2
Table 10-3. IP Register -- IP - Interrupt Priority Register (B8h)
Reset Value = XXX0 0000b
Bit addressable
7 6 5 4 3 2 1 0
- - - PS PT1 PX1 PT0 PX0
Bit
Number
Bit
Mnemonic Description
7 -
Reserved
The value read from this bit is indeterminate. Do not set this bit.
6 -
Reserved
The value read from this bit is indeterminate. Do not set this bit.
5 -
Reserved
The value read from this bit is indeterminate. Do not set this bit.
4 PS
Serial port Priority bit
Refer to PSH for priority level.
3 PT1
Timer 1 overflow interrupt Priority bit
Refer to PT1H for priority level.
2 PX1
External interrupt 1 Priority bit
Refer to PX1H for priority level.
1 PT0
Timer 0 overflow interrupt Priority bit
Refer to PT0H for priority level.
0 PX0
External interrupt 0 Priority bit
Refer to PX0H for priority level.
20
4428E–8051–02/08
AT/TS80C31X2
Table 10-4. IPH Register -- IPH - Interrupt Priority High Register (B7h)
Reset Value = XXX0 0000b
Not bit addressable
7 6 5 4 3 2 1 0
- - - PSH PT1H PX1H PT0H PX0H
Bit
Number
Bit
Mnemonic Description
7 -
Reserved
The value read from this bit is indeterminate. Do not set this bit.
6 -
Reserved
The value read from this bit is indeterminate. Do not set this bit.
5 -
Reserved
The value read from this bit is indeterminate. Do not set this bit.
4 PSH
Serial port Priority High bit
PSH PS Priority Level
0 0 Lowest
0 1
1 0
1 1 Highest
3 PT1H
Timer 1 overflow interrupt Priority High bit
PT1H PT1 Priority Level
0 0 Lowest
0 1
1 0
1 1 Highest
2 PX1H
External interrupt 1 Priority High bit
PX1H PX1 Priority Level
0 0 Lowest
0 1
1 0
1 1 Highest
1 PT0H
Timer 0 overflow interrupt Priority High bit
PT0H PT0 Priority Level
0 0 Lowest
0 1
1 0
1 1 Highest
0 PX0H
External interrupt 0 Priority High bit
PX0H PX0 Priority Level
0 0 Lowest
0 1
1 0
1 1 Highest
21
4428E–8051–02/08
AT/TS80C31X2
11. Idle mode
An instruction that sets PCON.0 causes that to be the last instruction executed before going into
the Idle mode. In the Idle mode, the internal clock signal is gated off to the CPU, but not to the
interrupt, Timer, and Serial Port functions. The CPU status is preserved in its entirely : the Stack
Pointer, Program Counter, Program Status Word, Accumulator and all other registers maintain
their data during Idle. The port pins hold the logical states they had at the time Idle was acti-
vated. ALE and PSEN hold at logic high levels.
There are two ways to terminate the Idle. Activation of any enabled interrupt will cause PCON.0
to be cleared by hardware, terminating the Idle mode. The interrupt will be serviced, and follow-
ing RETI the next instruction to be executed will be the one following the instruction that put the
device into idle.
The flag bits GF0 and GF1 can be used to give and indication if an interrupt occured during nor-
mal operation or during an Idle. For example, an instruction that activates Idle can also set one
or both flag bits. When Idle is terminated by an interrupt, the interrupt service routine can exam-
ine the flag bits.
The over way of terminating the Idle mode is with a hardware reset. Since the clock oscillator is
still running, the hardware reset needs to be held active for only two machine cycles (24 oscilla-
tor periods) to complete the reset.
11.1 Power-Down Mode
To save maximum power, a power-down mode can be invoked by software (Refer to Table 9-4.,
PCON register).
In power-down mode, the oscillator is stopped and the instruction that invoked power-down
mode is the last instruction executed. The internal RAM and SFRs retain their value until the
power-down mode is terminated. V
CC
can be lowered to save further power. Either a hardware
reset or an external interrupt can cause an exit from power-down. To properly terminate power-
down, the reset or external interrupt should not be executed before V
CC
is restored to its normal
operating level and must be held active long enough for the oscillator to restart and stabilize.
Only external interrupts INT0 and INT1 are useful to exit from power-down. For that, interrupt
must be enabled and configured as level or edge sensitive interrupt input.
Holding the pin low restarts the oscillator but bringing the pin high completes the exit as detailed
in Figure 11-1. When both interrupts are enabled, the oscillator restarts as soon as one of the
two inputs is held low and power down exit will be completed when the first input will be
released. In this case the higher priority interrupt service routine is executed.
Once the interrupt is serviced, the next instruction to be executed after RETI will be the one fol-
lowing the instruction that put TS80C31X2 into power-down mode.

AT80C31X2-RLTUM

Mfr. #:
Manufacturer:
Description:
IC MCU 8BIT ROMLESS 44VQFP
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union