Sparkfun SEN-09848 Geiger Counter - Updating firmware from V12 to V13 big problem.

I am not sure it is SEN-09848 because the product description says it has a ATMega328 but my unit has a ATMega168. Schematics seem to all show it has a ATmega168.

So, anyways, I used a Arduino UNO to flash the the lastest firmware into the microcontroller using AvrDude command line. It all went well device was detected, it was erased, reprogrammed, and verified the write was good. Afterwards the Geiger Counters “counter Led” always remains lit or flashing at a very high rate where it looks like it is fully on. Using a serial monitor all I got was steady flow of v’s ie… vvvvvvvvvvvv. Well,that was not good. So, I reprogrammed the old v12 firmware into it and it does absolutely nothing now. No output on the serial monitor, even with a radioactive sample up close to it. Prior, to re-flashing the board it worked fine giving an output off random 1’s and 0’s. Is there something I should check using AVRDude when programming newer firmware? This was the command I gave it.

avrdude -c arduino -b 19200 -p m168 -P COM10 -U flash:w:main-v13.hex

Like I mentioned there were no errors and it verified good. I just don’t understand why this didn’t work. Help would be greatly appreciated.

This is the results after doing the flash of v12. Still M168 is not working correctly. Counter Led is always on or flashing at a high rate. When it is looked at with the serial port monitor I am getting a constant repeating ACSII character. Always the same character, it never changes.

C:\Users\swiec\Downloads\Arduino-As-ISP-Burn-Hex-File-in-AVR-Fuse-in-AVR-Arduino-As-Programmer-master\Arduino-As-ISP-Burn-Hex-File-in-AVR-Fuse-in-AVR-Arduino-As-Programmer-master\ISP program>avrdude -c arduino -b 19200 -p m168 -P COM10 -U flash:w:main-v12.hex

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e9406 (probably m168)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "main-v12.hex"
avrdude: input file main-v12.hex auto detected as Intel Hex
avrdude: writing flash (2136 bytes):

Writing | ################################################## | 100% 2.48s

avrdude: 2136 bytes of flash written
avrdude: verifying flash memory against main-v12.hex:
avrdude: load data flash data from input file main-v12.hex:
avrdude: input file main-v12.hex auto detected as Intel Hex
avrdude: input file main-v12.hex contains 2136 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 1.45s

avrdude: verifying ...
avrdude: 2136 bytes of flash verified

avrdude: safemode: Fuses OK (E:00, H:DF, L:E2)

avrdude done.  Thank you

.

Well, I figured out this myself and my problem is resolved. Latest reversions of this item used an atmega328p. Mine maybe being the earliest used an atmega168. So, all the hex files v12 and v13 were compiled for an atmega328p. Well to fix the issue I installed Microchip Studio for AVR and recompiled the code for an atmega168. Flashed it with my Arduino UNO and now it works.