Port Register Control | Increase speed of Read/Write - Arduino101

แชร์
ฝัง
  • เผยแพร่เมื่อ 31 ต.ค. 2020
  • $2/5pcs 2Layer & $2/5pcs 4Layer PCBs: jlcpcb.com
    🔥Another class for the Arduino 101 series. These videos will have some more difficult Arduino programming. In this video I show you how use the port register control and why is that better...
    🔀LINKS
    -------------------------------------
    Tutorial Website: electronoobs.io/tutorial/201
    Tutorial: electronoobs.com/eng_arduino_...
    ATmega328p datasheet: bit.ly/3csU1i6
    Get Arduino UNO: www.banggood.com/custlink/mvv...
    🤝SUPPORT
    -------------------------------------
    ELECTRONOOBS.io: electronoobs.io
    Help my projects on Patreon : / electronoobs
    my Q&A page: electronoobs.io/forum/index.php
    Facebook page: / electronoobs
    Canal en Español: / electronoobs en español
    Like share and subscribe to motivate me. Thank you
    #Arduino
    #tutorial
    #registers
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 291

  • @mmawad100
    @mmawad100 3 ปีที่แล้ว +165

    PLEASE CONTINUE WITH THE ADVANCED STUFF THERE IS A SERIOUS LACK ON THE INTERNET FOR THAT

    • @willtipton
      @willtipton 3 ปีที่แล้ว +5

      I agree! 114%

    • @MrRijoAlex
      @MrRijoAlex 3 ปีที่แล้ว +4

      Truer words have never been spoken!

    • @Danixu86
      @Danixu86 3 ปีที่แล้ว +7

      Well there's stuff on internet, the problem is that is not well explained and this videos helps a lot.

    • @AdithyanKNair
      @AdithyanKNair ปีที่แล้ว +1

      still facing this problem

  • @minusharma1738
    @minusharma1738 3 ปีที่แล้ว +45

    You are so underrated 😭

    • @sawansihag6974
      @sawansihag6974 3 ปีที่แล้ว

      Yes, I am amazed by the amount of knowledge I got from this video

  • @DivyanshMMMUT
    @DivyanshMMMUT 3 ปีที่แล้ว +6

    I think programming directly using Register Control is more fun as we are literally seeing what the controller is actually doing.... More like an assembly level Language 🔥.
    - Thankyou from India 🙏

  • @ELECTRONOOBS
    @ELECTRONOOBS  3 ปีที่แล้ว +27

    ERROR: To invert a byte we use "~" and not the "!" Sowy! :)
    Arduino Course (Spanish): bit.ly/3ldW6kO
    Follow me on FACEBOOK for more: facebook.com/Electronoobs
    Help me on Patreon: www.patreon.com/ELECTRONOOBS

    • @bilelhafsi3320
      @bilelhafsi3320 3 ปีที่แล้ว

      Thank you for the vidéo!!!
      Could you please tell me which software do you use to make video animations ?

    • @monleyson8668
      @monleyson8668 3 ปีที่แล้ว +1

      Ok

  • @MarlinFirmware
    @MarlinFirmware 3 ปีที่แล้ว +10

    For our project we used “FastIO” headers that define helpful macros to initialize, read, and write to the port bits using the digital PIN number, concealing all the binary math. They really speed up digital I/O, so we extended them to several platforms. For analog pin reading you can do similar tricks, by first setting up the pin for reading, then starting the ADC, and then going off to do other things and picking up the ADC result later, instead of calling analogRead() and waiting for it to return. That would make a good related subject for a future video. Cheers!

    • @richardlighthouse5328
      @richardlighthouse5328 3 ปีที่แล้ว

      If you need performance, then write in pure c/c++.

    • @MD-vs9ff
      @MD-vs9ff ปีที่แล้ว

      @@richardlighthouse5328 I don't know what you mean. Arduino is a pure C++ set of libraries, with just some cosmetic things handled automatically (like function prototypes).

    • @richardlighthouse5328
      @richardlighthouse5328 ปีที่แล้ว

      @@MD-vs9ff I meant without any framework. Just AVR helpers.

    • @stark_energy
      @stark_energy 11 หลายเดือนก่อน

      @@richardlighthouse5328 What it means: using FastIO is not only having near equal the direct (without any framework) but also platform independent. The hard part is always making the code has near highest performance BUT at the same time platform agnostic (i.e. can be run on Mega, ESP32, etc without changing your code).

  • @sammflynn6751
    @sammflynn6751 3 ปีที่แล้ว +7

    Amazing, crystal clear explanation . wow, nobody explains it better than you. You deserve a million subs man.

  • @padmalayarawal3091
    @padmalayarawal3091 3 ปีที่แล้ว +20

    This is really a great explanation as well as great presentation. Port manipulation now looks more easy to get understand. Thank you. 🤩

  • @ManojSharma-ud3ox
    @ManojSharma-ud3ox 3 ปีที่แล้ว

    You explained it very well. I am a mechanical engineering graduate and have lots of projects which involved heavy use of electronic. This video was very clear and understand everything you said. Well done!!

  • @scottstevens7569
    @scottstevens7569 3 ปีที่แล้ว

    Very Good Explanation! We really do need more of this type of thing as there is not much available, and not as easy to understand as yours is. Clear, concise and relevant.

  • @baladshin7100
    @baladshin7100 3 ปีที่แล้ว +1

    One of the best videos I’ve ever seen on TH-cam for arduino tutorial 😍 keep going bro! 💪🏻 love from IRAN 🇮🇷

  • @mdoering
    @mdoering 3 ปีที่แล้ว

    The production value of your videos is next level... I LOVE the motion tracked labels. New subscriber achieved.

  • @saram263
    @saram263 ปีที่แล้ว

    The diagrams of the ports on the arduino board were so helpful and saved me from scrolling through pages of documentation as a noob, thank you!

  • @saurabhgawli2167
    @saurabhgawli2167 3 ปีที่แล้ว +2

    U deserve so much more...
    Just don't stop ur work...
    Luv from India ❤

  • @wiktormolzahn736
    @wiktormolzahn736 3 ปีที่แล้ว

    I love you!!!
    This ist the first Video that explanes everything nicely

  • @hrperformance
    @hrperformance 3 ปีที่แล้ว

    I learned so much from this video. This guy has a serious talent.
    Much love from the UK

  • @bobvanwagner6099
    @bobvanwagner6099 3 หลายเดือนก่อน

    i've programmed in C since Bell Labs in the late '70-s and know the concepts like this better than the back of my hand, but rarely have I seen such a clear and careful explanation. Great Job!

  • @anonymoususer900
    @anonymoususer900 3 ปีที่แล้ว

    Last time i honestly told you that the video(internal comparator one) wasnt very understandable for intermediate or new people. DRAMATIC IMPOROVEMENT. Awesome tutorial......i will use this in my led cube project.....Thanks!

  • @Sekhar_Home
    @Sekhar_Home 3 ปีที่แล้ว +1

    Finaly clearly able to know bitwise operator use in Arduino... Thanx for ur awesome graphical presentation which makes the education more fun and interactive

  • @richardsteen4340
    @richardsteen4340 2 หลายเดือนก่อน

    Excellent tutorial..!! Did some assembly programming years ago in college.. This has helped me to remember things I forgot I had learned..;)

  • @kaden56
    @kaden56 3 ปีที่แล้ว

    I will be a serious follower of this more advanced line of arduino info. This is the stuff that makes all my old projects finally work properly 😂

  • @bhargavdayal8595
    @bhargavdayal8595 2 ปีที่แล้ว

    Bro....This is one of the best explanations i have ever listened to..Great work

  • @JBAntiFan
    @JBAntiFan 3 ปีที่แล้ว +3

    Very informative, thanks for putting in the effort to edit the video. I like the inclusion of the result comparison at 6:50 and the video presentation overall looks professional, I bet new players will learn a lot from this Arduino101 series. Looking for more videos like this one to come soon, again, great job mate.

  • @stephanemuller7032
    @stephanemuller7032 3 ปีที่แล้ว +6

    Great video man! Best explanation I've seen out there.
    To make your code easier to read you can also use constants like so:
    DDRB |= (1

  • @antibrevity
    @antibrevity 3 ปีที่แล้ว +1

    This is an excellent explanation of boolean port manipulation that should be easy for newcomers to understand. Great work! I see that others have already pointed out some errors, but this is still a great video.

  • @halitekmekcioglu7150
    @halitekmekcioglu7150 3 ปีที่แล้ว +2

    very clear and well explained, I wish I could listen to this in my highschool years :) Lucky newbies

  • @soekma_aoeliea
    @soekma_aoeliea 3 ปีที่แล้ว

    You also could use , some of its function is pretty useful

  • @SaminaZafar270
    @SaminaZafar270 3 ปีที่แล้ว

    This is the video that I was searching for months. This video is awesome. Please make more arduino tutorials.

  • @MrAasi4
    @MrAasi4 3 ปีที่แล้ว

    This is one clearest tutorial of port manipulation. Good job!

  • @amarjitmoirangcha4521
    @amarjitmoirangcha4521 ปีที่แล้ว

    You are doing great I really like this. Such type of videos are very rare on internet which is teaching on register level for Arduino. Thanks

  • @nabilandadamslaboratory3422
    @nabilandadamslaboratory3422 3 ปีที่แล้ว +1

    This video has finally demystified port manipulation. Thank you!!

  • @kylemfwelch
    @kylemfwelch 3 ปีที่แล้ว

    I never seen this so clearly explained before. Excellent!

  • @tcrenegade
    @tcrenegade 3 ปีที่แล้ว

    Loved this!! I felt like I was finally learning how to use arduino as a tool

  • @moinshaikh6684
    @moinshaikh6684 3 ปีที่แล้ว

    Very Nice Explaination! Fallen in love with this tutorial!

  • @TimNortonGuru
    @TimNortonGuru 3 ปีที่แล้ว +1

    I did not realise the Arduino IDE could accept direct port addressing.
    Thanks

  • @CNsongs
    @CNsongs ปีที่แล้ว

    Super helpful. Thank you very much. My university expected expected us to know these magically.

  • @rikvermeer1325
    @rikvermeer1325 3 ปีที่แล้ว

    Amazing channel. I'm from software engineering and I understand this stuff but just don't know it all works like this. Thank you for clarifying!! I became a subscriber

  • @Tuberkulo1
    @Tuberkulo1 3 ปีที่แล้ว

    Best explanation about Port Register Control so far !

  • @ChrisLocke1969
    @ChrisLocke1969 3 ปีที่แล้ว

    One of your best arduino code videos yet, thanks!!

  • @skidroadkustom5953
    @skidroadkustom5953 2 หลายเดือนก่อน

    A lot of great info, thanks. I did watch this one at least 15 times

  • @jollyjumper1873
    @jollyjumper1873 3 ปีที่แล้ว

    Nice video! This is helping me out with my graduation project. Thanks :)

  • @alirezaahmadian4237
    @alirezaahmadian4237 2 ปีที่แล้ว

    right now im at the midle of the video and im so excited about this great explanation that made me write this comment. its great.thats exactully what i needed.

  • @piiumlkj6497
    @piiumlkj6497 3 ปีที่แล้ว +21

    This is a masterpiece , I love this kind of videos

  • @ajeethsuryash5123
    @ajeethsuryash5123 2 ปีที่แล้ว

    Amazing video... Expecting more of such class...

  • @chefseg
    @chefseg 2 ปีที่แล้ว

    Great video! The explanation was clear and concise!

  • @SusanAmberBruce
    @SusanAmberBruce 3 ปีที่แล้ว

    Thank you, I have been waiting for This tutorial, big help!

  • @SirLeecher
    @SirLeecher 3 ปีที่แล้ว

    Explained it really well and helped me understand, very nice !

  • @justdoingodswork
    @justdoingodswork 3 ปีที่แล้ว

    Thank you so much, its so great to learn these and importance of register. I'll definitely implement these in my codes from now on.
    Please keep making these videos about advance coding.
    Thanks again

  • @jaroslawpiotrowski210
    @jaroslawpiotrowski210 3 ปีที่แล้ว

    Very well prepared video about advanced operations on Arduino. Very well explain - THANKS !!!
    PLEASE continue this subjects for advanced operations !!!

  • @sennabullet
    @sennabullet ปีที่แล้ว

    A,fantastic explanation made easier to understand with superb animations. Thank you for sharing your knowledge.

  • @tanoryjakaperdana1419
    @tanoryjakaperdana1419 2 ปีที่แล้ว

    Thanks bro.. you explain these stuffs with human language.. subscribed and liked.. 👍👍👍

  • @myhobbies5965
    @myhobbies5965 3 ปีที่แล้ว

    Always waiting for such a atmega mcu program learning videos.

  • @littlemadness221990
    @littlemadness221990 3 ปีที่แล้ว

    Great video ! This is a perfect foundation for future learning.

  • @PdroAlfMar
    @PdroAlfMar 3 ปีที่แล้ว

    Puro Oro!!!! Saludos y Gracias por tu aporte a esta comunidad!!!!

  • @vitorlima2908
    @vitorlima2908 3 ปีที่แล้ว

    Muito show sua apresentação.
    Curto muito o seu canal.
    Vc é sensacional.

  • @pedroaugusto5995
    @pedroaugusto5995 4 หลายเดือนก่อน

    Nice video, your didactics is something else!

  • @TYGAMatt
    @TYGAMatt 3 ปีที่แล้ว

    Very well explained. Wish you'd don't this video a few months ago so that I wouldn't have had to spend hours reading the datasheet and doing it myself. Excellent stuff

  • @amnesie6615
    @amnesie6615 3 ปีที่แล้ว

    This is what I've subscribed for! COOL! Thank you!

  • @GrandNecro
    @GrandNecro 3 ปีที่แล้ว

    best tutorial i've found yet! i do have a question though. how do you read analog value? PINC register only stores the digital value of the analog pins.

  • @webslinger2011
    @webslinger2011 3 ปีที่แล้ว

    Wow! Thanks for a very good explanation on the Arduino ports.

  • @nid274
    @nid274 3 ปีที่แล้ว

    this is great..i never imagined there would nano to micro variation!!

  • @jstro-hobbytech
    @jstro-hobbytech 2 ปีที่แล้ว

    Cool video man. Optimized code gets me going.

  • @Danixu86
    @Danixu86 3 ปีที่แล้ว

    Nice tutorial. There are a lot of things that I did not understand until now. Also would be nice to have any tutorial like this talking about Timers and how to change it to change PWM signals for example.

  • @johnni5254
    @johnni5254 3 ปีที่แล้ว +5

    Great video! At 12:20 in the upper "loop()" commands, shouldn't those be: PORTD |= 0001000 and PORTD &= 00001000 accordingly? We're trying to set bit 3 of the register (Arduino pin D3). If we leave it as is in the video, it sets bit 1 of the register (Arduino pin D1). Do I miss something?

  • @VorpalForceField
    @VorpalForceField ปีที่แล้ว

    Absolutely Fantastic Content.. Thank You !!!

  • @JLCPCB
    @JLCPCB 2 ปีที่แล้ว +1

    Great video as always! 😀

  • @chiparooo
    @chiparooo 3 ปีที่แล้ว

    Very interesting! Great graphics. Learned a lot. Thanks for sharing!

  • @DustinWill
    @DustinWill 3 ปีที่แล้ว

    Best explanation and great animation. Very clearly stated.

  • @FixTronics
    @FixTronics 3 ปีที่แล้ว

    U R absolutely awesome
    I needed these information way long time ago
    Thank you for sharing it
    🥰⚘

  • @naikganesh5677
    @naikganesh5677 2 ปีที่แล้ว +1

    You nailed it 🔥🔥

  • @curiouslittledroid1234
    @curiouslittledroid1234 3 ปีที่แล้ว

    Great presentation. Nice video editing and great use of motion graphics.

  • @nyakoi
    @nyakoi 3 ปีที่แล้ว

    Thank you! Always good to learn something new 😀

  • @stark_energy
    @stark_energy 11 หลายเดือนก่อน

    A very detailed and great explanation to low-level optimization to Arduino. However we should point out that this only works on specific Arduino type, different type might require different configuration (and thus different code on different platform), while on the other hand a common Arduino function like digitalRead / Write is platform agnostic, it can even run on ESP32 or ESP8266 and many other types that conform with Arduino.h standard without changing code (except the pin number). So, for the sake of simplicity and portability there is always performance hit to pay. This is true for all programming language. The more you into performance, the more specific/limited device your code can work.

  • @rajneeshsingh6639
    @rajneeshsingh6639 3 หลายเดือนก่อน

    This is the best tutorial for port register control

  • @SudhirKumar-bq4xz
    @SudhirKumar-bq4xz 3 ปีที่แล้ว +2

    Great and informative video as always.... :-)
    Sir, please make a video on how to interface external ADCs, selection of ADC, important specification while selecting a ADC.....

  • @sawansihag6974
    @sawansihag6974 3 ปีที่แล้ว

    Thanks for sharing this precious knowledge ❤️❤️🔥

  • @Taran72
    @Taran72 3 ปีที่แล้ว +2

    Great explanation!! Thanks.

  • @vcrahul
    @vcrahul 3 ปีที่แล้ว

    Dear frnd..excellent explanation...even better than greatscott's...on this subject...nice...

  • @KresnaPermana
    @KresnaPermana 3 ปีที่แล้ว

    This video is awesome, thank you to show us

  • @PJElliot
    @PJElliot 3 ปีที่แล้ว

    Very nice production quality. Using a define for the pin value B0001000 etc would make the code easier to understand, but I understand you were trying to explain bit access for which your method was clearer to someone new to the topic.

  • @simplyishan06
    @simplyishan06 2 ปีที่แล้ว

    Incredible is an understatement...

  • @jimg9294
    @jimg9294 3 ปีที่แล้ว

    Thank you, this tutorial is excellent!

  • @Sekhar_Home
    @Sekhar_Home 2 ปีที่แล้ว

    Pls make more and more video on 101 arduino. I need to learn embeded system from you.. you are the best in teaching microcontroller.

  • @shoumikahmed6373
    @shoumikahmed6373 3 ปีที่แล้ว

    Waiting for it for a long time......

  • @tejaspatil5929
    @tejaspatil5929 3 ปีที่แล้ว

    please explain even more about the arduino, this video helped me a lot, please make even more videos

  • @ChathuraJayasundaraIMD
    @ChathuraJayasundaraIMD 3 ปีที่แล้ว +1

    Wow, awesome vid! please make a vid on timers n interrupts if it's possible. thank you

  • @jotyhasan4846
    @jotyhasan4846 ปีที่แล้ว

    You r so great! Love u so much❤️❤️❤️

  • @harikamalakarreddydarapu7410
    @harikamalakarreddydarapu7410 3 ปีที่แล้ว +1

    Very nice information.and very good explanation

  • @jawwadahmad7774
    @jawwadahmad7774 3 ปีที่แล้ว

    Hard-Work 👍. Easy to Understand.

  • @nabilandadamslaboratory3422
    @nabilandadamslaboratory3422 3 ปีที่แล้ว

    How would yo set it up so that you can assign a pin simply by referencing it's number? Similar to doing digitalRead(pin_number) and digitalWrite(pin_number).

  • @kendallbarboza6477
    @kendallbarboza6477 3 ปีที่แล้ว

    Excellent video man, thanks!

  • @stevenrogersfineart4224
    @stevenrogersfineart4224 2 ปีที่แล้ว

    This is such an excellent video

  • @luisbodart4140
    @luisbodart4140 3 ปีที่แล้ว

    I understood all. I love you.

  • @JamesLoper
    @JamesLoper 2 ปีที่แล้ว

    Thanks this is a great tutorial!

  • @arunbaalaji5589
    @arunbaalaji5589 3 ปีที่แล้ว

    Great explanation bro ☺️

  • @Nopf1
    @Nopf1 3 ปีที่แล้ว

    Very well explained!

  • @astrogerard
    @astrogerard 3 ปีที่แล้ว +1

    Very good video and thanks for taking the time to do this. I think the views counter is broken because in my opinion it should be at lease 10 timers higher by now.
    I would like to see more advance content like this. Please consider making an advance video on interrupts using -all- the pins of the Arduino. Thanks!

    • @ELECTRONOOBS
      @ELECTRONOOBS  3 ปีที่แล้ว +1

      Next part will be on interrupts

  • @abpccpba
    @abpccpba ปีที่แล้ว

    Thanks, Wonderful Graphic.

  • @akshay.kumar.k
    @akshay.kumar.k 3 ปีที่แล้ว

    Very nice tutorial!

  • @creatorx3795
    @creatorx3795 3 ปีที่แล้ว

    Thank you for that lesson!

  • @PhamhongDung68
    @PhamhongDung68 ปีที่แล้ว

    Thanks very much for this clip!