Searching \ for 'UART problems' 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=uart+problems
Search entire site for: 'UART problems'.

Truncated match.
PICList Thread
'UART problems'
1997\08\15@092915 by Ed Todd

picon face
Someone mentioned having problems with a PIC UART.  We are using them
successfully on 16C63, but we had to put an inverter on the input and
output lines to make the signals the 'same way up' that a PC expects.
Ed Todd <spam_OUTedtoddTakeThisOuTspamsni.net>

1997\08\15@101503 by Martin R. Green

picon face
Hi Ed, this is normal, since the inversion is usually handled by the level
converter.  The PC expects the signal to be the 'same way up' as the  RS232
standard prescribes.  Event the UART's in a PC actually work with inverted
signals, the input and output drivers convert them to the correct polarity.

Sometimes external UART's are used to exploit a characteristic of the level
drivers on a PC (most serial mice are a good example).  Most of them will
work OK with just a 0-5V input swing.  Of course, when you do this, you
don't have a level converter to do the inversion for you.  Sometimes , if
you are using this technique, it is better to bit bang the serial port.
This way you can 'invert' the normal signal polarities to match the PC
serial port without needing extra hardware.


CIAO - Martin R. Green
.....elimarKILLspamspam@spam@bigfoot.com

----------
From:   Ed Todd[SMTP:edtoddspamKILLspamSNI.NET]
Sent:   Friday, August 15, 1997 9:25 AM
To:     .....PICLISTKILLspamspam.....mitvma.mit.edu
Subject:        UART problems

Someone mentioned having problems with a PIC UART.  We are using them
successfully on 16C63, but we had to put an inverter on the input and
output lines to make the signals the 'same way up' that a PC expects.
Ed Todd <EraseMEedtoddspam_OUTspamTakeThisOuTsni.net>

1997\08\15@115127 by unknown667

picon face
At 07:25 AM 8/15/97 -0600, Ed Todd wrote:
>Someone mentioned having problems with a PIC UART.  We are using them
>successfully on 16C63, but we had to put an inverter on the input and
>output lines to make the signals the 'same way up' that a PC expects.

You mean you can go straight from the PIC USART to RS-232 communication
with just using an inverter?  Pardon my lack of knowledge... the board I'm
using right now has an actual TTL -> RS-232 converter chip on it.  Is that
necessary?

---
Unknown

1997\08\15@124402 by Martin R. Green

picon face
As I commented earlier, this is a trick that relies on the specific RS232
-> TTL converter in use on the receiving end.  Many of them will
differentiate successfully between 0 and 5V, but this is by no means
guaranteed!

The actual valid data levels as well as the amplitude of the "dead band" in
the middle is dependent on the RS232 version the converter chips support.
The most common these days (at least on PC's) is RS232C.  I don't remember
offhand what the levels of the various versions are (one of them is + - 10V
with a + - 3V dead band, another is + - 15V with a + - 5V dead band, I
think, and I think one of them uses + - 5V valid levels), and I don't have
time to look them up, I'll leave this to you.

One caveat, driving RS232 from TTL will probably NOT work since a typical
logical 1 is only 2.4V.  PIC port pins should be OK since they swing almost
rail to rail, but you should use a pull up resistor or something to raise
the level of TTL devices, and this might still not provide enough drive.

Another caveat, everything I've said relates to DRIVING RS232 from a PIC.
If you want to receive RS232 with a PIC, at the very least you will
require clamping diodes to both rails to protect the device from + -
10-15V.


CIAO - Martin R. Green
elimarspamspam_OUTbigfoot.com

----------
From:   unknown667[SMTP:@spam@unknown667KILLspamspamHOTMAIL.COM]
Sent:   Friday, September 12, 1997 11:42 AM
To:     KILLspamPICLISTKILLspamspammitvma.mit.edu
Subject:        Re: UART problems

At 07:25 AM 8/15/97 -0600, Ed Todd wrote:
>Someone mentioned having problems with a PIC UART.  We are using them
>successfully on 16C63, but we had to put an inverter on the input and
>output lines to make the signals the 'same way up' that a PC expects.

You mean you can go straight from the PIC USART to RS-232 communication
with just using an inverter?  Pardon my lack of knowledge... the board I'm
using right now has an actual TTL -> RS-232 converter chip on it.  Is that
necessary?

---
Unknown

1997\08\15@144650 by John Payson

picon face
>  If you want to receive RS232 with a PIC, at the very least you will
> require clamping diodes to both rails to protect the device from + -
> 10-15V.

All of the PIC's port pins have clamp diodes to ground that are spec'ed
to 10mA; almost all have clamp diodes to VDD as well (also 10mA).  Those
that don't are generally (in new data sheets*) spec'ed to tolerate inputs
up to 14 volts [a clamp zener would probably be a good idea in case the
RS-232 signal is a little "hot"].

(*) This spec wasn't in the older data sheets, but Microchip has indicated
   that it nonetheless applies to older parts as well as newer ones.

1997\08\15@181930 by Lee Hewitt

picon face
Is there a problem with the PIC16C65, I am new to PIC's and thought I woul be
better joining the PICLIST, but after receiving all these messages I don't
know what's happening.

I need to receive data from a p.c. via RS232 and thought the 16C65 would be
best as I require 31 I/O lines and 170 bytes of ram but no ADC.

Can anyone help me ??

Lee Hewitt: RemoveMELHewitt104TakeThisOuTspamaol.com

1997\08\15@201013 by Mike Keitz

picon face
On Fri, 15 Aug 1997 18:08:39 -0400 Lee Hewitt <spamBeGoneLHewitt104spamBeGonespamAOL.COM>
writes:
>Is there a problem with the PIC16C65, I am new to PIC's and thought I
>woul be
>better joining the PICLIST, but after receiving all these messages I
>don't
>know what's happening.
>
>I need to receive data from a p.c. via RS232 and thought the 16C65
>would be
>best as I require 31 I/O lines and 170 bytes of ram but no ADC.
>
>Can anyone help me ??

Microchip says the problem occurs when the serial port is put in the
"high speed" mode.  In this mode the baud rate is 16x the serial port
clock.  In the normal mode the baud rate is 64x the serial port clock.
If you are able to choose the PIC crystal frequency, then you can likely
find one which will match the PC baud rate without needing to use the
high speed mode.  Someone else may know better than I do but I thought
the UARTs in all the PICs that have them are the same, that is they will
all have the problem.

1997\08\15@222639 by Sean Breheny

flavicon
face
At 08:09 PM 8/15/97 -0400, you wrote:

>Microchip says the problem occurs when the serial port is put in the
>"high speed" mode.  In this mode the baud rate is 16x the serial port
>clock.  In the normal mode the baud rate is 64x the serial port clock.
>If you are able to choose the PIC crystal frequency, then you can likely
>find one which will match the PC baud rate without needing to use the
>high speed mode.  Someone else may know better than I do but I thought
>the UARTs in all the PICs that have them are the same, that is they will
>all have the problem.

You are right about what the problem is, however, not all pics have the problem.
The erratum was fixed in the 16C67,16C77, as well as a few others (I don't
offhand remember which ones exactly).

Sean

1997\08\15@235428 by Jens.Madsen

flavicon
face
John Payson wrote:
>
> >  If you want to receive RS232 with a PIC, at the very least you will
> > require clamping diodes to both rails to protect the device from + -
> > 10-15V.
>
> All of the PIC's port pins have clamp diodes to ground that are spec'ed
> to 10mA; almost all have clamp diodes to VDD as well (also 10mA).  Those
> that don't are generally (in new data sheets*) spec'ed to tolerate inputs
> up to 14 volts [a clamp zener would probably be a good idea in case the
> RS-232 signal is a little "hot"].
>
> (*) This spec wasn't in the older data sheets, but Microchip has indicated
>     that it nonetheless applies to older parts as well as newer ones.

The clamping diodes to Vcc are not real diodes. It xxx is transistors
that leads some current to ground. (P-Well technology).

1997\08\16@025456 by Jens.Madsen

flavicon
face
John Payson wrote:
>
> > The clamping diodes to Vcc are not real diodes. It xxx is transistors
> > that leads some current to ground. (P-Well technology).
>
> Actually, my understanding is that the VDD clamp current is fed into the
> VDD rail, not to ground.  This is what allows, for example, a PIC to operate
> with VDD disconnected if an I/O pin is at +5v and can supply enough current
> (note that this type of operation should not be considered reliable).
>
> Otherwise, though, you're correct that--at least in most cases--the clamping
> is done not by diodes per se, but by the PN junction between the P diffusion
> of the transistors and the N well in which they sit (I think that's how it
> works; it's been awhile).

When I made my lowcost programmer
(http://www.ebar.dtu.dk/~c888600/newpic2.htm) I discovered that the
current was lead to ground. It was problems if R1 was shorted and
the current was lead in Vdd, then higher current was drawn by ground.
Only a part of the current was lead into ground. Most into Vdd.
The programmer will not work if microchip increase the current by
changing size of wells.

The physical background is that part of the current are lead into the
substrate and leads into ground. The P-Well technology leads current
into ground, N-Well into Vdd. If microchip change technology, then my
lowcost versions will not work.

Regards,
Jens Dyekjfr Madsen

1997\08\16@102444 by Andy Kunz

flavicon
face
>high speed mode.  Someone else may know better than I do but I thought
>the UARTs in all the PICs that have them are the same, that is they will
>all have the problem.

All except the 16C76/77/66/67, which have the BRGH=1 bug fixed.  I would
expect revised silicon ("B" parts) to be introduced which fix it.  If MCHP
is wise, that is.

Andy

==================================================================
Andy Kunz - Montana Design - 409 S 6th St - Phillipsburg, NJ 08865
         Hardware & Software for Industry & R/C Hobbies
       "Go fast, turn right, and keep the wet side down!"
==================================================================

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