The offtime-cap.c Halo pointed out which should help you a lot…
Since you do have a DMM, you can skip the 48 hour discharge. With a DMM, is worth reopening up the flashlight and do some measurements. And while opened, you can discharge the capacitor manually.
- First, turn the power on for a few seconds (charge the capacitor up)
- Remove power supply (or battery)
- Now measure the voltage across your capacitor. It should have some voltage and should be falling. With a 4 digit DMM, you should actually be able to see the last digit change (within seconds). Note the voltage and time on paper.
- Measure again a couple of seconds later and see what it reads. Note that on paper. It should be less voltage than before.
- Repeat after 5 seconds wait, again voltage should have fell a bit more.
- Repeat after 10 seconds, again voltage should have fell a bit more.
- Measure again this time across MCU Pin2 and ground, you should read about the same voltage as across the capacitor.
- With that confirmed, you know PIN2 is probably connected right. Now check again by first discharging the cap. Use a bare wire or a screw driver and touch both ends of the capacitor. It should now be discharged. Use DMM and measure for 0-volt.
- Continue with the NANJG not powered, and switch DMM now in OHM mode (this should be done twice, see below)
- First do a test, probe Pin7 and ground, you should read 4.7K
- Probe Pin7 and Pin 8, you should read 19.1K
- Now you can test and see if PIN2 is connected to any other MCU pin. None of them should have a near zero ohm reading. In fact, I see all 0L (infinity/out of range) on my TINY85V. Note for possible funny behavior between Pin2 and Pin4. Pin2 is your capacitor top, and pin 4 is your capacitor ground. So if your capacitor is not fully discharged, you may have funny reading.
- Do pin2 to Battery+ (the spring), this too should be 0L (infinity) see if it is so. (You already did pin2 to ground by now).
You may find your short very quickly this way.
(Why you need to do again) Bare in mind, if you have a bad joint, the pressure of the DMM probe may just change a connection - you pressed the pin down enough to make/break connection during the measure. So if the measurement seem to change depending on pressure, you got a bad joint right there. If you find no shorts so far, since probe pressure may break/make the connection, try retest one more time. If retest give you different results, you either made a mistake or there is a bad joint.
- If you already found the short by now. Celebration time. After up to 6 beers or 6 shots of martini depending on body weight, time to re-solder time… (For me, a smoke will claim me down and hand steadied.)
- If you get this far without finding a short, re-discharge the capacitor, put it back in. This time it should definitely be considered NOT-QUICK-CLICK ie LONG_OFF. The cap was fully discharged.
Note if it acted like or acted dislike LONG_OFF. Since we know the cap is manually discharged, it should act like LONG_OFF.
Tell us what you find. We will figure out what to do from there. If you don’t want to wait, I would suggest resolder both the chip and the cap. It is more likely to be a bad joint we didn’t find, than a bad ADC (since you didn’t change a working program).
Tell us either way. Now that I have typed as much as typing a novel, I feel I am enlisted in this bug fight…