Page
24
of
60
©
2019 Radiocrafts AS
MBUS User Manual (ver 2.01)
MBUS USER MANUAL
5.3 Examples
Example 1
– Setting Install mode
Example
This example shows how to enter Install mode, the first step of the installation and binding process.
Before sending the I-command you must set the module in configuration mode and wait for prompt
(>).
Command
Hex
Response
Comment/Note
Enter
0x00
‘>’
Enter CONFIG mode.
Wait for ‘>’ prompt.
Alternative
: Assert CONFIG pin.
De-
assert CONFIG after ‘>’ prompt
‘I’
0x49
‘>’
I-command entered.
Wait for ‘>’ prompt.
1
0x01
‘>’
Command argument.
Wait for ‘>’ prompt.
(A new command can be issued here)
‘X’
0x58
(none)
Exit CONFIG mode.
Module returns to IDLE state
Example 2
– Binding a slave to a master
Example
Before you run the code below:
•
Set module in configuration mode
•
Set i
nstallation mode (‘I’ - command).
In this example a slave with the following address will be bound to address register #2.
MAN_ID1
MAN_ID2
ADDR_ID1
ADDR_ID2
ADDR_ID3
ADDR_ID4
ADDR_VER
ADDR_DEV
0xAB
0xCD
0x12
0x34
0x56
0x78
0x01
0x04
Command
Hex
Response
Comment/Note
‘B’
0x42
>
B-command entered.
Wait for ‘>’ prompt
2
0x02
(none)
Bind to address register #2
0x78
0x56
0x34
0x12
ADDR_ID (4 bytes)
Least significant byte first
0xCD
0xAB
MAN_ID
Least significant byte first
0x01
ADDR_VER
0x04
>
ADDR_DEV
(A new command can be issued here)
‘X’
0x58
(none)
Exit CONFIG mode.
Module returns to IDLE state