Hello Folks,
I'd like to build my own serial communication protocol with rs485. Therefore I have to send the data in 9 bit mode.
Example:
first byte + 9th bit set -> that's the adress of the slave
all other bytes are send without the 9th bit set to indicate they're no adress bytes.
Question: How can I set the 9th bit manually?
my code so far:
I will change the line:Code:DEFINE HSER_BAUD 19200 'Set Baud rate to 19200bps DEFINE HSER_BITS 8 'Set to 8 bit mode DEFINE HSER_EVEN 1 'Set Even Parity DEFINE HSER_CLROERR 1 'Clear overflow error automatically ... some other code ... HSEROUT [Slaveadress,Datalength,Databyte,Databyte ...until datalength reached...]into:Code:DEFINE HSER_BITS 8 'Set to 8 bit modeBut how can I set the 9th bit????Code:DEFINE HSER_BITS 9 'Set to 9 bit mode
Regards.


 
		
		 
			 
			 
			 
					
					 send 9 bits via hserout
 send 9 bits via hserout
		

Bookmarks