Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
8XC196Kx,8XC196Jx,87C196CA microcontroller family user's manual.1995.pdf
Скачиваний:
57
Добавлен:
23.08.2013
Размер:
3.97 Mб
Скачать

8XC196Kx, Jx, CA USER’S MANUAL

Table 5-2. Interrupt and PTS Control and Status Registers (Continued)

Register

Register

Description

Mnemonic

Name

 

 

 

 

EPA_MASK

EPA

These registers enable/disable the 20 multiplexed EPA interrupts

EPA_MASK1

Interrupt

 

Mask

 

 

 

 

Registers

 

 

 

 

EPA_PEND

EPA

The bits in these registers are set by hardware to indicate that a

EPA_PEND1

Interrupt

multiplexed EPA interrupt is pending.

Pending

 

 

 

 

Registers

 

 

 

 

EPAIPV

EPA

This register contains a number from 00H to 14H corresponding to the

 

Interrupt

highest-priority pending EPAx interrupt source. This value allows

 

Priority

software to branch via the TIJMP instruction to the correct interrupt

 

Vector

service routine when the EPAx interrupt is activated. Reading this

 

 

register clears the pending bit of the associated interrupt source. The

 

 

EPAx pending bit (INT_PEND.7) is cleared when all the pending bits

 

 

for its sources (in EPA_PEND and EPA_PEND1) have been cleared.

 

 

 

INT_MASK

Interrupt

These registers enable/disable each maskable interrupt (that is, each

INT_MASK1

Mask

interrupt except unimplemented opcode, software trap, and NMI.)

Registers

 

 

 

 

 

 

INT_PEND

Interrupt

The bits in this register are set by hardware to indicate that an interrupt

INT_PEND1

Pending

is pending.

Registers

 

 

 

 

 

 

PSW

Program

This register contains one bit that globally enables or disables servicing

 

Status Word

of all maskable interrupts and another that enables or disables the

 

 

PTS. These bits are set or cleared by executing the enable interrupts

 

 

(EI), disable interrupts (DI), enable PTS (EPTS), and disable PTS

 

 

(DPTS) instructions.

 

 

 

PTSSEL

PTS Select

This register selects either a PTS routine or a standard interrupt

 

Register

service routine for each of the maskable interrupt requests.

 

 

 

PTSSRV

PTS

The bits in this register are set by hardware to request an end-of-PTS

 

Service

interrupt.

 

Register

 

 

 

 

5.3INTERRUPT SOURCES AND PRIORITIES

Table 5-3 lists the interrupts sources, their default priorities (30 is highest and 0 is lowest), and their vector addresses. The unimplemented opcode and software trap interrupts are not prioritized; they go directly to the interrupt controller for servicing. The priority encoder determines the priority of all other pending interrupt requests. NMI has the highest priority of all prioritized interrupts, PTS interrupts have the next highest priority, and standard interrupts have the lowest. The priority encoder selects the highest priority pending request and the interrupt controller selects the corresponding vector location in special-purpose memory. This vector contains the starting (base) address of the corresponding PTS control block (PTSCB) or interrupt service routine. PTSCBs must be located in register RAM on a quad-word boundary.

5-4

STANDARD AND PTS INTERRUPTS

Table 5-3. Interrupt Sources, Vectors, and Priorities

 

 

Interrupt Controller

 

PTS Service

 

 

 

 

Service

 

 

 

 

 

 

 

 

 

 

 

 

Interrupt Source

Mnemonic

 

 

 

 

 

 

 

 

Name

Vector

 

Priority

Name

 

Vector

Priority

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Nonmaskable Interrupt

NMI

INT15

203EH

 

30

 

EXTINT Pin

EXTINT

INT14

203CH

 

14

PTS14

 

205CH

29

CAN (CA)†††

CAN

INT13

203AH

 

13

PTS13††

 

205AH

28

Reserved (Kx, Jx)

 

 

 

 

 

 

 

 

 

 

SIO Receive

RI

INT12

2038H

 

12

PTS12

 

2058H

27

SIO Transmit

TI

INT11

2036H

 

11

PTS11

 

2056H

26

SSIO Channel 1 Transfer

SSIO1

INT10

2034H

 

10

PTS10

 

2054H

25

SSIO Channel 0 Transfer

SSIO0

INT09

2032H

 

09

PTS09

 

2052H

24

Slave Port Command Buff Full

CBF

INT08

2030H

 

08

PTS08

 

2050H

23

Unimplemented Opcode

2012H

 

 

Software TRAP Instruction

2010H

 

 

Slave Port Input Buff Full

IBF

INT07

200EH

 

07

PTS07

 

204EH

22

Slave Port Output Buff Empty

OBE

INT06

200CH

 

06

PTS06

 

204CH

21

A/D Conversion Complete

AD_DONE

INT05

200AH

 

05

PTS05

 

204AH

20

EPA Capture/Compare 0

EPA0

INT04

2008H

 

04

PTS04

 

2048H

19

EPA Capture/Compare 1

EPA1

INT03

2006H

 

03

PTS03

 

2046H

18

EPA Capture/Compare 2

EPA2

INT02

2004H

 

02

PTS02

 

2044H

17

EPA Capture/Compare 3

EPA3

INT01

2002H

 

01

PTS01

 

2042H

16

EPA Capture/Compare 4–9,

EPAx

INT00

2000H

 

00

PTS00††

 

2040H

15

EPA 0–9 Overrun,

 

 

 

 

 

 

 

 

 

EPA Compare 0–1,

 

 

 

 

 

 

 

 

 

Timer 1 Overflow,

 

 

 

 

 

 

 

 

 

Timer 2 Overflow

 

 

 

 

 

 

 

 

 

††††

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

NOTES:

 

 

 

 

 

 

 

 

 

The NMI pin is not bonded out on the 8XC196Jx. To protect against glitches, create a dummy interrupt service routine that contains a RET instruction.

†† The PTS cannot determine the source of multiplexed interrupts, so do not use it to service these interrupts when more than one multiplexed interrupt is unmasked.

††† All CAN-controller interrupts are multiplexed into the single CAN interrupt input (INT13). The interrupt service routine associated with INT13 must read the CAN interrupt pending register (CAN_INT) to determine the source of the interrupt request

†††† These interrupts are individually prioritized in the EPAIPV register (see Table 10-16 on page 10-30). Read the EPA pending registers (EPA_PEND and EPA_PEND1) to determine which source caused the interrupt.

5-5

Соседние файлы в предмете Электротехника