![Intel 80C196NU Скачать руководство пользователя страница 210](http://html1.mh-extra.com/html/intel/80c196nu/80c196nu_user-manual_2072209210.webp)
10-13
EVENT PROCESSOR ARRAY (EPA)
The maximum output frequency depends upon the total interrupt latency and the interrupt-service
execution times used by your system. As additional EPA channels and the other functions of the
microcontroller are used, the maximum PWM frequency decreases because the total interrupt la-
tency and interrupt-service execution time increases. To determine the maximum, low-speed
PWM frequency in your system, calculate your system's worst-case interrupt latency and worst-
case interrupt-service execution time, and then add them together. The worst-case interrupt la-
tency is the total latency of all the interrupts (both normal and PTS) used in your system. The
worst-case interrupt-service execution time is the total execution time of all interrupt service rou-
tines and PTS routines.
Assume a system with a single EPA channel, a single enabled interrupt, and the following inter-
rupt service routine.
;If EPA0-3 interrupt is generated
EPA0-3_ISR:
PUSHA
LD EPA
x
_CON, #toggle_command
ADD EPA
x
_TIME, TIMER
x
, [next_duty_ptr]; Load next event time
POPA
RET
The worst-case interrupt latency for a single-interrupt system is 56 state times for external stack
usage and 54 state times for internal stack usage (see “Standard Interrupt Latency” on page 6-8).
To determine the execution time for an interrupt service routine, add up the execution time of the
instructions (Table A-9).
The total execution time for the ISR that services interrupts EPA3:0 is 79 state times for external
stack usage or 71 state times for internal stack usage. Therefore, a single capture/compare channel
0–3 can be updated every 125 state times assuming internal stack usage (54 + 71). Each PWM
period requires two updates (one setting and one clearing), so the execution time for a PWM pe-
riod equals 250 state times. When the input frequency on XTAL1 is 25 MHz and the phase-locked
loop is disabled on the 80C196NU, the PWM period is 20 µs and the maximum PWM frequency
is 50 kHz.
10.4.2.2
Generating a Medium-speed PWM Output
You can generate a medium-speed, pulse-width modulated output with a single EPA channel and
the PTS set up in PWM toggle mode. “PWM Toggle Mode Example” on page 6-27 describes how
to configure the EPA and PTS. Once started, this method requires no CPU intervention unless you
need to change the output frequency. The method uses a single timer/counter. The timer/counter
is not interrupted during this process, so other EPA channels can also use it if they do not reset it.
Содержание 80C196NU
Страница 1: ...8XC196NP 80C196NU Microcontroller User s Manual...
Страница 2: ...8XC196NP 80C196NU Microcontroller User s Manual August 1995 Order Number 272479 002...
Страница 18: ...1 Guide to This Manual...
Страница 19: ......
Страница 31: ......
Страница 32: ...2 Architectural Overview...
Страница 33: ......
Страница 48: ...3 Advanced Math Features...
Страница 49: ......
Страница 56: ...4 Programming Considerations...
Страница 57: ......
Страница 72: ...5 Memory Partitions...
Страница 73: ......
Страница 106: ...6 Standard and PTS Interrupts...
Страница 107: ......
Страница 144: ...7 I O Ports...
Страница 145: ......
Страница 165: ......
Страница 166: ...8 Serial I O SIO Port...
Страница 167: ......
Страница 183: ......
Страница 184: ...9 Pulse width Modulator...
Страница 185: ......
Страница 196: ...10 Event Processor Array EPA...
Страница 197: ......
Страница 225: ......
Страница 226: ...11 Minimum Hardware Considerations...
Страница 227: ......
Страница 239: ......
Страница 240: ...12 Special Operating Modes...
Страница 241: ......
Страница 255: ......
Страница 256: ...13 Interfacing with External Memory...
Страница 257: ......
Страница 303: ......
Страница 304: ...A Instruction Set Reference...
Страница 305: ......
Страница 373: ......
Страница 374: ...B Signal Descriptions...
Страница 375: ......
Страница 390: ...C Registers...
Страница 391: ......
Страница 447: ......
Страница 448: ...Glossary...
Страница 449: ......
Страница 458: ...Index...
Страница 459: ......