User`s manual
XP8500
Software Reference s 47
Advanced XP8500 Programming
PLCBus-Level Communication
Dynamic C functions perform the bus-level operations described here. A
program controls and communicates with an XP8500 though the PLCBus
interface register, a reserved memory location. This global register
occupies a single address on the PLCBus. After the program has selected a
particular XP8500 (by calling set12addr with the XP8500s address as
an argument), the program may write data to the XP8500s EEPROM or
A/D converter chip via BUSWR cycles to the bus interface register.
Similarly, the program can fetch EEPROM data or retrieve converted A/D
results via BUSRD0 cycles via the bus interface register. The bus interface
register allows the control program and a selected XP8500 to exchange
only one 4-bit nibble per cycle.
The EEPROM and the A/D converter are both serial I/O devices. Conse-
quently, the IC control lines can be set or cleared only one bit at a time,
and only one bit at a time may be read or written from/to the data lines.
During a BUSWR cycle, each 4-bit nibble transmitted via the bus interface
register through the PLCBus to an XP8500 board sets or resets a control
line according to Table 4-2.
Table 4-2. Effects of Nibbles Passed
Over PLCBus to XP8500
Nibble Function
0000 A/D Clock = 0
0001 A/D Clock = 1
0010 A/D Write Data = 0
0011 A/D Write Data = 1
0100 A/D Chip Select = 0
0101 A/D Chip Select = 1
0110 EEPROM SDA = 0
0111 EEPROM SDA = 1
1000 EEPROM SCL = 0
1001 EEPROM SCL = 1
1010 Not Used
1011 Not Used
1100 Not Used
1101 Not Used
1110 Not Used
1111 Not Used