Searching \ for ' PIC 16F84 & serial port on a PC' 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/microchip/ios.htm?key=serial
Search entire site for: 'PIC 16F84 & serial port on a PC'.

No exact or substring matches. trying for part
PICList Thread
'[PICLIST] PIC 16F84 & serial port on a PC'
2000\10\13@055311 by Matthieu Baraban

picon face
Hello,

I am designing a board that has to exchange some data between a PIC16F84
and a serial port on a PC, in both ways.
This will be done for about 1 minute, every week.
So, my question is :
Do I have to use a TTL<->RS232 converter, or can I simply use resistors as
it is explained sometimes on PIC web pages.
Could you give me your advices ?
Thanks a lot,
Best regards,

Matt.

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




2000\10\13@064838 by Leo

picon face
Hi,


I have used the direct connection between PC (EIA RS232) and the PIC as
showed in PBP manual. It works very well. You just take attention on the
polarity. The TTL serial have logical level inverted.


Ciao


Leo
{Original Message removed}

2000\10\13@065926 by Dale Botkin

flavicon
face
Me too.  I think the general opinion is that it works for one-offs and
small stuff, but it may not be wise to depend on it in a large-run
commercial product.  For the PIC receiving RS232 it seems to work quite
well, and I've han no trouble at all.  For sending, you'll get a
non-compliant signal that *most* RS232 receivers will see but no
guarantees.

Dale

On Fri, 13 Oct 2000, Leo wrote:

> I have used the direct connection between PC (EIA RS232) and the PIC as
> showed in PBP manual. It works very well. You just take attention on the
> polarity. The TTL serial have logical level inverted.
>
>
> Ciao
>
>
> Leo
> {Original Message removed}

2000\10\13@085136 by Bob Ammerman

picon face
If I were building something that:

1: I knew was going to be connected _only_ to a PC's serial port.

2: Was _very_ cost sensitive

Then I might consider using the direct-TTL trick.

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

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




2000\10\13@110916 by jamesnewton
face picon face
www.piclist.com/../io/serial/ttl-rs232

---
James Newton (PICList Admin #3)
jamesnewtonspamKILLspampiclist.com 1-619-652-0593
PIC/PICList FAQ: http://www.piclist.com or .org

{Original Message removed}

2000\10\13@112608 by Dale Botkin

flavicon
face
On Fri, 13 Oct 2000, Bob Ammerman wrote:

> If I were building something that:
>
> 1: I knew was going to be connected _only_ to a PC's serial port.
>
> 2: Was _very_ cost sensitive
>
> Then I might consider using the direct-TTL trick.

I dunno.  I looked at the specs for the 148x and MAX232 type line
receivers, and all of them I saw would see 0 and 3.5V as valid RS232
levels, at least as far as they were concerned.  It surprised me that even
the 1489(88? haven't used one in years) didn't need to see a negative
voltage.  I seem to recall the cutoff was 0.7V.  Has anyone had an actual
experience with something that would *not* work with the simple resistor
interface, I wonder?  I've had them talking to PCs, modems, and terminal
servers.

Dale
---
The most exciting phrase to hear in science, the one that heralds new
discoveries, is not "Eureka!" (I found it!) but "That's funny ..."
               -- Isaac Asimov

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




2000\10\13@114443 by Alan B. Pearce

face picon face
>I dunno.  I looked at the specs for the 148x and MAX232 type line
>receivers, and all of them I saw would see 0 and 3.5V as valid RS232
>levels, at least as far as they were concerned.  It surprised me that even
>the 1489(88? haven't used one in years) didn't need to see a negative
>voltage.  I seem to recall the cutoff was 0.7V.  Has anyone had an actual
>experience with something that would *not* work with the simple resistor
>interface, I wonder?  I've had them talking to PCs, modems, and terminal
>servers.

The reason for this is a requirement in the RS232 spec where an open circuit input should behave as though it has a voltage more negative than -3V. The easiest way to do this is set the schmitt trigger threshold at a slightly positive voltage. For this reason chips like the 1489 make excellent TTL line receivers, especially as you can slug the frequency response with a capacitor to slow them down. Check the spec sheets for this function.
it is also possible to adjust the threshold level of the 1489 using a resistor to a positive or negative voltage. If the resistor goes to a positive voltage then the threshold goes more negative. This is also covered in the data sheets.

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




2000\10\13@180643 by Olin Lathrop

flavicon
face
> I am designing a board that has to exchange some data between a PIC16F84
> and a serial port on a PC, in both ways.
> This will be done for about 1 minute, every week.
> So, my question is :
> Do I have to use a TTL<->RS232 converter, or can I simply use resistors as
> it is explained sometimes on PIC web pages.
> Could you give me your advices ?

You can get away with a resistor and diodes for a quick hack for data from
PC to PIC, but the voltage has to go from 0 -> 5 to -12 -> +12 the other way
around.  Maxxim makes a whole line of RS-232 converters, including some that
run just off of +5.  I've used these many times with PICs.


*****************************************************************
Olin Lathrop, embedded systems consultant in Devens Massachusetts
(978) 772-3129, olinspamspam_OUTcognivis.com, http://www.cognivis.com

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




2000\10\14@092519 by Dale Botkin

flavicon
face
On Fri, 13 Oct 2000, Olin Lathrop wrote:

> > I am designing a board that has to exchange some data between a PIC16F84
> > and a serial port on a PC, in both ways.
> > This will be done for about 1 minute, every week.
> > So, my question is :
> > Do I have to use a TTL<->RS232 converter, or can I simply use resistors as
> > it is explained sometimes on PIC web pages.
> > Could you give me your advices ?
>
> You can get away with a resistor and diodes for a quick hack for data from
> PC to PIC, but the voltage has to go from 0 -> 5 to -12 -> +12 the other way
> around.  Maxxim makes a whole line of RS-232 converters, including some that
> run just off of +5.  I've used these many times with PICs.

The MAX series is a great way to get standards-compliant RS232 signal
levels, and it's only one chip plus four resistors.  If a couple of bucks
and another square inch of board space won't kill your project, definitely
use one.  I can tell you, however, that the PC will receive data from the
PIC without one. Just remember you need to send the data inverted, which
means you can do it with a bit-banged interface but not with the PIC's
internal UART.

To get around the inverter thing, I have used a 74LS04 with high value
series resistors.  It worked (for me) both ways, but I certainly wouldn't
recommend it.  I just ran out of MAX232's and needed to test something
quickly.  I was surprised it worked. quite frankly.

Dale
---
The most exciting phrase to hear in science, the one that heralds new
discoveries, is not "Eureka!" (I found it!) but "That's funny ..."
               -- Isaac Asimov

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
"[PIC]:","[SX]:","[AVR]:" =uP ONLY! "[EE]:","[OT]:" =Other "[BUY]:","[AD]:" =Ads




2000\10\14@161017 by Bill Westfield

face picon face
   I can tell you, however, that the PC will receive data from the
   PIC without one. Just remember you need to send the data
   inverted, which means you can do it with a bit-banged interface
   but not with the PIC's internal UART.

A long time ago, after observing that the SDK-86 requiring +5 and +/-12
used the +/-12V ONLY for the rs232 drivers, I connected the +12 supply to
+5, and the -12V to GND, and it worked fine (talking to a CPM system,
IIRC. (yes, that long ago))

Since then, I've had a very "liberal" view of rs232 requirements. :-)

There have been a couple of ciruits published (here?) that do clever things
when at least one side has "real" rs232 voltages and "typical" rs232 signal
leads.  Ie, rather than switch between +/-PWR, you can go between +5 and
"whatever is on DTR (which is supposed to be -V, and I can damn well MAKE
it be -V since I control the PC side software too.)"  (This is slightly
more clever, IMHO, than using the modem signal leads to create a "power
supply" for a traditional level converter circuit.)

BillW

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
"[PIC]:","[SX]:","[AVR]:" =uP ONLY! "[EE]:","[OT]:" =Other "[BUY]:","[AD]:" =Ads




2000\10\14@171926 by Mark Willis

flavicon
face
William Chops Westfield wrote:
{Quote hidden}

You can use a diode off RxD (perhaps other pins as well, coming from PC)
to an electrolytic's - side.  i.e. Cathode on PC side, anode to Cap's -
side, to generate -12V (or so.)  And same trick to generate +12v off the
same COM port.

Or, harder, run a charge pump voltage tripler off some PIC pins to make
+- 14V or so.

Schottky's can be a good idea here if you need more voltage (Seen
BAT85's sometimes used.)

http://uq.net.au/~zzdkeena/AVR/DCKProgSchem.GIF for one example, can
find others.

 Mark

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
"[PIC]:","[SX]:","[AVR]:" =uP ONLY! "[EE]:","[OT]:" =Other "[BUY]:","[AD]:" =Ads




2000\10\14@231715 by Dan Michaels

flavicon
face
BillW wrote:
........
>There have been a couple of ciruits published (here?) that do clever things
>when at least one side has "real" rs232 voltages and "typical" rs232 signal
>leads.  Ie, rather than switch between +/-PWR, you can go between +5 and
>"whatever is on DTR (which is supposed to be -V, and I can damn well MAKE
>it be -V since I control the PC side software too.)"  (This is slightly
>more clever, IMHO, than using the modem signal leads to create a "power
>supply" for a traditional level converter circuit.)
>


I have an appnote describing a simple RS-232 ckt using 2 transistors
that translates 0 & 5v to +5v and -12v levels. The latter is "pilfered"
from the Rx line of the PC's port. This ckt costs < $1, and has the
great advantage over a MAX232 of less $$$$, and also that it has 0 mA
quiescent current requirements [actually transistor leakage] versus
the MAX's 2+ mA. Personally, I think you need a -voltage for good
reliability and generality.

See an-ecd02.zip at:

http://www.users.uswest.net/~oricom/appnote.htm

- Dan Michaels
Oricom Technologies
===================

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
"[PIC]:","[SX]:","[AVR]:" =uP ONLY! "[EE]:","[OT]:" =Other "[BUY]:","[AD]:" =Ads




2000\10\16@113625 by Dan Michaels

flavicon
face
Mark Willis wrote:
>>
>> See an-ecd02.zip at:
>>
>> www.users.uswest.net/~oricom/appnote.htm
>>
>
>This URL redirects to http://www.users.qwest.net/~oricom/appnote.htm
>which 404's from here.  I think I'm using the exact same circuit and
>mentioned part of it (2 diodes to the PC's serial output, one to the
>cap, the other is on the other side of a resistor and prevents an NPN
>transistor's base from being pulled below -0.7V, etc.)  It's a pretty
>good solution really, all in all.  I've seen MOSFET implementations of
>this, and ones with NPN and PNP transistors, prefer the PNP / NPN
>implementations as they're cheaper for production <G>
>

Oops, sorry, try:

http://www.users.uswest.net/~oricom/appnotes.htm


Mark, you are correct that including a diode from the base of the
Rx tansistor to gnd [anode to gnd] is helpful in preventing E-B
reverse breakdown. I typically now use a 2:1 voltage divider in
the base to prevent this. 10K Rx-to-base, 4.7K base-to-gnd.
Guess I should update the appnote.

- Dan Michaels
Oricom Technologies
===================

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.




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