Searching \ for 'serial port' 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/io/serials.htm?key=serial
Search entire site for: 'serial port'.

Truncated match.
PICList Thread
'Serial Port'
1996\06\06@161600 by Newson Edouard

flavicon
face
I am like to use one of Microchip microcontroller that has on board UART to
handle some serial communication.  However, I don't know which one to
get.

I don't want to use the 16C74 because is has a bad baudrate generator.

Any help is appreciated.


-Newson

1996\06\06@170313 by Todd Peterson

picon face
At 04:15 PM 6/6/96 -0400, you wrote:
>I am like to use one of Microchip microcontroller that has on board UART to
>handle some serial communication.  However, I don't know which one to
>get.
>
>I don't want to use the 16C74 because is has a bad baudrate generator.

This brings up an interesting point.  I have heard several (actually more
than several) complaints about hardware problems in the mid to upper level
PIC devices.  I even had someone tell me they were going to stop designing
with Microchip parts because of the hardware errors.

Now I know how easy it would be every time a program isn't operating
properly to blame the hardware, but I am getting the impression there are
actually a few problems other than the "baud rate generator=1" problem he
mentioned above.  Has anyone been keeping a list of the problems so we don't
all learn the hard way?  I know there have been revisions to some of the
chips (xxxA), but I understand even the revisions aren't quite perfect.

Can someone spread some light on the matter?  Hopefully I'm way off base here.

Todd Peterson
E-LAB Digital Engineering, Inc.

http://www.netins.net/showcase/elab

1996\06\06@170318 by Wireless Scientific

flavicon
face
At 4:15 PM 6/6/96, Newson Edouard wrote:
>I don't want to use the 16C74 because is has a bad baudrate generator.


Is this a well know fact? If so, it is documented?

Just curious because I've been using '73s.

craig

1996\06\06@173810 by John Payson

flavicon
face
{Quote hidden}

I suspect [beware: this is a WAG] that the problems with the PIC stem in
large measure from the fact that the higher-end devices evolved from an
architecture in which certain critical items were not issues.  For ex-
ample, the general design of the original PIC CPU would probably result in
a register read every instruction cycle whether it was called for in the
instruction or not.  Since register reads had no effect, this was not really
an issue.  Unfortunately, later PICs have registers which are affected by
reads; these registers can thus sometimes get hit unintentially.

Note as well that in the original PIC design, there were no asynchronous
events as far as the CPU was concerned.  Although the timer prescalar
could run asynchronously with the rest of the system, its output was run
through a simple synchronizer [i.e. a double-latch] before activating any-
thing the CPU controlled.  The effects on the CPU were thus easy to model
and understand.  In the newer PICs, however, there are more asynchronous
features and this in turn causes more risks of failure.

Without knowing the internal details of how Microchip's new designs are
implemented, it's hard to know what parts might cause marginal or wrong
behavior given unfortunate timings between events, but I would think the
best ways to avoid trouble would probably be to:

 [1] Run the UART shift clock synchronously with the instruction cycle.
     If finer control of the baud rate is desirable (which IMHO would be
     a great feature) it should IMHO be obtained by using a 4089-style
     circuit rather than merely dividing from a faster clock.  In fact,
     use of a 4089-style circuit would probably allow even a 4MHz PIC
     to operate its UART at _ANY_ speed up to 62Kbits/second within 1%,
     or a 20MHz PIC to operate at any speed up to 300Kbits/second.  If
     anyone wants details on how this would work, e-mail me.

 [2] If fast counters are going to run asynchronously, it might be useful
     to have them count graycode, then go through a latch, then through
     an XOR network [to convert the graycode to binary], then to the CPU.
     This should allow the CPU to read the counters at arbitrary times and
     get reliable results.

 [3] No port/register should be affected by both writing and reading.  If
     a read-only port has side-effects when it's read, that's no problem
     provided that the port is not affected by any asynchronous external
     events.

What do other people think of these design principles?

1996\06\06@191118 by Frank Latos

flavicon
face
Todd Peterson wrote:
>
> At 04:15 PM 6/6/96 -0400, you wrote:
> >I am like to use one of Microchip microcontroller that has on board UART to
> >handle some serial communication.  However, I don't know which one to
> >get.
> >
> >I don't want to use the 16C74 because is has a bad baudrate generator.
>
> This brings up an interesting point.  I have heard several (actually more
> than several) complaints about hardware problems in the mid to upper level
> PIC devices.  I even had someone tell me they were going to stop designing
> with Microchip parts because of the hardware errors.
>
> Now I know how easy it would be every time a program isn't operating
> properly to blame the hardware, but I am getting the impression there are
> actually a few problems other than the "baud rate generator=1" problem he
> mentioned above.  Has anyone been keeping a list of the problems so we don't
> all learn the hard way?  I know there have been revisions to some of the
> chips (xxxA), but I understand even the revisions aren't quite perfect.

Well, the errata sheet for the 16C65 (available on the Microchip web site) seems
to be accurate and complete.  At least I haven't encountered any problem not
described in this document, and I've just about completed my first C65 project.

The thought of abandoning Microchip parts for future designs occurred to me
more than once as I read over the errata.  The thought of releasing a chip
design
with so many flaws in really rudimentary peripherals leads me to question the
basic competence of the people responsible.

And to top it off, the final item on the errata:
"In a device brown-out, some peripheral modules may be disabled ... only a
Power-on
Reset will re-enable them (MCLR will not)."

-----------------------------------------
Frank Latos, Duo Systems Inc.
spam_OUTflatosTakeThisOuTspammich.com
-----------------------------------------

1996\06\07@040203 by Chaipi Wijnbergen

flavicon
picon face
On Thu, 6 Jun 1996, Newson Edouard wrote:

> I am like to use one of Microchip microcontroller that has on board UART to
> handle some serial communication.  However, I don't know which one to
> get.
>
> I don't want to use the 16C74 because is has a bad baudrate generator.

I use the 16C74 with great success, as long as you set BRGH low, then you
have a fantastic URAT. this should not be a factor when choosing which
part to use.

Chaipi

                              \\\|///
                            \\  ~ ~  //
                             (  @ @  )
----------------------------oOOo-(_)-oOOo--------------------------------------
!                                                                             !
! Chaipi Wijnbergen                                                           !
! Electronics/Computer Eng. M.Sc.  Tel    : +972-8-9343079                    !
! Optical Imaging Laboratory       Fax    : +972-8-9344129                    !
! Brain Research Center            Email  : .....chaipiKILLspamspam@spam@tohu0.weizmann.ac.il       !
! Weizmann Institute of Science    URL    : http://www.weizmann.ac.il/~chaipi !
! Rehovot 76100 ISRAEL             IPhone : chaipi                            !
!                                                                             !
------------------------------------Oooo.--------------------------------------
                         .oooO     (   )
                         (   )      ) /
                          \ (      (_/
                           \_)


'serial port'
2000\01\18@212234 by Tony Nixon
flavicon
picon face
Is it worth dispensing with the 232 chips for PIC to serial port
connections?

I've seen countless simple interfaces that must work, or they wouldn't
be around.

I can see the RX working OK if it's inverted with a tranny, but does the
TX work after inversion when it can only be pulled down to 0 volts.

--
Best regards

Tony

http://www.picnpoke.com
salesspamKILLspampicnpoke.com

2000\01\18@213350 by Dave VanHorn

flavicon
face
> I can see the RX working OK if it's inverted with a tranny, but does the
> TX work after inversion when it can only be pulled down to 0 volts.

Sure, the standard 1488 receiver chip only "sees" +3V or greater, and "near
or below ground".

2000\01\18@214446 by Tony Nixon

flavicon
picon face
Dave VanHorn wrote:
>
> > I can see the RX working OK if it's inverted with a tranny, but does the
> > TX work after inversion when it can only be pulled down to 0 volts.
>
> Sure, the standard 1488 receiver chip only "sees" +3V or greater, and "near
> or below ground".

What about a simple circuit like this then.

           100R (for pin isolation)
PIC TX >---/\/\/\-------------------------> DB9 - Pin 2

           22K (current limit for prot diode)
PIC RX <---/\/\/\-------------------------< DB9 - Pin 3

Gnd --------------------------------------- DB9 - Pin 5

Then use a bit banging serial routine because the TX/RX data will be
inverted.

--
Best regards

Tony

http://www.picnpoke.com
.....salesKILLspamspam.....picnpoke.com

2000\01\18@215048 by quozl

flavicon
face
On Wed, Jan 19, 2000 at 01:20:30PM +1100, Tony Nixon wrote:
> I've seen countless simple interfaces that must work, or they wouldn't
> be around.

Yep.  But I've seen it done without transistors at all.

TX from PIC to PC is just directly connected.
RX from PC to PIC is via 4k7.

Both treated inverted by the PIC itself.

--
James Cameron   EraseMEquozlspam_OUTspamTakeThisOuTus.netrek.org   http://quozl.us.netrek.org/

2000\01\18@222045 by Dave VanHorn

flavicon
face
> What about a simple circuit like this then.
>
>             100R (for pin isolation)
> PIC TX >---/\/\/\-------------------------> DB9 - Pin 2
>
>             22K (current limit for prot diode)
> PIC RX <---/\/\/\-------------------------< DB9 - Pin 3
>
> Gnd --------------------------------------- DB9 - Pin 5

Should work.  I'd feel better with diodes on the pic side to keep the
internal protection diodes turned off, though the 22k should keep the
current low enough (if only we knew what "low enough" is!)

2000\01\19@094542 by Edson Brusque

face
flavicon
face
> Should work.  I'd feel better with diodes on the pic side to keep the
> internal protection diodes turned off, though the 22k should keep the
> current low enough (if only we knew what "low enough" is!)

   About 0,4mA I think.

   Regards,

   Brusque
+----------------------+
|    Edson  Brusque    |
|   Tech Development   |
| http://www.citronics.com.br |
+----------------------+

2000\01\19@103738 by Russell McMahon

picon face
Tony sez -

Is it worth dispensing with the 232 chips for PIC to serial port
connections?

I've seen countless simple interfaces that must work, or they wouldn't
be around.

I can see the RX working OK if it's inverted with a tranny, but does the
TX work after inversion when it can only be pulled down to 0 volts.


& Rusl sez -


Every time I see this question asked I jump in with the following advice and
end up starting a long thread and having various people tell me I don't know
what I'm talking about :-)

So, ignore this at your peril.
Your mileage may vary (but it probably won't).

DO NOT use a simple serial resistor to connect RS232 bipolar signals into a
PIC.
The PIC protection diodes will conduct and the results will be
indeterminate.
My practical experience shows that the processor may behave erratically in
quite unexpected ways.

Doing this violates the proper operating specs of the PIC if you read the
data sheets carefully. Lots of people can quote bits of the data sheet which
they say suggest its OK to do but they are the wrong bits - they relate to
absolute max conditions - not working specs.
Proper conditions on a pin are (from an obscure part of the data sheet which
I'm not going to look up) not more than Vcc (or Vdd or whatever) and not
less than ground.
Few people SHOULD be surprised by this.

What I do is either

1.    place 2 small Schottky diodes (BAT85 or friend) from the input pin to
Vcc and ground (connected to conduct only when the pin tries to go outside
supply rails).

or

2.    Use 2 series input resistors and place diodes as above (Schottky or
1N4148) to supply from the midpoint.

Method 1 also theoretically violates the data sheet max/min specs but the
Schottky clamp observes the spirit (not the letter) of the law and keeps the
pin voltages below the protection diode (significant) conduction points.

Method 2 is also not perfect theoretically but comes closer.

One could also use 2 x 5V1 zeners from pin to supply rails but the zener
knee is so soft that this is v v probably worse than Schottky.

Method 3:     Ignore me and listen to all the people who will tell you that
PIC protection diodes are just crying out to receive external currents and
sink them safely without detriment while the chip operates just as you'd
expect it to. Don't trust your life to the product though :-)
YM W V




     Russell McMahon
_____________________________

>From other worlds - http://www.easttimor.com
                               http://www.sudan.com

What can one man* do?
Help the hungry at no cost to yourself!
at  http://www.thehungersite.com/

(* - or woman, child or internet enabled intelligent entity :-))


-----Original Message-----

--
Best regards

Tony

http://www.picnpoke.com
salesspamspam_OUTpicnpoke.com

2000\01\19@141256 by jamesnewton

flavicon
face
Use two pins for TX. One for RS232 ground and one for the RS232 RD (the TX
signal). Ground high and TX low for mark, Ground low, TX high for space.
(thanks to Steve Walz)

See:
http://204.210.50.240/techref/default.asp?url=io\serial\ttl-rs232.htm

---
James Newton @spam@jamesnewtonKILLspamspamgeocities.com 1-619-652-0593
http://techref.homepage.com The Technical Details Site.
Members can add private/public comments/pages ($0 TANSTAAFL web hosting)


{Original Message removed}

2000\01\20@080034 by Tom Handley

picon face
  Tony, in addition to comments from Russ and others, the bottom line is;
do you want an RS-232 compatible interface or one that will work with RS-232
under limited conditions?

  - Tom

At 01:20 PM 1/19/00 +1100, Tony Nixon wrote:
{Quote hidden}

------------------------------------------------------------------------
Tom Handley
New Age Communications
Since '75 before "New Age" and no one around here is waiting for UFOs ;-)

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