![Intel 8XC196NT Скачать руководство пользователя страница 266](http://html1.mh-extra.com/html/intel/8xc196nt/8xc196nt_user-manual_2072210266.webp)
10-33
EVENT PROCESSOR ARRAY (EPA)
10.9 PROGRAMMING EXAMPLES FOR EPA CHANNELS
The three programming examples provided in this section demonstrate the use of the EPA channel
for a compare event, for a capture event, and for generation of a PWM signal. The programs dem-
onstrate the detection of events by a polling scheme, by interrupts, and by the PTS. All three ex-
amples were created using ApBUILDER, an interactive application program available through
Intel Literature Fulfillment or the Intel Applications Bulletin Board system (BBS). See Chapter
1, “Guide to This Manual,” for information about ordering information from Intel Literature and
downloading files from the BBS. These sample program were written in the C programming lan-
guage. ASM versions are also available from ApBUILDER.
NOTE
The initialization file (80c196kr.h) used in these examples is available from
the Intel Applications BBS.
10.9.1 EPA Compare Event Program
This example C program demonstrates an EPA compare event. It sets up EPA channel 0 to toggle
its output pin whenever timer 1 is zero. This program uses no interrupts; a polling scheme detects
the EPA event. The program initializes EPA channel 0 for a compare event.
#pragma model(EX)
#include <80c196kr.h>
#define COMPARE 0x40
#define RE_ENABLE 0x08
#define TOGGLE_PIN 0x30
#define USE_TIMER1 0x00
#define EPA0_INT_BIT 47
void init_epa0()
{
epa0_con = COMPARE |
TOGGLE_PIN|
RE_ENABLE |
USE_TIMER1;
epa0_time = 0;
setbit(p1_reg, 0); /* int reg */
clrbit(p1_dir, 0); /* make output pin */
setbit(p1_mode, 0);/* select EPA mode */
}
void init_timer1()
{
t1control = COUNT_ENABLE |
COUNT_UP |
CLOCK_INTERNAL |
DIVIDE_BY_1;
}
Содержание 8XC196NT
Страница 1: ...8XC196NT Microcontroller User s Manual...
Страница 2: ...8XC196NT Microcontroller User s Manual June 1995 Order Number 272317 003...
Страница 22: ...1 Guide to This Manual...
Страница 23: ......
Страница 35: ......
Страница 36: ...2 Architectural Overview...
Страница 37: ......
Страница 49: ......
Страница 50: ...3 Programming Considerations...
Страница 51: ......
Страница 66: ...4 Memory Partitions...
Страница 67: ......
Страница 104: ...5 Standard and PTS Interrupts...
Страница 105: ......
Страница 147: ......
Страница 148: ...6 I O Ports...
Страница 149: ......
Страница 176: ...7 Serial I O SIO Port...
Страница 177: ......
Страница 194: ...8 Synchronous Serial I O SSIO Port...
Страница 195: ......
Страница 211: ......
Страница 212: ...9 Slave Port...
Страница 213: ......
Страница 231: ......
Страница 232: ...10 Event Processor Array EPA...
Страница 233: ......
Страница 270: ...11 Analog to digital Converter...
Страница 271: ......
Страница 291: ......
Страница 292: ...12 Minimum Hardware Considerations...
Страница 293: ......
Страница 306: ...13 Special Operating Modes...
Страница 307: ......
Страница 317: ......
Страница 318: ...14 Interfacing with External Memory...
Страница 319: ......
Страница 362: ...15 Programming the Nonvolatile Memory...
Страница 363: ......
Страница 408: ...A Instruction Set Reference...
Страница 409: ......
Страница 476: ...B Signal Descriptions...
Страница 477: ......
Страница 493: ......
Страница 494: ...C Registers...
Страница 495: ......
Страница 565: ......
Страница 566: ...Glossary...
Страница 567: ......
Страница 580: ...Index...
Страница 581: ......
Страница 597: ......