Data Sheet
ROBOT.HEADtoTOE
ProductUser’sManual–MDS40B
8.4SERIALPACKETIZEDMODE
In Packetized Serial mode, Enhanced SmartDrive40 is controlled by using the UART
interface. DIG1 pin is the UART Rx pin. DIG2, AN1 and AN2 pins are not used in this mode.
To control the motor, data sent to the driver must be in 4 bytes packet format which includes
a header, address, command and checksum. Up to 8 units of Enhanced SmartDrive40 can be
connectedtogethertoasinglemicrocontrollerUARTTxpin.
Besides that, the Enhanced SmartDrive40 also incorporates an AutoBaud feature in
Packetized Serial mode. When the driver is first powered up, the host microcontroller must
send a header byte (Decimal 85 or hex 55) once to the driver. The driver will then calculate
the baud rate automatically based on this byte. After that, Enhanced SmartDrive40 is ready to
read full packet (4 bytes) and the baud rate cannot be changed without power recycle (power
offandon)orresetbutton.
NOTE:
1. When the driver is powered up and waiting for the header byte, the error LED will
blinkandindicatethatthereisinputerror.
2. Enhanced SmartDrive40 may take up to 500ms to start up after power is applied.
Sending the header byte for auto baud during this time period may cause undesirable
results. Please allow onesecond delay between applying power and sending the header
byte.
Packetized Serial mode is selected by setting SW1, SW2 and SW3 to 1 (Up). SW4 – SW6
areusedtoselecttheaddress.
InputMode
SW1SW3
111
PacketizedSerialMode
UARTAddress
SW4SW6
000111
07
0OFF 1ON XDon’tCare
Apacketconsistsof4bytesandtheformatisshowninthefollowingtable.
Byte
Name
Value(Decimal)
Description
1
Header
85
Toindicatethestartofpacket.
2
Address
07
Used to identify the driver when multiple units are connected
together. The address bits (bit 2 0) must match the address
configuredwiththeDIPswitch.
3
Command
0–255
Value 127 stops the motor, 0 is full reverse and 255 is full
forward.
4
Checksum
0–255
Thevalueforchecksummustbetheresultof
Header+Address+Command
CreatedbyCytronTechnologiesSdn.Bhd.–AllRightsReserved 22