NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Support Forum » Can't Get Microcontroller into Programming Mode

May 08, 2009
by JimCahill
JimCahill's Avatar

I successfully got the initialload and temperature sensor projects working. Now I can't seem to get the microcontroller into programming mode. I flip the programming mode switch and verify with a voltmeter that pin 14 is pulled to ground. It continues running the program outputting to the LCD and into the USB port COM5 (as seen in PuTTY.) I even tried removing the switch and wiring pin 14 directly to ground.

When I try to load initialload and do the Make All, it just hangs on the line: avrdude -c avr109 -p m168 -b 115200 -P COM5 -U flash:w:initialload.hex:a

I appreciate any ideas on how to get unstuck. Thanks.

May 09, 2009
by brian
brian's Avatar

Check all the little jumper-wires on your breadboard, it's possible one may have come loose.

Have you tried unplugging your USB-Serial adapter, turning off/on your nerdkit, then plugging the adapter back in?

May 10, 2009
by JimCahill
JimCahill's Avatar

Brian, Thanks. I did recheck all my jumpers and measured voltage on the pins tied to +5 and ground. They all read OK.

I also tried unplugging the USB, powering down (disconnecting battery), replugging USB, repowering up, all with the switch set to programming mode. When I repower, it immediately starts running the temperature sensor program. This program writes the temperature readings to the USB port.

Even with the program running, I try the make all command on the InitialLoad program to see it it will write over the existing program. It just hands on the avrdude command.

Is there a bare minimum number of pins I can wire to do a download, to simplify the troubleshooting? Thanks!

May 20, 2009
by JimCahill
JimCahill's Avatar

Just in case someone comes upon a similar problem. It ended up being a problem with the bootloader.

I emailed support and did the hack with the parallel port suggested to reload the bootloader code, and now it goes into programming mode just fine.

July 25, 2011
by biosensors
biosensors's Avatar

Please provide the details on how to do the "hack with the parallel port" because we are experiencing the same problem as described above (it just hangs on the line: avrdude -c avr109 -p m168 -b 115200 -P COM5 -U flash:w:initialload.hex:a)

We tried to reload the bootloader but we don't have a parallel port (we have a COM port)

July 25, 2011
by Rick_S
Rick_S's Avatar

If you don't have a built on the motherboard parallel port, you cannot use a parallel port ISP programmer. 1st, you need to make 100% sure that the bootloader is not functioning on your chip. If it is an original NK chip, the odds are it is there and working. Probably 95% or more problems are not due to a missing or bad bootloader but some other factor. Do you ever get a time-out error from avrdude? Are you sure your USB/Serial cable is on COM5? Are you getting any other error messages? Have you tried loading anything other than the initialload program? Does the program compile properly? Did you get your "Congratulations" screen after your build? Can you post a photo of your setup to help us troubleshoot?

Rick

July 25, 2011
by Ralphxyz
Ralphxyz's Avatar

Reboot, reboot start over from scratch!

Ralph

April 15, 2012
by peter_fox
peter_fox's Avatar

I had the same problem: would not go into programming mode even when I wired pin 14 directly to ground. The way I got around this was to: power down; unplug the usb cable from my PC; power up (with pin 14 low) and the unit went into programming mode. I then powered down, reconnected the usb cable and powered up and it was still in programming mode.

Post a Reply

Please log in to post a reply.

Did you know that a piezoelectric buzzer can be used to play music with your microcontroller? Learn more...