RS232 with 2 stop bits on PIC16F877A

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
jonath
Posts: 1
Joined: Mon May 09, 2011 7:20 pm

RS232 with 2 stop bits on PIC16F877A

Post by jonath »

ANY SUGGESTIONS ON HOW TO IMPLEMENT RS232 RX/TX WITH 2 STOP BITS LIKE
BAUDRATE 19,200, 8 BITS, NONE PARITY, 2 STOP BITS SERIAL COMMUNICATION ON PIC16F877.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: RS232 with 2 stop bits on PIC16F877A

Post by Benj »

Hello,

Flowcode v3 does not support the 9th data bit so you will probably have to do this via C code.

Flowcode v4 supports 9 bit data mode so you could always set the 9th bit to 1 and this will be your 1st stop bit. The second stop bit will then be automatic.

The stop bits are always logic 1 so you could do a normal 8-bit data transmission and then have at least a bit delay after you have sent a byte. This will essentially allow time for the second stop bit to be detected as the bus is always a logic 1 when inactive. You could even modify the send byte function with an appropriate delay_us() call and this will allow the second stop bit to be added automatically.

Post Reply