CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

12F629 reset latching problem

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
test153



Joined: 09 Feb 2009
Posts: 28

View user's profile Send private message

12F629 reset latching problem
PostPosted: Wed Mar 11, 2009 3:33 pm     Reply with quote

As I understood the 12F629 has some kind of reset latching problem and the supply voltage need to be clean.

Is having a decoupling capacitor (0.1uF) near the PIC all that is needed to fix this reset latching problem or do I need more capacitors? Also could someone explain in more detail what the reset latching problem is?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Mar 11, 2009 3:49 pm     Reply with quote

The person who made that statement did not provide a link to a post
on the Microchip forum or to an Errata document. Until they do that,
I just assume it's a generic power-on reset problem.

The person suggests using a voltage regulator. I always use a regulator.
The person suggests using a decoupling cap on Vdd. I always do that.

The original poster gives a list of his config settings. He does not have
Brownout enabled. That could be a problem, if a wall transformer is
used. I suggest that the BROWNOUT fuse should be used.
Ttelmah
Guest







PostPosted: Wed Mar 11, 2009 3:54 pm     Reply with quote

Look at document 80125G at MicroChip.
Really the key is good supply design. Capacitors only reduce the likelyhood, with some types of supply (you need decoupling close to the PIC anyway).
Ideally use a supply regulator that can be held in shutdown, till the incoming supply reaches a critical threshold, and reset the regulator when the supply falls back below this threshold.

Best Wishes
test153



Joined: 09 Feb 2009
Posts: 28

View user's profile Send private message

PostPosted: Wed Mar 11, 2009 4:12 pm     Reply with quote

The reason why I asked was that the pic is doing strange things, I'm using delay_us to blink some LEDs and when I connect the pic directly to 5V the LEDs begin to flash instead of being illuminated, also the soft rs232 doesn't work (although I can say for sure if this is related to the LED flashing problem). So I thought that it might have something to do with the power because if I use the VCC output from the programmer the pic runs without any issues. The programmer has two capacitors with I think helps to stabilize the power. I was under the impression that one decoupling cap is enough, though I seem to be wrong.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Mar 11, 2009 4:32 pm     Reply with quote

Post a schematic and a photo of your board.

Or

Post a very small test program that shows the LED problem.
Describe the circuit for the LEDs in detail. Describe the power
supply circuit for the PIC and LEDs in detail.
test153



Joined: 09 Feb 2009
Posts: 28

View user's profile Send private message

PostPosted: Wed Mar 11, 2009 4:50 pm     Reply with quote

Here is the schematic

And here is the picture of the board - perhaps not the best image but the only one I have on such a short notice.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Mar 11, 2009 5:19 pm     Reply with quote

The power for this board appears to come from the PC's serial port.
I suggest that you don't do this, during the initial development. Use a
bench power supply, or use a wall-transformer with a +5v regulator.
test153



Joined: 09 Feb 2009
Posts: 28

View user's profile Send private message

PostPosted: Wed Mar 11, 2009 5:40 pm     Reply with quote

I know it's a bad idea to draw current from the serial port - so I do use a bench power supply, and that where the problem comes in. As I said before if I use the power from the serial port trough the pic programmer (with by the way also acts as a interface) every thing works great. So do you think I need to add another capacitor or a voltage regulator?

Anyhow when I get this problem sorted out I was thinking of connecting the pic to a FTDI chip and get the power from the USB-bus.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Mar 11, 2009 5:56 pm     Reply with quote

Do you have the BROWNOUT fuse enabled ? If not, then enable it.
test153



Joined: 09 Feb 2009
Posts: 28

View user's profile Send private message

PostPosted: Thu Mar 12, 2009 1:57 am     Reply with quote

I tried with BROWNOUT as well as with PUT and it makes no difference. Any other suggestions?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Mar 12, 2009 11:22 am     Reply with quote

Remove most of the LEDs. Try to make the board work with a simple
program that flashes one LED on/off. Simplify the program and the
board, until you get something that works reliably.
Ttelmah
Guest







PostPosted: Thu Mar 12, 2009 11:29 am     Reply with quote

One thing I notice. I can see lots of LEDs on the ends of wires, and the board, but no sign of any current limiting resistors for the LEDs. They could be hidden under the heatshrink at the LED's, but if not, then this is the problem...

Best Wishes
test153



Joined: 09 Feb 2009
Posts: 28

View user's profile Send private message

PostPosted: Mon Mar 16, 2009 5:56 am     Reply with quote

Well I added the current limiting resistors, 56ohm (the reason why I didn't put them in in the first place was that I got the wrong info for them from the site I bought it on). Anyhow I doesn't work any better...
languer



Joined: 09 Jan 2004
Posts: 144
Location: USA

View user's profile Send private message

PostPosted: Mon Mar 16, 2009 1:58 pm     Reply with quote

I think your 56-ohm is a bit aggressive. In the link you provide they use 180-ohm, how about at least following that (which in my opinion is still aggressive, since each PIC pin could be sourcing/sinking two LEDs simultaneously). I do not think you would need that much current anyway, so why not start with around 500-ohms (470 or 510).
test153



Joined: 09 Feb 2009
Posts: 28

View user's profile Send private message

PostPosted: Tue Mar 17, 2009 2:27 am     Reply with quote

I finally solved the problem. When I connected the curcuit to the external power I didn't connect the VPP line (which handles the RS232 communication), so GP3 was a 0 - and the program was designed to fire an ISR on 0's (a RS232 signal is 1 on start). Thanks for the help on the way.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group