USBtiny & Boarduino upload fails

For other supported Arduino products from Adafruit: Shields, accessories, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
Frank843
 
Posts: 29
Joined: Sun Feb 24, 2008 12:34 am

Error in Loading from USBTinyISP and Boarduino

Post by Frank843 »

I keep getting the following message when I try to load the "Blink" sketch to my Boarduino:

avrdude: stk500_getsync (): not in sync: resp-0x00
avrdude: stk500_disable (): protocol error, expect=0x14, resp=0x51


Looks familiar...?!

My environment is:

Windows 2000 SP4
USBTinyISP V2.0 shows under LIB in Device Manager but not as COM3 under ports - there is no entry other than the pre-existing COM1, COM2, and LPT1
USBTinyISP drivers are installed.

Both green lights are on for the TinyISP and Boarduino.
The Boarduino red light lights when reset is pressed.

Since I am not running Linux I can not run via sudo, but I installed the Arduino IDE as Administrator and am running as Administrator, and yet, I still have this problem.

I have turned ZoneAlarm off so as not to block any COM Ports.

Any recommendations? Help...!

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Post by adafruit »

make sure you know the difference between the arduino bootloader and the usbtinyisp programmer

you cannot use the usbtinyisp within the Arduino software to upload sketches. you must have a USB-ttl adapter such as the FTDI cable.
the usbtinyisp is a programmer, not an adapter

http://www.ladyada.net/learn/avr/programming.html
http://www.ladyada.net/learn/avr/programmers.html

(i will note that its a little confusing since the bootloader acts as a stk500 programmer and theres an stk500 bridge for the usbtinyisp. unfortunately, there are enough differences between the stk500 bootloader and stk500 programmer that im not sure it will work!)
Last edited by adafruit2 on Sun Mar 09, 2008 11:50 pm, edited 2 times in total.

Frank843
 
Posts: 29
Joined: Sun Feb 24, 2008 12:34 am

Error in Loading from USBTinyISP and Boarduino

Post by Frank843 »

ok, maybe I'm a little confused... no, "a lot" confused...

MY APPROACH

1) My original intent was to use the Boarduino as a prototype of any potential projects I was going to work on. I assumed that the Arduino IDE would allow me to quickly get the prototype up and running.

2) After using the prototype in a production enviroment for some time, I wanted to be able to step back, re-consider the hardware and software design, possibly re-code the software in "C" and re-configure the hardware to eliminate excess components, i.e. streamline the production version.

a) At this point the production model could be a custom Boarduino/Arduino or
b) the production model could be an AVR (non-Arduino clone)

make sure you know the difference between the arduino bootloader and the usbtinyisp programmer


I think this is easier said, than done. Unfortunately, the links only added more confusion.

PROTOTYPING USING the BOARDUINO [part of Step 1 above]

It seems that you are telling me that in order for me to accomplish Step #1 above, I need an FTDI adapter for the Boarduino (which has a bootloader installed). Is that correct?

And that I can use the Arduino IDE to download sketchs to the Boarduino. Is that correct?

The USBTinyISP was not intended for this purpose.

PRODUCTION MODEL - BOARDUINO [2a above]

Lets say that I like the way my production model is performing and would like to have a custom, minimal hardware version of a Boarduino for the production model. How do I load the bootloader onto another ATTiny chip?Can I use the FTDI adapter?


PRODUCTION MODEL - NON-BOARDUINO [2b above]

Lets say that I like the way my prototype/production model is performing (from #1) and would like to make a more permanent production model, but I would like to take a minimalist approach to hardware and cost.

I am assuming that I could use the USBTinyISP and WinAVR to code my program in "C" and load it to an AVR chip (no bootloader).

Is my understanding of all this correct?

Thanks.

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: Error in Loading from USBTinyISP and Boarduino

Post by adafruit »

Frank843 wrote:
PROTOTYPING USING the BOARDUINO [part of Step 1 above]

It seems that you are telling me that in order for me to accomplish Step #1 above, I need an FTDI adapter for the Boarduino (which has a bootloader installed). Is that correct?

And that I can use the Arduino IDE to download sketchs to the Boarduino. Is that correct?

The USBTinyISP was not intended for this purpose.
yes
PRODUCTION MODEL - BOARDUINO [2a above]

Lets say that I like the way my production model is performing and would like to have a custom, minimal hardware version of a Boarduino for the production model. How do I load the bootloader onto another ATTiny chip?Can I use the FTDI adapter?
no you must use usbtinyisp to load the bootloader onto an empty (new) chip. after the bootloader is installed, you can use the ftdi cable
PRODUCTION MODEL - NON-BOARDUINO [2b above]

Lets say that I like the way my prototype/production model is performing (from #1) and would like to make a more permanent production model, but I would like to take a minimalist approach to hardware and cost.

I am assuming that I could use the USBTinyISP and WinAVR to code my program in "C" and load it to an AVR chip (no bootloader).

Is my understanding of all this correct?
yes. no bootloader is necessary if you are happy to skip the Arduino IDE and go straight to WinAVR.

jpcivade
 
Posts: 1
Joined: Sun Jun 15, 2008 6:11 am

Using USBTinyISP in arduino dev environnement

Post by jpcivade »

It is possible to use USBTinyISP within Arduino developement environnement with a small hack (only a txt file...).

This will allow to burn the the application AND/OR the bootloader, either if mega168 is a blank one (no bootloader: no more chicken and egg...).

To do that, edit arduino-0011\hardware\boards.txt and add at the end the folowing lines:

Code: Select all

##############################################################

boarduino.name=Boarduino Dieciemilia via USBTinyISP

boarduino.upload.protocol=usbtiny
boarduino.upload.maximum_size=14336
boarduino.upload.speed=19200

boarduino.bootloader.low_fuses=0xff
boarduino.bootloader.high_fuses=0xdd
boarduino.bootloader.extended_fuses=0x00
boarduino.bootloader.path=atmega168
boarduino.bootloader.file=ATmegaBOOT_168_diecimila.hex
boarduino.bootloader.unlock_bits=0x3F
boarduino.bootloader.lock_bits=0x0F

boarduino.build.mcu=atmega168
boarduino.build.f_cpu=16000000L
boarduino.build.core=arduino
The launch Arduino-0011, and select from the IDE Tools/Board menu : "Boarduino Dieciemilia via USBTinyISP".

Now, the programing will be done thru USBTinyISP.

This can be reverted by simply chosing again "Arduino Diecemilia" from the Tools/Board menu;

I wish also to thanks Ladyada for her great job done on electronics. Greetings from France!

mtbf0
 
Posts: 1645
Joined: Sat Nov 10, 2007 12:59 am

Post by mtbf0 »

cool...

if i were really desperate to squeeze a few more lines of code into my sketch, or if i wanted to put some sort of massive data structure in flash, could i change the maximum sketch size to 16536 and just eat the bootloader? would i have to diddle the reset vector?

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Post by adafruit »

yes youd have to change the bootloader reset fuse

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Arduino products from Adafruit”