Starting on ATtiny85: what programmer?

Started by Fancy Lime, December 19, 2020, 05:20:33 PM

Previous topic - Next topic

Fancy Lime

Hey all,

I decided to finally order some ATtiny85s and get me feet wet with microcontroller programming. I'm thinking a tap tremolo might be a nice first project. My question: what do I want for programming the little things? I was thinking Arduino Nano Every. Good idea? Bad idea? Any other/better ideas? Seriously, I am completely ignorant when it comes to microcontrollers and got tired of the enormous flood of nonsense tutorials in completely incomprehensible "English" real fast.

Thanks guys, appreciate any help and wisdom,
Andy
My dry, sweaty foot had become the source of one of the most disturbing cases of chemical-based crime within my home country.

A cider a day keeps the lobster away, bucko!

patrick398

I use an Arduino Uno and it's pretty straight forward to interface with the attiny chips. You can write the code for the Arduino itself and utilize the serial monitor to make sure everything is working as it should (which it rarely is in my case) and then I change pin numbers to correspond with the attiny.
I recomment this guy for really good beginner tutorials: https://toptechboy.com/arduino-lessons/

Fancy Lime

Quote from: patrick398 on December 19, 2020, 05:46:30 PM
I use an Arduino Uno and it's pretty straight forward to interface with the attiny chips. You can write the code for the Arduino itself and utilize the serial monitor to make sure everything is working as it should (which it rarely is in my case) and then I change pin numbers to correspond with the attiny.
I recomment this guy for really good beginner tutorials: https://toptechboy.com/arduino-lessons/
I can do what with the huh? I have to go through the tutorials before I even understand your answer completely ;) The question for now is, can I use any Arduino or does it have to be an Uno or Nano v3? I guess I probably can but I only found info for those two definitely working.

Thanks,
Andy
My dry, sweaty foot had become the source of one of the most disturbing cases of chemical-based crime within my home country.

A cider a day keeps the lobster away, bucko!

niektb

I believe you can use any arduino that uses the FTDI chip (or the CH340G) for the usb communication

patrick398

Quote from: Fancy Lime on December 20, 2020, 01:47:03 AM
Quote from: patrick398 on December 19, 2020, 05:46:30 PM
I use an Arduino Uno and it's pretty straight forward to interface with the attiny chips. You can write the code for the Arduino itself and utilize the serial monitor to make sure everything is working as it should (which it rarely is in my case) and then I change pin numbers to correspond with the attiny.
I recomment this guy for really good beginner tutorials: https://toptechboy.com/arduino-lessons/
I can do what with the huh? I have to go through the tutorials before I even understand your answer completely ;) The question for now is, can I use any Arduino or does it have to be an Uno or Nano v3? I guess I probably can but I only found info for those two definitely working.

Thanks,
Andy

I think you can use a nano, but as it's all open source you can pick up an Uno clone for a few pounds, so you may as well get the more powerful one. I have mine set up next to a breadboard with the attiny, then there's about 4 or 5 connections to make. But I wouldn't worry about the attiny just yet, get the Arduino first and play around with that, then you can think about translate the sketches onto an attiny

niektb

Funny fact, In most cases I just stick a cheap Chinese Arduino Nano clone on the effect PCB (even though it's quite large, compared to a ATTiny). They are soo cheap, no bootloader flashing is needed and you can update the software easily via usb once the effect is in the case :)

deadastronaut

#6
+1 on arduino uno

Follow this vid, and youll be up n running... 8)

https://youtu.be/i9WOwDrpRKs


I used this method to programme an attiny for neo pixel leds for a guitar neck fret marker lights.... :icon_mrgreen:
https://www.youtube.com/user/100roberthenry
https://deadastronaut.wixsite.com/effects

chasm reverb/tremshifter/faze filter/abductor II delay/timestream reverb/dreamtime delay/skinwalker hi gain dist/black triangle OD/ nano drums/space patrol fuzz//

MR COFFEE

I have used the Arduino Nano successfully and just plug both the Nano and the AtTiny into a common Electronics Breadboard and then run jumpers to the AtTiny by pushing them into the corresponding holes shown in the  hookup schematic. I never bought a Uno and started with the Nano when I got into the Arduino world. I find the Nano more useful and economical because it's not so big.

The Uno is the way to go if you plan on buying shields that piggy back on the Uno, but I never went that route. Shields are kinda pricey in my book. I got a Nano off ebay for $5 bucks or so.

It's surprisingly easy to program an AtTiny and that 8-pin dip is really stompbox friendly. FWIW.

Do debug your program and get it working on the Nano before you bother downloading it into the AtTiny 85 like Dead Astronaut said. Especially when you are just starting out, you will spend quite of bit of time debugging - or at least I did.

mr coffee
Bart

Fancy Lime

Thanks guys!

Just programming the Arduino directly until I got it all figured out sounds like a smart move. I just ordered a Nano Every, which is currently the cheapest offer from Arduino themselves and significantly more powerful than the regular Nano and Uno. I ordered the version with headers, so it plugs right into the breadboard. I decided against a cheap clone for now because the ones I found for cheap all seem to have a different USB chip (if I understood the info on that correctly, which may not be the case since most of it reads like it was Google translated from Chinese), which seems to cause a host of problems for people who don't know what they are doing, aka me. Plus, the genuine Arduino is less than a coffee plus muffin at Starbucks, and I never go to Starbucks, so I save an Arduinos worth of money every day. Yes, this is how I run my finances and yes it goes about as badly as you'd think. Plan on graduating to cheap clones later.

Wish me luck,
Andy
My dry, sweaty foot had become the source of one of the most disturbing cases of chemical-based crime within my home country.

A cider a day keeps the lobster away, bucko!

niektb

I never used an original Arduino nano, all clones I've come across use a CH340G :) (which is different from the FTDI232 found in the original)

ElectricDruid

Quote from: Fancy Lime on December 21, 2020, 07:07:50 AM
Wish me luck,
Andy

Good luck, Andy!

TBH, I don't think you'll need too much. Just ask here if you get stuck, and someone will be able to sort you out, no doubt.

anotherjim

I saw a "rumour" that, if your board don't have the FTDI chip, the driver for that has been tweaked to brick the Chinese clones firmware. So you must install the clones driver and not let the Arduino IDE access with the FDTI driver. Can this be true?

ElectricDruid

Quote from: anotherjim on December 23, 2020, 04:52:49 PM
I saw a "rumour" that, if your board don't have the FTDI chip, the driver for that has been tweaked to brick the Chinese clones firmware. So you must install the clones driver and not let the Arduino IDE access with the FDTI driver. Can this be true?

It *could* be true, but I thought the point of Arduino was that it was open source, in which case the Chinese clones would have access to the same firmware as any other builds. Or am I missing something? (not unlikely, let's face it...;) )

patrick398

I think that rumour came from a Trump tweet  :icon_lol:

niektb

Quote from: anotherjim on December 23, 2020, 04:52:49 PM
I saw a "rumour" that, if your board don't have the FTDI chip, the driver for that has been tweaked to brick the Chinese clones firmware. So you must install the clones driver and not let the Arduino IDE access with the FDTI driver. Can this be true?

Nope wrong. You just need to install a different driver :)
Sparkfun has a neat tutorial for this :)
https://learn.sparkfun.com/tutorials/how-to-install-ch340-drivers/all

pruttelherrie

Quote from: anotherjim on December 23, 2020, 04:52:49 PM
I saw a "rumour" that, if your board don't have the FTDI chip, the driver for that has been tweaked to brick the Chinese clones firmware. So you must install the clones driver and not let the Arduino IDE access with the FDTI driver. Can this be true?

They don't brick the CH340 et al, but they *do* (did?) brick the chinese clones of an FTDI! This had some nasty side-effects for people and developers who thought that they had bought the real thing (even legitimate stores were carrying the clones, unknowingly), and then had to handle the returns of the products that incorporated the clones...

Anyway, if you want to use the cheap Nano clones with CH340 chips, you'll need the CH340 drivers and it all works fine.
Some more info here https://hackaday.com/2014/10/22/watch-that-windows-update-ftdi-drivers-are-killing-fake-chips/
and unbricking here: https://hackaday.com/2015/02/08/unbricking-a-counterfeit-ftdi-chip/

[edit] that 2nd link states that by now the drivers are updated to not do that anymore (early 2015).

anotherjim

Thanks for the clarification. This is obviously old news from 5 years ago but deeper reading showed they were "compatible" chips - not direct copies internally; were given the same USB ID as the FTDI in order to use the FTDI driver which FTDI objected to.
A thing I found interesting when I got some cheap Asian PWM motor controllers advertised as having a common PWM controller chip actually have a differently numbered, but functionally compatible, Chinese chip that is in fact an original Chinese owned design. In fact, it's probably better than the original part. The Chinese one is MOS instead of BJT, can do the same work without heatsinking and doesn't require you to add flyback diodes on the outputs.

On the subject of same but different chips, there's these...
https://www.bitsbox.co.uk/index.php?main_page=product_info&cPath=140_161_164&products_id=3607

pruttelherrie

Wow. The Atmega328 is already cheap as peanuts, and still it's profitable to make a work-a-like?!?

niektb

You think it is cheap, but there are microcontrollers that go as low as $0.03  :icon_mrgreen: (but that's another topic haha)

ElectricDruid

Quote from: pruttelherrie on December 24, 2020, 05:24:43 AM
Wow. The Atmega328 is already cheap as peanuts, and still it's profitable to make a work-a-like?!?

No, it's as cheap as chips!

(common expression in UK English, meaning potato chips/fries in this case)