CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

RS232 : Can you have 2 stop bits using soft ccs UART ?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
stoppsm
Guest







RS232 : Can you have 2 stop bits using soft ccs UART ?
PostPosted: Mon Nov 26, 2001 9:46 am     Reply with quote

I have an application driving an RS232 device, it requires a word size of 8, parity = none, stop bits = 2.

Stops bits appear not to be configurable in the use rs232 () setup function, any suggestions would be welcome.


void fluid_control() { //

#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, parity=N, bits=8)

printf("RUN");putc(13);

} //
___________________________
This message was ported from CCS's old forum
Original Post ID: 1317
Sherpa Doug
Guest







Re: RS232 : Can you have 2 stop bits using soft ccs UART ?
PostPosted: Mon Nov 26, 2001 12:25 pm     Reply with quote

:=I have an application driving an RS232 device, it requires a word size of 8, parity = none, stop bits = 2.
:=
:=Stops bits appear not to be configurable in the use rs232 () setup function, any suggestions would be welcome.
:=
:=
:=void fluid_control() { //
:=
:=#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, parity=N, bits=8)
:=
:=printf("RUN");putc(13);
:=
:= } //

Requiring 2 stop bits is rather odd now days. But since a stop bit is the same as an idle line you could insert a simple delay after each character. Have printf() print to a function. That function consists of a putc() and a 1 bit delay. Note this gets much more complicated if you use a hardware UART.
___________________________
This message was ported from CCS's old forum
Original Post ID: 1323
Frank
Guest







Re: RS232 : Can you have 2 stop bits using soft ccs UART ?
PostPosted: Mon Nov 26, 2001 7:20 pm     Reply with quote

Try using 9 bits of data and set the last bit high.

#use rs232(BAUD=57600,PARITY=N,XMIT=PIN_C6,RCV=PIN_C7,ERRORS,BITS=9) //hardware uart

#bit TX9D = 0x98.0 //the 9th bit for hardware uart tx

TX9D=1;
putc('x');



Good Luck

-Frank
___________________________
This message was ported from CCS's old forum
Original Post ID: 1334
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group