
- •1. Description
- •2. Features
- •3. Block Diagram
- •4. SFR Mapping
- •5. Pin Configuration
- •6. TS80C52X2 Enhanced Features
- •6.1 X2 Feature
- •6.1.1 Description
- •6.2 Dual Data Pointer Register Ddptr
- •6.3 Timer 2
- •6.3.1 Auto-Reload Mode
- •6.3.2 Programmable Clock-Output
- •6.4 TS80C52X2 Serial I/O Port
- •6.4.1 Framing Error Detection
- •6.4.2 Automatic Address Recognition
- •6.4.3 Given Address
- •6.4.4 Broadcast Address
- •6.4.5 Reset Addresses
- •6.5 Interrupt System
- •6.6 Idle mode
- •6.7 Power-Down Mode
- •6.8 ONCETM Mode (ON Chip Emulation)
- •6.9 Power-Off Flag
- •6.10 Reduced EMI Mode
- •7.1 ROM Structure
- •7.2 ROM Lock System
- •7.2.1 Encryption Array
- •7.2.2 Program Lock Bits
- •7.2.3 Signature bytes
- •7.2.4 Verify Algorithm
- •8.1 EPROM Structure
- •8.2 EPROM Lock System
- •8.2.1 Encryption Array
- •8.2.2 Program Lock Bits
- •8.2.3 Signature bytes
- •8.3 EPROM Programming
- •8.3.1 Set-up modes
- •8.3.2 Definition of terms
- •8.3.3 Programming Algorithm
- •8.3.4 Verify algorithm
- •8.4 EPROM Erasure (Windowed Packages Only)
- •8.4.1 Erasure Characteristics
- •9. Signature Bytes
- •10. Electrical Characteristics
- •10.1 Absolute Maximum Ratings (1)
- •10.2 Power consumption measurement
- •10.3 DC Parameters for Standard Voltage
- •10.4 DC Parameters for Low Voltage
- •10.5 AC Parameters
- •10.5.1 Explanation of the AC Symbols
- •10.5.2 External Program Memory Characteristics
- •10.5.3 External Program Memory Read Cycle
- •10.5.4 External Data Memory Characteristics
- •10.5.5 External Data Memory Write Cycle
- •10.5.6 External Data Memory Read Cycle
- •10.5.7 Serial Port Timing - Shift Register Mode
- •10.5.8 Shift Register Timing Waveforms
- •10.5.9 EPROM Programming and Verification Characteristics
- •10.5.10 EPROM Programming and Verification Waveforms
- •10.5.11 External Clock Drive Characteristics (XTAL1)
- •10.5.12 External Clock Drive Waveforms
- •10.5.13 AC Testing Input/Output Waveforms
- •10.5.14 Float Waveforms
- •10.5.15 Clock Waveforms
- •11. Ordering Information

TS80C32X2
TS87C52X2
TS80C52X2
6.5 Interrupt System
The TS80C52X2 has a total of 6 interrupt vectors: two external interrupts (INT0 and INT1), three timer interrupts (timers 0, 1 and 2) and the serial port interrupt. These interrupts are shown in Figure 9.
IPH, IP |
High priority |
|
interrupt |
||
|
INT0 |
3 |
IE0 |
|
|
0 |
TF0 |
3 |
|
|
|
0 |
INT1 |
3 |
IE1 |
|
|
0 |
TF1 |
3 |
|
|
|
0 |
RI |
3 |
TI |
0 |
|
|
TF2 |
3 |
|
|
EXF2 |
0 |
|
Interrupt polling
sequence, decreasing from high to low priority
Individual Enable |
Global Disable |
Low priority |
|
interrupt |
|||
|
|
||
|
|
|
|
|
|
|
Figure 9. Interrupt Control System
Each of the interrupt sources can be individually enabled or disabled by setting or clearing a bit in the Interrupt Enable register (See Table 11.). This register also contains a global disable bit, which must be cleared to disable all interrupts at once.
Each interrupt source can also be individually programmed to one out of four priority levels by setting or clearing a bit in the Interrupt Priority register (See Table 12.) and in the Interrupt Priority High register (See Table 13.). shows the bit values and priority levels associated with each combination.
24 |
Rev.D - 16 November, 2000 |

|
|
|
|
|
TS80C32X2 |
|
|
|
|
|
TS87C52X2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TS80C52X2 |
|
|
|
|
Table 10. Priority Level Bit Values |
|
|
|
|
|
|
|
|
|
|
IPH.x |
IP.x |
Interrupt Level Priority |
|
|
|
|||
0 |
0 |
0 (Lowest) |
|||
|
|
|
|||
0 |
1 |
1 |
|||
|
|
|
|||
1 |
0 |
2 |
|||
|
|
|
|||
1 |
1 |
3 (Highest) |
|||
|
|
|
|
|
|
A low-priority interrupt can be interrupted by a high priority interrupt, but not by another low-priority interrupt. A high-priority interrupt can’t be interrupted by any other interrupt source.
If two interrupt requests of different priority levels are received simultaneously, the request of higher priority level is serviced. If interrupt requests of the same priority level are received simultaneously, an internal polling sequence determines which request is serviced. Thus within each priority level there is a second priority structure determined by the polling sequence.
Table 11. IE Register
IE - Interrupt Enable Register (A8h)
7 |
6 |
5 |
|
4 |
|
3 |
|
2 |
1 |
0 |
||
|
|
|
|
|
|
|
|
|
|
|
|
|
EA |
|
- |
|
ET2 |
|
ES |
|
ET1 |
|
EX1 |
ET0 |
EX0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Bit |
|
Bit |
|
|
|
|
|
Description |
|
|
|
|
Number |
Mnemonic |
|
|
|
|
|
|
|
|
|||
|
|
|
|
|
|
|
|
|
|
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Enable All interrupt bit |
|
|
|
|
|
|
|
||
|
|
|
|
Clear to disable all interrupts. |
|
|
|
|
|
|||
7 |
|
EA |
|
Set to enable all interrupts. |
|
|
|
|
|
|||
|
|
|
|
If EA=1, each interrupt source is individually enabled or disabled by setting or clearing its own interrupt |
||||||||
|
|
|
enable bit. |
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
- |
Reserved |
|
|
|
|
|
|
|
|||
|
The value read from this bit is indeterminate. Do not set this bit. |
|
|
|||||||||
|
|
|
|
|
|
|||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Timer 2 overflow interrupt Enable bit |
|
|
|
|
|
||||
5 |
|
ET2 |
|
Clear to disable timer 2 overflow interrupt. |
|
|
|
|||||
|
|
|
|
Set to enable timer 2 overflow interrupt. |
|
|
|
|
|
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Serial port Enable bit |
|
|
|
|
|
|
|
||
4 |
|
ES |
|
Clear to disable serial port interrupt. |
|
|
|
|
|
|||
|
|
|
|
Set to enable serial port interrupt. |
|
|
|
|
|
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Timer 1 overflow interrupt Enable bit |
|
|
|
|
|
||||
3 |
|
ET1 |
|
Clear to disable timer 1 overflow interrupt. |
|
|
|
|||||
|
|
|
|
Set to enable timer 1 overflow interrupt. |
|
|
|
|
|
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
External interrupt 1 Enable bit |
|
|
|
|
|
||||
2 |
|
EX1 |
|
Clear to disable external interrupt 1. |
|
|
|
|
|
|||
|
|
|
|
Set to enable external interrupt 1. |
|
|
|
|
|
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Timer 0 overflow interrupt Enable bit |
|
|
|
|
|
||||
1 |
|
ET0 |
|
Clear to disable timer 0 overflow interrupt. |
|
|
|
|||||
|
|
|
|
Set to enable timer 0 overflow interrupt. |
|
|
|
|
|
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
External interrupt 0 Enable bit |
|
|
|
|
|
||||
0 |
|
EX0 |
|
Clear to disable external interrupt 0. |
|
|
|
|
|
|||
|
|
|
|
Set to enable external interrupt 0. |
|
|
|
|
|
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
Reset Value = 0X00 0000b
Bit addressable
Rev.D - 16 November, 2000 |
25 |

TS80C32X2
TS87C52X2
TS80C52X2
Table 12. IP Register
IP - Interrupt Priority Register (B8h)
7 |
6 |
5 |
|
4 |
|
3 |
|
2 |
1 |
0 |
||
|
|
|
|
|
|
|
|
|
|
|
|
|
- |
|
- |
|
PT2 |
|
PS |
|
PT1 |
|
PX1 |
PT0 |
PX0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Bit |
|
Bit |
|
|
|
|
|
Description |
|
|
|
|
Number |
Mnemonic |
|
|
|
|
|
|
|
|
|||
|
|
|
|
|
|
|
|
|
|
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
|
PT2 |
Timer 2 overflow interrupt Priority bit |
|
|
|
|
|
||||
|
|
Refer to PT2H for priority level. |
|
|
|
|
|
|||||
|
|
|
|
|
|
|
|
|
||||
|
|
|
|
|
|
|
|
|
|
|
|
|
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. |
|
|
|
|
|
|||||
|
|
|
|
|
|
|
|
|
||||
|
|
|
|
|
|
|
|
|
|
|
|
|
Reset Value = XX00 0000b
Bit addressable
26 |
Rev.D - 16 November, 2000 |

TS80C32X2
TS87C52X2
TS80C52X2
Table 13. IPH Register
IPH - Interrupt Priority High Register (B7h)
7 |
6 |
5 |
4 |
|
3 |
|
2 |
1 |
0 |
||
|
|
|
|
|
|
|
|
|
|
|
|
- |
|
- |
|
PT2H |
PSH |
|
PT1H |
|
PX1H |
PT0H |
PX0H |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Bit |
|
Bit |
|
|
|
|
Description |
|
|
|
|
Number |
Mnemonic |
|
|
|
|
|
|
|
|||
|
|
|
|
|
|
|
|
|
|||
|
|
|
|
|
|
|
|
|
|
|
|
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. |
|
|
||||||||
|
|
|
|
|
|
||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Timer 2 overflow interrupt Priority High bit |
|
|
|
|||||
|
|
|
|
PT2H |
PT2 |
Priority Level |
|
|
|
||
5 |
|
PT2H |
0 |
0 |
|
Lowest |
|
|
|
||
|
0 |
1 |
|
|
|
|
|
|
|||
|
|
|
|
|
|
|
|
|
|||
|
|
|
1 |
0 |
|
|
|
|
|
|
|
|
|
|
1 |
1 |
|
Highest |
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Serial port Priority High bit |
|
|
|
|
|
|||
|
|
|
|
PSH |
PS |
Priority Level |
|
|
|
||
4 |
|
PSH |
0 |
0 |
|
Lowest |
|
|
|
||
|
0 |
1 |
|
|
|
|
|
|
|||
|
|
|
|
|
|
|
|
|
|||
|
|
|
1 |
0 |
|
|
|
|
|
|
|
|
|
|
1 |
1 |
|
Highest |
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Timer 1 overflow interrupt Priority High bit |
|
|
|
|||||
|
|
|
|
PT1H |
PT1 |
Priority Level |
|
|
|
||
3 |
|
PT1H |
0 |
0 |
|
Lowest |
|
|
|
||
|
0 |
1 |
|
|
|
|
|
|
|||
|
|
|
|
|
|
|
|
|
|||
|
|
|
1 |
0 |
|
|
|
|
|
|
|
|
|
|
1 |
1 |
|
Highest |
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
External interrupt 1 Priority High bit |
|
|
|
|
|
|||
|
|
|
|
PX1H |
PX1 |
Priority Level |
|
|
|
||
2 |
|
PX1H |
0 |
0 |
|
Lowest |
|
|
|
||
|
0 |
1 |
|
|
|
|
|
|
|||
|
|
|
|
|
|
|
|
|
|||
|
|
|
1 |
0 |
|
|
|
|
|
|
|
|
|
|
1 |
1 |
|
Highest |
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Timer 0 overflow interrupt Priority High bit |
|
|
|
|||||
|
|
|
|
PT0H |
PT0 |
Priority Level |
|
|
|
||
1 |
|
PT0H |
0 |
0 |
|
Lowest |
|
|
|
||
|
0 |
1 |
|
|
|
|
|
|
|||
|
|
|
|
|
|
|
|
|
|||
|
|
|
1 |
0 |
|
|
|
|
|
|
|
|
|
|
1 |
1 |
|
Highest |
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
External interrupt 0 Priority High bit |
|
|
|
|
|
|||
|
|
|
|
PX0H |
PX0 |
Priority Level |
|
|
|
||
0 |
|
PX0H |
0 |
0 |
|
Lowest |
|
|
|
||
|
0 |
1 |
|
|
|
|
|
|
|||
|
|
|
|
|
|
|
|
|
|||
|
|
|
1 |
0 |
|
|
|
|
|
|
|
|
|
|
1 |
1 |
|
Highest |
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
Reset Value = XX00 0000b
Not bit addressable
Rev.D - 16 November, 2000 |
27 |