Installing firmware

I am trying to install the firmware over the ISP connection using an Olimex AVR-ISP-MK2 programmer on Osx (using Avrdude 5.11.1 , because 6.x appeared to break things for the Olimex programmer). The chip is powered by the programmer with 5V. No other power supply has been added.

Unfortunately I am unable to program it, having following log :

avrdude -B 1 -V -p m644p -c avrispmkII -P usb -U flash:w:ambika_controller.hex:i -U flash:w:ambika_controller_boot.hex:i -U lock:w:0x2f:m -F

avrdude: stk500v2_command(): command failed
avrdude: stk500v2_program_enable(): bad AVRISPmkII connection status: Unknown status 0x00
avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.

Are you sure the programmer is actually providing power to the chip?

Have you set the fuses before? Did it work?

I am not sure about the programmer providing power, i will have to verify it tonight. Setting the fuses gave the same error.

If that’s a blank AVR chip you may have to use -B 10 to lower the programming speed a bit.
Also, which connector do you use? If I remember correctly, it’s the 10 pin connector on this programmer that is for megaAVR use (you need an adapter to connect it to the 6 pin ones in the MI products).

I already tried lowering the baudrate and that did not work. Larsen, you are right on the 10vs6 pin. I use jumper cables to make the bridge.( I am using Programmer male-male cables connected to female-female cables to Ambika ). They might be individually of different size, could that make a difference? (i remember UTP cables being very error prone to length)

With my AVRISP mk2 i have to power the voice cards through the Ambika. Doe the light on the AVRISP turn green once you connect it to the voicecard?

@shiftr I do notice led activity while attempting to flash. I am not yet into the voicecard programming phase…

So the AVR is sitting in the Ambika motherboard when you try to flash it? Then this should work I think.

I don’t think the length of the cables is an issue here (unless they really are quite long), but if the Ambika motherboard is fully completed then the programmer might not be able to power all the other electronics that is also on the same +5v lines.

Good point, i will try to use a breadboard instead for flashing the device. Another possibility is that the programmer (or driver) is broken. To be continued…

Just power the Ambika…

^ I have an avrispmkii and it does not supply power. You’ll need to power the Ambika.

BINGO! It appears the ISP ground wasn’t making a good connection, fuse written. Fuses and controller hes has been written sucessful. After the firmware was written, i do see leds 9 - 16 shining in orange. After powering down and replugging the power supply i unfortunately see nothing on the screen ( screen resistor is set to the least resistor, i am measuring 4.96V ). Nor do i see any led lit up. Where do i have to start to look at ?

Maybe this is obvious, but have you adjusted the contrast trimmer for the LCD? Does pressing any of the buttons light up any of the corresponding LEDs?

Yes i did (i put in a state so VCC of the OLED screen receives 4.96V). Pressing buttons doesn’t do much. I would think the microcontroller doesn’t boot up properly or can not communicate with other components. I do notice that VCC on the Atmel receives a proper 4.96V

I assume you resoldered the isp header? This makes me think there could more bad solder joints on the board.

That might be possible, but how could i find out where they could be? I did the basic voltage tests which were fine; are there any more tests (eg. continuity) documented to pinpoint the issue?

> i do see leds 9 – 16 shining in orange

Something wrong with the 165 or the buttons causing the unit to boot in firmware update mode?

@pichenettes After reboot i don’t see the leds being illuminated anymore. Can i somehow debug what might be going on there?

It might be that the processor does not start at all - in which case you’ll get a non-specified LED pattern at boot.

It’s bad that you can’t determine if the display works at all - that’s one of the downsides of OLEDs… At least with an LCD you can see if the backlight works and adjust the contrast, even when hooked to a dead CPU.

There’s not much I can suggest… Try using AVRdude to verify that the chip has been flashed correctly (same command with “-V” to run the extra check). Otherwise I would attack the problem by probing with a scope or logic analyzer some CPU pins to see if it does anything at all during startup.

Worst case i could swap the screen , but i prefer not to desolder it. Which pins should i have peak at?