Let's get the technical bits out right away...
I have a project that uses a PIC 16F873, it uses the TMR0 with interrupt to calculate time with a prescaller of 111 (1:256), it also uses 3 ADCs on the chip to monitor voltages. I have a menu system with a 2x20 LCD, 4 LED ports and 4 switches with external pull-ups. I'm running at 4Mhz with an oscillator crystal. I have a pull-up 1k resistor on the MCLR pin that goes trough a 1N4148 diode so I can do ICSP without using a switch. I also have a 1N4148 diode on the +5V supply on pin 20 for the same reason.
Here are the settings used when programming the fuses:
Here is the problem, when I leave the project running for a while at any of the sub-menus, either ones wich poll the ADCs and switches or the menus where only the switches are checked for a keypress. The chip just seems to reset and will be at the main startup menu when I return to the project after a few hours. I also tried using XT setting for the oscillator but with same result.
I'm stumped and just can't find why it does this?
Please help with any sugestions,
Nelson
I have a project that uses a PIC 16F873, it uses the TMR0 with interrupt to calculate time with a prescaller of 111 (1:256), it also uses 3 ADCs on the chip to monitor voltages. I have a menu system with a 2x20 LCD, 4 LED ports and 4 switches with external pull-ups. I'm running at 4Mhz with an oscillator crystal. I have a pull-up 1k resistor on the MCLR pin that goes trough a 1N4148 diode so I can do ICSP without using a switch. I also have a 1N4148 diode on the +5V supply on pin 20 for the same reason.
Here are the settings used when programming the fuses:
Code:
__config _HS_OSC & _CP_OFF & _WDT_OFF & _PWRTE_ON & _DEBUG_OFF & _WRT_ENABLE_OFF & _BODEN_OFF & _LVP_OFF
Here is the problem, when I leave the project running for a while at any of the sub-menus, either ones wich poll the ADCs and switches or the menus where only the switches are checked for a keypress. The chip just seems to reset and will be at the main startup menu when I return to the project after a few hours. I also tried using XT setting for the oscillator but with same result.
I'm stumped and just can't find why it does this?
Please help with any sugestions,
Nelson