Searching \ for ' PC's UART and 9 bit characters' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=pcs+uart+bit+characters
Search entire site for: 'PC's UART and 9 bit characters'.

No exact or substring matches. trying for part
PICList Thread
'[PICLIST] PC's UART and 9 bit characters'
2001\10\03@073453 by wzab

flavicon
picon face
Hi All,

I have to use PC to communicate with RS-485 bus. I'd like to use the 9-bit
addressing codes available for PICs/8051s and other uCons. Unfortunately
The PC's UART is 8-bit, but I can manually control the parity bit.
Probably there is no problem with sending - I can change the parity mode
to get the proper 9th bit.
But what about reception? I could use the "parity error" bit to examine the
9th bit of received data, but what about FIFO? (I was familiar with the old
16450 without any fifos).
Does the status register use the FIFO in the same way as data register?
Eg. if I have received and stored in FIFO the following sequence of bytes
(# denotes parity error): 0x10 0x20# 0x15 0x23# 0x40,
will the "parity bit" in the status register change when I read the
consecutive bytes (cleared until 0x10 read, set until 0x20 read, then
cleared until 0x15 read and so on...)?
Maybe it gets set after the first byte with parity error is received
and written to the FIFO (it would be really creazy)?
So in fact my question is if the receiver's FIFO holds the additional info
(eg. parity & frame errors) together with the bytes themselves.
Are the 16550A and other new UARTs (16650 ...) compatible in that subject?
--
                               TIA & Regards,
                             Wojciech M. Zabolotny
       http://www.ise.pw.edu.pl/~wzab  <--> spam_OUTwzabTakeThisOuTspamise.pw.edu.pl

Before buying any hardware ask the dealer if it is Open Source friendly!!!
hhtp://http://www.openhardware.org

--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestKILLspamspam@spam@mitvma.mit.edu


2001\10\03@100412 by Byron A Jeff

face picon face
On Wed, Oct 03, 2001 at 01:13:13PM +0200, Wojciech Zabolotny wrote:
> Hi All,
>
> I have to use PC to communicate with RS-485 bus. I'd like to use the 9-bit
> addressing codes available for PICs/8051s and other uCons. Unfortunately
> The PC's UART is 8-bit, but I can manually control the parity bit.

Woj,

You need to read a bit more! ;-) PIC's do nine bits. Take a look at page 103
in section 10.2.3 in the 16F877 manual. It describes not only the ninth bit
but more importantly how to configure the USART interrupt so that it'll only
interrupt when the 9th bit is set.


> Probably there is no problem with sending - I can change the parity mode
> to get the proper 9th bit.

No need. See the last paragraph on page 99.

[ Other possibilities truncated... ]

There's no need to do anything exotic. The PIC USART handles 9 bits just
the way you would expect it to...

BAJ

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestspamKILLspammitvma.mit.edu


2001\10\03@154212 by wzab

flavicon
picon face
On Wed, Oct 03, 2001 at 09:18:30AM -0400, Byron A Jeff wrote:
> On Wed, Oct 03, 2001 at 01:13:13PM +0200, Wojciech Zabolotny wrote:
> > Hi All,
> >
> > I have to use PC to communicate with RS-485 bus. I'd like to use the 9-bit
> > addressing codes available for PICs/8051s and other uCons. Unfortunately
> > The PC's UART is 8-bit, but I can manually control the parity bit.
>
> Woj,
>
> You need to read a bit more! ;-) PIC's do nine bits. Take a look at page 103
> in section 10.2.3 in the 16F877 manual. It describes not only the ninth bit
> but more importantly how to configure the USART interrupt so that it'll only
> interrupt when the 9th bit is set.
>

Well, but my problem is not with PIC but with PC (probably the
misunderstanding was caused by my poor english).
I have to force the standard (16450 or 16550A based) PC UART (AKA com port)
to drive the RS485 bus (maybe with PICs and 8051s connected to it).
I know I have to use the level shifter (MAX232) and RS485 transceiver
(SN75176). But the main problem is how to emulate the 9-bit mode in the PC.
--
                             Wojciech M. Zabolotny
       http://www.ise.pw.edu.pl/~wzab  <--> .....wzabKILLspamspam.....ise.pw.edu.pl

http://www.ise.pw.edu.pl/~wzab/picadc/picadc.html - Build your FREE Data
                                                   Acquisition System

--
http://www.piclist.com hint: To leave the PICList
EraseMEpiclist-unsubscribe-requestspam_OUTspamTakeThisOuTmitvma.mit.edu


2001\10\03@175652 by Byron A Jeff

face picon face
On Wed, Oct 03, 2001 at 08:04:11PM +0200, Wojciech Zabolotny wrote:
> On Wed, Oct 03, 2001 at 09:18:30AM -0400, Byron A Jeff wrote:
> > On Wed, Oct 03, 2001 at 01:13:13PM +0200, Wojciech Zabolotny wrote:
> > > Hi All,
> > >
> > > I have to use PC to communicate with RS-485 bus. I'd like to use the 9-bit
> > > addressing codes available for PICs/8051s and other uCons. Unfortunately
> > > The PC's UART is 8-bit, but I can manually control the parity bit.
> >
> > Woj,
> >
> > You need to read a bit more! ;-) PIC's do nine bits. Take a look at page 103
> > in section 10.2.3 in the 16F877 manual. It describes not only the ninth bit
> > but more importantly how to configure the USART interrupt so that it'll only
> > interrupt when the 9th bit is set.
> >
>
> Well, but my problem is not with PIC but with PC (probably the
> misunderstanding was caused by my poor english).

Nope. A misunderstanding because I read too fast. The English was perfect.
It turns out that I was the one that had to read a bit more! ;-)

> I have to force the standard (16450 or 16550A based) PC UART (AKA com port)
> to drive the RS485 bus (maybe with PICs and 8051s connected to it).
> I know I have to use the level shifter (MAX232) and RS485 transceiver
> (SN75176). But the main problem is how to emulate the 9-bit mode in the PC.

Truth be told it's a fight I wouldn't bother with. Simply add another PIC to
your level shifters and let the PIC hardware USART handle the 9 bit
communication on the EIA-485 (it's a true standard now, so EIA instead of RS).

Since the PIC will have nothing else to do, you should be able to bit bang
at a decent clip. Run the PIC @ 18.432 Mhz so that timing will be simple.
You could even interrupt drive a timer if you need to get higher performance.

A 16F627 or F628 would be perfect for the application.

Personally I think this is a situation where a bit more hardare will result
in a lot less headache.

BAJ

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestspamspam_OUTmitvma.mit.edu


2001\10\03@182953 by Bob Ammerman

picon face
But look at the subject: He said PC (not PIC) UART!

Bob Ammerman
RAm Systems
(contract development of high performance, high function, low-level
software)

{Original Message removed}

More... (looser matching)
- Last day of these posts
- In 2001 , 2002 only
- Today
- New search...