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 » Temp sensor - Stuck in Programming mode

December 04, 2011
by pfullen
pfullen's Avatar

I wired my kit for the temp sensor project. I am using the USB cable to power the project

In programming mode I have two lines of bars on the LCD screen

When I use the make file everything appears to run correctly

I then disconnect the usb to power off and move the switch to the down position

When I power back up the program does not execute. I am stuck with the 2 lines of bars on the LCD screen

I posted a couple videos on Youtube to show the wiring and make file on the screen.

If anyone can see a problem with the wiring etc please let me know.

http://youtu.be/8RPHa9kqlDk

http://youtu.be/WhZl9CbZ4Cc

http://youtu.be/qDilCfSDcFk

Thanks for your help

December 05, 2011
by hevans
(NerdKits Staff)

hevans's Avatar

Hi pfullen,

I can't really see the wiring clearly from a video, is there any way you can post a good close up picture. It might help us find something.

On the command line when you try to upload a new program, do you get any errors at all? If you post a screencap of your command line it might help us too.

Humberto

December 05, 2011
by pfullen
pfullen's Avatar

Huberto

Here is a new link hopefully showing the wires a bit closer I checked the upload program and there were no errors

http://www.youtube.com/watch?v=ojHJlAz6B6M

Thanks a bunch for your help

December 05, 2011
by missle3944
missle3944's Avatar

pfullen,

Are you able to run another program such as the initialload successfully? Triple or quadruple check your wiring. It looks like your programming switch is off on pin 14 like you are 1 pin below it. A picture would help much more than a video.

December 06, 2011
by pfullen
pfullen's Avatar

Pic

Here is a link to a pic of my set up

Thanks

December 06, 2011
by missle3944
missle3944's Avatar

Are you able to run another program such as the initialload successfully?

December 07, 2011
by pfullen
pfullen's Avatar

I did run the initiaload successfully.

I then thought that maybe the wires got bumped. I even took everything back off the board expect the chip and rewired it again

Is it possible that the wires are correct but some how I shorted out the chip?

When I run the Avr dude I get the verified message and no errors. However when I power down and flip the switch and power back up I am still stuck in programming mode with the 2 lines of bars on the LCD

December 07, 2011
by hevans
(NerdKits Staff)

hevans's Avatar

HI pfullen,

If the chip is programming, it is very unlikely that the chip is completely non-operational. It is possible that you damaged one of the output pins on the chip, or possible that you damaged the LCD. Try flashing a simpler program, like the LED Blink program onto your chip. Since it doesn't use the LCD it will be easier for us to determine if the chip is really stuck in programming mode or if the LCD just isn't working for some reason.

Humberto

December 12, 2011
by pfullen
pfullen's Avatar

Ok

I was able to get the LED Blink program to load and work

I then rewired the lcd back but still having the two line of boxes problem.

Is it possible that I somehow fried my LCD. It did work for the initial load program but then when I started the temp sensor project is where the problem started.

Should I buy a new LCD to see if that is the problem?

Thanks for you help

Peter

December 12, 2011
by hevans
(NerdKits Staff)

hevans's Avatar

Hi Peter,

It is certainly possible that you fried your LCD, but actually two lines of boxes on the LCD just means the LCD was not initialized (so it might be working fine). Did you try to load the initialload file again onto your chip like missle3944 suggested? Make sure you also remove any .hex and .o files in your initialload folder before trying to load that program again, this will ensure your .c file gets recompiled.

Humberto

December 12, 2011
by BobaMosfet
BobaMosfet's Avatar

I'm wondering if this is actually the 'yellow wire' problem? As this kit is USB powered.

BM

December 13, 2011
by pfullen
pfullen's Avatar

Humberto

I did what you suggested including removing the .hex and .o and tried to load the initalload file

It complied correctly without error but when I power down and switch to run mode it the lcd keeps the two lines of bars.

Also sometimes I get an error message when I am using the make It will say unable to reach programmer or something like that.
Can you tell me what that means.

Thanks

December 13, 2011
by BobaMosfet
BobaMosfet's Avatar

I'm still pointing you at the 'yellow' wire problem. Look elsewhere in the forums for this- Noter had a solution.

BM

December 15, 2011
by pfullen
pfullen's Avatar

Thanks BM

December 15, 2011
by pfullen
pfullen's Avatar

I am able to get it out of programming mode and run the led blink program so I don't think it is stuck in programming mode due to the yellow wire as in some of the other examples.

Is is possible the resistor is bad or wrong?

Thanks

December 15, 2011
by hevans
(NerdKits Staff)

hevans's Avatar

Hi pfullen,

I don't know what you mean by the resistor. At this point I suspect either the LCD, or possibly one of your output pins on the MCU might be failing. What I would do before replacing either the LCD or the chip is to write a quick little program that flips all the digital output pins on the left side of the chip on for about a second, then off for about a second. You should then be able to put an LED across each of those pins separately and see the light go on and off, if one of them doesn't then that is your problem. If they all work fine, then your LCD got damaged somehow.

Humberto

December 23, 2011
by pfullen
pfullen's Avatar

It seems like I am now stuck on a different problem. I have been able to get the Led_Blink program work before. However now when I use the make command I get an error that the programmer is not responding.

[root@Basement led_blink]# make avrdude -c avr109 -p m168 -b 115200 -P /dev/ttyUSB0 -U flash:w:led_blink.hex:a

Connecting to programmer: . Found programmer: Id = "FDL v02"; type = S Software Version = 0.2; No Hardware Version given. Programmer supports auto addr increment. Programmer supports buffered memory access with buffersize=128 bytes.

Programmer supports the following devices: Device code: 0x35

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9406 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 "led_blink.hex" avrdude: input file led_blink.hex auto detected as Intel Hex avrdude: writing flash (7784 bytes):

Writing | | 0% 0.00savrdude: butterfly_recv(): programmer is not responding make: *** [led_blink-upload] Error 1

I rewired everything and still get the same error.

Thanks

Peter

December 23, 2011
by hevans
(NerdKits Staff)

hevans's Avatar

Hi pfullen,

9 times out of 10 that error happens at that point because of a battery issue. Notice that your chip got through the reading, but bonked when it got to the writing. Writing to flash memory takes way more current than reading from it.

Humberto

December 26, 2011
by pfullen
pfullen's Avatar

I have it wired to get power from the USB cable. I tested it with my multi meter and am getting a 5.03 reading

I have had it work before so I am not sure what is going on this time

December 27, 2011
by hevans
(NerdKits Staff)

hevans's Avatar

Hi pfullen,

Well thats weird. I noticed you are on a Mac. Did you set up the sleep() in the makefile in between the read and write cycles. It usually makes programming on macs more stable.

Humberto

Post a Reply

Please log in to post a reply.

Did you know that you can connect digital calipers to a microcontroller? Learn more...