Exact match. Not showing close matches.
PICList
Thread
'[PIC] 16F877A USART'
2005\11\22@110137
by
Anno, Jeff
|
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
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
|
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
|
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_eng2TakeThisOuT
yahoo.com> wrote:
{Quote hidden}> 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.....
2005\11\22@122205
by
Anno, Jeff
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
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
|
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}> 1. *Don't Float:* Tie the switch pin
> <
http://piclist.com/techref/microchip/portpins.htm> Hi or Lo
> with a ~10K resistor or use internal pullups to avoid floating
> inputs when the switch is open. In general, do something with
> unused pins <piclist.com/techref/logic/xtrapins.htm>
> don't just leave them floating
> 2. *TRIS* <
http://piclist.com/techref/microchip/tris.htm> - make
> sure they are set properly for in/out pins.
> 3. *Debounce* the switches to avoid false switch states.
> 4. *RA4 on a 16F84 is "open collector"* - it can pull to ground but
> will not pull up to V^cc . You can still use it to drive LEDs by
> hanging the LED & resistor between RA4 and +5V supply. (anode to
> +5V) This means that the logic is now inverted; 1 = off and 0 = on
> 5. *Diasble WDT <
http://piclist.com/techref/wdts.htm>* if not needed
> 6. *Check MCLR* is connected to V^cc
> 7. *Connect ALL V^cc and V^dd pins.* Not just one of each.
> 8. Make sure Osc <piclist.com/techref/microchip/osc.htm>
> fuses are set for your type of oscillator
> <
http://piclist.com/techref/microchip/osc.htm>, crystal (XT), RC
> (RC), resonator (HS). etc
>
2005\11\22@133244
by
Paul Hutchinson
2005\11\22@141419
by
Mark Chauvin
Thanks. That clears things up.
-Mark
--- Paul Hutchinson <paullhutchinson
KILLspamyahoo.com> wrote:
> See:
> www.piclist.com/techref/power/decouple.htm
>
> Paul
>
> > {Original Message removed}
2005\11\22@153228
by
olin piclist
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
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
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
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
|
Olin Lathrop(.....olin_piclistKILLspam
.....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
|
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
|
John Nall <EraseMEjwnallspam_OUT
TakeThisOuTgmail.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...