Atmega328 Rainbowduino Programming via Arduino Issue

Arduino, Seeeduino Serials and mutants. Share your problems and experence on arduino compatible board such as seeeduino/stalker, etc.

Moderators: lily.li, violet, salmanfarisvp

lastcoolnameleft
Pre-kindergarten
Pre-kindergarten
Posts: 1
Joined: Fri Aug 13, 2010 12:55 pm

Atmega328 Rainbowduino Programming via Arduino Issue

Post by lastcoolnameleft » Fri Aug 13, 2010 1:07 pm

Has anyone been successful at programming a new Atmega328 Rainbowduino through their Atmega328 Arduino? Everytime I do, I get:

Code: Select all

avrdude: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0xfe
avrdude: failed to write flash memory, rc=-4
I have checked double, triple, quadruple...., about 10x checked that my setup is according to the diagram below, but still haven't figured out what I could be doing wrong, or if it's an incompatibility issue.
http://www.rngtng.com/files/2009/06/ard ... wduino.jpg

I'm able to program it through the Uar_SB, but not by using a Duemilanove. Any ideas/help?

Thanks,
-Tommy.

User avatar
Albert.Miao
Elementary-2
Elementary-2
Posts: 250
Joined: Sun Nov 23, 2008 9:23 am

Re: Atmega328 Rainbowduino Programming via Arduino Issue

Post by Albert.Miao » Fri Aug 13, 2010 5:34 pm

Hi Tommy,
I am sorry, please plug off the Arduino Atmega328.
As Rainbowduino_Atmega328 and Arduino Atmega328 has same bootloader.
And connect as:
Rainbowduino<--->Arduino
TXD<--->TXD
RXD<--->RXD
GND<--->GND
VCC<--->+5v
DTR<--->Reset

thanks
Albert

miso
Pre-kindergarten
Pre-kindergarten
Posts: 20
Joined: Wed Jan 05, 2011 2:15 am

Re: Atmega328 Rainbowduino Programming via Arduino Issue

Post by miso » Wed Jan 05, 2011 2:35 am

Hello.

I am experiencing a similar problem and I would appreciate some help.

I have recently purchased a black widow (328 chip) and some rainbowduinos (328 chip).
In some forums, I read that using these two devices with this chip is incompatible. Is this right?

If I was supplying the rainbowduino board with a 6v power from the JST 2 pin connection and did not connect the GND, VCC wires would this be correct?

Thanks.

michu
Kindergarten
Kindergarten
Posts: 55
Joined: Thu Jun 17, 2010 12:36 am
Location: Switzerland
Contact:

Re: Atmega328 Rainbowduino Programming via Arduino Issue

Post by michu » Wed Jan 05, 2011 4:46 am

make sure you first upload an empty sketch to your black widow - this makes sure that the serial port forwarding works fine...

miso
Pre-kindergarten
Pre-kindergarten
Posts: 20
Joined: Wed Jan 05, 2011 2:15 am

Re: Atmega328 Rainbowduino Programming via Arduino Issue

Post by miso » Wed Jan 05, 2011 5:45 am

Hello and thanks for the reply. I appreciate the feedback as I want to get this little project of mine completed as soon as I can.

I have already uploaded a sketch on the black widow that has two empty functions (loop and setup) and this did not work. I found this tip on some forum. When you say empty sketch do you mean completely empty? The reason I am asking is because a completely empty sketch does not compile.

I retried the process now just to be sure and I am still having the same issue as before.

miso
Pre-kindergarten
Pre-kindergarten
Posts: 20
Joined: Wed Jan 05, 2011 2:15 am

Re: Atmega328 Rainbowduino Programming via Arduino Issue

Post by miso » Wed Jan 05, 2011 6:54 am

I have tried the same process with another rainbowduino which was unused and I got an error which said something like programmer out of sync.
The sketch that I tried uploading was some 3_0 version of a rainbowduino firmware.

The second time onward when trying to upload the sketch it gives me the same type of error that astcoolnameleft reported.

michu
Kindergarten
Kindergarten
Posts: 55
Joined: Thu Jun 17, 2010 12:36 am
Location: Switzerland
Contact:

Re: Atmega328 Rainbowduino Programming via Arduino Issue

Post by michu » Wed Jan 05, 2011 5:29 pm

miso wrote:that has two empty functions (loop and setup)
that was i meant yes. if you did so you did the wiring wrong (between black widoww and rainbowduino) OR you selected the wrong board on the arduino ide.

about wiring up, check http://www.neophob.com/2010/07/rainbowd ... nbowduino/ - 3) Wire Up Arduino/Rainbowduino

make sure you connect all 5 cables!

cheers

miso
Pre-kindergarten
Pre-kindergarten
Posts: 20
Joined: Wed Jan 05, 2011 2:15 am

Re: Atmega328 Rainbowduino Programming via Arduino Issue

Post by miso » Wed Jan 05, 2011 7:26 pm

Maybe you are right about the wiring. I am expecting some new wires so that I can connect GND and VCC according to the diagram. At the moment I do not have those two connected as I am using an external power supply on the rainbowduino. Do you think that this could be the problem?

michu
Kindergarten
Kindergarten
Posts: 55
Joined: Thu Jun 17, 2010 12:36 am
Location: Switzerland
Contact:

Re: Atmega328 Rainbowduino Programming via Arduino Issue

Post by michu » Wed Jan 05, 2011 10:12 pm

Yes - you need to connect the GNZ between arduino and rainbowduino.

check the newly created wiki at: http://garden.seeedstudio.com/index.php ... bowduino_2

cheers

miso
Pre-kindergarten
Pre-kindergarten
Posts: 20
Joined: Wed Jan 05, 2011 2:15 am

Re: Atmega328 Rainbowduino Programming via Arduino Issue

Post by miso » Thu Jan 06, 2011 5:41 pm

Hello michu. Thanks for the last two links. The new information on the wiki is much improved and very useful.

I still experience problems with uploading the firmware to the rainbowduino through the arduino. The error I get is the following:

avrdude: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x95
avrdude: failed to write flash memory, rc=-4
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0xf1

I got this when sending the firmware pde file by using the arduino022 ide. The wiring is now as follows:
VCC-5v
GND-GND
RESET-DTR
RX-RX
TX-TX

Therefore I am now no longer trying to power the rainbowduino through the JST connection.
I do first load an empty sketch on the arduino and I do select the duemilanove 328 device on the IDE.

My devices connect to a usb port on a MacBook Pro. I dont know if the IDE on MAC OS could have any issues that is why I am mentioning it. Also sometimes usb ports dont output the voltages/amps as the usb specification mentions. Maybe laptops are worse than desktop pcs?

Do you know any people that have managed to flush a rainbowduino through an arduino where both devices have the ATMEGA328 chip installed on them? I already spend about 150-200 dollars on electronics equipment + other on this project and if possible I would like to avoid spending another £15 on a UartSB (unless if this is the only option).

Thanks,
M

Post Reply