Erratic Startup BS2PX
SeanDF
Posts: 12
Hi All,
I notice that my BS2PX has erratic startups after resets. I can't seem to find the problem, but maybe it's in my program. Sometimes, when starting the BS2PX up, all of my LED'S will come on, and requires a reset, only to do the same thing again. And about 70% of the time, the program works as it should. I'm using a outboard regulation circuit, only putting 5 VDC into the chip.
I have listed the program in a file, cliicking on PIC-01 will open the files into the editor. Please have a look and tell me if something in my program would be causing this...
I notice that my BS2PX has erratic startups after resets. I can't seem to find the problem, but maybe it's in my program. Sometimes, when starting the BS2PX up, all of my LED'S will come on, and requires a reset, only to do the same thing again. And about 70% of the time, the program works as it should. I'm using a outboard regulation circuit, only putting 5 VDC into the chip.
I have listed the program in a file, cliicking on PIC-01 will open the files into the editor. Please have a look and tell me if something in my program would be causing this...
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
·
I noticed a few coding clean up ideas; but was there a reason you were writing to the EEPROM rather than using a variable to store a 0 or 1? The reason why I ask is because there is a limited amount of writes that an EEPROM has and if a variable can be used instead, it's always suggested; unless you need to utilize the non-volatile memory. Was that your intent?
·
I have attached the first part of the code as a suggestion to clean up the program, I used a FOR...NEXT command that executed the same, but a little easier to read. Also, when you attach files, it's easier for members·to use a zip format and have everything included in one file.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Joshua Donelson
www.parallax.com