![Intel 8XC196NT Скачать руководство пользователя страница 221](http://html1.mh-extra.com/html/intel/8xc196nt/8xc196nt_user-manual_2072210221.webp)
8XC196NT USER’S MANUAL
9-8
9.4
SLAVE PORT MODES
The slave port can operate in either standard slave mode or shared memory mode. In both modes,
the master and slave share a 256-byte block of memory located anywhere within the slave’s mem-
ory space. Data written is stored in the slave’s P3_PIN register; data to be read is stored in the
slave’s P3_REG register. The standard slave mode supports either a demultiplexed or a multi-
plexed bus and uses the command buffer full (CBF) interrupt. The shared memory mode supports
only a multiplexed bus and uses the input buffer empty (IBE) and output buffer full (OBF) inter-
rupts. In both modes, the interrupts must be processed by a software interrupt service routine.
9.4.1
Standard Slave Mode Example
In standard slave mode, the master and slave share a 256-byte block of memory. The high byte of
the address (the base address) selects the location within the slave’s memory space. The master
writes the low byte of the address to the slave’s command register (SLP_CMD). This mode can
be used with either a multiplexed or a demultiplexed bus.
In this example, the master and slave share a 256-byte block of memory from 0400–04FFH. The
master device has arbitrary external memory locations that are dedicated to slave port accesses.
9.4.1.1
Master Device Program
The following code segment illustrates the simple method for writing to the slave.
EXT_P3_PIN
EQU
0FFFDH ;
(A1=0)
EXT_SLP_CMD
EQU
0FFFEH
; (A1=1)
STB
DATA, EXT_P3_PIN
; write the data into the slave’s P3_PIN
STB
ADDR, EXT_SLP_CMD
; write address LSB into slave’s SLP_CMD
; wait for SLPINT to go high
The master first writes data to the P3_PIN register, which clears the IBE flag in the slave’s
SLP_STAT register and pulls SLPINT low. This notifies the slave to perform a data write at the
address BASE + SLP_CMD.
The following code segment illustrates the equally simple method for reading from the slave.
EXT_P3_REG
EQU
0FFFCH ;
(A1=0)
EXT_SLP_CMD
EQU
0FFFEH ;
(A1=1)
LDB
TEMP, EXT_P3_REG
; clear slave’s P3_REG
STB
ADDR, EXT_SLP_CMD
; write address LSB into slave’s SLP_CMD
; ... wait for SLPINT to go high
LDB
DATA, EXT_P3_REG
; read the data from P3_REG
Содержание 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: ......