Programming The Epa And Timer/Counters; Configuring The Epa And Timer/Counter Port Pins; Programming The Timers - Intel 8XC196K Series User Manual

Table of Contents

Advertisement

With this method, the resolution of the EPA (Figure 10-8 on page 10-18 and Figure 10-9 on page
10-19) determines the maximum PWM output frequency. (Resolution is the minimum time re-
quired between a capture or compare.) At 16 MHz, a 250 ns resolution results in a maximum
PWM of 4 MHz.

10.5 PROGRAMMING THE EPA AND TIMER/COUNTERS

This section discusses configuring the port pins for the EPA and the timer/counters; describes
how to program the timers, the capture/compare channels, and the compare-only channels; and
explains how to enable the EPA interrupts.

10.5.1 Configuring the EPA and Timer/Counter Port Pins

Before you can use the EPA, you must configure the pins of port 1 and port 6 to serve as the spe-
cial-function signals for the EPA and, optionally, for the timer/counter clock source and direction
control signals. See "Bidirectional Ports 1, 2, 5, and 6" on page 6-4 for information about config-
uring the port pins.
If you use T2CLK as the timer 2 input clock, you cannot use EPA
capture/compare channel 0. If you use T2DIR as the timer 2 direction-control
source, you cannot use EPA capture/compare channel 1.
Table 10-2 on page 10-3 lists the pins associated with the EPA and the timer/counters. Pins that
are not being used for an EPA channel or timer/counter can be configured as standard I/O.

10.5.2 Programming the Timers

The control registers for the timers are T1CONTROL (Figure 10-8) and T2CONTROL (Figure
10-9). Write to these registers to configure the timers. Write to the TIMER1 and TIMER2 regis-
ters to load a specific timer value.
EVENT PROCESSOR ARRAY (EPA)
NOTE
10-17

Advertisement

Table of Contents
loading

Table of Contents