Data Sheet
MD04 communication configuration
First step - get the drivers
The MD04 uses a virtual comm port for setting the communication method. Before connecting the
module you should download the driver and unzip it. Now connect the USB cable and navigate
windows to the folder and install the driver, the MD04 will now appear as a COM port.
Setting the communication type
Now the MD04 appears as a comm port we have a simple set of commands to switch between the
communication options and settings. An app to easily change between settings is available on the next
page.
Command Name Response / additional parameters
0x24 Read Temperature 1 byte response - the PCB temperature in °C
0x25 Read Version 1 byte response - current software version
0x27 Read Mode 1 byte response - current mode of operation
0x28 Read Status 1 byte response - see status byte makeup
0x29 Read Baud 2 byte response - see baud rate calculation and table
0x34 Write Mode Send 1 additional byte for the mode from table below
0x35 Write Baud Send 2 additional bytes to set baud from calculation or table
Operation modes
Value Mode
0 I2C @ 0xB0
1 I2C @ 0xB2
2 I2C @ 0xB4
3 I2C @ 0xB6
4 I2C @ 0xB8
5 I2C @ 0xBA
6 I2C @ 0xBC
7 I2C @ 0xBE
8 Analogue 0v-2.5v-5v
9 Analogue 0v-5v
10 RC mode with timeout
11 RC Mode no timeout
12 Serial
Calculated baud rates for serial mode
Baud rate Value
300 9999
1200 2499
2400 1249
9600 311
10417 287
19.2k 155
57.6k 51
115.2k 25
Value = (48,000,000/(16* baud rate)) – 1
Because 48mhz may not divide into baud rate
exactly:
Actual baud rate = 48,000,000/(16 * (Value+1))
© Devantech Ltd 12/07/15 MD04 documentation 3/8