Searching \ for '[PIC] 16F877A USART' 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=usart
Search entire site for: '16F877A USART'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] 16F877A USART'
2005\11\22@110137 by Anno, Jeff

flavicon
face
Hey Piclisters,

I'm having some flaky results with RS232 Communication on the Pic 16F877A.  
I suspect it is a grounding issue because I can change the results by
touching the cable shield (9 pin D Shell).  
After some short settling time, the chip sends "Power On" text to the port
at 9600 Baud.  In Hyper terminal I can see this message at power up.  I can
also tell that it is receiving correctly because it reports "channel 1" when
I send it a "1" and "Channel 2" when I send it a "2", etc... So I suspect
that the code is working.  

Occasionally it appears that the chip has 'reset' because I get the "Power
On" text appearing when I haven't unplugged it.  It would also stop
reporting "Channel X" when I would send it "X".  I could wiggle and touch
the cable and it would start working again after the power on message.

I am powering it through a wall wart (8 V DC) and then across a 5V regulator
(also tried a linear DC Power Supply).  I have tried two different chips to
ensure that it wasn't an individual chip problem.  The chip had given the
flaky results when it was on my bread board, so I made a circuit board and
still had the same flaky communication.  I have Pin 5 going to ground, Pins
2 & 3 going to the RS232 chip (tried Maxim 232CPE and Sipex 232ACP). I have
tried connecting the shield to ground and got a reset each time.  I have the
five 1uf electrolytic caps for the rs232 chips with the right polarity
(triple checked).

I even connected pins 1, 4, & 6 together as well as 7 & 8. Nothing I have
tried helps.  The cable is the same cable that I program the chip with, so I
don't see any issues with it either.  Any Suggestions????

Thanks in advance,
Jeff Anno

2005\11\22@111523 by olin piclist

face picon face
Anno, Jeff wrote:
> Occasionally it appears that the chip has 'reset' because I get the
> "Power On" text appearing when I haven't unplugged it.  It would also
> stop reporting "Channel X" when I would send it "X".  I could wiggle
> and touch the cable and it would start working again after the power on
> message.
>
> I am powering it through a wall wart (8 V DC) and then across a 5V
> regulator (also tried a linear DC Power Supply).  I have tried two
> different chips to ensure that it wasn't an individual chip problem.
> The chip had given the flaky results when it was on my bread board, so
> I made a circuit board and still had the same flaky communication.  I
> have Pin 5 going to ground, Pins 2 & 3 going to the RS232 chip (tried
> Maxim 232CPE and Sipex 232ACP). I have tried connecting the shield to
> ground and got a reset each time.  I have the five 1uf electrolytic
> caps for the rs232 chips with the right polarity (triple checked).
>
> I even connected pins 1, 4, & 6 together as well as 7 & 8. Nothing I
> have tried helps.  The cable is the same cable that I program the chip
> with, so I don't see any issues with it either.  Any Suggestions????

It probably has nothing to do with the RS-232 part.  Do you have a 100nF
ceramic bypass cap accross the power as close to the PIC pins as possible?
What is connected to MCLR?  What is connected to PGM?  Is the watchdog
enabled in the code?  Is low voltage programming enabled?  What is the
lowest voltage the "8V DC" wall wart produces over a power cycle?  Is the 5V
output of the regulator really 5V and steady?  Is it a 7805 regulator?


******************************************************************
Embed Inc, Littleton Massachusetts, (978) 742-9014.  #1 PIC
consultant in 2004 program year.  http://www.embedinc.com/products

2005\11\22@120503 by alan smith

picon face
I agree with Olin.  It seems, that half the issues folks have with something is the fact you didn't bother to decouple the PIC.  I haven't looked at Olins dev board, but I suspect that he did decouple on it but with alot of dev boards, even those from microchip and microlabs (which I use cuz they are cheap and from JameCo) they don't ever include pads specific to add the caps.  I don't know why, since you have to and I just solder across the power and ground pins.  Granted, some of the time you can get away without decoupling, but it is GOOD GENERAL PRACTICE to always...always..always...decouple the chips on the board.  So I also wonder if he decoupled the RS232 chip as well.  Never overlook the obvious....I do sometimes and after spending time you go back and just duh.....

 So with that said.....if all you have is the PIC and RS232 chip....you would think it would be one or the other.  One tool I have found very handy is a TTL-RS232 dongle (few on here sell those as well as you can make your own) and just tie into the serial lines to monitor the traffic.  If you see good results there, and bad from the serial chip well its obvious where the problem lies.
 
 

               
---------------------------------
Yahoo! FareChase - Search multiple travel sites in one click.  

2005\11\22@121520 by Mark Chauvin

picon face
I'm going to don my dummy hat and ask a stupid
question - how do you decouple a chip?  Do you mean
put a very small cap across chip pwr & gnd so it gets
rid of any ripple caused by the other parts of the
circuit?  (I'm guessing, but even dummies can guess
right some times ;)

--- alan smith <spam_OUTmicro_eng2TakeThisOuTspamyahoo.com> wrote:

{Quote hidden}

2005\11\22@122205 by Anno, Jeff

flavicon
face
Well Olin...

Once again you have fixed my problem.

What is connected to MCLR?
NOTHING!!!

Once Connected everything appears fine!

Thanks again!
-Jeff Anno



{Original Message removed}

2005\11\22@123619 by Mauricio Giovagnini

flavicon
face
I suggested him (on the microchip forum) to check  also his code, to see if he has a return without a goto or something  like that.
   Although it seems to be a hardware problem, it can be also a code problem that comes around after some secs of working.
   

               
---------------------------------
1GB gratis, Antivirus y Antispam
Correo Yahoo!, el mejor correo web del mundo
Abrí tu cuenta aqu

2005\11\22@124657 by John Nall

picon face
Anno, Jeff wrote:
> Well Olin...
>
> Once again you have fixed my problem.
>
> What is connected to MCLR?
> NOTHING!!!
>
> Once Connected everything appears fine!
>  
Sometimes is is really a good idea to just do a check on the "duh"
stuff, even for experienced people.  Looking at "Tips for Beginners" on
piclist.com one sees (for example) the tip about checking MCLR:

{Quote hidden}

2005\11\22@133244 by Paul Hutchinson

picon face
See: http://www.piclist.com/techref/power/decouple.htm

Paul

{Quote hidden}

2005\11\22@141419 by Mark Chauvin

picon face
Thanks.  That clears things up.
-Mark

--- Paul Hutchinson <paullhutchinsonspamKILLspamyahoo.com> wrote:

> See:
> www.piclist.com/techref/power/decouple.htm
>
> Paul
>
> > {Original Message removed}

2005\11\22@153228 by olin piclist
face picon face
Mark Chauvin wrote:
> I'm going to don my dummy hat and ask a stupid
> question - how do you decouple a chip?  Do you mean
> put a very small cap across chip pwr & gnd

Yes.

> so it gets
> rid of any ripple caused by the other parts of the
> circuit?

No.  So that it rides out the current spikes caused by the chip itself.  It
reduces the power supply impedence at high frequencies seen by the chip.


******************************************************************
Embed Inc, Littleton Massachusetts, (978) 742-9014.  #1 PIC
consultant in 2004 program year.  http://www.embedinc.com/products

2005\11\23@111146 by alan smith

picon face
And thats also why, on ASIC's and FPGA's where you have alot of different frequency domains occuring, you end up with several values of decoupling from 1uF...to .1uF to 100pF.  There is an entire science related to decoupling, where the lead inductance of the caps can negate the effect they have, so using small SMT with pad in hole is sometimes the solution that is required.  For PIC's and the like, usually don't have to worry about these issues.
 No. So that it rides out the current spikes caused by the chip itself. It
reduces the power supply impedence at high frequencies seen by the chip.


******************************************************************
Embed Inc, Littleton Massachusetts, (978) 742-9014. #1 PIC
consultant in 2004 program year. http://www.embedinc.com/products

2005\11\23@113445 by olin piclist

face picon face
alan smith wrote:
> And thats also why, on ASIC's and FPGA's where you have alot of
>  different frequency domains occuring, you end up with several values
> of decoupling from 1uF...to .1uF to 100pF.  There is an entire science
> related to decoupling, where the lead inductance of No. So that it
> rides out the current spikes caused by the chip itself. It
> reduces the power supply impedence at high frequencies seen by the chip.
>
>
> ******************************************************************
> Embed Inc, Littleton Massachusetts, (978) 742-9014. #1 PIC
> consultant in 2004 program year. http://www.embedinc.com/products
> -

2005\11\23@122408 by alan smith

picon face
kinda wierd....because when I wrote that reply....I cut out the stuff
 that didnt' need to be included...but left Olin's name..quote..etc.....
 least I thought...that was the intent at least.
 
 But I usually don't read my posts after submitted, so I can see how
 Olin saw and reacted, once I read it.
 
 My apoligies.  I was only trying to add additional thoughts.
 
 I'll just stop repying I guess.

               
---------------------------------
Yahoo! FareChase - Search multiple travel sites in one click.  

2005\11\23@134054 by Wayne Topa

flavicon
face
Olin Lathrop(.....olin_piclistKILLspamspam.....embedinc.com) is reported to have said:
>
> Please be a bit more careful in replying to posts.  First, differentiate
> what your are replying to from what you are adding.  The standard is to
> include ">" at the beginning of lines to indicate replied-to text.  It's
> also nice to include your reply *after* each point you are replying to as it
> makes it a lot less confusing to read, since that's how converations work.
> In addition it won't kill you to spend the extra second to trim trailer
> lines and stuff added by the server from the replied-to text.

Amen!

> Neatness counts, and people will think less of sloppy posters.  Some of that
> is your business if you don't care that others find it annoying or what they
> think of you.  However it's my business when you make it look like I wrote
> your post.  Please be more careful in the future.

I admire your restraint.

WT
--
There are two ways to write error-free programs; only the third one
works.
_______________________________________________________

2005\11\24@123017 by John Nall

picon face
alan smith wrote:
>>  > And thats also why, on ASIC's and FPGA's where you have alot of
>>  different frequency domains . . . (etc., etc.)
and then Olin Lathrop replied:

> > Please be a bit more careful in replying to posts . . . (etc. etc.)
and then alan smith wrote:

> My apoligies.  I was only trying to add additional thoughts.
>    
>   I'll just stop repying I guess.
No, don't stop replying (assuming you have something valuable to add, of
course. :-)  You made an error, but there was no intent to be
malicious.  Olin corrected you, which he had a right to do because you
made it appear that he said something which he had not said.  But notice
that he said "please," so he wasn't really all that ticked off.  
Everyone on piclist does or says something a bit out of line every now
and then.  If everyone stopped replying just because they got called on
an error, then we wouldn't have much of a list.

So forget it.  No one else is thinking about it, believe me.  And keep
contributing.

John

2005\11\24@124924 by Mauricio Giovagnini

flavicon
face


John Nall <EraseMEjwnallspam_OUTspamTakeThisOuTgmail.com> escribió:  alan smith wrote:
>>  > And thats also why, on ASIC's and FPGA's where you have alot of
>>  different frequency domains . . . (etc., etc.)
and then Olin Lathrop replied:

> > Please be a bit more careful in replying to posts . . . (etc. etc.)
and then alan smith wrote:

> My apoligies.  I was only trying to add additional thoughts.
>    
>   I'll just stop repying I guess.
No, don't stop replying (assuming you have something valuable to add, of course. :-)  You made an error, but there was no intent to be malicious.  Olin corrected you, which he had a right to do because you made it appear that he said something which he had not said.  But notice that he said "please," so he wasn't really all that ticked off.  Everyone on piclist does or says something a bit out of line every now and then.  If everyone stopped replying just because they got called on an error, then we wouldn't have much of a list.

So forget it.  No one else is thinking about it, believe me.  And keep contributing.

John

 I agree It was a small incident .        Alan, all you have to do is to be careful next time. This kind of things happen on ALL forums :) so don't feel bad about it  

               
---------------------------------
1GB gratis, Antivirus y Antispam
Correo Yahoo!, el mejor correo web del mundo
Abrí tu cuenta aqu

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