STANDARD AND PTS INTERRUPTS

The address of the first (lowest) PTSCB byte is stored in the PTS vector table in special-purpose memory (see “Special-purpose Memory” on page 4-3). Figure 5-13 shows the PTSCB for each PTS mode. Unused PTSCB bytes can be used as extra RAM.

NOTE

The PTSCB must be located in the internal register file. The location of the first byte of the PTSCB must be aligned on a quad-word boundary (an address evenly divisible by 8).

Single

Transfer

Unused

Unused

PTSDST(H)

PTSDST (L)

PTSSRC (H)

PTSSRC (L)

PTSCON

PTSVECT PTSCOUNT

8XC196MC and MD only.

Block

Transfer

Unused

PTSBLOCK

PTSDST (H)

PTSDST (L)

PTSSRC (H)

PTSSRC (L)

PTSCON

PTSCOUNT

A/D Scan

Mode

Unused

Unused

PTSPTR2 (H)

PTSPTR2 (L)

PTSPTR1 (H)

PTSPTR1 (L)

PTSCON

PTSCOUNT

SIO #1

PTSVEC1 (H)

PTSVEC1 (L)

BAUD (H)

BAUD (L)

EPAREG (H)

EPAREG (L)

PTSCON

PTSCOUNT

SIO #2

Unused

SAMPTIME

DATA (H)

DATA (L)

PTSCON1

PORTMASK

PORTREG (H)

PORTREG (L)

Figure 5-13. PTS Control Blocks

5.6.1Specifying the PTS Count

The first location of the PTSCB contains an 8-bit value called PTSCOUNT. This value defines the number of interrupts that will be serviced by the PTS routine. The PTS decrements PTSCOUNT after each PTS cycle. When PTSCOUNT reaches zero, hardware clears the corre- sponding PTSSEL bit and sets the PTSSRV bit (Figure 5-6), which requests an end-of-PTS inter- rupt. The end-of-PTS interrupt service routine should reinitialize the PTSCB, if required, and set the appropriate PTSSEL bit to re-enable PTS interrupt service.

5-25

Page 112
Image 112
Intel 8XC196MH, 8XC196MD, 8XC196MC manual Specifying the PTS Count