Robotis RX-28 Automobile Electronics User Manual


 
DYNAMIXEL
RX-28
Appendix
RS485 UART RS485 UART is a serial communication protocol where both TxD and RxD cannot be
used at the same time. This method is generally used when many devices need to be
connected to a single bus. Since more than one device are connected to the same bus,
all the other devices need to be in input mode while one device is transmitting. The Main
Controller that controllers the Dynamixel actuators sets the communication direction to
input mode, and only when it is transmitting an Instruction Packet, it changes the
direction to output mode.
Instruction Packet Status Packet
Return Delay Time
RS485 Direction Output Duration
Return Delay Time The time it takes for the Dynamixel actuator to return the Status Packet after receiving
an Instruction Packet. The Default Value is 160 uSec and can be changed via the
Control Table at Address 5. The Main Controller needs to change the Direction Port to
input mode during the Return Delay Time after sending an instruction packet.
Tx,Rx Direction For RS485 UART, the transmission ending timing is important to change the direction to
receiving mode. The bit definitions within the register that indicates UART_STATUS are
as the following
TXD_BUFFER_READY_BIT: Indicates that the transmission DATA can be loaded into
the Buffer. Note that this only means that the SERIAL TX BUFFER is empty, and does
not necessarily mean that the all the data transmitted before has left the CPU.
TXD_SHIFT_REGISTER_EMPTY_BIT: Set when all the Transmission Data has
completed its transmission and left the CPU.
The TXD_BUFFER_READY_BIT is used when one byte is to be transmitted via the
serial communication channel, and an example is shown below.
TxDByte(byte bData)
{
while(!TXD_BUFFER_READY_BIT); //wait until data can be loaded.
SerialTxDBuffer = bData; //data load to TxD buffer
}
31