Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

power supply for pic - need help.... interference problems!

Status
Not open for further replies.
SnM said:
thanks, i'll look into isolating the switch with an optocoupler.

i was still able to get it to reset or "crash" with it on battery power, and with the switch not connected. i have some snap connectors a few inches out from my unit. i disconnected them and then connected them together, so it appears the switch is closed. instead of 10-15 feet of wire, it is then about 6 inches. the problem still exists, but it is harder to have it happen.

i guess these pics don't really like interference in the inputs! i'll let you guys know how the optocoupler works...

What value pullup resistor are you using?, the higher the value, the higher the input impedance, and the more sensitive to interference it is.
 
the input is setup for internal weak pullups, and i just remembered, i have it setup for an interrupt on pin change for that input. this way i didn't have to poll the input. when that input changes states, my pic will reset, and run some code that i have in the beginning.....

so it looks like the input is the main cause..... the interference is causing the pin to change states, and the pic resets basicly.... still not sure why it decides to lock up the chip sometimes. i would enable the wdt, but i have the pic sleep when not in use, cuz i am still not sure if i want to run it on a battery or not. save some juice while sleeping.

thanks
steve
 
oh and if i recall correctly, aren't the internal pull ups around 22K? i know it is in the data sheet.....but i don't have one here, and don't have time to download it and look it up.... what lower value would be ok to use, for an external pullup?

thanks
 
SnM said:
oh and if i recall correctly, aren't the internal pull ups around 22K? i know it is in the data sheet.....but i don't have one here, and don't have time to download it and look it up.... what lower value would be ok to use, for an external pullup?

I thought they were higher than that, but try something like 2.2K and see if that helps.
 
You've still not described how you configured the reset pin. That's the most likely problem right there.
 
So are you sure you set the CONFIG bit for internal reset only?
 
pretty sure.... :)

i don't have access to the code til this weekend, and i never got the chance to mess with it last night, so i'll post up what i find when i find it... 8)
 
Wow, I haven't had a chance to mess with this project in a while :oops:

I checked and the CONFIG bit is setup for internal reset only.

__CONFIG _WDT_OFF & _IntRC_OSC & _CP_OFF & _MCLRE_OFF

I got some optocouplers, but I haven't had a chance to try them out. Hopefully I will this week.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top