pic chip freezes on startup
Posted: Tue Jan 20, 2009 9:08 am
Hi guys, can you please help with this problem?. I have got my pwm servo program to read 2 voltage inputs via ADC, the program generates PWM signal then the program adjusts PWM signal depending on the outcome of the ADC. Well, when i first start up the processor....ie. the actual hardware.....i can see that the program runs as it should because i have a led that comes on ever 4000 program loop cycles, and this led is flashing on/off as expected. But the ADC seems to be jammed as though it is receiving a high voltage....it is not as i have tested the voltage.....i even tried earthing it!
After about 5 or 10 minutes the problem goes away and begins to read the ADC correctly and all is well!
This problem does not appear in proteus and i have tried 2 chips.
I have not connected any input/output pins that i do not use,
Q. Do i need to pull up or pull down the unused pins?
Q. if so, please explain the method...resistor?...earth?...etc.
Q. is there anything else that could cause this problem?
After about 5 or 10 minutes the problem goes away and begins to read the ADC correctly and all is well!
This problem does not appear in proteus and i have tried 2 chips.
I have not connected any input/output pins that i do not use,
Q. Do i need to pull up or pull down the unused pins?
Q. if so, please explain the method...resistor?...earth?...etc.
Q. is there anything else that could cause this problem?