Pages: [1]   Go Down
Author Topic: programming an attiny  (Read 978 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 29
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

all the questions i saw regarding attiny's addressed operating issues. nobody but me seems to not be able to get it to work at all.
my arduino 1.0.1 works fine with my computer serial link, using arduino uno as the board. the example blink sketch blinks fine, as do other little programs i have written.
but when i try to program my attiny85 to do anything, it doesn't work.

i followed 3 or 4 sets of web instructions, including the youtube shrinkify video, but no luck.

here is what i have been doing, with comments.
a little help getting me going would be much appreciated.

1-plug in my uno board to the usb.
2- open the arduino p.env.
3- open example, arduino ISP
4- select board: arduino uno
5- upload arduino ISP sketch to the UNO board.  loads without any issues.
6- close arduino ISP sketch. usb is still plugged in.
7- wire attiny85 per "shrinkify video" attiny 1:Uno 10  ; att 4:U grd ;  att 5:U 11 ; att 6: U 12 ;  att 7: U 13 ; att 8: U  +5v;  10 microf cap reset to grd (neg side cap to grd).  the usb is still plugged in.
8- open example blink sketch.
9- in sketch change pin 13 to pin 3.
10- select board : "attiny 85 (internal 20 Mhz clock)".  the option shown in the video "attiny85 w/ arduino as ISP" is not available. in the lower right it says "ATtiny85(internal 8 MHz clock) on com3".
11- upload sketch. get error "avrdude: usbdev_open() : did not find any USB device "usb"".

if i plug in an led from atttiny pin 3 to ground, nothing.

i don't think it is working.  i haven't fried my arduino, because if i dis-connect the attiny and the cap, and select arduino UNO board, it still runs the blink program just fine.



Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
a little help getting me going would be much appreciated.

Download AS5.0 and get a $5 avr programmer and start coding.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 29
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

anyone else have a suggestion ?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 29
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

after 1-2 more hours of fiddling around, i'm not sure what i have done, but it seems to be working. the delay lasts 8 times as long as i expected, but when i change to attiny85 1 MHz internal, the delay is right. i'll have to give this some thought.

now comes the anxiety of taking it apart and trying to re-assemble it (not knowing what i did to make it work).
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 499
Posts: 19065
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You probably have the "divide clock by 8" fuse bit set. I think that is the factory standard.
Logged


California
Online Online
Faraday Member
**
Karma: 92
Posts: 3438
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

after 1-2 more hours of fiddling around, i'm not sure what i have done, but it seems to be working. the delay lasts 8 times as long as i expected, but when i change to attiny85 1 MHz internal, the delay is right. i'll have to give this some thought.

now comes the anxiety of taking it apart and trying to re-assemble it (not knowing what i did to make it work).

Before programming for the first time, select Tools > Burn Bootloader; it will set the fuse bits properly.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 29
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ok. got it apart and back together, and hey presto, it didn't work. but after more hours of fiddling around, and starting from scratch with the MIT high-low tech instructions, it is working again. i think loading the arduinoISP to the UNO board again did the trick.

thanks for the comments.
Logged

Norfolk UK
Offline Offline
Faraday Member
**
Karma: 70
Posts: 2581
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Once you have uploaded the ArduinoISP sketch to your UNO you would be safer/better to unplug it from the USB/power while wiring up the ATtiny and putting the reset capacitor on, then re-connect the USB.
As Arrch said the very first time you try to program a new ATtiny you need to select it's type in Board and then do burn bootloader. This will not actually burn a bootloader but will set the fuses correctly so when you load/compile your tiny sketch and 'upload using programmer' it should work with just two warning messages you can ignore.
Logged


Pages: [1]   Go Up
Jump to: