Тёмный

Bare-Metal MCU #9 - Review; ATTiny85 from scratch 

Mitch Davis
Подписаться 36 тыс.
Просмотров 64 тыс.
50% 1

ATTiny85 Datasheet: ww1.microchip.com/downloads/e...
Eleccelerator Fuse Bit Calculator: eleccelerator.com/fusecalc/
----------------------------------------------------------------------
ENTIRE PLAYLIST: • Fundamentals of Microc...
Video #1 - Intro to Registers: • Bare-Metal MCU #1 - In...
Video #2 - Access registers by address: • Bare-Metal MCU #2 - Se...
Video #3 - Barebones hardware (breadboard arduino): • Bare-Metal MCU #3 - Ba...
Video #4 - Bootloaders and Programers: • Bare-Metal MCU #4 - Bo...
Video #5 - AVRDude and Fuses: • Bare-Metal MCU #5 - AV...
Video #6 - Compilers: • Bare-Metal MCU #6: Com...
Video #7 - Linkers: • Bare-Metal MCU #7: Lib...
Video #8 - Optimizers: • Bare-Metal MCU #8: Opt...

Опубликовано:

 

22 авг 2020

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 167   
@r3jjs
@r3jjs 3 года назад
I've almost finished your whole series (so far.) I am an experienced developer in working with low level systems (long live the 6502!) but I watched your videos out of curiosity on what approach you would take to explaining things. You have, I believe, some of the absolute best descriptions that I have heard. To address specific points. 1) You stay on-focus and do not ramble. You've got a goal and you get to that point. 2) You have a solid speaking voice without hemming or hawing. (You /may/ speak a little fast for ESL viewers, however.) 3) Your approach of "deconstructing" the Arduino blink sketch and then rebuilding it was incredibly clear. I've not been able to explain it that well to people. Start with what they understand and go from there. 4) Your bit-shifting (to use the pun) bang on! So many videos on bit shifting spend forever with animated charts and you did it with a single slide of coloured graphics. I will be referring people to your videos as well as using some of your techniques when talking in the future.
@DashkaMilashka015
@DashkaMilashka015 2 года назад
you've just nailed it. couldn't say any better!
@JeSuisNerd
@JeSuisNerd 3 года назад
Just finished watching the whole series up to this point! Even as a CS major and developer by trade, this has been educational and fun to watch, just the perfect amount of succinct. You teach very well!
@donlion157
@donlion157 15 дней назад
Stumbled onto yr channel was hooked right away. You have a talent being able to make things clear and simple without being boring. Thank you, Damn good job Don D Lion
@andreialexander405
@andreialexander405 2 года назад
Mitch, this series is phenomenal work on making it so clear and simple. Thanks so much!!
@tomgoff8670
@tomgoff8670 Год назад
Thanks for posting this series, you obviously know what you’re doing and have put a lot of effort into these videos. Great job!
@patrickcpe
@patrickcpe 3 года назад
Extremely well made, thank you a ton for this. I've been looking for good resources to help friends out and this series is a godsend :)
@robjordan63
@robjordan63 3 года назад
I really enjoyed this series, thanks. I have a stop/start project to master the new(ish) ATTINY '1' series, and this is incredibly helpful for getting some context on that task.
@Electromakerio
@Electromakerio 3 года назад
Fantastic series Mitchel. We loved this video so much we featured it in this weeks episode of the Electromaker Show!
@AlvaroAlcaideSoler
@AlvaroAlcaideSoler 5 месяцев назад
Thank you for this series , it really helped me getting into embedded development. Your way of explaining the subjects really makes a difference. Keep up the fantastic work!
@malevinso
@malevinso 11 месяцев назад
Mitch, I have recently found myself addicted to MCU's and all things related. I can't seem to get enough of them! Your videos are by far my favorite! They all still work great and I just love to follow along! I can only hope someday you come back to the channel and share your knowledge. All good things, Mark
@madphoenix1
@madphoenix1 3 года назад
Great series, I hope you do more!
@tusharshiralkar7483
@tusharshiralkar7483 3 года назад
Great video series, really loved it, looking forward to see your series on STM microcontrollers
@leifclaesson2470
@leifclaesson2470 3 года назад
Fantastic series, Mitch! Thank you so much. Reddit u/stm8 brought me here as well. I've watched your entire series, looking forward to your forthcoming STM8 videos but I'm not waiting, with what I've learned already I'm ready to dive in!
@archadious
@archadious Год назад
Great video. Amazing how satisfying it is see that green LED start to blink on your breadboard.
@1080pixel
@1080pixel 2 месяца назад
Sidenote: The ATtiny85 has an internal pull-up resistor for the reset pin - there is no need for an external one. Reference: Page 39 in the datasheet, 8.1 Resetting the AVR
@josephotieno898
@josephotieno898 3 года назад
Excellent series. I have learnt a lot, filling gaps i had with AVR microcontrollers...
@didiergasser-morlay2417
@didiergasser-morlay2417 3 года назад
Hats off! Excellent series, clear & concise, to the point with just enough details to push people to dig & learn more. I bought a few attinys (in case I fry some during my experiments :) ) thanks a lot
@michaelmounts1269
@michaelmounts1269 Год назад
outstanding series---Thank you! I know it takes a lot of time and commitment to do these RU-vid videos. you work is much appreciated. FWIW--I thought including the memory maps of the chips really helped to keep the instructions clear...Kudos...well done!
@andriilogoshko8881
@andriilogoshko8881 3 года назад
Very clear and concise explanations. Looking forward for new episodes.
@benedekfauszt9351
@benedekfauszt9351 3 года назад
I have never seen such clear explanation. Very well done! Thank you!
@PlasticBonesMusic
@PlasticBonesMusic 3 года назад
I've been following your series since the first episode while doing my own project for school and it's been a godsend. I did a project last semester coding an ATMega32 and kind of understood what I was doing (with lots of hand holding), but you were really able to break it all down and bridge the knowledge from what I learned then and what I already knew about programming arduinos. It's given me the confidence to actually ditch the arduino and use a barebones microcontroller for my own project. I can't wait for you to continue onto STM, as I have an STM32 development board I impulse bought which has been gathering dust as I have no idea what I'm doing with it.
@mugishadavid5938
@mugishadavid5938 Год назад
Thank you very much @Mitch Davis for important lessons about avr. Where i live its not easy to get knowledge like this. I really appreciate.
@tilipitappi7762
@tilipitappi7762 Год назад
i absolutely love these videos! You're top teacher. I hope you continue to do these lessons some day :)
@NunoRVOliveira
@NunoRVOliveira 3 года назад
Excellent series! Learned more in a couple of hours than in a couple of weeks. Thanks!
@topherchung8910
@topherchung8910 Год назад
Hi Mitch, wanted to say thank you for this series. I learned lots, and opened up my understanding of arduino's and avr chips. I was looking for how to setup an internal clock and you showed much more. Again thanks!
@ck-li6yr
@ck-li6yr 3 года назад
Great job. I've been looking for a series exactly like this. Can't wait for other MCUs.
@makingwithsteve
@makingwithsteve 3 года назад
This is a great series! Learned so much! Thank you for doing these Mitch, can't wait to see what you do next. Would be interesting to see you try doing this with something even smaller like the attiny4, pushing optimization even harder to fit code onto such a small chip. Keep up the good work!
@user-vs7cw2rg7r
@user-vs7cw2rg7r 2 года назад
Good job man, excellent intro to AVR.
@celem1
@celem1 2 года назад
Mitch, I am enjoying your STM32 videos but saw this ATtiny85 video and also watched it. I know, from comments in other videos of yours, that you spend a lot of time producing each video and I feel the results reflect that extra effort. I like that you cover what is needed with a succinct but complete delivery. I never fail to learn something in every video. That includes this video despite the fact that, over the years, I have flashed many bare metal ATtiny85 chips for various projects. Keep it up!! BTW I second what Jeremy Starcher's said in his much earlier (a year earlier) comment.
@kenanusta3242
@kenanusta3242 Год назад
perfect series Mitch.Thank You and your effort.
@meemuboi
@meemuboi 3 года назад
I have finished watching the entire series and i gotta say, you are probably the best youtuber out there that can explain this stuff in great detail and its so easy to understand, especially for a beginner like myself. Thank you so much, you deserve a lot more views and subs (subbed btw :DD).
@patlollasrujan8493
@patlollasrujan8493 2 года назад
finished watching the entire playlist, great work.
@MitchDavis2
@MitchDavis2 2 года назад
I had a lot of fun making that first series. I wish I had better recording equipment at the time though. Oh well
@luzten
@luzten Год назад
This is easily the best playlist of "bare metal" embedded devices programming I watched. Thanks a lot Mitch
@vivekvenkatsubramaniam437
@vivekvenkatsubramaniam437 3 года назад
Saved your playlist....thanks for making these videos! Hope you do other MCUs also...
@faxanidu3070
@faxanidu3070 3 года назад
Ooo you did a attiny video like I wanted! Your the best!
@KH-zt3vs
@KH-zt3vs Год назад
Thank you so much! Love this series!
@Factory400
@Factory400 Год назад
This is pure gold. I was stuck learning this stuff with cryptic books. It took a loooong time to get some skills. Then, I find this..... which nails it.
@lm7415
@lm7415 3 года назад
excellent complete series. very detailed. your video presentation is professional and most competent.
@chiraggoyal7637
@chiraggoyal7637 3 года назад
Great videos. Will love to see how you explain STM. Thank you for making such great videos.
@hkl9854
@hkl9854 3 года назад
Thank-you for make this. This video series is the most crystal clear explanation of Bare-Metal microcontroller for me I have seen on RU-vid. I would love to learn a lot from you if you are going to do a STM8 series video. :-)
@waqaswani2994
@waqaswani2994 Год назад
Finished the series today glad I got to learn all of this
@nict2618
@nict2618 3 года назад
Such a fantastic set of videos. Thank you so much.
@naveenkakada
@naveenkakada 2 года назад
Really enjoyed your video series. Thank you.
@Bubby9767
@Bubby9767 8 месяцев назад
Great content. Awesome explanation. Very easy to follow. Something that I think would be interesting is actually a nice project with a little more than just a led blinking. From start to finish
@davidesp11
@davidesp11 3 года назад
I loved this series. Looking forward to see the STM8 one. Thanks.
@ianwalsh3868
@ianwalsh3868 5 месяцев назад
Just watched the whole series. It’s fantastic. It’s a great intro to bare metal microcontroller programming, as well as C programming in general. Thank you!
@boblake2340
@boblake2340 2 года назад
Brilliant video! All the detais clear and to tne point.
@DavidTLutz
@DavidTLutz 9 месяцев назад
Great series!!!
@henkoegema6390
@henkoegema6390 Год назад
Excellent work. 👏
@harris9624
@harris9624 3 года назад
Just finished watching the series, awesome tutorial! I did a little digging and found out that the avr-gcc compiler has a built-in delay library in the avr-libc package called This lets you use a _delay_ms function in your C code (no more nasty for loops).
@AmalMathewTech
@AmalMathewTech 3 года назад
Great Series, Thank you Mitchel
@gapguy9564
@gapguy9564 2 года назад
Just finished watching whole series. And happy feeling
@mr.tweety
@mr.tweety 2 года назад
Simply the greatest. Thank you.
@dineshganesh6723
@dineshganesh6723 3 года назад
Great work bro❤️😎
@nict2618
@nict2618 3 года назад
These videos are so good.
@donamills
@donamills 3 года назад
Dont know what took me so long to find your channel. But here I am.
@FreddyBNL
@FreddyBNL 3 года назад
Exeptionally well done. Did some binge-viewing and learned a lot, even though I already write programs for program the ATtiny s myself.
@vyuniverse9490
@vyuniverse9490 3 года назад
This entire series was great; thanks for creating them. (I'm planning on following through your series with a Raspberry Pi and an Arduino Uno and see how far I get.)
@testme2026
@testme2026 3 года назад
excellent as always!
@elliotth30
@elliotth30 3 года назад
Brilliant video
@Milanissimo
@Milanissimo 3 года назад
Awesome videos!
@draufunddran
@draufunddran 3 года назад
I always wanted a good introduction to stm32 micros... maybe your next series could be on one of those. And just once again... awesome series... keep the vids coming!
@draufunddran
@draufunddran 3 года назад
@@MitchDavis2 This is so funny... I had the exact same problem with the IDE beeing to overwhelming and all i wanted was a blank programm. But i never had the time to dig into the part where i could do it from scratch. Thats why i would love to see a series on this from you. I realy learn a lot from your style of videos and so i hope i can save some time and don't have to dig too much into the datasheets myself.
@DanEllis
@DanEllis 3 года назад
@@MitchDavis2 Honestly, the amount of code you need to blink an LED on a Cortex-M device isn't _much_ more than for an AVR. You just have to actually turn the peripheral on and enable its clock, which is just two extra lines.
@sylvainboyer2310
@sylvainboyer2310 Год назад
Very helpful video, many thanks, I was confused by the change of 0x17 to 0x37 and after reading a bit more on the topic I have a better understanding. From the ATTiny85 datasheet p20: "When addressing I/O Registers as data space using LD and ST instruc-tions, 0x20 must be added to these addresses." And from, the Atmega328p datasheet p19: "When addressing I/O registers as data space using LD and ST instructions, 0x20 must be added to these addresses"
@RFDarter
@RFDarter 11 месяцев назад
Ok at least they specified that. But why wouldn't they provide us with the correct memory address in the first place?
@pbs570
@pbs570 Год назад
NICE! We want more!
@human890209yang
@human890209yang 25 дней назад
Thanks! I watched all the videos in this playlist. You explained what Arduino is doing behind the scenes. I made some projects with Arduinos just following the “habits” from the examples and other's codes. Now I know the things behind those magic words of the codes and IDE's buttons.
@andymouse
@andymouse 2 года назад
Great tutorials...cheers.
@weirdboyjim
@weirdboyjim 3 года назад
Nice video thanks Mitchel.
@toma.a7146
@toma.a7146 3 года назад
This is great content!
@philippeclair4017
@philippeclair4017 3 года назад
Thank you Mitch, I watched the whole series with great interest, I learnt a lot of things, despite I already programmed dozens of T85s chips. This is the best tutorial I ever found for programming the AVR micro-controllers if you want to progress from arduino IDE to avr-gcc and avrdude. Now I hope to learn from you how to use Make and Makefiles. It is so tedious and error-prone to repeat over and over again the same cryptic commands from the console. Please explain us how to automatize this process.
@cuatropantalones
@cuatropantalones 3 года назад
this was excellent!
@Amaralrosa1
@Amaralrosa1 Год назад
That's beautiful!
@rohitkumarsambaria9811
@rohitkumarsambaria9811 3 года назад
What a wonderful series! I would love to see you with a series on STM8, especially stm8s103f3 and stm8s003f3.
@asddsfdsaasdf
@asddsfdsaasdf 3 года назад
Great content - new way of learnong things from arduino world. Thank you
@microtongue
@microtongue Год назад
This series was awesome, thank you! The cherry on top would've been 1 video of automating it all with a makefile
@shamailkawish6632
@shamailkawish6632 Год назад
Thanks for the video.
@user-og8hi6tb2j
@user-og8hi6tb2j 3 месяца назад
I really like your video content and I wish to see more. I'm particularly interested in your journey and overview of working with ARM and ESP, including bare metal coding on both platforms.
@user-vv9gf6dg9f
@user-vv9gf6dg9f 3 года назад
Yo dude, nice video, thank you
@floridasenior
@floridasenior 3 года назад
great job am subscribing now
@RinksRides
@RinksRides 3 года назад
very cool approach bro! First video of yours I saw, SUB'D!
@ahmatrizki5154
@ahmatrizki5154 3 года назад
Thanks for sharing
@onuryorutken5540
@onuryorutken5540 3 года назад
Your series are great, briefly really really great! That is not just a "oo i like that video" comment, your videos are nailing it without boring and explaining it detailed. They way you start for example PORTB=32 for bit banging is perfect i think. Thank you, i will be waiting your other videos.
@MitchDavis2
@MitchDavis2 3 года назад
Glad it was helpful. These videos keep taking longer and longer to make. Sometimes I find myself knowing WHAT to do, but not WHY, so I have to do a fair bit of homework before covering it in my videos. It’s also incredibly difficult to decide what NOT to talk about. It’s too easy to go off on a tangent with things that are loosely related. Thanks again!
@onuryorutken5540
@onuryorutken5540 3 года назад
​@@MitchDavis2 Exactly! I think it must be so hard to decide what NOT to talk about, it is like sampling without loosing quality, taking derivative without loosing function. You spend time for helping people saving time. Thanks again !
@mdfaisal1415
@mdfaisal1415 8 месяцев назад
This best video tutorial. Thank you so much
@albertroswell
@albertroswell Год назад
awesome!, thanks, just want I needed to program an attiny20!, thanks for making this!
@squeaky_honda
@squeaky_honda 9 месяцев назад
Thanks for the tutorial series!! The arduino attiny85/84 support is a mess. Bootloaders on 85 that hog most of the pins, leaving you with little, damaged support on 84 due to versioning-shenanigans on IDE 2.x. Various "boards/HALs" hogging the timers and interrupts just in case you need delay(). Without those, I can't build anything productive. I managed to program things with a cheap "usbasp" programmer by following your instructions.
@abpccpba
@abpccpba 2 года назад
For this, your first go-round went well. : = ))
@Bianchi77
@Bianchi77 2 года назад
Vote up, nice clip, thanks for sharing :)
@VerticalTurkey
@VerticalTurkey 3 года назад
Great series. I found your videos incredibly helpful. My only recommendation going forward is to normalize your audio levels to what normal videos play at. Your videos are quiet AF.
@donythomas7
@donythomas7 Год назад
Thank you very much for your Bare-Metal MCU tutorials !!! Can you please add some videos on programming AVR MCUs using Rust programming language?
@mr0insane
@mr0insane 3 года назад
Wow, just finished this serie of 9 vids. This might just be flagged as one of the best tutorial series I've ever encountered on YT, scratch that, on the net! Very interesting, very detailed, and very comprehensible indeed. "Take one step back, ... to leap a couple of miles ahead" ! I must add, though, I am still wondering about the use, and the need, for those 'high fuse', 'extended fuse', and 'lock bits'. In addition, how to scribble EEPROM? (My guess is that it is done in a similar way as writing flash with avrdude?). Keep up with this amazing quality! Now I'm heading to the LCD vid :D //Best regards from The Netherlands
@henninb
@henninb 3 года назад
Amazing video , inspires me to program without an ide.
@MitchDavis2
@MitchDavis2 3 года назад
By all means, if you don't want to use an IDE, go for it. This type of video is what inspires me to USE an IDE. I like to know what's going on behind the scenes so there's no "magic". But after that, I like to take advantage of all the cool tools out there.
@DashkaMilashka015
@DashkaMilashka015 2 года назад
well... thats the best led blink thing i have seen. all that.. hundred parts..? thanks for the time you've spent, thats the way to do it (teach). ps: big thanks
@AleksandrIvin
@AleksandrIvin 11 месяцев назад
Nice video. I used this chip in my toy as IR recivier :)
@a.inaciomorais9859
@a.inaciomorais9859 3 года назад
I have a lot of old AVR MCU here. ATMEGA8535 and AT90S8535. ATMEGA8535 worked fine with AVRDUDE 6.3 and ARDUINOISP. But with AT90S8535 I have experienced the strangest outcomes so far. It is necessary to use an external clock (I'm using a 8MHz crystal) and there aren't quite evident fuses that work with AVRDUDE (the online calculator states that there is an AVRDUDE lfuse argument but the AVRDUDE returns "lfuse" memory type not defined for part "AT90S8535"). Without fuses I was able to perform a first programming (avrdude -u -C /etc/avrdude.conf -p 8535 -P /dev/ttyACM0 -c stk500v1 -b 19200 -U flash:w:"avr2.hex":i) and it works fine, but for every AT90S8535 that I try to program a second time it is impossible ("Yikes! Invalid device signature") but it works well if I disconnect the GND line from ARDUINOISP when programming it again (I'm not kidding). I'm using decoupling caps and everything. Maybe it's better to let go of things from the past.
@a.inaciomorais9859
@a.inaciomorais9859 3 года назад
@@MitchDavis2 They have discontinued it in 2004 I think. These ones that I have were produced in 2001. But don't bother... I was using these because I don't have others AVR MCUs (only the ATMEGA328P that comes with ARDUINO). I was able to apply your lessons with ATMEGA8535 MCUs and it was fine. Thank you very much. The way you explained it was amazing. I have never seen anyone with your ability to teach. Please, consider some STM32 content for the future and forgive my bad English.
@brendanbarbour210
@brendanbarbour210 3 года назад
Hey Mitch...That was terrific..I just binged on all nine in the series and it filled in a great deal of detail about what was going on behind the scenes..The Arduino IDE is all very well, but it keeps a lot of secrets that ultimately can be crucial in debugging not just code but workflow as well. I'm now going to revisit a number of failed projects armed with the insights..Many thanks..One question...I don't have the specific programmer you used..I have a TL866II-Plus...can this work as a programmer under the Arduino IDE ?
@brendanbarbour8568
@brendanbarbour8568 3 года назад
@@MitchDavis2 You were looking for suggestions as to what to tackle next; Have you thought about a sortie into FPGAs..or delving into some specialised ICs/Modules, by taking the backwards engineering approach that works so well, to work from the datasheet and end up with a basic working system, for example the Farchild Smart Power IGBJT (FSBF5CH60B) and ending up with an Inverter....
@SauvikRoy
@SauvikRoy Год назад
For a simple combinational logic circuit, would it be a nice solution? Actually, I was trying to put together a blinker unit using this which would also have a hazard function which could get overridden upon triggering indicators and then back to the blinker function again. PS: Consider a 3input 2output logic circuit.
@nexpro6985
@nexpro6985 5 месяцев назад
Never connect the power and ground rails together on your breadboard. Make sure you connnect the ground rail on one side with a wire to the ground rail on the other side. Then do the same with the power rails ( as shown in the video ) 😁
@marcusstenbeck
@marcusstenbeck 8 месяцев назад
I've watched through the series and just want to say thank you. Do you know any other resource that "start from the data sheet" and then figures out how to do it. It's like you say, jumping into a data sheet feels overwhelming when you don't know what to look for and what can probably be ignored. The fact that you go through data sheets and say out loud "sounds like this might be important, but I don't know yet" makes it so easy to follow how you think when you go through an unfamiliar data sheet. Thank you!
@bilinguliar
@bilinguliar Год назад
It was hard to find your Patreon link, but I managed.
@zetaconvex1987
@zetaconvex1987 3 года назад
STM8's are great little chips, BTW. Small, simple, cheap, with ample pins to play with. I have an stm8s103f3p6.
@zetaconvex1987
@zetaconvex1987 3 года назад
@@MitchDavis2 You might want to take a look here: github.com/blippy/rpi/tree/master/stm8s103f3p6/bare It's hastily-assembled bare metal files for the STM8S, including basic blinking, PWM, timer interrupts, uart, SPI and I2C. Expect bugs, particularly wrt I2C. But it might give you some inspiration. There's clearly a lot you can do with an STM8.
@paulrisk606
@paulrisk606 3 года назад
Wow! You're committed. Nice work. I'm gonna stick with Arduino IDE :D
@MitchDavis2
@MitchDavis2 3 года назад
This is a great response. I went down this rabbit hole to learn HOW things worked. After you understand the low level stuff, you don't have to feel bad about using higher-level frameworks/IDEs. The only thing that stinks is if you develop a dependence on something, which can prevent you from learning new things. I started learning low level stuff so I could use an STM8 (which didn't have the support of modern frameworks/IDEs). But it certainly wasn't fun to try to learn everything from the ground up while leaving the wonderfully cultivated world of Arduino.
Далее
Bare-Metal MCU #4 - Bootloaders and Programmers
18:24
How to use the Atmel ATTINY10 Microcontroller
53:02
Просмотров 547 тыс.
Datasheets: 16x2 LCD By Hand (No microcontroller)
26:35
Bare-Metal MCU #1 - Intro to registers
13:10
Просмотров 68 тыс.
The Z80's secret feature discovered after 40 years!
16:07
“Hello, world” from scratch on a 6502 - Part 1
27:25
Are PIC Microcontrollers Any Good? - Beyond Arduino #4
21:07
#87 Six, yes SIX, GPIO pins on an ATTiny85
30:07
Просмотров 27 тыс.
Program the ATTINY85 with Arduino 1.8.18 (2022)
7:35
Optimizing Arduino Code: no setup(), no loop() ⛔
9:27