Access from the user program
KL6001
33
Version: 3.0.0
Control byte in register mode (REG=1)
MSB
REG=1
W/R
A5
A4
A3
A2
A1
A0
REG = 0
bin
: Process data exchange
REG = 1
bin
: Access to register structure
W/R = 0
bin
: Read register
W/R = 1
bin
: Write register
A5..A0 = register address
Addresses A5...A0 can be used to address a total of 64 registers.
Example register communication
Fig. 15: Register mode control byte
The control or status byte occupies the lowest address of a logical channel. The corresponding register
values are located in the following 2 data bytes. (The BK2000 is an exception: here, an unused data byte is
inserted after the control or status byte, and the register value is therefore placed on a word boundary).
Example 1
Reading of register 8 in the BK2000 with a KL6001 and the end terminal:
If the following bytes are transferred from the controller to the terminal,
Byte
Byte0
Byte1
Byte2
Byte3
Name
Control
Not used
Data out, high byte
Data out, low byte
Value
0x88
0xXX
0xXX
0xXX
the terminal returns the following type identifier (0x1771 corresponds to unsigned integer 6001).
Byte
Byte0
Byte1
Byte2
Byte3
Name
State
Not used
Data in, high byte
Data in, low byte
Value
0x88
0x00
0x17
0x71