Strange misbehavior using Atmel AVRISP mkII In-System Progra

Support forum for the mightyohm.com Geiger Counter.
http://mightyohm.com/geiger
Post Reply
lunobili
Posts: 7
Joined: Mon Feb 13, 2012 4:23 am

Strange misbehavior using Atmel AVRISP mkII In-System Progra

Post by lunobili »

Hi,
I know this is strange and this could even be just an ATtiny2313 question rather than a GeigerKit question, but bear with me and let me explain my problem.

Prologue:
1) I assembled my kit
2) Worked fine
3) Could see it logging data by attaching an FTDI Basic Breakout - 3.3V (http://www.sparkfun.com/products/9873)
4) Had no problems at all.

Then I did this:
1) Hacked the original firmware
2) Fleshed my changes a few times using the Atmel AVRISP mkII In-System Programmer
3) Realised there is a problem (which I will explain about soon)
4) Flashed the original firmware

...BUT the problem stil persists.

Here is the problem:
- Apparently every thing works fine if I keep the ISP Programmer connected: I see the LED blinking, I see the kit correctly logging. No click sound, but I believe this is unrelated and I just mention it for completeness, notice however, that this used to work fine and that I have continuity between one pin of the the piezo and pin PB2 and the other pin of the piezo and ground.
- When the ISP Programmer is disconnected, I see the LED blinking, but nothing gets logged (THIS IS THE PROBLEM I AM TRING TO FIGURE OUT).

Things I tried to troubleshut:
1) Powercycle the Kit e few times, but it never works unless the ISP Programmer is connected.
2) While keepin the Kit powered on, I connect the ISP Programmer back again. I see the Kit resetting (I see the message "mightyohm.com Geiger Counter 1.00") and logging is fine.

My conclusions:
1) It shoud not be a firmware problem, I see the strange behaviour even with the original firmware.
2) It shoud not be a hardware problem, although I am not sure about this. If I see loggings, albheit with ISP Programmer connected, this should mean that connections should be fine.

...but then where is the problem? Would you know where I should be looking to troubleshut this? Can you suggest any test to narrow down the problem?

Sorry for this long post, I hope I made it clear enough.

Thanks for your help,
Luca
User avatar
mightyohm
Site Admin
Posts: 1064
Joined: Fri Apr 03, 2009 10:29 pm
Location: Seattle, WA
Contact:

Re: Strange misbehavior using Atmel AVRISP mkII In-System Pr

Post by mightyohm »

Perhaps the ATtiny2313 config fuses got messed up?

Did you try running "make fuse" to reset the config fuses to the values I set? They are not the defaults for the Attiny2313.
lunobili
Posts: 7
Joined: Mon Feb 13, 2012 4:23 am

Re: Strange misbehavior using Atmel AVRISP mkII In-System Pr

Post by lunobili »

Hi,
thanks for the reply. Unfortunately this command:

avrdude -c avrispmkII -P usb -p attiny2313 -v

returned this:
avrdude: Device signature = 0x1e910a
avrdude: safemode: lfuse reads as EE
avrdude: safemode: hfuse reads as DD
avrdude: safemode: efuse reads as FF
So looks like fuses are all right. Anyway I usually upload the firmware using make install and that should flash fuses every time.

I will keep on googlig and experimenting, but if you have other suggestion, please let me know.

Thanks,
Luca
lunobili
Posts: 7
Joined: Mon Feb 13, 2012 4:23 am

Re: Strange misbehavior using Atmel AVRISP mkII In-System Pr

Post by lunobili »

...just out of desperation I tried to reflow solder on both the piezo and the FTDI header and now both work!!!!!

Thanks for you help, the fuse idea made sense, but in the end was just another case of poor soldering skills.

Cheers,
Luca
User avatar
mightyohm
Site Admin
Posts: 1064
Joined: Fri Apr 03, 2009 10:29 pm
Location: Seattle, WA
Contact:

Re: Strange misbehavior using Atmel AVRISP mkII In-System Pr

Post by mightyohm »

That is not the fix I expected, but I'm glad your kit is working now. :D
Post Reply