
8XC196MD
Table 3. Interrupt Sources, Vectors and Priorities
Interrupt Service
PTS Service
Interrupt Source
Symbol
Name
Vector
Priority
Name
Vector
Priority
Capture/Compare5
CAPCOMP5
INT12
2038H
12
PTS12
2058H
27
Compare4
COMP4
INT11
2036H
11
PTS11
2056H
26
Capture/Compare4
CAPCOMP4
INT10
2034H
10
PTS10
2054H
25
Interrupt and PTS Vectors
The 8XC196MD has three new interrupt and PTS
vectors which are Capture/Compare5, Compare 4,
and Capture/Compare4. Table 3 shows these inter-
rupt vectors and priorities. These are shown as re-
served vectors in the 8XC196MC User’s Manual.
Frequency Generator
The Frequency Generator (FG) Peripheral which
was not available on the 8XC196MC device, is avail-
able on the 8XC196MD device. The FG outputs a
programmable-frequency 50% duty cycle waveform
on the FREQOUT pin (P7.7). There are two 8-bit reg-
isters which control the FG peripheral:
D Frequency Generator Control Register
(FGDCON) at 1FB8h
D Frequency Generator Period Count Register
(FGDCOUNT) at 1FBAh.
The FGDCON can be read or written. This register
is loaded with a value which determines the number
of counts necessary for toggling the output. The fol-
lowing equation should be used to calculate the
FGDCON value:
FGDCON value
e
F
XTAL
16
*
(FG Frequency)
b
1
where FG Frequency is from 4 kHz to 1 MHz.
The FGDCOUNT is loaded with the FGDCON reg-
ister value. The FGDCOUNT register is decrement-
ed every eighth state time. When it reaches 00h, the
FGDCOUNT register will send a signal to toggle the
output pin and reload the FGDCOUNT register with
the
value
in
the
FGDCON
FGDCOUNT can only be read, not written.
register.
The
The FREQOUT pin (P7.7) must be configured for a
special function to use it for the Frequency Genera-
tor feature.
Port 7
Port 7 is an additional bidirectional port that was not
available on the 8XC196MC device. Port 7 can be
used as I/O or some of the pins have special func-
tions. The pins are listed below followed by their
special functions.
Table 4. Port 7 Special Function Pins
Pin
Special Function
P7.0
CAPCOMP4
P7.1
CAPCOMP5
P7.2
CAPCOMP4
P7.3
CAPCOMP5
P7.4
P7.5
P7.6
P7.7
FREQOUT
The special functions of the pins are selected in the
Port 7 SFRs. The Port 2 I/O Port section of the
8XC196MC User’s Manual can be referenced when
setting up the Port 7 SFRs. Port 7 SFRs are located
in the following locations:
Table 5. Port 7 Special Function Registers
SFR
Address
P7DMODE
P7DDIR
P7DREG
P7DPIN
1FD1h
1FD3h
1FD5h
1FD7h
5