I needed a Picaxe to check battery voltages and I had a couple of 20M chips around so I used them. I wanted to check to see at what voltage NiMH batteries were at the end of their charge. I needed the picaxe to turn on loads, wait for the batteries to drain then turn off the loads. When I got up this morning, the 4 battery pack was reading 2.5 volts. The Picaxe did not turn off the load. I downloaded the data from my external datalogger and it verified that the load stayed on all night.
Upon investigating, it looks like the program started normally but only went one time through the DO loop and stopped. While testing, I added a TOGGLE 7 and a INC W5 and DEBUG to help troubleshoot. It turns out that as long as the TOGGLE 7 (led blink) is in the loop everything works OK (see attached program). If I REM out TOGGLE 7, the program goes through the loop once, DEBUG shows W5 to be 1 and that is it.
I also noted something else. With the program running, DEBUG does not update every time. DEBUG shows W5 to increment like this: 1, 2, 4, 6, 8, 10.... However, if I move the HIGH 7, 6, 5 command to inside the loop, W5 increments normally, 1, 2, 3, 4, 5, ...... Even with this command inside the loop, if TOGGLE 7 is removed, the program stops. Just for the heck of it I also changed CALIBADC10 to READADC10 13 but it did nothing different.
I verified most of this with another 20M.
Vsupply = 4.97 volts, PE = 5.3.1 (downloaded yesterday), 20M = 3.A.
I searched the forum but did not find anything that looked like this so if anyone has any info, I would like to hear it.
Dave E
Upon investigating, it looks like the program started normally but only went one time through the DO loop and stopped. While testing, I added a TOGGLE 7 and a INC W5 and DEBUG to help troubleshoot. It turns out that as long as the TOGGLE 7 (led blink) is in the loop everything works OK (see attached program). If I REM out TOGGLE 7, the program goes through the loop once, DEBUG shows W5 to be 1 and that is it.
I also noted something else. With the program running, DEBUG does not update every time. DEBUG shows W5 to increment like this: 1, 2, 4, 6, 8, 10.... However, if I move the HIGH 7, 6, 5 command to inside the loop, W5 increments normally, 1, 2, 3, 4, 5, ...... Even with this command inside the loop, if TOGGLE 7 is removed, the program stops. Just for the heck of it I also changed CALIBADC10 to READADC10 13 but it did nothing different.
I verified most of this with another 20M.
Vsupply = 4.97 volts, PE = 5.3.1 (downloaded yesterday), 20M = 3.A.
I searched the forum but did not find anything that looked like this so if anyone has any info, I would like to hear it.
Dave E
Attachments
-
465 bytes Views: 22