while temp2 != temp
write 5, temp
pause 60
read 5, temp2
wend
This is a part of my program. I am trying to store the hi-score in 16F84's eeprom. Sometimes program cannot exit from the loop. What problems cause this loop continues forever?
while temp2 != temp
write 5, temp
pause 60
read 5, temp2
wend
This is a part of my program. I am trying to store the hi-score in 16F84's eeprom. Sometimes program cannot exit from the loop. What problems cause this loop continues forever?
If you're using interrupt this may happen. Post your whole code.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
I have just solve the problem. I connect a capacitor between 5V and GND of 7805. Then I can answer my own question)
During write operation, 7805 cannot handle the voltage changes itself. So a write error occurs. A capacitor solves the problem.
Bookmarks