Problems Uploading

Questions about the Really Bare Bones Board
Post Reply
GregV
Posts: 2
Joined: Wed Jun 09, 2010 10:31 pm

Problems Uploading

Post by GregV » Wed Jun 09, 2010 11:10 pm

Hi,

I have 3 older atmega168 RBBB boards (from around 2008) that a friend assembled for me a while ago. I finally had a need for them so I dug them up and they haven't been working.
I do not know if the chips were working previously, but I assume my friend tested them before giving them to me.


I'm receiving the following errors:

avrdude: Version 5.4-arduino, compiled on Oct 9 2007 at 11:20:31
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

System wide configuration file is "/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf"
User configuration file is "/Users/Greg/.avrduderc"
User configuration file does not exist or is not a regular file, skipping

Using Port : /dev/tty.usbserial-00002006
Using Programmer : stk500v1
Overriding Baud Rate : 19200
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: Send: Q [51] [20]
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding

I have tried to run board on both Linux 10.04 and Mac OSX 10.5 with the same results.

I've done a decent amount of reading on this issue, and I've tried many solutions from different websites, but so far I have been unable to resolve the issue.

I have connected an LED to pin 13 and when I press the reset button it blinks.

I am connecting to the RBBB using a USB to TTL converter which uses an FTDI chip. I have installed the drivers and I am confident that the drivers are working as I have been able to attach a Parallax serial RFID reader through the same TTL connection and have had it work properly (through the arduino app's serial monitor). However I feel like it may be part of the problem.
I have tried reversing the RX and TX cables, but I believe I have it wired correctly with TX<->RX on both sides.

I have tried the reset tricks, but those do not appear to be working either.

edit: For what it is worth, I have set the Board under tools to Diecimila at168, and I am sure that the chip on the RBBB is an atmega168

Any thoughts? I have tried all three of the boards I own, so I am hesitant to think it is a hardware issue.

Thanks in advance,
Greg

paul
Site Admin
Posts: 733
Joined: Mon May 12, 2008 4:19 pm

Re: Problems Uploading

Post by paul » Thu Jun 10, 2010 7:18 am

Greg,

I'm kind of puzzled too.

This line might be worth investigating
I have tried reversing the RX and TX cables, but I believe I have it wired correctly with TX<->RX on both sides.
The markings on the board at the cable connector, for the TX line, actually go to the RX pin on the chip - so the marking is for the CABLE TX.

There is one other thing - early revs of my board needed a cap stubbed in to work with auto-reset. So you may need to either stub in a cap from the momentary switch to the reset pin (the one on the end, furthest from ground). I believe the bootloader you have will work by pressing the reset button while uploading - too, although installing the cap makes life much easier. Let me know the rev of the board and I'll get the docs up on the site.

Those are the things that come to mind immediately. You can trouble shoot the serial and reset signals by hooking up a small electrolytic cap - anything between 10-100uf in series with a small speaker - listen for clicks - at the pins of the atmega chip when uploading.

I believe you can also see the reset signal with a meter, but it may be just a small flicker, depending on your platform.

Try downloading a clean copy of arduino IDE - it contains a patched copy of avrdude I believe that may have some differences with the one you are using.

Good luck and write back if any of that doesn't get it,

Paul

GregV
Posts: 2
Joined: Wed Jun 09, 2010 10:31 pm

Re: Problems Uploading

Post by GregV » Thu Jun 10, 2010 2:45 pm

I tried updating my AVRdude but I don't think I did it right, for what it is worth, I've tested it on a newer version on a friend's computer now and it still does not work.

Interestingly enough, it appears I have serial communication to the board, as when I connect RX to TX on the chip, I can send messages to myself through the serial monitor of the arduino software.

I'm using Arduino 0018, which is the most recent, so I feel that is not the issue (I may try and earlier version in a few minutes).

I am quickly running out of options, and I am not sure what is wrong still.

When I power the board with a wall supply I do get a slightly different message, which is seems to be moving in the right direction.

Using Port : /dev/tty.usbserial-00002006
Using Programmer : stk500v1
Overriding Baud Rate : 19200
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: Recv: 0 [30]
avrdude: stk500_getsync(): not in sync: resp=0x30
avrdude: Send: Q [51] [20]
avrdude: Recv: Q [51]
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

avrdude done. Thank you.


It's strange that changing the power source appears to change the situation. It makes me think there is something wrong with the cable I am using (which is strange because it is sending data through correctly).


Thanks again,
Greg

paul
Site Admin
Posts: 733
Joined: Mon May 12, 2008 4:19 pm

Re: Problems Uploading

Post by paul » Thu Jun 10, 2010 4:47 pm

Greg,

What's the rev letter on your board?
Did you try pressing the reset button shortly before upload?
Please describe the pin flash on pin 13 (you'll need LED and series resistor) when your press the reset button.

Have you confirmed that both a reset signal is making it to pin 1 on the chip?
And RX data is making to pin 2 on the chip? (both on upload)

Paul

warm38
Posts: 4
Joined: Sat Oct 23, 2010 10:12 am

Re: Problems Uploading

Post by warm38 » Sat Oct 23, 2010 10:45 am

I just got the latest boards (5 of them) this week (Thur) and assembled them last night (Fri).

I loaded Melody (http://www.arduino.cc/en/Tutorial/Melody) modified like Joe Purdue of SmileyMicros.com in his Arduino book and loaded it onto the RBBB so that it now plays "happy birthday" ... forever. (ARGH! MAKE IT STOP!)

Whenever I try to modify the program or change the program to something else this is what I get:

Arduino 0021
---------------------
Binary sketch size: 450 bytes (of a 32256 byte maximum)
avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51
---------------------

whatever does that mean?

I have an external supply hooked up (7.5V).
I am using USB BUB from your website but 5V and 3.3V are NOT connected to the 6-pin socket

I hooked up a 1K resistor to an LED connected between D13 and GND. On RESET it flashes once and HappyBirthday starts over. (ARGH! MAKE IT STOP!)

I have pressed RESET before clicking the "Upload" button and I have tried pressing RESET right after I see the "Binary sketch size: 450 bytes (of a 32256 byte maximum)"

Suggestions?

How can I change it back to the nice BLANK chip with Arduino bootloader? I have an Arduino Duemilanove board with ICSP. And I have one AVRISP MkII.

wade

paul
Site Admin
Posts: 733
Joined: Mon May 12, 2008 4:19 pm

Re: Problems Uploading

Post by paul » Sat Oct 23, 2010 3:06 pm

Try swapping the chip into your Arduino board to see if that if it will upload there. If you can't upload then just burn a new bootloader to it with the AVRISP mkII.

good luck,

Paul

floresta
Posts: 93
Joined: Mon Jul 28, 2008 6:52 pm
Location: Western New York, USA
Contact:

Re: Problems Uploading

Post by floresta » Sat Oct 23, 2010 3:12 pm

Wade:
whatever does that mean?
It means that there is a serial communications problem between your RBBB and your computer.
How can I change it back to the nice BLANK chip with Arduino bootloader? I have an Arduino Duemilanove board with ICSP. And I have one AVRISP MkII.
You can program the chip while it is still on the RBBB if you are willing to wire the appropriate (six) connections to your AVRISP. Otherwise you can temporarily put the chip into the Duemilanove board and use its ICSP pins. I use AVR Studio 4 to program my bootloaders but you may also be able to do this from within the Arduino environment. The required hex files are in "arduino-0021\hardware\arduino\bootloaders\".

Don

warm38
Posts: 4
Joined: Sat Oct 23, 2010 10:12 am

Re: Problems Uploading

Post by warm38 » Sat Oct 23, 2010 4:20 pm

I loaded the same program onto my Duemilanove board, then loaded a blank one (setup(){} loop(){}) then loaded blink(). It all worked OK.

I put the RBBB chip on the Duemilanove board and listened to HappyBirthday (ARGH! MAKE IT STOP!). I hooked up the AVRISP MkII. Arduino 0021 couldn't find my AVRISP MkII! I started up CodeVisionAVR and used that to erase the chip (IT STOPPED!). Then I programmed the chip with the atmega328 bootloader (is that the correct one? There were several and that was the only one I knew was the most reasonable to me). I put it back on the RBBB. Loaded the program again and couldn't reload it. It is a one-time only deal.

What do I look for?

wade

warm38
Posts: 4
Joined: Sat Oct 23, 2010 10:12 am

Re: Problems Uploading

Post by warm38 » Sat Oct 23, 2010 6:25 pm

I tried a second RBBB. Same story: load the program, then cannot load another.
Moved the mega328s to the Duemilanove board and used CVAVR/AVRISP mkII to clear and program them with arduino\hardware\bootloaders\atmega\ATmegaBOOT_168_atmega328.hex. (should I choose a different one?)

On the Duemilanove board I can program them with anything. BUT if it is not the bootloader ONLY, I cannot program them.
I tried HappyBDay, empty program, blink, blinkwithoutdealy. No problem. I moved them to the RBBB. Toast. They are blinking according to the blinkwithoutdelay and will not program. Put them back on the Duemilanove board, put the bootloader on them, move them to the RBBB and I can program them once.

Am I not holding my tongue correctly?

BTW, I cannot see that "set RTS on close" does anything once a program is loaded on the RBBB chip. It acts the same with or without it being checked -- i.e., no communication.
---------------------
Binary sketch size: 1718 bytes (of a 30720 byte maximum)
avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51
---------------------

sigh. done for the night.

wade

warm38
Posts: 4
Joined: Sat Oct 23, 2010 10:12 am

Re: Problems Uploading

Post by warm38 » Sun Oct 24, 2010 8:40 pm

Oops. Bad solder job on 2 boards.
I got 5 boards and I made up 4. 2 OK, 2 bad. It became clear after 2 worked that it was a problem with the boards. My ohm meter even had trouble with the solder joints on the DTR pin. Both bad boards were OK after I resoldered the 6-pin connector. The DTR pin wasn't too well soldered on two boards. Just my luck. :oops:
Sorry about that.

wade

paul
Site Admin
Posts: 733
Joined: Mon May 12, 2008 4:19 pm

Re: Problems Uploading

Post by paul » Mon Oct 25, 2010 10:24 am

No problem on our end. Think of it as a valuable learning experience. Especially in relationship to say, losing ones car keys, and then finding them in one's overcoat after searching the house for 45 minutes.

But I've never done that ... :)

Post Reply