I'm attempting to program an ATTiny841 using Arduino, and the very nice ATTinyCore by SpenceKonde with a custom circuit board. The application is reading an analog input, counting the time between peaks in the analog data, and lighting an LED if the frequency enters a predefined range. Sorry for the length of this in advance, but I've been working on this for a while, tried a lot of things, and I'm just at a loss and hoping some of the super smart folks here may be able to point out what I missed!
Here's the problem: the code has stopped working, but it hasn't changed, the programming process seems to be the issue but I can't figure out why, or how to fix it.
What lead up to the failure:
I had the code working exactly as I need on one of my prototype boards, so I built up a second board, programed it, it worked as expected but I had to make a little tweak to the design and switched the power supply from a 5V linear regulator to a boost converter set to 5V output. Built up a third board, programed it, and... Nothing. I get no output from the chip any more. It's like it doesn't read anything from the analog input. I reprogrammed it with a Blink program to just flash the attached LED, but that didn't even work. The program would flash properly (Arduino IDE would do the write and read back and report no errors) but it didn't seem to run.
After this, I thought maybe by programmer went bad (using a SparkFun AVR Pocket programmer) so I switched to another one I have, but still didn't work. After some other testing I found that when I flashed the blink program from a different computer it would work! However, flashing the original firmware still wouldn't read from the analog input properly.
I thought maybe there was something wrong in my new design, but after checking extensively between versions I couldn't find anything, so I tried swapping a good working chip onto the new board. It worked perfectly! So, I tried reflashing the chip with the exact same firmware from Arduino with the working computer and new programmer from earlier and... It quit working.... WTF?
So, replaced it with a brand new chip thinking something went wrong with that one, flashed it, still won't work!
I am absolutely 100% positive that the code has not changed, and I'm using the same settings, and I just don't understand what I'm missing. Any ideas?
EDIT: Attaching Schematic. I wasn't able to post it initially as I was travelling!
Detector Test Schematic v3.pdf (56.3 KB)
