|
|
View previous topic :: View next topic |
Author |
Message |
stoppsm Guest
|
RS232 : Can you have 2 stop bits using soft ccs UART ? |
Posted: Mon Nov 26, 2001 9:46 am |
|
|
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 ? |
Posted: Mon Nov 26, 2001 12:25 pm |
|
|
:=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 ? |
Posted: Mon Nov 26, 2001 7:20 pm |
|
|
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 |
|
|
|
|
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
|