Searching \ for '[PIC]: serial garbage' 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: 'serial garbage'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: serial garbage'
2001\05\21@150838 by Hartung, Greg

flavicon
face
  I am transferring a project from wirewrap to etched PCB.  Each section of
the wirewrap board is being moved to a separate module with pc/104 stackthru
connectors.
  Everthing was going fine until I got to the RS-232 section.  It uses the
USART of a 16c774 and a Dallas ds275.  It is not identical to the wirewrap
design, as I removed a switching relay because I no longer need to talk to 2
devices, which makes it much simpler.  The wirewrap board works.  The etched
board, however, transmits exactly the corect # of character (to a PC, no
flow control, 115kbps), but they are the incorrect characters.  I put a
simple "echo" program in the PIC to check.  I press an "A", I should get an
"A" back, but instead I get some other character, but always the same
incorrect chacter for a given key.  I checked the math to see if it was a
simple pattern (bit 8 or something), but no pattern.  Some keys produce the
same hex value.
  I tried different chips, eliminating unnecessary modules (only the
processor, PS, and serial boards are left), different bauds, and have
checked the boards for shorts, etc.
  Any ideas?
  Thanks.

Greg Hartung

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


2001\05\21@155457 by Barry Gershenfeld

picon face
incorrect characters.  I put a
>simple "echo" program in the PIC to check.  I press an "A", I should get an
>"A" back, but instead I get some other character, but always the same
>incorrect chacter for a given key.  I checked the math to see if it was a
>simple pattern (bit 8 or something), but no pattern.  Some keys produce the
>same hex value.

Are any of the characters correct?   Mismatched parity will give
about 50% of the characters wrong, and not in any expected order
(like, not every other one).

Single bit errors sometimes aren't obvious at first glance,
either.  If you type ABCDEFGHIJKLMNOPQRSTUVWXYZ, what do
you get back?

Barry

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


2001\05\21@160904 by Dan Michaels

flavicon
face
Greg Hartung wrote:
.......
  Everthing was going fine until I got to the RS-232 section.  It uses the
USART of a 16c774 and a Dallas ds275.
....... The etched
>board, however, transmits exactly the corect # of character (to a PC, no
>flow control, 115kbps), but they are the incorrect characters.  I put a
.......
>   I tried different chips, eliminating unnecessary modules (only the
>processor, PS, and serial boards are left), different bauds, and have
>checked the boards for shorts, etc.
>   Any ideas?


Greg,

Try removing the PIC and jumping across the Rx and Tx lines (RC6/7)
at the PIC socket, for a simple loopback test. Set your terminal emulator
for full-duplex and type away. This will tell you if your RS-232 h.w.
and link are ok.

If yes, then the problem is in the PIC s.w. - your description actually
sounds like it is set to the wrong baudrate. You may have the SPBRG
value off by 1.

good luck,
- dan michaels
http://www.oricomtech.com
========================

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


2001\05\21@161116 by promero

flavicon
face
part 0 44 bytes
his is a multi-part message in MIME format.
part 1 1774 bytes content-type:text/plain; charset=us-ascii (decoded 7bit)

check and re-check:

- PC configuration:
 * Number of Data bits.
 * Number of Stop bits.
 * Baud Rate.
 * Flow Control.
 * Parity.

- PIC Configuration:

 * Number of Data bits.
 * Number of Stop bits.
 * Baud Rate.
 * Bit 9 enable/disable.
 * SPBRG value.
 * Asynchronous/synchronous mode.


"Hartung, Greg" wrote:

{Quote hidden}


part 2 422 bytes content-type:text/x-vcard; charset=us-ascii;
(decoded quoted-printable)

begin:vcard n:Romero Plaza;Pável Ernesto
tel;cell:5489528
tel;fax:6-7444829
tel;home:6-7464233
tel;work:6-7444829
x-mozilla-html:TRUE
url:http://www.insitel.com.co
org:Insitel Ltda.;Research & Development
adr:;;Calle 21 # 16 - 46 Piso 7;Armenia;Quindío;;Colombia
version:2.1
email;internet:EraseMEpromerospam_OUTspamTakeThisOuTinsitel.com.co
title:Hardware Engineer
fn:Pável Ernesto Romero Plaza
end:vcard


part 3 105 bytes
--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestspamspam_OUTmitvma.mit.edu


2001\05\21@162151 by promero

flavicon
face
part 0 44 bytes
his is a multi-part message in MIME format.
part 1 2030 bytes content-type:text/plain; charset=us-ascii (decoded 7bit)

also check BRGH bit

promero wrote:

{Quote hidden}


part 2 422 bytes content-type:text/x-vcard; charset=us-ascii;
(decoded quoted-printable)

begin:vcard n:Romero Plaza;Pável Ernesto
tel;cell:5489528
tel;fax:6-7444829
tel;home:6-7464233
tel;work:6-7444829
x-mozilla-html:TRUE
url:http://www.insitel.com.co
org:Insitel Ltda.;Research & Development
adr:;;Calle 21 # 16 - 46 Piso 7;Armenia;Quindío;;Colombia
version:2.1
email;internet:KILLspampromeroKILLspamspaminsitel.com.co
title:Hardware Engineer
fn:Pável Ernesto Romero Plaza
end:vcard


part 3 105 bytes
--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestTakeThisOuTspammitvma.mit.edu


2001\05\21@165310 by Hartung, Greg

flavicon
face
  This was literally a chip pulled from one circuit and dropped in another.
It worked @ 115 before.  How can that be software?  However, I did try
different baud rates anyway because that's what the symptoms looked like to
me.  Different garbage translations, but still didn't work.  Also checked
the scope to make sure I didn't put the wrong crystal in.
  Anyone know a good way to monitor serial data (not lines)?

{Original Message removed}

2001\05\21@170143 by Barry Gershenfeld

picon face
> Also checked
>the scope to make sure I didn't put the wrong crystal in.
>   Anyone know a good way to monitor serial data (not lines)?

Not sure what you want, but you can trap a character on
the scope and read the bits right off it.  Also make sure
your signal isn't upside down. (Drivers, inverters, stuff
like that).

Barry

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


2001\05\21@170553 by jamesnewton

face picon face
Here is my bet:

You reversed the polarity of the connection when you removed the switching
relay...

...the unit is sending a mark when it should send a space, etc....

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

{Original Message removed}

2001\05\21@171353 by Hartung, Greg

flavicon
face
  Since it's real time, 115kbps blows by pretty fast.  Serial just looks
like a jumpy line at -x volts.  I didn't know a scope would capture that.
Any hints?

{Original Message removed}

2001\05\21@174058 by Bob Barr

picon face
>From: "Hartung, Greg" <RemoveMEghartungspamTakeThisOuTADT.COM>
>Reply-To: pic microcontroller discussion list <PICLISTEraseMEspam.....MITVMA.MIT.EDU>
>To: EraseMEPICLISTspamMITVMA.MIT.EDU
>Subject: Re: [PIC]: serial garbage
>Date: Mon, 21 May 2001 15:10:19 -0600
>
>    Since it's real time, 115kbps blows by pretty fast.  Serial just looks
>like a jumpy line at -x volts.  I didn't know a scope would capture that.
>Any hints?
>

You should be able to see it by sending the same character at a rapid rate
and triggering the scope on the start bit. With the scope sync'd to the
input, the waveform should be pretty easy to see. An 8 1/2 usec bit time
shouldn't be too hard to see.

(Or you might want to use a storage scope if you have one available)

<snip>

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

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


2001\05\21@174110 by Karl Seibert

flavicon
face
1. Look at it really, really fast.
2. Send the same byte repeatedly so you have something
to trigger on.
or 3. Use a digital scope which can catch one time events.
My Tektronix TDS210 has it.

Karl Seibert
RemoveMEkarlseibertspam_OUTspamKILLspamsiscom.net

Hartung, Greg writes:

>    Since it's real time, 115kbps blows by pretty fast.  Serial just looks
> like a jumpy line at -x volts.  I didn't know a scope would capture that.
> Any hints?
>

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


2001\05\21@174310 by Jim Murphy

picon face
>Not sure what you want, but you can trap a character on
>the scope and read the bits right off it.

    I scoped serial output the other day to see what I could see, and
realized that if I didn't have some way of producing a clock signal for the
trigger of the scope, I would be beating my head against the wall.  The
problem I think I encountered was that the scope doesn't trigger off every
9th bit, but triggers its sweep from the highs or lows which you set.  So
the result is that the first bit which occurs at trigger time gives you a
nice square waveform, but after that, who knows what's there? Did the start
of the scope sweep occur at the beginning of a character, the middle, or the
end?  Search me.
    Do any of you know how to produce an accurate trigger, without getting
too complicated, so that you can see an actual "byte" pattern?
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

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


2001\05\21@174534 by Barry Gershenfeld

picon face
>   Since it's real time, 115kbps blows by pretty fast.  Serial just looks
>like a jumpy line at -x volts.  I didn't know a scope would capture that.
>Any hints?

Well if you see -x volts then your polarity is ok (in the
RS232 sense).

The reason scopes were invented was to catch and display stuff
that is "too fast" to see.  Your hints are:  Adjust the triggering
so that it triggers on the falling edge of the signal.  That's
where the start bit comes in.   Then use the "single sweep"
feature  to catch the next character.  Run the sweep rate
up until you can see the individual bits.

If your scope isn't a storage type you can get the same effect
if you make the program send the same character over and over
again and trigger off the start bit as before.  Put a little
bit of a delay between the characters you send so the scope
will finish the sweep before the character repeats, otherwise
it's hard to get a stable display (unless you know how the
"holdoff" feature works).

I hope you were able to actually measure the crystal frequency.
Sometimes you don't get what logic tells you you should.

Barry

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


2001\05\21@180142 by Bob Barr

picon face
{Quote hidden}

You need to set the rep rate of the character and the sweep speed of the
scope to get a solid picture. I haven't done this in a while (since I got a
storage scope), but here's the basic idea.

Assuming 115k 8N1, you have a total character time of about 86 usec
including start and stop bits.

If you set the scope for 10 usec/div, the total sweep time will be 100 usec.
If you send the characters every 150-200 usec, the only trigger the scope
should see is the start bit. You should see the waveform spread pretty much
across the whole screen and not moving around.

(The scope can't retrigger until after its sweep completes. By then, one
character has been displayed and the scope waits for the next start bit to
begin the next sweep.)

Boy, oh boy, storage scopes sure have spoiled me.
YMMV, obviously.
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

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


2001\05\21@182846 by Bob Ammerman

picon face
If your scope has a 'trigger holdoff' control you can use that.

If not, you can adjust the horizontal sweep speed. Chances are you'll find a
speed that results in a stable display.

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

{Original Message removed}

2001\05\21@210527 by Greg Hartung

picon face
For

ABCDEFGHIJKLMNOPQRSTUVWXYZ

I get

oaua?c?iuiyiyiyo?uy?yuyy

(U and W didn't produce anything

Raw log shows the following hex output:

F8 E3 FC E6 FE E7 FE EC FB EF FF EE FF EF FF F8 FE FB FF FE FF FC FF FF


{Original Message removed}

2001\05\21@231049 by Dan Michaels

flavicon
face
At 06:52 PM 5/21/01 -0600, you wrote:
>For
>
>ABCDEFGHIJKLMNOPQRSTUVWXYZ
>
>I get
>
>oaua?c?iuiyiyiyo?uy?yuyy
>

Did you try the simple h.w. loopback test described earlier?

The VERY FIRST thing to do is to determine whether the problem
is in h.w. or s.w. - else you can be spinning your wheels for
days.












>(U and W didn't produce anything
>
>Raw log shows the following hex output:
>
>F8 E3 FC E6 FE E7 FE EC FB EF FF EE FF EF FF F8 FE FB FF FE FF FC FF FF
>
>
>{Original Message removed}

2001\05\21@234707 by Greg Hartung

picon face
I misread the loopback test the first time.  I just tried it as instructed
(looped at the pic pins with the pic removed) and the results were the same
as I mentioned previously, pointing to the hardware.  So I removed the
processor module, leaving just the PS board and the DS275 board.  Loop the
same pins, same result.  Out of time, but I will try a different PS next.

{Original Message removed}

2001\05\22@075439 by David Harmon

picon face
On Mon, 21 May 2001 18:52:24 -0600, Greg Hartung <@spam@ghartung13@spam@spamspam_OUTHOME.COM>
wrote:

>For
>
>ABCDEFGHIJKLMNOPQRSTUVWXYZ
>
>I get
>
>oaua?c?iuiyiyiyo?uy?yuyy
>
>(U and W didn't produce anything
>
>Raw log shows the following hex output:
>
>F8 E3 FC E6 FE E7 FE EC FB EF FF EE FF EF FF F8 FE FB FF FE FF FC FF FF

vs.
41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F 50 51 52 53 54;56 57;59 5A

Assuming start bit is a zero, stop bit is a one, LSB transmitted first.
All of the received chars have high bits set to ones, suggesting that
receive bit rate is too slow.

Let us take 50 xmit and F8 rcvd.  Laying them out LSB on the left like
an oscilloscope, the bits could possibly line up like

bit     0 1 2 3 4 5 6 7
xmit    0 0 0 0 1 0 1 0 1 1 1 1
recv    0 0   0 1   1   1 1   1

Or take 44 xmit and E6 recv:

bit     0 1 2 3 4 5 6 7
xmit    0 1 0 1 0 1 0 1 1 1 1 1
recv    0 1   1 0   0   1 1   1

So it looks to me like maybe the receive bit rate is approximately 2/3
of what it ought to be, relative to the transmit bit rate.  Perhaps not
constant.  This theory does not explain all the symptoms yet, but
perhaps you could check the speeds and get back to us with any more info
that yields.

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


2001\05\22@090654 by Olin Lathrop

face picon face
> board, however, transmits exactly the corect # of character (to a PC, no
> flow control, 115kbps), but they are the incorrect characters.  I put a
> simple "echo" program in the PIC to check.  I press an "A", I should get
an
> "A" back, but instead I get some other character, but always the same
> incorrect chacter for a given key.  I checked the math to see if it was a
> simple pattern (bit 8 or something), but no pattern.  Some keys produce
the
> same hex value.

This smells like a baud rate problem.  Check both the incoming and outgoing
bit streams with a scope.  When bringing up new hardware like this, I
usually use a loop that sends the same single character every 1mS or so.
That makes it easy to trigger on the scope and make sure the timing is
right, follow it thru the driver circuit, etc.  You can make a PC send the
same character repetitively by using HyperTerm and putting a small weight on
one of the keys.


********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, spamBeGoneolinspamKILLspamembedinc.com, http://www.embedinc.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\05\22@090710 by Olin Lathrop

face picon face
>      Do any of you know how to produce an accurate trigger, without
getting
> too complicated, so that you can see an actual "byte" pattern?

Send the same byte repeatedly with at least a on character delay in between.
That should allows the scope to reliably trigger on the leading edge of the
start bit.

Here's a trick I use:  Once you have verified that the bit timing is
correct, use the variable sweep rate adjust so that each bit is exactly one
division.  Most scopes have 10 divisions accross, which is real handy for
showing you where all 10 bits of a character are.


********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, .....olinspam_OUTspamembedinc.com, http://www.embedinc.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\05\22@154538 by Peter L. Peres

picon face
Your bits seem to be inverted ?! or you have canceled some delay and the
characters are overlapping or something. The hex dump has too many '1's in
it for that text. Is it possible that an inverter was left out when you
changed the design and the RS232 stream is inverted ? What is the line
state at the computer if you do not send anything (must be 0 or -12V on
RxD).

Try to send yourself a test message burned into the device. Eg. 'abcd',0a,0d
with pacing (pause 2-10 character times between messages). This will allow
you to scope the line and get a steady image among other things.

hope this helps,

Peter

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


2001\05\22@203941 by Bill Westfield

face picon face
You can sometimes get weird behavior similar to this if you screw up your
rs232 signal grounds.  We had some terminals once that worked "a bit" but
not well, and it turned out that misswired connectors were resulting in using
the DTR signal (or similar) as ground (for a three-wire connection.)

BillW

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



'[PIC]: serial garbage'
2001\07\05@125832 by Hartung, Greg
flavicon
face
I never did figure this bug out.  I ended up swapping the DS275 for a MAX233
and all is well, if that makes any sense.

{Original Message removed}

2001\07\05@161332 by Olin Lathrop

face picon face
> I never did figure this bug out.  I ended up swapping the DS275 for a
MAX233
> and all is well, if that makes any sense.

Is is possible that one of these inverts and the other doesn't?


********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, TakeThisOuTolin.....spamTakeThisOuTembedinc.com, http://www.embedinc.com

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


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