I'm implemanting the MCLR as a reset switch; I have a 910k resistor tied high (5V) and a grounding push button switch.
For the most part things seem to be working okay, but when I copied the same .hex into other 12F675's some of those chips are not working... The program will boot properly but when I reset it, it seems to hang!
I've tried tieing a 0.01uF cap from the pin to ground but that doesn't help?
Just wondering if anyone else ever had similar issues.
I saw on a schematic once that some one use a 1M resistor for the MCLR pull up. It seemed to make sense to use as little current as possible.
I just tried a 100K and I got the same results. will try the 10K now. And last resort, the switch in series.
So yeah, I have this one chip 12F675 that works perfectly, and a fresh batch of chips with the exact same code are giving me problems. Is it possible that these things have to be broken in? heh heh
so I tried the 10K and on one of my older chips I have to press and hold the reset switch for a good 2 sec in order for it to reboot. *strange*, and the one chip that works as it should uses the 910K resistor...
I tried the new batch of chips with the 10K and those new chips from DigiKey cannot reset, even if I hold for 2 sec.
right now I'm holding them on a grounded bread board, thinking they need to discharge?
Shouldn't; MOVLW 0XD0 ;GLOBAL EN,PERIPHERAL EN, GP2/INT EN.
MOVWF INTCON
Be the last thing you do before entering the; MAIN SLEEP
GOTO MAIN
Loop? If you enable interrupts before all variables are initialized, then unpredictable behavior will result.
First thing, change the 100k to 10k thru 22k
second add the all important and often omitted 0.1uf cap between pins 1 & 8
third use a 330 ohm resistor in series with the LED (omit the 2.2k)
forth omit the 100K on the switch and enable the GPIO pullups
Try that.
If you just want to see if your PIC is OK then check out my Inchworm Hello world poster in the download section. (should be easy to mod the 12F509 code) and the schematic with 0.1uf led etc is there.
Shouldn't; MOVLW 0XD0 ;GLOBAL EN,PERIPHERAL EN, GP2/INT EN.
MOVWF INTCON
Be the last thing you do before entering the; MAIN SLEEP
GOTO MAIN
Loop? If you enable interrupts before all variables are initialized, then unpredictable behavior will result.