How to Program ATtiny10 with Arduino IDE (Full guidance)

  Переглядів 10,662

DIY GUY Chris

DIY GUY Chris

Рік тому

Fully explained tutorial about how to program ATtiny10 small Microcontroller through @Arduino IDE.
I explained in this tutorial how to properly make your Arduino IDE suitable for Tiny10 MCU and I tested some code samples of Arduino APIs such as digitalWrite, analogWrite, delay etc.
The small flash memory of the Tiny10 is not a limit because the microcontroller still can get some basic codes for simple applications which makes it a good solution to replace some electronics components especially due to its cheap price of around $0.4
I recommend that you read this guidance if you want to get deeper details especially about the programming TPI technique offered by @MicrochipTechnology and I found this TPI technique very hand for programming such tiny MCU: make.kosakalab.com/make/elect...
👉Tiny10 programming datasheet: ww1.microchip.com/downloads/e...
👉Arduino preferences Link: kimio-kosaka.github.io/bitDui...
0:04 Video intro
0:15 Comparison between some Tiny MCUs
0:50 Not working solutions to program the ATtiny10
1:53 Best solution to program ATtiny10
2:28 TPI Programming protocal explanation
3:00 software setup (Arduino IDE)
3:33 Hardware setup (Arduino UNO as programmer)
4:45 IDE error debugging
6:00 Code uploaded successfully
The main Breakout Board PCB has been designed under Altium Designer and you can start a FREE TRIAL of this ECAD software through this link :
www.altium.com/yt/DIYGUYChris
★☆★ Trusted sources ★☆★
PCB designing tool : www.altium.com/yt/DIYGUYChris
PCB Parts CAD Models: octopart.com
PCB manufacturing : jlcpcb.com/PCH
★☆★ DOWNLOAD UNO CODE ★☆★
Uno Code: github.com/kimio-kosaka/avrbo...
★☆★ Recommended Electronics Kit ★☆★
Raspberry Pi Pico Kit Amazon link : www.amazon.com/SunFounder-Ras...
★☆★ My Video filming tools ★☆★
Main Camera Canon Rebel T7 : www.amazon.com/gp/product/B07...
Macro Camera lens : www.amazon.com/gp/product/B06...
Secondary camera Gopro Hero 8 : www.amazon.com/gp/product/B08...
LED Video lighting : www.amazon.com/gp/product/B08...
★☆★ 💻 FOLLOW ME BELOW 💻 ★☆★
Instructables: www.instructables.com/member/...
Hackaday : hackaday.io/DIYGUYChris
Facebook : / diyguychris
Twitter : / chris_diy
Hackster : www.hackster.io/diyguyChris
TikTok : vm.tiktok.com/ZMRAvhK9u/
Keywords
#arduino #electronic #explore #arduinoproject #arduinoprogramming #attiny10 #learn #learning #stem #education #tips ##circuit #breadboard #smd #easytutorial #hardware

КОМЕНТАРІ: 71
@ibrahim.t3530
@ibrahim.t3530 11 місяців тому
This video has really brought me happiness because, I was working with chip and I failed 100000 times to program it. I used the same method you used but I wasn't able to know what was wrong with my IDE. This solution really helped me, and made my dream of making attiny10 to be working come true. Many thanks ❤❤❤❤❤❤❤❤
@DIYGUYChris
@DIYGUYChris 11 місяців тому
Subscribe for more 😉
@stocothedude
@stocothedude 8 місяців тому
Finally I was able to take your approach and thanks to you and Kosakas Blog, it really works great :) I have my own SOT-23 breakouts with already soldered tiny10 on it, but specifically made for thin applications hence I had to make my own wires first before I could try it. Very happy that is works, thank you !
@drhubs7049
@drhubs7049 11 місяців тому
Worked like an absolute charm, thank you! A hiccup I ran into was I was using the windows store app version which didn't really let me switch to the 1.6.23 version. When using the regular downloaded app, it worked great! :) Thank you!
@DIYGUYChris
@DIYGUYChris 11 місяців тому
Enjoy 😊
@drhubs7049
@drhubs7049 11 місяців тому
@DIY GUY Chris you are the man. Another fun tidbit for people, millis doesnt work. I replaced all millis calls with a counter and my code works great!
@DIYGUYChris
@DIYGUYChris 11 місяців тому
@@drhubs7049 I didn't tested many Arduino APIs for Tiny10 and also the more APIs you use the large the code size because, flash memory needs to be considered wisely for this little MCU 😌
@drhubs7049
@drhubs7049 11 місяців тому
@@DIYGUYChris yh my lil sketch it 800/1000 bytes 😵 Fortunately its enough for what I need
@danielmichalski94
@danielmichalski94 10 місяців тому
This is gold - I have 5 of this tiny fellas laying around, waiting to be programmed
@DIYGUYChris
@DIYGUYChris 10 місяців тому
Good luck 😉
@JBERGALIEN
@JBERGALIEN 4 місяці тому
Hi, also do I need to select the "Programmer: Arduino as ISP" ? thank's again for your time
@gustavoreynaga
@gustavoreynaga Рік тому
Awesome, thanks!!!
@DIYGUYChris
@DIYGUYChris Рік тому
Welcome 😉
@JBERGALIEN
@JBERGALIEN 4 місяці тому
Hello, is it possible to to set the internal clock . thank you
@JBERGALIEN
@JBERGALIEN 3 місяці тому
That's very helpful from you, how can I send you screen captures to help you find the problem, let me know thank's again for your reply I will setup again the arduino and breadboard circuit and get the errors ready to send it to you.
@JBERGALIEN
@JBERGALIEN 4 місяці тому
Hello, and thank you for this excellent tutorial, if I may ask can the TPI by use to set the RESET pin as an GPIO, and does the TPI can be use to reset the attiny10 to factory setup.
@drhubs7049
@drhubs7049 4 місяці тому
Any luck getting it working?
@JBERGALIEN
@JBERGALIEN 4 місяці тому
waiting for your input@@drhubs7049
@limchengwei8853
@limchengwei8853 4 місяці тому
Try ws2812b led programming
@muratkaraca309
@muratkaraca309 4 місяці тому
Hello. Thanks for your video. I have a question. Can we use this setup for Attiny5?
@robotboy3525
@robotboy3525 4 місяці тому
It should work with Attiny5 without any issues
@muratkaraca309
@muratkaraca309 4 місяці тому
@@robotboy3525 yes. It did work
@vairam1977
@vairam1977 Місяць тому
does the same work for ATTINY102?
@torpe1
@torpe1 2 місяці тому
does it have a digital input?
@JBERGALIEN
@JBERGALIEN 3 місяці тому
Also I used Arduino IDE 1.8.9, with arduino AVR board 1.6.23
@DIYGUYChris
@DIYGUYChris 3 місяці тому
Have you tried version less than 1.8.9?
@JBERGALIEN
@JBERGALIEN 3 місяці тому
Hello Chris, I did install 1.8.18, still same error as before.@@DIYGUYChris
@akkahash6287
@akkahash6287 Рік тому
Any idea how to program the attiny12. Many thanks in advance ❤
@DIYGUYChris
@DIYGUYChris 11 місяців тому
Hi, yes the Attiny12 is supported for megaTinyCore (from a quick serach) you can check this GitHub link for details and let me know if you come up with something from it, the Tiny12 has SPI port so basically programming it is a bit calssic through external programmer like USBASP github.com/SpenceKonde/megaTinyCore/
@roguezaint
@roguezaint 2 місяці тому
Thanks for the video. I followed the steps and could compile the blink code. But the upload gave me an error message.Any Sketch uses 428 bytes (41%) of program storage space. Maximum is 1024 bytes. Global variables use 0 bytes (0%) of dynamic memory, leaving 32 bytes for local variables. Maximum is 32 bytes. C:\Users\A.B\AppData\Local\Arduino15\packages\bitDuino10-aTPI\tools\avrboy\1.0.1/avrboy -p attiny10 -P COM14 -b 9600 -U C:\Users\A.B\AppData\Local\Temp\arduino_build_438319/Blink.ino.hex 2024/03/03 14:09:54 open COM14 The system cannot find the file specified. 2024/03/03 142:09:54 An error occurred while uploading the sketch Any suggestions of what went wrong?
@dominykassimpukas1958
@dominykassimpukas1958 8 місяців тому
Hey, I am trying to program ATtiny 10 using your method, but I don't seem to get any response from ATtiny when programming it. I get serial:timeout error on Arduino IDE. I use same version as you, I also checked connection and they are correct. I use 220 Ohm resistors on data lines. It looks like ATtiny doesn't turn on or doesn't respond to Arduino UNO attempts to communicate with it. Any solutions to that?
@JCuriosity
@JCuriosity 7 місяців тому
i had that too my solution was hooking everything up correctly to the arduino, than press upload and than connect the arduino to the PC during the compiling procces.
@MrBCRC
@MrBCRC 5 місяців тому
@@JCuriosity That's impressive given the compile time is milliseconds
@JCuriosity
@JCuriosity 5 місяців тому
@@MrBCRC it’s not milliseconds for me using the Arduino compiler. You have a solid 5-10 seconds before it starts uploading
@darioeljatib6399
@darioeljatib6399 10 місяців тому
Hello! Thank you very much for this video, is really usefull and detailed. But sadly I can't compile the code... I already changed and updated the version of AVR Boards to 1.6.22 but still not working... Could you help me or give me some advice? Thanks in advance. PD: My Arduino IDE is v1.8.13 Best regards from Argentina!
@darioeljatib6399
@darioeljatib6399 10 місяців тому
Hello! Now I uninstalled the Arduino and the related files and installed an older version 1.8.9 and now compiles, but when I try to upload occur the timeout... I already checked the connections several times, and I changed the microcontroller... can you help me please? Do you know wich can be the problem? Thanks in advance!
@dominykassimpukas1958
@dominykassimpukas1958 8 місяців тому
@@darioeljatib6399 Have you solved the problem? I get same error with timeout.
@darioeljatib6399
@darioeljatib6399 8 місяців тому
Yes! It's working well for me... Have you checked the version of your Arduino IDE and the version of "AVR Boards" section? Tell me which version of both are you using@@dominykassimpukas1958
@legendahistory4262
@legendahistory4262 3 місяці тому
​@@dominykassimpukas1958 same error . Did you solved it ?
@dominykassimpukas1958
@dominykassimpukas1958 3 місяці тому
@@legendahistory4262 No, I switched to attiny13a
@JBERGALIEN
@JBERGALIEN 3 місяці тому
first I open the sketch "ATtiny4_5_9_10_20_40Programmer_2" compile and upload with the board as ("Arduino/Genuino uno", (Arduino AVR Board Version 1.6.23")this step is ok ,then open the blink sketch, change the board to ( ATtiny10 (bitDuino10-arduino TPI) ,when compiling then I got this error (last 3 lines) collect2.exe: error: ld returned 1 exit status exit status 1 Error compiling for board ATtiny10 (bitDuino10-arduinoTPI). what I'm missing.... Thank's again for your time
@isheamongus811
@isheamongus811 23 дні тому
Why not QFNL?
@deancotton2127
@deancotton2127 10 місяців тому
Hello, I have all the versions identical to the video IDE version 1.8.9, AVR version 1.6.23 (tried 1.6.22 as well), except it still doesn't compile. any suggestions, advice or solutions
@DIYGUYChris
@DIYGUYChris 10 місяців тому
What is the error message you got when compiling?
@deancotton2127
@deancotton2127 10 місяців тому
@@DIYGUYChris Arduino: 1.8.9 (Windows 10), Board: "ATtiny10 (bitDuino10-arduinoTPI), 8MHz(Internal)" c:/users/deanc/appdata/local/arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/../lib/gcc/avr/7.3.0/../../../../avr/bin/ld.exe: cannot find crtattiny10.o: No such file or directory c:/users/deanc/appdata/local/arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/../lib/gcc/avr/7.3.0/../../../../avr/bin/ld.exe: skipping incompatible c:/users/deanc/appdata/local/arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/../lib/gcc/avr/7.3.0/../../../../avr/lib\libm.a when searching for -lm c:/users/deanc/appdata/local/arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/../lib/gcc/avr/7.3.0/../../../../avr/bin/ld.exe: cannot find -lm c:/users/deanc/appdata/local/arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/../lib/gcc/avr/7.3.0/../../../../avr/bin/ld.exe: skipping incompatible c:/users/deanc/appdata/local/arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/../lib/gcc/avr/7.3.0\libgcc.a when searching for -lgcc c:/users/deanc/appdata/local/arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/../lib/gcc/avr/7.3.0/../../../../avr/bin/ld.exe: cannot find -lgcc c:/users/deanc/appdata/local/arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/../lib/gcc/avr/7.3.0/../../../../avr/bin/ld.exe: skipping incompatible c:/users/deanc/appdata/local/arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/../lib/gcc/avr/7.3.0/../../../../avr/lib\libm.a when searching for -lm c:/users/deanc/appdata/local/arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/../lib/gcc/avr/7.3.0/../../../../avr/bin/ld.exe: cannot find -lm c:/users/deanc/appdata/local/arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/../lib/gcc/avr/7.3.0/../../../../avr/bin/ld.exe: skipping incompatible c:/users/deanc/appdata/local/arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/../lib/gcc/avr/7.3.0/../../../../avr/lib\libc.a when searching for -lc c:/users/deanc/appdata/local/arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/../lib/gcc/avr/7.3.0/../../../../avr/bin/ld.exe: cannot find -lc c:/users/deanc/appdata/local/arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/../lib/gcc/avr/7.3.0/../../../../avr/bin/ld.exe: cannot find -lattiny10 collect2.exe: error: ld returned 1 exit status exit status 1 Error compiling for board ATtiny10 (bitDuino10-arduinoTPI).
@JCuriosity
@JCuriosity 7 місяців тому
@@deancotton2127 i had that problem too, solved by deleting everything in AppData\Local\Arduino15\packages\arduino\tools\avr-gcc, and than reinstalling the 1.6.23 AVR. the local appdata is accesable by doing %localappdata% in finder.
@JCuriosity
@JCuriosity 7 місяців тому
i think it's due that progam is accidently calling up a newer version of AVR
@LinnLim
@LinnLim 3 місяці тому
Sketch uses 70 bytes (6%) of program storage space. Maximum is 1024 bytes. Global variables use 0 bytes (0%) of dynamic memory, leaving 32 bytes for local variables. Maximum is 32 bytes. 2024/02/04 13:34:06 open COM13 The system cannot find the file specified. 2024/02/04 13:34:06 Failed uploading: uploading error: exit status 1 Please help. Thanks.
@LinnLim
@LinnLim 3 місяці тому
I am using Arduino Nano. Is it the problem?
@LinnLim
@LinnLim 3 місяці тому
Solved by installing Arduino IDE 1.6.13
@JBERGALIEN
@JBERGALIEN 3 місяці тому
please the last comment for the SPI error, it's ok now
@medhasnaoui1533
@medhasnaoui1533 Рік тому
😶‍🌫️👏👏👏
@JBERGALIEN
@JBERGALIEN 3 місяці тому
Chris, it's missing directories , error : c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/7.3.0/../../../../avr/bin/ld.exe: cannot find crtattiny10.o: No such file or directory from my explorer the path I can see is this one: C:\Program Files (x86)\Arduino\hardware\tools\avr\bin. I guess there's some directories that are not install properly is this an arduino problem or the bitDuino10 that is not installed properly. let me know what you think about this. thank you again
@DIYGUYChris
@DIYGUYChris 3 місяці тому
Try to uninstall Arduino IDE and remove all the IDE files then download the old version 1.8.9 from the Arduino website and install it, then compile again after updating the AVR Board version
@JBERGALIEN
@JBERGALIEN 3 місяці тому
Hello Chris, did uninstall arduino IDE, then boot my PC, reinstall arduino 1.8.19, install artduino avr board 1.6.23, install bitduino10-arduino TPI. load the " TPI programmer for ATtiny4/5/9/10/20/40", the select board: bitduino10-arduino TPI load Blink, compile---> then errors the same as before . maybe this is not working at all maybe you're lucky it's working on your system, I search the internet if someone else was able to compile like your system, but not found anything. or maybe kasakalab, avrboy is buggy. @@DIYGUYChris
@JBERGALIEN
@JBERGALIEN 3 місяці тому
anyway Crhis , thank's for you time
@DIYGUYChris
@DIYGUYChris 3 місяці тому
@@JBERGALIEN there is always a solution, it works for me so it should work for you (nothing about luck especially because it works for some other followers, check the comments) Btw have you deleted the AVR boards repository content before updating the AVR boards version?
@JBERGALIEN
@JBERGALIEN 3 місяці тому
I'm not sure, what the step to delete it. does the reinstall did take care of this. if you can list clearly all the steps I should do to fix it. I'm a beginner thank's again@@DIYGUYChris
@MrBCRC
@MrBCRC 5 місяців тому
Sadly this doesn't work any more. The avrboy program written in golang cannot open the serial connection to the arduino. Given that the arduino acts as the programming interface that's a pretty major bug. Why on earth they wrote it in such a frail language... It is yet another example of where trying to be trendy doesn't pay off in the long run. At least they didn't use python ROFL Now i'm off to buy a usbASP
@drhubs7049
@drhubs7049 4 місяці тому
Do you know why this is? I thought the Serial didn't matter for the ATTINY but I'm clearly misunderstanding what you're saying
@JBERGALIEN
@JBERGALIEN 3 місяці тому
don't try this program, it simply does not work at all.
@DIYGUYChris
@DIYGUYChris 3 місяці тому
maybe if you read the comments you will notice that the program probably didn't worked for only you, kindly check the steps and let me know if you encountred any issue, I'm here to help : )
@JBERGALIEN
@JBERGALIEN 3 місяці тому
please read my comments other have the same problem if you know how to fix, or not let me know@@DIYGUYChris
Самая маленькая Ардуина - ATtiny10 + проект
10:37
Заметки Ардуинщика
Переглядів 169 тис.
Good bye Arduino? Welcome ATtiny 1-Series!! UPDI --geil!!
15:44
maker-garage-de
Переглядів 55 тис.
Помилка,  яку зробило військове керівництво 🙄
01:00
Радіо Байрактар
Переглядів 409 тис.
Teenagers Show Kindness by Repairing Grandmother's Old Fence #shorts
00:37
Fabiosa Best Lifehacks
Переглядів 17 млн
How to Program an ATtiny with Arduino (Up to Date)
10:09
Levi Janssen
Переглядів 52 тис.
Bare-Metal MCU #9 - Review; ATTiny85 from scratch
14:25
Mitch Davis
Переглядів 60 тис.
ATTiny85 Program Using Arduino UNO
12:07
Steve Rayner Makes
Переглядів 12 тис.
Are PIC Microcontrollers Any Good? - Beyond Arduino #4
21:07
Sine Lab
Переглядів 34 тис.
Use the very attractive new ATTINY chips for your projects
14:34
Andreas Spiess
Переглядів 191 тис.
Make a UPDI Programmer for the Arduino ATTiny
14:50
element14 presents
Переглядів 22 тис.
Arduino Tutorial - ATtiny85 explained in 4 minutes!
4:28
Adio_
Переглядів 168 тис.
Programming Attiny MCUs in Hindi
7:01
Arnov Sharma
Переглядів 14 тис.
i cant stop thinking about this bug
8:40
Low Level Learning
Переглядів 37 тис.
ИГРОВОЙ ПК от DEXP за 37 тысяч рублей из DNS
27:53
Ремонтяш
Переглядів 392 тис.
The power button can never be pressed!!
0:57
Maker Y
Переглядів 9 млн
САМЫЙ дешевый ПК с OZON на RTX 4070
16:16
Мой Компьютер
Переглядів 71 тис.