8XC196NT USER’S MANUAL
9-16
9.5.2
Enabling the Slave Port Interrupts
The master can generate three interrupt requests: command buffer full (CBF), output buffer emp-
ty (OBE), and input buffer full (IBF). The CBF interrupt is used in standard slave mode; the OBE
and IBF interrupts are used in shared memory mode. To enable an interrupt, set the corresponding
bit in the interrupt mask register (Table 9-2 on page 9-4).
9.6
DETERMINING SLAVE PORT STATUS
The master can determine the status of the slave port by reading the SLP_STAT register (Figure
9-7). It can also read the interrupt pending registers (Table 9-2 on page 9-4) to determine the status
of the interrupts.
9.7
USING STATUS BITS TO SYNCHRONIZE MASTER AND SLAVE
The status bits in the SLP_STAT register can be used to synchronize the master with the slave.
Because synchronization of the status bits is not monitored by the status flags, it is more difficult
for the master to monitor. Software must ensure data integrity throughout the operation. Two
techniques are recommended — a double read or a software flag.
If the master processor is fast enough to read SLP_STAT twice before the contents change, the
master can compare the readings from before and after the data fetch. If the readings are identical,
the data is guaranteed correct.
In standard slave mode, the slave can use bit 7 of SLP_STAT to indicate valid data. To update the
status, the slave performs the following sequence:
•
Clear the flag bit (bit 7) without changing the other four status bits.
•
Update the status bits (SLP_STAT.6:3).
•
Set the flag bit (bit 7) without changing the other four status bits.
Содержание 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: ......