Brilliant. The key point with Matt's video is that it is up to date: so many videos are not. MATT, please keep this posting checked over. Two points: the Arduino RESET 10microfarad capacitor is probably an electrolytic with polarised ( + and - ) terminals. It is important that the capacitor's negative ( - ) terminal is connected to 0V or GND. : I connected the test LED to a pin not used to programme the chip (ie. not pin0 - PB0), in my case pin3 - PB3 (physical chip pin 2) on an ATTiny85. Thus the LED can be left connected while code is flashed into the chip. Don't forget to change all coding from pin0 to pin3. Hope this helps someone?
hi there, thanks for the excellent tips. I have also something to share. Wokwi Arduino simulator has also the capability to simulate ATtiny85 😀 I use this to write Arduino sketch and also verify it without real hardware. The simulator is free of cost and doesn't require any installations. It can run also on my mobile browser 🙂🙂 ATtiny85 examples are here: ATtiny85 and FastLED wokwi.com/arduino/projects/283910810787381773 ATtiny85 and simple LED wokwi.com/arduino/projects/283022189068812813 Please visit wokwi.com for more such Arduino simulations. Kindly give a like, if this information was interesting.
They are very handy chips. And best of all, it still seems possible to buy them despite the MCU shortage. Whereas the newer ATTiny chips anytime I looked they have been out of stock.
good can we use usb to serial adopter for uploading code after burning bootloader on attiny 84 by the way i want to use attiny2313 programming for T12 soldring iron
Thank you Matt - that was super on point and the right kind of pace to follow along (I've never used an ATTiny85 before but it's definitely on my agenda). You took the mystique out but left the magic smoke in - proper job. :-)
I'm getting a attiny85 for a small project I want to do. You mentioned that I needed a 0.1uF Ceramic capacitor. You made it sound like I really needed a ceramic capacitor but I just have normal ones. Can I just get away with the normal ones?
Apparently, it's important for high frequencies: electronics.stackexchange.com/questions/232631/ceramic-caps-vs-electrolytic-what-are-the-tangible-differences-in-use
Thanks for taking up the Arduino tutorials ! Just subbed you in hopes that you might bring some applications for the AT84 or any of the line up, that might push the boundary beyond "Hello World" and Blink.
Thanks Chris! I'm using the ATtiny for the disco dog collar light that I'm currently working on, so you'll be seeing a vid on that in the near future (PCBs are getting made soon). That's definitely a project that bridges the gap between blinking light and functional product (which ironically is a blinking light.... but one takes 5 minutes the other has been months of design). Open to any ideas you may have! Btw you might already know this, but one thing I didn't explicitly state in the video is that the ATtiny series is part of the AVR family of chips, just like the ATmega chip you see on most Arduino boards. So an ATtiny is usable in a lot of Arduino projects you see online, but it really shines when you are trying to save space and power.
@@MattInglot Your explanation was good, and my 1st attempt was successful, however things vent south after that! I could not reload the same chip with updated code! Have not tried a new chip yet. Have you encountered a similar problem?
@@xzadeh Sorry to hear. Honestly it could be so many things. I would suggest triple checking your connections and orientation of your chip because a wire coming loose on a breadboard or you putting the chip in one hole off or the wrong way is all stuff that's super common and has happened to me. Less common but possible is you bricked the chip. Usually happens if you mess around with the fuse settings, such as telling it to use external clock or setting the clockspeed too low.
@@MattInglot Hi Matt, now that I have had some time to check my setup, I don’t see any issues with wiring! Just a little background, I have been using Atmel Dragon to program ATTinys for years until my Dragon died and Atmel (Microchip now) no longer supports Dragon, they call it obsolete! Trying alternatives led me to Arduino. I don’t think it is a reliable alternative! Still looking for a programmer that I can reliably use without spending $100s dollars for a hobby programmer. Any suggestions? Thanks in advance.
@@xzadeh sorry but unfortunately "Arduino" is the answer. For what it's worth, I program ATTiny chips all the time and anytime I've had an issue, it's always been my fault in the end (wiring, pins, bricking the chip, etc).
Good video! I finally got my led blinking using ATTiny85, but I have a weird problem that I sometime have to upload the code several times because of this error: "avrdude stk500_getparm() error: protocol expects OK byte 0x10 but got 0x14" I have to hit upload several times to get it working and I still can't figure out what's the problem. The same error also occurs when I tried to burn the bootloader.
Unfortunately I'm not sure, you could try Googling or asking GPT. The first thing you want to consider with intermittent AVR errors is a loose connection or something not wired correctly.
If you're using the Arduino platform to program it then you would be using Arduino's version of C++. But because of the way you phrased the question, I want to clarify that the chip itself doesn't read or understand C++. The compiler turns your code into a set of instructions that the chip can understand (machine language).
I double checked my connections and set it up like shown in Arduino IDE but I was using Arduino 1.8.11 with ATTiny Core. It did not burn boot loader. I got error "avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x06...", which I have seen before so it cannot connect to ATTiny84 or something. This was a fresh ATTiny84 chip from Mouser and I know I got ATMega328 from Mouser that come blank so you have to upload boot loader. But I am not sure why it is giving the error.
Hey John, This should be very solvable so don't panic just yet. I didn't see that error message, but my programmer's instinct says it might be either a problem with how you setup your Arduino, or the fact that you are using 1.8.11 which is super new. I suggest going through the steps of setting up your Arduino again (when you upload the programmer sketch make sure your attiny isn't connected and reset doesn't still have capacitor!!!), setting the ATtiny options, and make sure you have reset disabled with the capacitor trick shown in the video (this is not an optional step). There are lots of little steps with the IDE configuration and selecting the correct options that it's very possible you just missed something. We all do it no matter how closely we feel we followed the instructions. If that fails to work, try using 1.8.9 since that is confirmed to work and ATTinyCore page listed troubles with 1.8.10. If all that fails, please share what Arduino you are using and screenshot ALL settings you have set in the IDE and share that info. I
Hello, I was trying to use my USBTiny ISP (uses an ATTiny2313A) to program the ATTiny84 chip as I did with my Arduino Uno as a programmer. So I set the Arduino programmer to USBTiny ISP but it won't recognize the port when the USBTiny ISP is plugged in. The Win10 PC device manager clearly shows it and identifies it but it just won't show up on Arduino IDE. I think my USB Tiny ISP might not work properly; only the first light is on but the second light does not come on. Any ideas?
@@johnritz5991 I've never used that device so I honestly have no idea. You could do the usual USB troubleshooting like trying a different USB cable (this has worked for me a couple times when having trouble getting Arduino IDE to recognize what I've plugged in), different USB port, etc. Beyond that I don't know, I would contact Adafruit.
at approximately time 930 you said dont use these 6 pins/ports that are above the "aref" WHAT ARE THEY? i have searched and found nothing to identify them! i never noticed them also what is "aref" and their are two pins next to the six pins that are unmarked?
Lots of people on RUclips have done exactly this. Do a search and you should be able to find a project that does it (typically with the regular Arduino boards, no real reason to go to the trouble of using the ATTiny here).
Hi, I probably successfully uploaded the Arduino ISP to the Arduino Pro Mini (the LED lights up like it's breathing). When I want to upload an example to Attina 85 Blink will print an Arduino IDE error: avrdude: Expected signature for ATtiny85 is 1E 93 0B Double check chip, or use -F to override this check. Attiny85 board set, 1 MHz internal clock, com3 and Arduino as ISP. I don't know what's wrong anymore .. AVRISP mkII encountered an error while loading the project
If avrdude is coming back with something like signature is 0 expected is ____ then it can't see the ATTiny. When this happens to me it's almost always a wiring error or connection. Could possibly be bad ATTiny, or mistake in how you setup your programmer. Sooo. I would suggest starting by triple checking your wiring and if you are still banging your head against the wall then unfortunately next step is go through the video and making sure you got all other steps right. But 80% it's wiring. Good luck!
It looks like ATtiny13 also uses ISP for programming so the steps *should* be identical, however you must select the correct ATtiny and look at the pin out diagram for ATtiny13 to make sure you have all the pins connected correctly. Good luck!
@@abolfazlabbasi4854 Hmmmmmm! You are right. You could try the core listed here: www.electronics-lab.com/project/how-to-program-attiny13attiny13a-using-arduino-ide/ Good luck!
You can definitely use ATtiny85 to read an analog pin and also have serial communication via SCL and SDA. If you would like to program the ATtiny85 in Arduino style and also want to verify the code without the real sample, please go ahead and visit wokwi.com ATtiny85 code sample links are here: wokwi.com/arduino/projects/283910810787381773 wokwi.com/arduino/projects/283022189068812813 wokwi.com/arduino/projects/283019827166052872 Please give a like if you find this information interesting 🙂 for more Arduino simulations visit wokwi.com Wokwi Arduino simulation is free. It is based on AVR8js platform and is open source. Many people have developed interesting projects using the open-source Arduino compiler. You can easily save and share the projects you create. The Arduino projects can be run instantly on a web browser or a mobile browser🌐 No need to install or download anything - No hassles It also has a huge number of peripherals to play with OLED, FastLED, NeoPixels, LCD1602, Servos, Potentiometers, Matrix Keypad and more. Please give a like if you find this interesting
Everything seemed to upload correctly. However, when I try to blink the LED, it seems to just stay on permanently. This happens regardless of which ATtiny pin it is plugged into. Why would this be?
It's very difficult to debug this kind of stuff online because I don't see your setup, I obviously can't touch it and fiddle with it, and so on. The best tip I can give you for any sort of troubleshooting is to isolate as much as possible. So in this case if the LED isn't blinking, pull out the ole multimeter, and prob the pin you THINK is the correct pin, and see if the voltage changes as if it were blinking (one lead should be on the pin, one on ground as in the negative part of your power supply). If it does, check your wiring. If it doesn't, then there is something wrong with your program. I would guess you have the incorrect pin # or some error in the code. Sorry I can't be more help, but if you reason it out you should be able to figure it out. This stuff takes a bit of troubleshooting and fiddling.
Has anyone successfully done this with an Arduino Uno Wifi Rev2? I'm having trouble with the error: avrdude: stk500_getsync() attempt x of 10: not in sync: resp = 0x03 while trying to burn the bootloader.
Unfortunately I've never worked with that Arduino but before assuming it's the board triple double quadruple check all your connections against the wiring diagrams and make sure you are using the correct pin diagram for your ATTiny. Then double check everything else is wired up too, and that the software settings are all correct. Also read the comments of the Arduino ISP program carefully in case it mentions your board and requires any changes. What my video didn't show was the 2 hours of troubleshooting owing to various connection mistakes.
Please help, does anyone know what are the list of classic Arduino functions that the ATTinyCore supports? I can't find this anywhere on the internet. I'm not a pro at programming so looking at the source files and libraries on GitHub confuses me even more.
It's a loaded question because it depends on how far down the rabbit hole you want to do. Since you are a beginner the easiest answer is that most of the Arduino functions and libraries should work just fine, and you are encouraged to try stuff out and experiment for yourself. For the stereotypical Arduino examples it should mostly work (assuming you hook things up to the correct pings and number them correctly). Of course that's not the whole answer. The ATmega328 (the processor that Arduino Uno uses) has more capabilities than the different ATtiny processors. So of course you're not going to be able to use functionality that the processor doesn't support. How does this affect you? It depends on the complexity of the code you are writing. For a beginner the biggest impact is that ATmega328 has a lot more I/O pins, more PWM capable pins, and so on. All of which you can grab easily from the datasheet for your chosen ATtiny. If you continue down the rabbit hole to lower level programming and start dealing with things like interrupts, those are all different not only with ATtiny vs ATmega328 but within the ATtiny family as well. At that point you *need* to download and read the datasheets to understand if a particular processor will work for your needs, and how to access those advanced capabilities.
hello yesterday i bought an at tiny 85 and before 5 minutes it worked fine but the last time i plugged it in i put reverse voltage by mistake and now it doesnt run did i burn it?
Unfortunately it sounds like it. With how little the chips cost it's a good idea to have a few on hand in case you make mistakes like that. It's almost inevitable that as you play with this stuff you'll burn *something* out by accident.
@@MattInglot oh thank you for answering so quick and secondly I also had plugged in an 8*8 matrix and this also doesnt light up does it mean I burned this too
@@trashos817 It's really not something I could tell you over the internet. It's certainly possible that it broke, but it's just as possible that you now have it hooked up wrong, programmed wrong, etc. The only way you can really work that out is to start troubleshooting. If you have spares of the components the obivous thing to do is double check all your writing, then pop in a good component. If you don't, then you need to start pulling out the multimeter and seeing if your getting power where you expect it (including output on any output pins). It can also be helpful to break up your circuit into the simplest possible components needed to test it before testing everything together. Good luck!
Like many of these videos, you loaded the bootloader and then overwrote it with blink. The point of the bootloader is to not need ISP programming but go directly to serial RX, TX, and Reset pins using a serial FTDI or something.
The issue is that you have to burn the bootloader in order to set the fuses. Per the documentation on github.com/SpenceKonde/ATTinyCore "When using a chip for the first time, or after changing the clock speed, EESAVE or BOD settings, you must do "burn bootloader" to set the fuses, even if you are not using the chip with a bootloader"
Thanks, that makes sense now. So nobody I've watched is actually wanting to use it stand alone? That is what I have done with all of my ATTiney/ATMega chips. Then I can use them in projects with just a serial connection to the Arduino development system.
after doing a lot of tries for months finally found this video and at last i was able to use attiny85 now. thank you so much
Awesome to hear! What did you end up building with it?
AWESOME TUTORIAL. I spent the day trying to upload on to my 85 and your video took me to success. thanks a lot!
Nice work! Very happy to hear :)
Very well explained! I watched other videos but couldn't get it to work. I followed your guide and it worked first time. Thank you.
Glad to hear! Have fun with your project!
Thanks for pointing out the ICSP/SPI header, it's the only thing that worked for me.
Glad to hear! Good luck on your project.
Excellent tutorial - exactly what I needed to see!
Great tutorial, well presented and very clear. This is all quite new to me but you helped me understand this so much better.
Well done tutorial. I tried two other RUclips tutorials and they only frustrated me. Your tutorial worked the first time I tried. it. Keep it up.
Woohoo! That's great to hear, thank you Henry. What are you building with the ATtiny?
Great tutorial! Well explained. Looking forward to seeing more.
Thanks so much! Filming more as we speak!
AMAZING! This is the only tutorial that worked for me, many thanks. Flawless, informative, and to the point.
Thanks! Glad it helped!
Thanks Matt. I have tried with a ATtiny 25 and it works perfectly.
Glad to hear it!
Brilliant. The key point with Matt's video is that it is up to date: so many videos are not. MATT, please keep this posting checked over. Two points: the Arduino RESET 10microfarad capacitor is probably an electrolytic with polarised ( + and - ) terminals. It is important that the capacitor's negative ( - ) terminal is connected to 0V or GND. : I connected the test LED to a pin not used to programme the chip (ie. not pin0 - PB0), in my case pin3 - PB3 (physical chip pin 2) on an ATTiny85. Thus the LED can be left connected while code is flashed into the chip. Don't forget to change all coding from pin0 to pin3. Hope this helps someone?
Thanks Kenneth. Yes the polarity of electrolytic capacitors is important.
hi there,
thanks for the excellent tips. I have also something to share. Wokwi Arduino simulator has also the capability to simulate ATtiny85 😀 I use this to write Arduino sketch and also verify it without real hardware.
The simulator is free of cost and doesn't require any installations. It can run also on my mobile browser 🙂🙂
ATtiny85 examples are here:
ATtiny85 and FastLED
wokwi.com/arduino/projects/283910810787381773
ATtiny85 and simple LED
wokwi.com/arduino/projects/283022189068812813
Please visit wokwi.com for more such Arduino simulations. Kindly give a like, if this information was interesting.
Thank you very much Matt you are the first person who really helped me. CONGRATULATIONS
Glad to hear it helped!
*Good work, I like the ATtiny85 and ATtiny84 too*
They are very handy chips. And best of all, it still seems possible to buy them despite the MCU shortage. Whereas the newer ATTiny chips anytime I looked they have been out of stock.
It worked! Great video.
Great description.
Thanks!
I'm thinking of buying a few tiny84's. I have some 85's, but the pin count is very restrictive.
Great demonstration and explanation.....thanks!
Thank you!
Hi I followed everything in the tutorial and uploaded blink to the chip successfully but the LED will not blink.
thank you so much for this tutorial! was very hepful, best regards
Glad it helped!
Good, clear tutorial, very easy to understand. Thanx
Thanks :)
You're a great teacher Matt :)
Thanks so much. Glad you enjoyed the video!
Thank you ferry much for explaining!
good can we use usb to serial adopter for uploading code after burning bootloader on attiny 84 by the way i want to use attiny2313 programming for T12 soldring iron
Thank you Matt - that was super on point and the right kind of pace to follow along (I've never used an ATTiny85 before but it's definitely on my agenda). You took the mystique out but left the magic smoke in - proper job. :-)
Thanks so much :) And trust me, I was very surprised that the magic smoke didn't come out ;)
I'm getting a attiny85 for a small project I want to do. You mentioned that I needed a 0.1uF Ceramic capacitor. You made it sound like I really needed a ceramic capacitor but I just have normal ones. Can I just get away with the normal ones?
Apparently, it's important for high frequencies: electronics.stackexchange.com/questions/232631/ceramic-caps-vs-electrolytic-what-are-the-tangible-differences-in-use
Thanks for taking up the Arduino tutorials !
Just subbed you in hopes that you might bring some applications for the AT84 or any of the line up, that might push the boundary beyond "Hello World" and Blink.
Thanks Chris! I'm using the ATtiny for the disco dog collar light that I'm currently working on, so you'll be seeing a vid on that in the near future (PCBs are getting made soon). That's definitely a project that bridges the gap between blinking light and functional product (which ironically is a blinking light.... but one takes 5 minutes the other has been months of design).
Open to any ideas you may have!
Btw you might already know this, but one thing I didn't explicitly state in the video is that the ATtiny series is part of the AVR family of chips, just like the ATmega chip you see on most Arduino boards. So an ATtiny is usable in a lot of Arduino projects you see online, but it really shines when you are trying to save space and power.
It is 3 July 2023 and still works! Thanks, good job.
Super glad to hear thank you! Did you run into any setup issues or differences that I should note in the description?
@@MattInglot Your explanation was good, and my 1st attempt was successful, however things vent south after that! I could not reload the same chip with updated code! Have not tried a new chip yet. Have you encountered a similar problem?
@@xzadeh Sorry to hear. Honestly it could be so many things. I would suggest triple checking your connections and orientation of your chip because a wire coming loose on a breadboard or you putting the chip in one hole off or the wrong way is all stuff that's super common and has happened to me.
Less common but possible is you bricked the chip. Usually happens if you mess around with the fuse settings, such as telling it to use external clock or setting the clockspeed too low.
@@MattInglot Hi Matt, now that I have had some time to check my setup, I don’t see any issues with wiring! Just a little background, I have been using Atmel Dragon to program ATTinys for years until my Dragon died and Atmel (Microchip now) no longer supports Dragon, they call it obsolete! Trying alternatives led me to Arduino. I don’t think it is a reliable alternative! Still looking for a programmer that I can reliably use without spending $100s dollars for a hobby programmer. Any suggestions? Thanks in advance.
@@xzadeh sorry but unfortunately "Arduino" is the answer. For what it's worth, I program ATTiny chips all the time and anytime I've had an issue, it's always been my fault in the end (wiring, pins, bricking the chip, etc).
"Huh, no smoke, that's a good sign" :D
:D that was seriously a relief!
@@MattInglot YES, it is. HAHA. By the way nice vid. 👍
Good video! I finally got my led blinking using ATTiny85, but I have a weird problem that I sometime have to upload the code several times because of this error: "avrdude stk500_getparm() error: protocol expects OK byte 0x10 but got 0x14" I have to hit upload several times to get it working and I still can't figure out what's the problem. The same error also occurs when I tried to burn the bootloader.
Unfortunately I'm not sure, you could try Googling or asking GPT. The first thing you want to consider with intermittent AVR errors is a loose connection or something not wired correctly.
Which language is used for Attiny 85
If you're using the Arduino platform to program it then you would be using Arduino's version of C++. But because of the way you phrased the question, I want to clarify that the chip itself doesn't read or understand C++. The compiler turns your code into a set of instructions that the chip can understand (machine language).
I double checked my connections and set it up like shown in Arduino IDE but I was using Arduino 1.8.11 with ATTiny Core.
It did not burn boot loader. I got error "avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x06...", which I have seen before so it cannot connect to ATTiny84 or something.
This was a fresh ATTiny84 chip from Mouser and I know I got ATMega328 from Mouser that come blank so you have to upload boot loader. But I am not sure why it is giving the error.
Hey John,
This should be very solvable so don't panic just yet. I didn't see that error message, but my programmer's instinct says it might be either a problem with how you setup your Arduino, or the fact that you are using 1.8.11 which is super new. I suggest going through the steps of setting up your Arduino again (when you upload the programmer sketch make sure your attiny isn't connected and reset doesn't still have capacitor!!!), setting the ATtiny options, and make sure you have reset disabled with the capacitor trick shown in the video (this is not an optional step). There are lots of little steps with the IDE configuration and selecting the correct options that it's very possible you just missed something. We all do it no matter how closely we feel we followed the instructions. If that fails to work, try using 1.8.9 since that is confirmed to work and ATTinyCore page listed troubles with 1.8.10.
If all that fails, please share what Arduino you are using and screenshot ALL settings you have set in the IDE and share that info.
I
I uploaded the wrong program to the Arduino, now it works. thanks.
@@johnritz5991 Awesome! Happy coding!
Hello, I was trying to use my USBTiny ISP (uses an ATTiny2313A) to program the ATTiny84 chip as I did with my Arduino Uno as a programmer.
So I set the Arduino programmer to USBTiny ISP but it won't recognize the port when the USBTiny ISP is plugged in.
The Win10 PC device manager clearly shows it and identifies it but it just won't show up on Arduino IDE.
I think my USB Tiny ISP might not work properly; only the first light is on but the second light does not come on.
Any ideas?
@@johnritz5991 I've never used that device so I honestly have no idea. You could do the usual USB troubleshooting like trying a different USB cable (this has worked for me a couple times when having trouble getting Arduino IDE to recognize what I've plugged in), different USB port, etc. Beyond that I don't know, I would contact Adafruit.
at approximately time 930 you said dont use these 6 pins/ports that are above the "aref" WHAT ARE THEY? i have searched and found nothing to identify them! i never noticed them also what is "aref" and their are two pins next to the six pins that are unmarked?
What is the link to ATtiny pin-out where all of them shown one after another?
github.com/SpenceKonde/ATTinyCore scroll wayyyy down.
bro can we do self watering plants by connecting LCD display and soil moisture sensor pls reply me
Lots of people on RUclips have done exactly this. Do a search and you should be able to find a project that does it (typically with the regular Arduino boards, no real reason to go to the trouble of using the ATTiny here).
Hi, I probably successfully uploaded the Arduino ISP to the Arduino Pro Mini (the LED lights up like it's breathing).
When I want to upload an example to Attina 85 Blink will print an Arduino IDE error:
avrdude: Expected signature for ATtiny85 is 1E 93 0B
Double check chip, or use -F to override this check.
Attiny85 board set, 1 MHz internal clock, com3 and Arduino as ISP. I don't know what's wrong anymore ..
AVRISP mkII encountered an error while loading the project
If avrdude is coming back with something like signature is 0 expected is ____ then it can't see the ATTiny. When this happens to me it's almost always a wiring error or connection. Could possibly be bad ATTiny, or mistake in how you setup your programmer.
Sooo. I would suggest starting by triple checking your wiring and if you are still banging your head against the wall then unfortunately next step is go through the video and making sure you got all other steps right. But 80% it's wiring.
Good luck!
So How would I upload custom code onto the ATTINY 85? (IE code that isn't heartbeat or blink) Do I need to change anything?
Thanks for the tutorial, Is this method going to work with ATtiny13 as well?
It looks like ATtiny13 also uses ISP for programming so the steps *should* be identical, however you must select the correct ATtiny and look at the pin out diagram for ATtiny13 to make sure you have all the pins connected correctly. Good luck!
Matt Inglot , thanks for the reply, it looks like there is no ATtiny13 in the boards’ list. Do I need to choose some other chips? Or not gonna work?
@@abolfazlabbasi4854 Hmmmmmm! You are right. You could try the core listed here: www.electronics-lab.com/project/how-to-program-attiny13attiny13a-using-arduino-ide/ Good luck!
A programmer is required to upload this message appears after burning blink code to attiny85
Ok I am confused, can the ATtiny85 read in analog input in reference to serial communication SCL and SDA ? Pins 6 and 7 I saw were not used.
You can definitely use ATtiny85 to read an analog pin and also have serial communication via SCL and SDA.
If you would like to program the ATtiny85 in Arduino style and also want to verify the code without the real sample, please go ahead and visit wokwi.com
ATtiny85 code sample links are here:
wokwi.com/arduino/projects/283910810787381773
wokwi.com/arduino/projects/283022189068812813
wokwi.com/arduino/projects/283019827166052872
Please give a like if you find this information interesting 🙂
for more Arduino simulations visit wokwi.com
Wokwi Arduino simulation is free. It is based on AVR8js platform and is open source. Many people have developed interesting projects using the open-source Arduino compiler.
You can easily save and share the projects you create.
The Arduino projects can be run instantly on a web browser or a mobile browser🌐
No need to install or download anything - No hassles
It also has a huge number of peripherals to play with
OLED, FastLED, NeoPixels, LCD1602, Servos, Potentiometers, Matrix Keypad and more. Please give a like if you find this interesting
Everything seemed to upload correctly. However, when I try to blink the LED, it seems to just stay on permanently. This happens regardless of which ATtiny pin it is plugged into. Why would this be?
It's very difficult to debug this kind of stuff online because I don't see your setup, I obviously can't touch it and fiddle with it, and so on. The best tip I can give you for any sort of troubleshooting is to isolate as much as possible. So in this case if the LED isn't blinking, pull out the ole multimeter, and prob the pin you THINK is the correct pin, and see if the voltage changes as if it were blinking (one lead should be on the pin, one on ground as in the negative part of your power supply). If it does, check your wiring. If it doesn't, then there is something wrong with your program. I would guess you have the incorrect pin # or some error in the code. Sorry I can't be more help, but if you reason it out you should be able to figure it out. This stuff takes a bit of troubleshooting and fiddling.
@@MattInglot thanks, I appreciate the advice! Otherwise, the video was great and definitely one of the best tutorials for this out there.
Has anyone successfully done this with an Arduino Uno Wifi Rev2? I'm having trouble with the error: avrdude: stk500_getsync() attempt x of 10: not in sync: resp = 0x03 while trying to burn the bootloader.
Unfortunately I've never worked with that Arduino but before assuming it's the board triple double quadruple check all your connections against the wiring diagrams and make sure you are using the correct pin diagram for your ATTiny. Then double check everything else is wired up too, and that the software settings are all correct. Also read the comments of the Arduino ISP program carefully in case it mentions your board and requires any changes. What my video didn't show was the 2 hours of troubleshooting owing to various connection mistakes.
Please help, does anyone know what are the list of classic Arduino functions that the ATTinyCore supports? I can't find this anywhere on the internet. I'm not a pro at programming so looking at the source files and libraries on GitHub confuses me even more.
It's a loaded question because it depends on how far down the rabbit hole you want to do. Since you are a beginner the easiest answer is that most of the Arduino functions and libraries should work just fine, and you are encouraged to try stuff out and experiment for yourself. For the stereotypical Arduino examples it should mostly work (assuming you hook things up to the correct pings and number them correctly).
Of course that's not the whole answer. The ATmega328 (the processor that Arduino Uno uses) has more capabilities than the different ATtiny processors. So of course you're not going to be able to use functionality that the processor doesn't support.
How does this affect you? It depends on the complexity of the code you are writing. For a beginner the biggest impact is that ATmega328 has a lot more I/O pins, more PWM capable pins, and so on. All of which you can grab easily from the datasheet for your chosen ATtiny.
If you continue down the rabbit hole to lower level programming and start dealing with things like interrupts, those are all different not only with ATtiny vs ATmega328 but within the ATtiny family as well. At that point you *need* to download and read the datasheets to understand if a particular processor will work for your needs, and how to access those advanced capabilities.
Really clear. :)
Glad it helped!
hello yesterday i bought an at tiny 85 and before 5 minutes it worked fine but the last time i plugged it in i put reverse voltage by mistake and now it doesnt run did i burn it?
Unfortunately it sounds like it. With how little the chips cost it's a good idea to have a few on hand in case you make mistakes like that. It's almost inevitable that as you play with this stuff you'll burn *something* out by accident.
@@MattInglot oh thank you for answering so quick and secondly I also had plugged in an 8*8 matrix and this also doesnt light up does it mean I burned this too
@@trashos817 It's really not something I could tell you over the internet. It's certainly possible that it broke, but it's just as possible that you now have it hooked up wrong, programmed wrong, etc.
The only way you can really work that out is to start troubleshooting. If you have spares of the components the obivous thing to do is double check all your writing, then pop in a good component. If you don't, then you need to start pulling out the multimeter and seeing if your getting power where you expect it (including output on any output pins). It can also be helpful to break up your circuit into the simplest possible components needed to test it before testing everything together.
Good luck!
thank you so much !!
So glad to hear, congrats on getting it working :)
Like many of these videos, you loaded the bootloader and then overwrote it with blink. The point of the bootloader is to not need ISP programming but go directly to serial RX, TX, and Reset pins using a serial FTDI or something.
The issue is that you have to burn the bootloader in order to set the fuses.
Per the documentation on github.com/SpenceKonde/ATTinyCore
"When using a chip for the first time, or after changing the clock speed, EESAVE or BOD settings, you must do "burn bootloader" to set the fuses, even if you are not using the chip with a bootloader"
Thanks, that makes sense now. So nobody I've watched is actually wanting to use it stand alone? That is what I have done with all of my ATTiney/ATMega chips. Then I can use them in projects with just a serial connection to the Arduino development system.
thx
No 🚬 smoke is always a good sign
Nice
arduino 2.x the board manager doesn't showup more the attiny??