8XC196NP, 80C196NU USER’S MANUAL
viii
10.2 EPA AND TIMER/COUNTER SIGNALS AND REGISTERS....................................... 10-2
10.3 TIMER/COUNTER FUNCTIONAL OVERVIEW........................................................... 10-5
10.3.1 Cascade Mode (Timer 2 Only) ................................................................................10-6
10.3.2 Quadrature Clocking Mode .....................................................................................10-6
10.4 EPA CHANNEL FUNCTIONAL OVERVIEW............................................................... 10-8
10.4.1 Operating in Capture Mode .....................................................................................10-9
10.4.1.1 EPA Overruns ..................................................................................................10-11
10.4.1.2 Preventing EPA Overruns ................................................................................10-12
10.4.2 Operating in Compare Mode .................................................................................10-12
10.4.2.1 Generating a Low-speed PWM Output ............................................................10-12
10.4.2.2 Generating a Medium-speed PWM Output .....................................................10-13
10.4.2.3 Generating a High-speed PWM Output ...........................................................10-14
10.4.2.4 Generating the Highest-speed PWM Output ....................................................10-15
10.5 PROGRAMMING THE EPA AND TIMER/COUNTERS............................................. 10-15
10.5.1 Configuring the EPA and Timer/Counter Port Pins ...............................................10-15
10.5.2 Programming the Timers .......................................................................................10-15
10.5.3 Programming the Capture/Compare Channels .....................................................10-18
10.6 ENABLING THE EPA INTERRUPTS ........................................................................ 10-22
10.7 DETERMINING EVENT STATUS.............................................................................. 10-22
10.7.1 Using Software to Service the Multiplexed Overrun Interrupts .............................10-23
10.8 PROGRAMMING EXAMPLES FOR EPA CHANNELS ............................................. 10-24
10.8.1 EPA Compare Event Program ..............................................................................10-24
10.8.2 EPA Capture Event Program ................................................................................10-25
10.8.3 EPA PWM Output Program ..................................................................................10-26
CHAPTER 11
MINIMUM HARDWARE CONSIDERATIONS
11.1 MINIMUM CONNECTIONS......................................................................................... 11-1
11.1.1 Unused Inputs .........................................................................................................11-2
11.1.2 I/O Port Pin Connections ........................................................................................11-2
11.2 APPLYING AND REMOVING POWER ....................................................................... 11-4
11.3 NOISE PROTECTION TIPS........................................................................................ 11-4
11.4 THE ON-CHIP OSCILLATOR CIRCUITRY ................................................................. 11-5
11.5 USING AN EXTERNAL CLOCK SOURCE.................................................................. 11-7
11.6 RESETTING THE DEVICE.......................................................................................... 11-8
11.6.1 Generating an External Reset .................................................................................11-9
11.6.2 Issuing the Reset (RST) Instruction ......................................................................11-11
11.6.3 Issuing an Illegal IDLPD Key Operand .................................................................11-11
CHAPTER 12
SPECIAL OPERATING MODES
12.1 SPECIAL OPERATING MODE SIGNALS AND REGISTERS..................................... 12-1
12.2 REDUCING POWER CONSUMPTION ....................................................................... 12-3