User Manual

Option 1: Standard Simplified Serial
Mode
Serial data is sent to input S1. The baud rate is selected
with switches 4 and 5. Commands are sent as single bytes.
Sending a value of 0 will cause the motor to drive full
forward, and sending a value of 255 will cause the motor to
drive reverse. A value of 127 will cause the motor to stop.
Option 2: Simplified Serial with Slave
Select
This mode is used when it is desirable to have multiple
SyRen 50s running from the same serial transmitter, but
you do not wish to use packetized serial. A digital signal
(0v or 5v) is fed to the S2 input. This is controlled by the
host microcontroller. If the signal on S2 is logic high (5v)
when the serial command is sent, then the driver will change to the new speed. If the signal on
S2 is not high when the command is sent, then command will be ignored. Pseudo-code
demonstrating this is shown below. After sending the signal, allow about 50 us before
commanding the Slave Select line to a logic LOW to allow time for processing. A hookup
diagram and example pseudo-code are shown in Figures 6.2 and 6.3.
//set controller 1’s speed
Output_High (S2 pin on controller 1)
USART_TX(controller 1 speed, 0 to 255)
Delay_us(50)
Output_Low (S2 pin on controller 1)
//set controller 2’s speed
Output_High (S2 pin on controller 2)
USART_TX(controller 2 speed, 0 to 255)
Delay_us(50)
Output_Low (S2 pin on controller 2)
Figure 6.2: Hookup for Slave Select Figure 6.3: Pseudocode for Slave Select
Standard Simplified Serial
Simplified Serial
with
Slave Select