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

Resetting PIC 16f690

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

Joined: 27 Feb 2008
Posts: 8

View user's profile Send private message

Resetting PIC 16f690
PostPosted: Tue Apr 08, 2008 4:10 pm     Reply with quote

I have seen previous posts on this topic and have tried all the suggestions with no luck.

I have a pic16f690. I am controlling four relays using pins C0, C1, C2, and C5. The chip works fine to turn them on but about 1 out of 10 times it just resets itself.

At first I had a darlington BJT setup to power the relay with a shunting diode accross the inducting load. I thought maybe I had some problems with that circuit so I changed to a mosfet solution. I have 1uf caps between the source and ground before applying 5V into my microcontroller. I have shunting diodes (although with a mosfet I shouldn't need them) accross the inductance coils of my relays. The power for the controller is completely independent of the power for the relays. (they are on a seperate supply) The supply is capable of giving the relays plenty of juice.

I am pretty much at a loss as to how this is still resetting every once in a while. The problem improved greatly when I switched to mosfet, but still a 1/10 chance of reset is unacceptable to my application....

Any help would be great thanks,
PCM programmer

Joined: 06 Sep 2003
Posts: 20168

View user's profile Send private message

PostPosted: Tue Apr 08, 2008 4:41 pm     Reply with quote

We have an older product that uses two relays. It has a 16C77, which
drives a 75451. The relays switch 12v at 7 amps to their loads.
The power supply for the board is a commercial switching supply, which
delivers 12v at 24 Amps. The PIC and the relay driver (75451) are
running at 5v. Each Vdd pin has a 100 nF capacitor to ground on each
of those chips. A LM340T regulator supplies the +5v. It has 10 uF
tantalum capacitors on the input and output. The PIC has a 100 ohm
pull-up to +5v on MCLR. (This is an earlier design and doesn't use ICSP).
The relays each have a 1N5818 diode across the coils, going to the +12v
supply for the relays.

The board is two layers, but was carefully laid out so the power and
ground traces are gridded (like streets in a city) and are at least 100 mils
(2.5mm) wide. There is a ring of +5v and Ground going around the
edges of the board (GND on top, +5v on the bottom layer), which all
of the gridded traces connect to. The PIC's power and ground traces
connect directly to the gridded +5v and ground. (There are no stubs,
i.e., no short traces which leave the main grid and go to the PICs Vdd
and Vss pins. Stubs cause noise).
The relays are placed very close to the main input power connector
from the switching power supply.

The relays are switched on/off every few minutes. They are sequenced
with a 1 second interval between switching each relay. This allows the
power supply to react to the load change more easily (total of 14 Amps).

The PIC never resets by itself.
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