
Manual 18-ccTalk
Version 0.6
Page 10
7.1. Command / Response frame format
Dest. Addr
Nr Data Bytes
Source Addr
Header
Data 1
. . .
Data N
Checksum
The destination address (host address) is usually 1.
The source address (hopper address) starts from 3.
Most responses from the slave have a ACK Header byte followed by zero or more data response
bytes. If a command cannot be executed, a NAK Header (Hex 5) will be returned. For example the
hopper dispense command which may return a NAK (Hex 5) if the dispense procedure could not be
done (for example hopper disabled, busy, pin code not correct, opto error, etc).
The ACK byte in the responses has value 0.
The Checksum is calculated such that the 8-bit addition (modulus 256) of all bytes in the message
from the start to the checksum itself is zero.
7.2. Hopper Setup and Initialisation commands
Before the hopper can be used, a number of initialisation steps have to be done.
Check communication
Transmit the SIMPLE POLL command to the hopper to check if it is responding with an ACK
message:
Simple Poll (header 254)
Command : 03 00 01 FE FE
Response: 01 00 03 00 FC
Here a normal ACK is received. Device at address 3 is communicating ok.
If no response is received then check the hopper address by sending the ADDRESS POLL command:
Address Poll (header 253)
Command : 00 00 01 FD 02
Response: 03
The command is sent with the destination address of 0
From the response can be seen that there is only 1 device on the bus with address 3.
This command returns all device addresses of the devices on the ccTalk bus. If each device has an
unique address, then no communication clashes will occur. If a clash occurs, then some devices share
the same address. (Address clashes should not occur after power up, since each device will revert to
it's default address, which should be unique for every device used). Use the ADDRESS CLASH
command (header 252) to check which address clashes. If an address clash occurs, the devices that
clashes can be given a random address by using the ADDRESS RANDOM (header 250) command.
Send the ADDRESS CLASH again to resolve any other address clashes. Once every device has an
unique address, the addresses can be optionally changed to new addresses using the ADDRESS
CHANGE (header 251) command.
Once communication is ok, device details can be requested. For your reference all commands are
listed below. Most of the commands are not mandatory to operate the hopper.