III. Low level mode
To use this mode, your application must handle the following:
a. GPIO pins of the Raspberry PI, needed to switch the multiplexers to the correct
communication channel (to select the peripheral).
b. Serial port of the Raspberry PI (/dev/ttyAMA0).
c. for MDB handling you need, also, to manipulate MDB RTS and MDB CTS pins.
The MDB communication is handled by setting MDB RTS pin to lo and waiting for CTS
PIN to be set as lo by the board. Only messages sent by reading lo on MDB CTS will be
correctly received by the device. Please be sure that will keep MDB RTS high when you
do not need to communicate to MDB bus.
1. Multiplexer GPIO truth table
GPIO22
GPIO27
GPIO17
Selected peripheral
(the peripheral currently connected to RasPI)
0
0
0
MDB
0
0
1
RS232 #1 (J10)
0
1
0
RS232 #2 (J11)
0
1
1
VTLCOMBUS
1
0
0
ccTalk
1
0
1
Modem
2. MDB bill validator initialization
<HEADER>
<CMD>
<SUBCMD>
<PARAMETERS>
<CRC>
0xFE
0x42
0x01
[none]
0xBD
RASPIVEND answer
0xFE
0x42
0x01
0xFB – command execution failed
0xFC – command successfully executed
0xFD – command CRC error
CRC
This command will execute the initialization procedure for the MDB bill validator connected
on the MDB port.
3. MDB bill enable
<HEADER>
<CMD>
<SUBCMD>
<PARAMETERS>
<CRC>
0xFE
0x42
0x02
[none]
0xBE
RASPIVEND answer
0xFE
0x42
0x02
0xFB – command execution failed
0xFC – command successfully executed
0xFD – command CRC error
CRC
This command will enable the bill validator that will start accepting all the banknotes it can
recognize.
© 2016 – AUTOMATROM SRL – www.vendingtools.ro