RS232 with 2 Stop-Bits ?

General discussion on mikroPascal.
Post Reply
Author
Message
Andreas
Posts: 139
Joined: 05 Feb 2005 12:43
Location: Germany

RS232 with 2 Stop-Bits ?

#1 Post by Andreas » 13 Jan 2009 00:03

Hi,
I need to communicate to a device via RS232 that uses 2 Stop-Bits.

The hardware USART seems to support only 1 Stop-Bit. Same problem with the software library.

So, what I need is instead of the usual 8N1 the unusual 8N2 configuration.

I'm currently using a 16F876, but want to change to a much bigger 18F.

Any idea would be appreciated.

Kind regards
Andreas

jpc
Posts: 1986
Joined: 22 Apr 2005 17:40
Location: France 87

#2 Post by jpc » 13 Jan 2009 08:52

Hello Andreas,

it is already some time ago but maybe this can be of help. http://www.mikroe.com/forum/viewtopic.php?t=4886

Andreas
Posts: 139
Joined: 05 Feb 2005 12:43
Location: Germany

RS232 with 2 Stop-Bits ?

#3 Post by Andreas » 13 Jan 2009 10:55

Hi jpc,
thanks for your quick response.

So I can simply "misuse" the 9th data bit as the additional Stop-Bit? Sounds almost too easy. I will give it a try.

Many thanks
Andreas

jpc
Posts: 1986
Joined: 22 Apr 2005 17:40
Location: France 87

#4 Post by jpc » 13 Jan 2009 11:10

for TX this is the simplest use of the 9th bit , for reception there is no issue at all , after the 8 databytes can comean infinite number of 'stopbits' as these have the same level as no activity.

Andreas
Posts: 139
Joined: 05 Feb 2005 12:43
Location: Germany

RS232 with 2 Stop-Bits ?

#5 Post by Andreas » 15 Jan 2009 00:47

Many thanks, jpc, it works!

Kind regards
Andreas

Post Reply

Return to “mikroPascal General”