Searching \ for '[PIC]:PIC Xmit to 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/microchip/ios.htm?key=serial
Search entire site for: 'PIC Xmit to Serial Port'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]:PIC Xmit to Serial Port'
2001\01\22@170557 by kben

picon face
Hi,
I have an F84 Xmitting to a Maxim232. The Maxim's TX line is tied to an old
serial mouse cable. The DB9 layout from the serial cable has 5 connections TD,RD,RTS,DTR
and GRND. So, I have the TX from the Maxim tied to TD on the serial cable and
the GRND from the serial cable tied GRND on my board. I put a logic probe on
the Maxim TX line and it appears to be xmitting ok. Question/problem is this
connection ok, should I be handshaking? Does anyone have any software to receive
from the com port.  I tried using Hyper-terminal but no luck.This project http://www.piclist.com/techref/piclist/cheapic/alphabet.htm

says to set the port to Use XXXX baud 8ND, (8 bit, no parity, handshake disabled.
How do you set handshake disabled in hyper term ?
PS. I have Windows ME.
TIA,
Kevin

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


2001\01\22@174808 by James Paul

flavicon
face
Kevin,

Also, remember that RS232 is looking for data that is inverted from
what the PIC puts out.  In other words, when the PIC is outputting a
HIGH (5V), the MAX232 is outputting -12V, and vice versa.  You may
not be receiving any data because everything is inverted.  Try
inverting your data coming from the PIC.  Make highs lows, and lows
the highs.   It worked for me.


                                          Regards,

                                            Jim



On Mon, 22 January 2001, "Kevin A. Benedict" wrote:

{Quote hidden}

spam_OUTjimTakeThisOuTspamjpes.com

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


2001\01\23@081629 by Drew Vassallo

picon face
>  Also, remember that RS232 is looking for data that is inverted from
>  what the PIC puts out.  In other words, when the PIC is outputting a
>  HIGH (5V), the MAX232 is outputting -12V, and vice versa.  You may
>  not be receiving any data because everything is inverted.  Try
>  inverting your data coming from the PIC.  Make highs lows, and lows
>  the highs.   It worked for me.

This shouldn't be the case.  The MAX232 chip should do all the inverting for
you.  The logic levels for the serial data are SUPPOSED to be inverted from
your output.  That is to say that when you output '10100111', the MAX chip
converts it to '01011000' in order to control the serial into the PC.

If you are sending data DIRECTLY to the PC without using the MAX chip, you
need to invert your data.  This is the only case that I'm aware of that you
need to do this.  I believe the reason for this is that the PC reads (-)
values as "1" and (+) values as "0".

--Andrew
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\01\23@090340 by Olin Lathrop

face picon face
> How do you set handshake disabled in hyper term ?

Flow control "none".


*****************************************************************
Olin Lathrop, embedded systems consultant in Devens Massachusetts
(978) 772-3129, .....olinKILLspamspam@spam@embedinc.com, http://www.embedinc.com

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\01\23@093128 by Olin Lathrop

face picon face
> If you are sending data DIRECTLY to the PC without using the MAX chip, you
> need to invert your data.  This is the only case that I'm aware of that
you
> need to do this.  I believe the reason for this is that the PC reads (-)
> values as "1" and (+) values as "0".

PCs conform to the RS-232 standard, which is inverted from the 0 to 5 volt
levels used by the PIC UART.  You need the same level conversion and
inversion whether you are connecting to a PC or any other "normal" RS-232
device.  The main difference between devices out there is that some will be
"terminal" equipment versus "computing" equipment and have RX/TX (and other
pairs) flipped.


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

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\01\23@141017 by kben

picon face
OK, dumb mistake #1, I had the TX on the Maxim connected to the TD on the serial
port !  I now have it connected to RD.
I am receiving data but it looks like my baudrate calc is off. I am sending
H'61' (a) in a loop to hyper-term.
I receive a black smily face with black square box. I think this is a graphic
code for a non-displayable charater ? The code for the TX is from >>
http://www.piclist.com/techref/microchip/rs232at9600on16F84noint.htm

Hyper Term is set emulation:auto detect, Telnet Term ID:ANSI, 9600,8,N,1.

The author of the TX routine did not have _c defined. I defined it as
#define _c      STATUS,C  ;Carry Flag  since I am doing a RRF.
Also his baudrate is a constant value which he calculates to 67 for a 2mhz xtal.
He uses
clockrate       equ             .2000000   ;Xtal value (2Mhz in this case)
fclk            equ             clockrate/4
baudrate        equ             ((fclk/.2400)/3-2) ;2400

I calculated 33 for 9600 baudrate, I am using a 4mhz on a F84.

Any help would be greatly appreciated,
Kevin

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\01\23@152917 by Olin Lathrop

face picon face
> The author of the TX routine did not have _c defined. I defined it as
> #define _c      STATUS,C  ;Carry Flag  since I am doing a RRF.
> Also his baudrate is a constant value which he calculates to 67 for a 2mhz
xtal.
>  He uses
> clockrate       equ             .2000000   ;Xtal value (2Mhz in this case)
> fclk            equ             clockrate/4
> baudrate        equ             ((fclk/.2400)/3-2) ;2400
>
> I calculated 33 for 9600 baudrate, I am using a 4mhz on a F84.
>
> Any help would be greatly appreciated,

I use a macro for doing the UART baud rate calculation.  See
http://www.embedinc.com/pic and look at the macro UART_BAUD in
STD.INS.ASPIC.  I've used this macro accross different projects using
different PICs, including 16xxx and 17xxx parts.


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

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\01\24@080506 by Jason Harper

picon face
"Kevin A. Benedict" <EraseMEkbenspam_OUTspamTakeThisOuTDCA.NET> wrote:
> I am receiving data but it looks like my baudrate calc is off. I am
sending
> H'61' (a) in a loop to hyper-term.
> I receive a black smily face with black square box. I think this is a
graphic
> code for a non-displayable charater ?

Sending a single character continuously is likely to produce incorrect
results.  Depending on where in the bit stream your PC starts picking up
the data, it may frame it wrong, and will afterwards be stuck with it.
You're sending this bit pattern (0x61, LSB first, with start & stop bits):
|1 1 0 0 0 0 1 1 0 0|1 1 0 0 0 0 1 1 0 0|1 1 0 0 0 0 1 1 0 0|
            |1 1 0 0 1 1 0 0 0 0|1 1 0 0 1 1 0 0 0 0|1 1 0 0 1 1 0 0 0 0|
But the framing on the second line is an equally valid interpretation of
this pattern, and that's a continuous 0x19 (a control character).  See if
HyperTerm has some mode for displaying non-printables in a more readable
format (hex or ^X format, probably), that would help track down the
problem.

To receive async serial data reliably, you must at least occasionally have
a pause greater than one full character time to ensure proper framing.
       Jason Harper

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


2001\01\24@124414 by kben

picon face
OK, I set up a simple loop to send Z-A with a 200 ms delay in between characters

and 1/2 second delay in between repeating the Z-A sequence. Basically I decrement
a register from H'5B' to H'40' not sending the 5B or 40 just 5A to 41.

Olin, sent me a link to a macro for the baud rate calc but WWW.embedinc.com
has been down since yesterday. Can anybody forward me this macro ?

I have a F84, 4mhz xtal trying to send 9600,8,n,1.
the code is from http://204.210.50.240/techref/microchip/rs232at9600on16F84noint.htm

I calculate a Baud rate delay of 33.

I download a nice terminal viewer from
http://www.picnpoke.com

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


2001\01\24@134909 by Olin Lathrop

face picon face
> Hello Olin,
>
> 400 Bad Request
>
> Request cannot be handled by the server.
>
> Reason: Connection with Host: header containing unknown local
> host name http://www.embedinc.com. Received on IP address
> 208.220.128.71, which is not bound to any virtual server.
> Cannot proceed.
>
> You paid your phone bill lately?

Thanks for pointing this out.  There was indeed a problem at my ISP, which
has meanwhile been fixed.  You can now get to my PIC development page again,
at http://www.embedinc.com/pic.


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

--
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 2001 , 2002 only
- Today
- New search...