8XC196MC, MD, MH USER’S MANUAL

2.5.3Event Processor Array (EPA) and Timer/Counters

The event processor array (EPA) performs high-speed input and output functions associated with its timer/counters. In the input mode, the EPA monitors an input for signal transitions. When an event occurs, the EPA records the timer value associated with it. This is a capture event. In the output mode, the EPA monitors a timer until its value matches that of a stored time value. When a match occurs, the EPA triggers an output event, which can set, clear, or toggle an output pin. This is a compare event. Both capture and compare events can initiate interrupts, which can be serviced by either the interrupt controller or the PTS.

Timer 1 and timer 2 are both 16-bit up/down timer/counters that can be clocked internally or ex- ternally. Each timer/counter is called a timer if it is clocked internally and a counter if it is clocked externally. See Chapter 11, “Event Processor Array (EPA),” for additional information on the EPA and timer/counters.

2.5.4Pulse-width Modulator (PWM)

The output waveform from each PWM channel is a variable duty-cycle pulse. Several types of motors require a PWM waveform for most efficient operation. When filtered, the PWM wave- form produces a DC level that can change in 256 steps by varying the duty cycle. The number of steps per PWM period is also programmable (8 bits). See Chapter 10, “Pulse-width Modulator,” for more information.

2.5.5Frequency Generator

The 8XC196MD has a peripheral not found on other 8XC196Mx microcontrollers — the fre- quency generator. This peripheral produces a waveform with a fixed duty cycle (50%) and a pro- grammable frequency (ranging from 4 kHz to 1 MHz with a 16 MHz input clock). See Chapter 8, “Frequency Generator,” for details.

2.5.6Waveform Generator

A waveform generator simplifies the task of generating synchronized, pulse-width modulated (PWM) outputs. This waveform generator is optimized for motion control applications such as driving 3-phase AC induction motors, 3-phase DC brushless motors, or 4-phase stepping motors. The waveform generator can produce three independent pairs of complementary PWM outputs, which share a common carrier period, dead time, and operating mode. Once it is initialized, the waveform generator operates without CPU intervention unless you need to change a duty cycle. See Chapter 9, “Waveform Generator,” for more information.

2-10

Page 47
Image 47
Intel 8XC196MC, 8XC196MD manual Event Processor Array EPA and Timer/Counters, Pulse-width Modulator PWM, Frequency Generator