Intel 8XC196K Series User Manual page 133

Table of Contents

Advertisement

8XC196K x , J x , CA USER'S MANUAL
PTSCB0 for EPA0
Unused
Unused
PTSCONST1 (HI) = T2 (HI)
PTSCONST1 (LO) = T2 (LO)
PTSPTR1 (HI) = 1FH (EPA0_TIME, HI)
PTSPTR1 (LO) = 62H (EPA0_TIME, LO)
PTSCON = 40H (Mode = 010, TMOD = 0)
Unused
4.
Set up EPA0 and EPA1:
— Load EPA0_CON with 68H (timer 1, compare mode, set output pin, re-enable).
— Load EPA1_CON with 158H (timer 1, compare mode, clear output pin, re-enable,
remap enabled).
— Load EPA0_TIME with 0000H (selects time 0 as first event time for EPA0).
— Load EPA1_TIME with the value of T1 (selects time T1 as first event time for EPA1).
— Load timer 1 with FFFFH to ensure that the EPA0 event time (t = 0) is matched first.
— Load T1CONTROL with C2H (enables timer 1, selects up-counting at F
enables the divide-by-four prescaler).
5.
Enable the EPA0 and EPA1 interrupts and select PTS service for them:
— Set INT_MASK.4 and INT_MASK.3.
— Set PTSSEL.4 and PTSSEL.3
6.
Enable the interrupts and the PTS. The EI instruction enables interrupts; the EPTS
instruction enables the PTS.
5-38
Table 5-14. PWM Remap Mode PTSCB
PTSCB1 for EPA1
Unused
Unused
PTSCONST1 (HI) = T2 (HI)
PTSCONST1 (LO) = T2 (LO)
PTSPTR1 (HI) = 1FH (EPA1_TIME, HI)
PTSPTR1 (LO) = 66H (EPA1_TIME, LO)
PTSCON = 40H (Mode = 010, TMOD = 0)
Unused
/4, and
OSC

Advertisement

Table of Contents
loading

Table of Contents