Testing my just finished USBtinyISP

USB AVR Programmer and SPI interface. Adafruit's USBtinyISP.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
ltpitt
 
Posts: 75
Joined: Thu Jan 03, 2013 5:22 am

Testing my just finished USBtinyISP

Post by ltpitt »

Hi all!

I've just built the USBtinyISP from kit and installed all software.

It seems to look fine but I can't do a simple led blink so I thought to ask for a little help.

I open arduino and select USBTinyISP.

I choose the default basic sketch of led blinking and, after checking connections, I upload the bootloader first and then the sketch successfully to an attiny84 I have.

Then I connect 3.3v to pin 1 of the attiny and ground to pin 8

According to the little sketch:

Code: Select all

/*
  Blink
  Turns on an LED on for one second, then off for one second, repeatedly.
 
  This example code is in the public domain.
 */
 
// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
int led = 13;

// the setup routine runs once when you press reset:
void setup() {                
  // initialize the digital pin as an output.
  pinMode(led, OUTPUT);     
}

// the loop routine runs over and over again forever:
void loop() {
  digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);               // wait for a second
  digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);               // wait for a second
}
I connect my led - to ground and my led + to a resistor and then to pin 13.

Nothing happens...

What am I doing wrong?

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Testing my just finished USBtinyISP

Post by adafruit_support_rick »

You have to manually download your sketch with avrdude. You can't do it with the Arduino IDE. That setting in the IDE is only for downloading the Arduino bootloader

User avatar
ltpitt
 
Posts: 75
Joined: Thu Jan 03, 2013 5:22 am

Re: Testing my just finished USBtinyISP

Post by ltpitt »

Oh...

Thanks!

I am getting closer...

Installed avrdude (I suppose it's working) and now I'm ready to upload again.

I try with original blink file from arduino library:

Code: Select all

avrdude -c usbtiny -p t84 -U flash:w:Blink.ino
and I get:

Code: Select all

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.03s

avrdude: Device signature = 0x1e930c
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 "Blink.ino"
avrdude: input file Blink.ino auto detected as invalid format
avrdude: invalid input file format: -1
avrdude: write to file 'Blink.ino' failed

avrdude: safemode: Fuses OK

avrdude done.  Thank you.
Is .ino not compatible?

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Testing my just finished USBtinyISP

Post by adafruit_support_rick »

No. You have to compile the sketch first. Arduino will produce a compiled .hex file. That's the file you need to download with avrdude.

In the arduino Preferences window, turn on verbose compile. Then close and restart the arduino application.
When you compile your sketch (click the 'Check' icon), you'll see a whole bunch of cryptic-looking output at the bottom of the arduino window. at the end of all of that, you'll see a line that looks something like this:

Code: Select all

/var/folders/rm/42sbjlxr8xj2q60059_spx7r0000gn/T/build2003570799458643190.tmp/WebClient.cpp.hex 
Instead of "WebClient.cpp", you'll see the name of your sketch. You need to go to that directory, and download the .hex file from there using avrdude

User avatar
ltpitt
 
Posts: 75
Joined: Thu Jan 03, 2013 5:22 am

Re: Testing my just finished USBtinyISP

Post by ltpitt »

Code: Select all

C:\Users\Pitto\AppData\Local\Temp\build901782081024382380.tmp>avrdude -c usbtiny
 -p t84 -U flash:w:Lampeggio.cpp.hex

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.03s

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

Writing | ################################################## | 100% 0.64s



avrdude: 830 bytes of flash written
avrdude: verifying flash memory against Lampeggio.cpp.hex:
avrdude: load data flash data from input file Lampeggio.cpp.hex:
avrdude: input file Lampeggio.cpp.hex auto detected as Intel Hex
avrdude: input file Lampeggio.cpp.hex contains 830 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.47s



avrdude: verifying ...
avrdude: 830 bytes of flash verified

avrdude: safemode: Fuses OK

avrdude done.  Thank you.
HOOOOORRRAAAYYY :D

Thanks!

The led blinking is VERY soft...

Voltage and resistance are fine, anyway.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Testing my just finished USBtinyISP

Post by adafruit_support_rick »

Good work! :D

gpoteau
 
Posts: 4
Joined: Fri Feb 21, 2014 11:30 am

Re: Testing my just finished USBtinyISP

Post by gpoteau »

Actually you can download the sketch using the arduino IDE, for this you have to hold the shift key while clicking on the prog icon.

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

Return to “USBtinyISP”