Programming ATtiny chips

@StuckInSynth I’m having ATtiny issues. I had previous success programming the ATtiny85 with both the Arduino UNO and the littleBits Arduino to make my own bits, but I started getting a frustrating AVR dude error that I can’t fix by checking my connections. I tried another chip, but still the same error.

I’m looking for a hardware programmer for the ATtiny series (kindof like the FTDI friend for the Arduino pro mini’s). Could you please recommend a usb plugin device so I can stop using the Arduino as ISP method? I want to stay in the Arduino IDE.

Oh, me too, me too! (jumping in seat, waving arm in air!)

I’ve gotten a couple ATtiny85 chips, but I can’t decide between two programmers at Sparkfun: the Tiny AVR programmer that sticks roight into a USB port and has a chip scocket right on it, or the Pocket AVR programmer that comes with an ISP cable. The latter seems more versatile, but the former more convenient if the 8 leg chips are the only target.

ps, I just noticed the Tiny programmer is backordered.

1 Like

Hello @JackANDJude and @chris101,
I have the AVR pocket programmer from Sparkfun, I have used it without too many issues on ATTiny 85’s, and the 24/44/84 series also. The online support on Sparkfun’s site is also quite helpful. With the newest version of the Arduino IDE, I have found that sometimes I have to set the fuse bits more than once while refining programs(using the bootloader burn function. @JackANDJude, are you using the IDE or AVRdude directly?

1 Like

@stuckinsynth I’m using the Arduino IDE 1.05r2. I have not updated my IDE since previous success.

I back ordered the Tiny programmer from Sparkfun this morning, because it looks simpler and I really like 8 pin chips for bit making…

2 Likes

@JackANDJude,

Could also be the issue that your program is too big! Is it bigger than 4 Kb??

And I also still program in 1.0.5. because well… I know that works;)

1 Like

I’ve been quite happy with 1.6.1, but haven’t used it with an AVR programmer … yet!

Great stuff @chris101! You should get an ISP programmer and get some ATTiny chips. You would be amazed how much you can do with an Tiny84 or even the Tiny85. Then you can ditch any excess weight you’re not using and get rid of the Arduino boards, even the Micro, which is small already. Check out http://highlowtech.org/?p=1695. The whole deal is pretty easy if you’ve programmed Arduino before. While you’re at it ATMEL provides FREE samples to “qualified” individuals.

1 Like

Thanks much @Philip_Verbeek, I appreciate your advice. I have tried multiple variations of simple R/C filters, even second-order and inductive type, they provide an accurate read out, but the signal noise my scope reads is totally unacceptable IMHO. A Sallen-Key low pass seems to be the answer, but again just can’t achieve a close unity gain, when I do the math to design one, the end result is impossible. Maybe my calculus is that rusty… The ArduinoBit schematic does look very promising tho, some much for not “cheating”

1 Like

Thanks Ryan! (@StuckInSynth)

Going naked with Atmel chips is definitely in my future. Although there is a HUGE overhead saving, it’s at the expense of ‘Easy’, which is my no. 1 parameter. But I have been thinking a lot about this, especially since I need to make my ‘people counter’ much smaller (… and it will use a bargraph style output.) However, since I do brute-force programming, more output pins are better! :open_mouth:

For example my bargraph+ uses 13 pins. So what are the ‘high pin-count’ chips I should be looking at? I want to use discrete pins, cause support chips intimidate me!

1 Like

@chris101,
Have you considered using a tactswitch to go through the different modes? This will save you some pins. Also an advantage is that you can very easily add more modes to it later etc.

But if you need 13 pins you can go with the ATMEGA328. These are also used in the micro, nano, uno etc. So you will have the same pins available.

PS: Have you seen my colored arena of wires used in the LEGO pinball machine? Sometimes it has its charms, I think;)

3 Likes

Well @chris101, that puts you square out of the most popular of the ATTiny series, being the 45/85, and the 24/44/84 chips primarily. While you can do very cool things with an ATTiny85, it has only three analog or digital inputs and two PWM outputs. The ATTiny24/44/84 lets loose a bit more, with eight general purpose input/output (GPIO) and as the name says, input or output, analog or digital and has a 10 bit ADC. Three more digital input/output, PWM output capability on three set outputs, one digital, two A/D. Another thing that seems assumed is all the extras people describe as “must-have” items, i.e. Crystal or Resonator, associated capacitors and such. These chips do not require anything more than a clean power source connected to VCC and GND. Then can be set to run on an internal 1 Mhz or 8 Mhz clock that will be more than adequate for many applications. There are additional ATTinys in the series, like the 87/167 or the ATTiny43(u) that boast sixteen GPIO, but they are really not all that tiny anymore. In addition, SMD only available, no PDIP like the others. Also, unlike the others, these are really programmed in C/C++ with AVRDude or similar software that is not nearly as friendly as the Arduino IDE. There are easier ways to cut back on pin abuse, like a shift register for a display that can easily control a 16 LED bargraph with just three pins. It also usually ends up simplifying your code and saving memory. You can go on to pretty simple multiplexing to really serious multiplexing using just a few pins also. Who knows, you’ll amaze yourself. Happy to respond to questions when I’m available.

2 Likes

Ryan (@StuckInSynth), you make a pretty good case for going with the smaller chip. Thank you!

And who doesn’t like easier programming? But shift registers and other multiplexing stuff is new to me, but I get that is what I have to learn. Do you have a suggestion for a tutorial?

When using the Arduino IDE to go from programming an Uno to doing proper coding for the ATTiny won’t be too difficult, BTW I like my SparkFun AVR Pocket Programmer, their info website has lots of really good general and specific info for ATTiny. Whichever programmer you choose, follow their tutorial(Again SparkFun) and there are excellent links at the end after you get setup. As far as using registers, I know Instructables had alot if you searched 'shift register seven segment display. Using a bargraph style will also avoid you the pain of converting seven segment numerals into hexadecimal. I think the way they explain simple multiplexing or ‘charlieplexing’ on the Arduino reference/examples page is really the simplest way to get started on that one. I find myself mostly referring to arduino.cc for the vast majority of my own questions. The high/low tech website I gave earlier is most important, it has the software core to modify the Arduino IDE. Happy hunting for now, I’m sure we’ll end up learning something from eachother along the way.

1 Like

Thanks for the assignment @StuckInSynth:wink:

I’ve got some reading to do now, and perhaps a trip to Frys Electronics (where they have a whole array of logic chips, including shift registers) this afternoon.

I am having fun with the ATtiny85 as well, thanks to @Philip_Verbeek. It really ain’t that difficult if you’re used to programming with the Arduino…

3 Likes

@Philip_Verbeek: When things don’t work, I always go back to blink as a system test. Here’s the error I get:
Binary sketch size: 842 bytes (of a 8,192 byte maximum)
avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85
avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override

I’m pretty sure anyone here is already aware, but for reference, this sub-forum:

http://forum.arduino.cc/index.php?board=67.0

is all about direct AVR programming.

Good idea indeed.
But i was pointing to an other problem that could occur.

For your problem: I think you already did it, but recheck the connections again? Maybe rebuild it on another breadboard to test. Have you connected the reset pin correctly?
Maybe reburning the bootloader to it?

1 Like

hey @JackANDJude,
I have created some relatively complex projects with a lone AT85, when you put your mind in ‘simplest’ mode, it’s amazing what you can do. So if you want to stick to the '85, do it, from what I understand, the programmer you ordered is pretty foolproof hardware wise. There’s alot of info on the '85 in particular on the Sparkfun website, dig around some and see what you can find. By the way, ATTiny sure did see easier on older version of Arduino IDE, I would keep going with what you have, altough I have no complaints with the new version truly.

1 Like

Yo Ryan, Jude, Philip! ( @StuckInSynth @JackANDJude @Philip_Verbeek )

I just placed an order with Sparkfun for a Pocket Programmer, and a fist full of chips: 2 tiny85s, 2 tiny84s and a 328 (just in case the tinys don’t work out :wink: ) I also got a couple resonators (I’ll switch over to crystals 1) if I need the speed, and 2) if I make a Bit, because resonators contain mercury) and a 28 pin zif socket to hold any of the chips while programming them. I am excited! I’ll come back and crow when my order arrives.