Searching \ for 'rs-232 w/o level convert?' 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=rs%2D232
Search entire site for: 'rs-232 w/o level convert?'.

Truncated match.
PICList Thread
'rs-232 w/o level convert?'
1999\09\19@200328 by Dan Rosenfeld

flavicon
face
Hi all,

>From looking at the archive, I can see that this is a somewhat FAQ.
Unfortunately, I'm having trouble assembling all that I've read into a
coherent picture applicable to my simple problem....

I'd like be able to send characters (debugging printfs) from the 16LF84 in
my circuit to my PC serial port W/O USING A LEVEL CONVERTER CHIP. I only
need this to work on my PC for debugging purposes (it's not a production
circuit) and at low baud rates and short cable distances. I'm also wondering
whether I can get away with running this all at Vdd = 3.0V (thus the LF84)
or will I need run at some higher voltage while debugging.

I'm pretty clear on the PC side (terminal emulator app or basic program),
but I'm not certain of the exact electrical connections on the pic side.
I've seen mention of using anywhere from 1k to 1meg in series w/o tx/rx
lines and along with some mention of pulldowns on these lines.

Also, do I need to do anything special with any of the other rs-232 lines
such as RTS/DTS, etc. or can I just let them float? (Assuming the pc
software is configured correctly.)

So, what's the *exact* wiring/circuit that I should use here ?

(BTW, inside the PIC I'm planning on using the CCS compiler's serial IO
routines.)

Thanks in advance,

Dan

1999\09\19@201818 by Dan Creagan

flavicon
face
You can try it with 3 volts, but you would probably be lucky (haven't tried
it myself). You will probably have to use 5 volts.  However, after that it
is easy enough. Just run the output of the PIC to an inverter (74HCT04 or
similar) and vice versa with the PC. The transmit portion of the PC should
be tempered a bit (values can get high) so put a 22 k resistor from pin 3 of
the 9 pin to your PIC input.

Of course, you don't have to use an inverter if the 3.0 will trigger the PC.
Just use the 'INVERT' key word when opening your port with CCS C.

#use delay(clock=4000000) // necessary for the 'rs232' directive
#use rs232(baud=9600, xmit=PIN_B0,rcv=PIN_B1,parity=n,bits=8, invert)

Dan

{Original Message removed}

1999\09\19@223337 by Mike Keitz

picon face
On Sun, 19 Sep 1999 16:54:51 +0100 Dan Rosenfeld
<spam_OUTdrosenfeldTakeThisOuTspamSMARTMATTER.COM> writes:
> I'm also
> wondering
> whether I can get away with running this all at Vdd = 3.0V (thus the
> LF84)
> or will I need run at some higher voltage while debugging.

You can make a direct connection if the PC is going to accept the 0 to 3V
signal.  I haven't tried but I suspect that many will.  If you don't use
a level converter the PIC software needs to send out bits of opposite
polarity than if a level converter is used.  The serial out line of the
PIC should idle near Vss for a direct connection.  With a level converter
it would idle near Vdd, the level converter will convert that to a
negative voltage for the RS-232 line.

If your PC doesn't work with such a small voltage signal it would
probably be better to include a level converter circuit in the PC adapter
circuit rather than increase the PIC supply voltage.  The PIC circuit
would then be unchanged for debugging other than tapping off a 0 to 3V
logic line for serial output.

> I'm pretty clear on the PC side (terminal emulator app or basic
> program),
> but I'm not certain of the exact electrical connections on the pic
> side.
> I've seen mention of using anywhere from 1k to 1meg in series w/o
> tx/rx
> lines and along with some mention of pulldowns on these lines.

If you are transmitting only from the PIC no resistors are necessary.  It
may be a good idea to use a small resistor (100 ohms) in series with the
data line to limit current in case of a fault.  So you'd connect PIC
ground to PC ground and PIC pin (possibly through resistor) to PC data
in.

>
> Also, do I need to do anything special with any of the other rs-232
> lines
> such as RTS/DTS, etc. or can I just let them float? (Assuming the pc
> software is configured correctly.)

Most PC software will can be set to ignore the handshaking lines, but
some would like them driven high.  A conventional way to do that is
connect CTS to RTS and DSR to DTR at the PC connector.  The PIC circuit
would just connect to two pins: ground and data in.



___________________________________________________________________
Get the Internet just the way you want it.
Free software, free e-mail, and free Internet access for a month!
Try Juno Web: dl.http://www.juno.com/dynoget/tagj.

1999\09\19@225450 by Brian Kraut

picon face
Don't know how it will work on 3V, but at 5V you can connect a Pic output
directly to a 232 input, no resistors needed.  You can connect a 232 output to a
PIC input pin through a 22K resistor.

A computer 232 port will read without doing anything to the RTS, CTS, etc.
lines, but to get it to transmit you need to connect some lines together, but I
don't remember which ones off the top of my head.  Can someone help me out?

Dan Rosenfeld wrote:

{Quote hidden}

1999\09\20@015550 by Kevin Maciunas

flavicon
picon face
Brian Kraut wrote:

> Don't know how it will work on 3V, but at 5V you can connect a Pic output
> directly to a 232 input, no resistors needed.  You can connect a 232 output to
a
> PIC input pin through a 22K resistor.
>
> A computer 232 port will read without doing anything to the RTS, CTS, etc.
> lines, but to get it to transmit you need to connect some lines together, but
I
> don't remember which ones off the top of my head.  Can someone help me out?
>

The short answer is:

Connect RTS to CTS (Request to Send to Clear to Send)
DSR to DTR (Data Set Ready to Data Terminal Ready)
You might also need to connect DCD (Data Carrier Detect) to an asserted pin.

The PC will be a DTE, so it will assert DTR - connect DSR/DTR/DCD

Minimal interface is 3 wires: TxD, RxD and GND.  This is how I have my cable to
the RS-232 interfaced PICs I use..

Hope this helps.
/Kevin

1999\09\20@042812 by wzab

flavicon
picon face
On Sun, Sep 19, 1999 at 04:54:51PM +0100, Dan Rosenfeld wrote:
> Hi all,
>
> >From looking at the archive, I can see that this is a somewhat FAQ.
> Unfortunately, I'm having trouble assembling all that I've read into a
> coherent picture applicable to my simple problem....
>
> I'd like be able to send characters (debugging printfs) from the 16LF84 in
> my circuit to my PC serial port W/O USING A LEVEL CONVERTER CHIP. I only

I'd rather suggest using a small voltage shifter (see the attached
schematics, sorry for binary attachment; I've compressed it to spare
bandwidth).
T1,T2 & T4 may be almost any npn low power transistors (eg. BC107).
T3 almost any pnp low power transistor with UCEmax >=30V (eg. BC177).
Using of switching transistors is however recommended.
Diodes - almost any low power impulse diodes.

> need this to work on my PC for debugging purposes (it's not a production
> circuit) and at low baud rates and short cable distances. I'm also wondering
> whether I can get away with running this all at Vdd = 3.0V (thus the LF84)
> or will I need run at some higher voltage while debugging.

Take the higher voltages from the RS232 port (see my circuits).
>
> I'm pretty clear on the PC side (terminal emulator app or basic program),
> but I'm not certain of the exact electrical connections on the pic side.
> I've seen mention of using anywhere from 1k to 1meg in series w/o tx/rx
> lines and along with some mention of pulldowns on these lines.
>
> Also, do I need to do anything special with any of the other rs-232 lines
> such as RTS/DTS, etc. or can I just let them float? (Assuming the pc
> software is configured correctly.)
If you switch off the hardware handshake in the PC software, don't care of
the input lines (leave them floating).
--
                               Hope this helps
                             Wojciech M. Zabolotny
       http://www.ise.pw.edu.pl/~wzab  <--> .....wzabKILLspamspam@spam@ise.pw.edu.pl

http://www.debian.org  Use Linux - an OS without "trojan horses" inside

Content-Type: application/octet-stream
Content-Description: Schematics diagram
Content-Disposition: attachment; filename="PIC_RS232.eps.gz"

Attachment converted: wonderland:PIC_RS232.eps.gz (????/----) (0000C971)

1999\09\20@111812 by eplus1

flavicon
face
Steve Walz of armory.com says "Use a TTL HI output for the RS232 *GROUND*!!
Then you get +/-5VDC levels to fake out the RS232. When TTL-GND goes HI,
then a TTL-XMT LO looks like -5VDC and a "mark". Even sign problems go away
in hardware! When TTL-GND goes LO, and TTL-XMT goes HI, it looks like +5VDC
and a "space"! You can derive the two TTL signals from one off an inverter
or inverter pair! Then magically, you have direct TTL to RS232 conversion!!

This has worked for me without any external chips by just copying the
inverted output to a second pin in software and connecting it to the TD and
the "original" pin to the Signal Ground. You might use a hex inverter (7404)
to avoid modifying the software. It complies with the RS232 spec (which
calls for at least +/-3v and not more than +/-12v)

Clear to Send (CTS): CTS is used along with RTS to provide handshaking
between the DTE and the DCE. After the DCE sees an asserted RTS, it turns
CTS ON when it is ready to begin communication.       Hard-wire to RTS on
connector to bypass this function

Data Set Ready (DSR): This signal is turned on by the DCE to indicate
that it is connected to the telecommunications line.       Hard-wire to DTR
on connector to bypass this function

Data Terminal Ready (DTR): DTR indicates the readiness of the DTE. This
signal is turned ON by the DTE when it is ready to transmit or receive data
from the DCE. DTR must be ON before the DCE can assert DSR.       Hard-wire
to DSR on connector to bypass this function

James Newton, webmaster http://get.to/techref
(hint: you can add your own private info to the techref)
jamesnewtonspamKILLspamgeocities.com
1-619-652-0593 phoneÊ



{Original Message removed}

1999\09\20@173011 by Dan Rosenfeld

flavicon
face
Thanks very much to everyone who helped me with this.

I got things *kinda* working (transmit only for now) running at 4.5v,
cts<->rts and dsr<->dtr, and with 200 Ohms from the pic xmit pin to the
rs-232 Rx line. Current unsolved mystery is why  it only works reliably with
the scope's ground clip attached to my circuit ground (with scope probe
unattached.)...

Cheers,
Dan

1999\09\20@175312 by Vincent Deno

flavicon
face
I had this problem once (actually, it too was an RS232 app).  Try running
some additional ground wires here and there and back to the main ground
point.  That did it for me.

-Vincent

> Thanks very much to everyone who helped me
with this. >
> I got things *kinda* working (transmit only for now) running at 4.5v,
> cts<->rts and dsr<->dtr, and with 200 Ohms from the pic xmit pin to the
> rs-232 Rx line. Current unsolved mystery is why  it only works reliably with
> the scope's ground clip attached to my circuit ground (with scope probe
> unattached.)...
>
> Cheers,
> Dan
>

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