PDA

View Full Version : PIC problem, ways to do reset



lab310
- 26th May 2005, 08:02
I got stuck with this problem: I have simple application of PIC doing only PWM (use hardware PWM) acording to measured input voltage. Problem is that when some big (near) circuti breaker swithes on or off, PIC got stuck and PWM goes to 100% duty cycle. Then I need to switch power on/off (reset) to get it back to work.
I used power-on reset, brown-out reset and wdt with prescaler 128 (20MHz). MCLR is connected directly to +5V, and whole PCB is in metal box (only has two small openings).
What should I try to prevent all this to happen?

mister_e
- 26th May 2005, 14:31
Am pretty sure it's an other example where unused pin are left floating...

Microchip says.. assign unused pin as Output will be sufficient... that's s h i t. Unused input must bie tie somewhere VCC or Ground. Via resistor will reduce the current consumption.

I had that problem often in many noisy environement. What i did to solve the problem, tie unused pins to ground and assign them to inputs. PCB should have some kind of ground plane around and under to screen the MCU from external noise/spark.. call it as you want.

I also see many time PIC destroyed by the environement noise. Yup. So everybody must be tie those unused pin to somewhere....

Also be sure your voltage regulator output/input is very well spark protectected.