Data Sheet
dScript
dScript User Manual v2.15
Stop bits
The default is 2 stop bits.
serialport RS485 2 100 200
RS485.StopBits = 1 ; set 1 stop bit
RS485.StopBits = 2 ; set 2 stop bits
Only 1 or 2 is allowed, any other value is ignored and StopBits will remain unchanged.
Break
Some systems require a "break" to be transmitted as a start of frame marker. A break is
defined as the Tx line low for longer than one character frame. The break time used by dScript
is 18 bit times. For Example a baud rate of 19200 has a bit time of 52uS. We therefore send a
break of 18*52uS = 936uS.
A break is not queued in the transmit FIFO. It is initiated immediately only if the transmit FIFO
is empty. If there is a transmission in progress when the break is requested it will be ignored.
You should check all previous transmissions are complete by checking BytesToWrite is zero. To
start the break use serialport.SetBreak(). While the break is in progress reading RS485.Break
will return 1 (on). It will change to 0 (off) when complete.
Wait4Tx: if RS485.BytesToWrite > 0 goto Wait4Tx ; wait for last Tx to go
RS485.SetBreak() ; send the break
Wait4Break: if RS485.Break == on goto Wait4Break
< send data bytes >
Copyright © 2016, Devantech Ltd.
All rights reserved.
www.robot-electronics.co.uk
33