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

  Рет қаралды 89,925

Electronoobs

Electronoobs

3 жыл бұрын

$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

Пікірлер: 293
@mmawad100
@mmawad100 3 жыл бұрын
PLEASE CONTINUE WITH THE ADVANCED STUFF THERE IS A SERIOUS LACK ON THE INTERNET FOR THAT
@willtipton
@willtipton 3 жыл бұрын
I agree! 114%
@MrRijoAlex
@MrRijoAlex 3 жыл бұрын
Truer words have never been spoken!
@Danixu86
@Danixu86 3 жыл бұрын
Well there's stuff on internet, the problem is that is not well explained and this videos helps a lot.
@AdithyanKNair
@AdithyanKNair Жыл бұрын
still facing this problem
@minusharma1738
@minusharma1738 3 жыл бұрын
You are so underrated 😭
@sawansihag6974
@sawansihag6974 3 жыл бұрын
Yes, I am amazed by the amount of knowledge I got from this video
@DivyanshMMMUT
@DivyanshMMMUT 3 жыл бұрын
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 🙏
@TimNortonGuru
@TimNortonGuru 3 жыл бұрын
I did not realise the Arduino IDE could accept direct port addressing. Thanks
@ELECTRONOOBS
@ELECTRONOOBS 3 жыл бұрын
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 жыл бұрын
Ok
@sammflynn6751
@sammflynn6751 3 жыл бұрын
Amazing, crystal clear explanation . wow, nobody explains it better than you. You deserve a million subs man.
@saram263
@saram263 2 жыл бұрын
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!
@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!
@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 жыл бұрын
One of the best videos I’ve ever seen on KZbin for arduino tutorial 😍 keep going bro! 💪🏻 love from IRAN 🇮🇷
@bobvanwagner6099
@bobvanwagner6099 5 ай бұрын
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!
@padmalayarawal3091
@padmalayarawal3091 3 жыл бұрын
This is really a great explanation as well as great presentation. Port manipulation now looks more easy to get understand. Thank you. 🤩
@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 😂
@mdoering
@mdoering 3 жыл бұрын
The production value of your videos is next level... I LOVE the motion tracked labels. New subscriber achieved.
@MarlinFirmware
@MarlinFirmware 3 жыл бұрын
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 Жыл бұрын
@@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).
@hrperformance
@hrperformance 3 жыл бұрын
I learned so much from this video. This guy has a serious talent. Much love from the UK
@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
@richardsteen4340
@richardsteen4340 4 ай бұрын
Excellent tutorial..!! Did some assembly programming years ago in college.. This has helped me to remember things I forgot I had learned..;)
@null8363
@null8363 22 күн бұрын
I found this video and channel today, this is extremely amazing, the information and the quallity are top-notch, really thank you for your hardwork
@antibrevity
@antibrevity 3 жыл бұрын
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.
@Sekhar_Home
@Sekhar_Home 3 жыл бұрын
Finaly clearly able to know bitwise operator use in Arduino... Thanx for ur awesome graphical presentation which makes the education more fun and interactive
@nabilandadamslaboratory3422
@nabilandadamslaboratory3422 3 жыл бұрын
This video has finally demystified port manipulation. Thank you!!
@MrAasi4
@MrAasi4 3 жыл бұрын
This is one clearest tutorial of port manipulation. Good job!
@SaminaZafar270
@SaminaZafar270 3 жыл бұрын
This is the video that I was searching for months. This video is awesome. Please make more arduino tutorials.
@halitekmekcioglu7150
@halitekmekcioglu7150 3 жыл бұрын
very clear and well explained, I wish I could listen to this in my highschool years :) Lucky newbies
@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.
@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
@saurabhgawli2167
@saurabhgawli2167 3 жыл бұрын
U deserve so much more... Just don't stop ur work... Luv from India ❤
@kylemfwelch
@kylemfwelch 3 жыл бұрын
I never seen this so clearly explained before. Excellent!
@soekma_aoeliea
@soekma_aoeliea 3 жыл бұрын
You also could use , some of its function is pretty useful
@bhargavdayal8595
@bhargavdayal8595 2 жыл бұрын
Bro....This is one of the best explanations i have ever listened to..Great work
@jollyjumper1873
@jollyjumper1873 3 жыл бұрын
Nice video! This is helping me out with my graduation project. Thanks :)
@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
@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.
@wiktormolzahn736
@wiktormolzahn736 3 жыл бұрын
I love you!!! This ist the first Video that explanes everything nicely
@JBAntiFan
@JBAntiFan 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.
@tcrenegade
@tcrenegade 3 жыл бұрын
Loved this!! I felt like I was finally learning how to use arduino as a tool
@CNsongs
@CNsongs Жыл бұрын
Super helpful. Thank you very much. My university expected expected us to know these magically.
@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
@tanoryjakaperdana1419
@tanoryjakaperdana1419 3 жыл бұрын
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.
@jaroslawpiotrowski210
@jaroslawpiotrowski210 3 жыл бұрын
Very well prepared video about advanced operations on Arduino. Very well explain - THANKS !!! PLEASE continue this subjects for advanced operations !!!
@Tuberkulo1
@Tuberkulo1 3 жыл бұрын
Best explanation about Port Register Control so far !
@skidroadkustom5953
@skidroadkustom5953 4 ай бұрын
A lot of great info, thanks. I did watch this one at least 15 times
@stephanemuller7032
@stephanemuller7032 3 жыл бұрын
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
@sharingmylittleinsight
@sharingmylittleinsight 2 жыл бұрын
thanks a lottt, it's worked
@kacperfilipek8461
@kacperfilipek8461 2 жыл бұрын
PORTB ^= (1
@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.
@ajeethsuryash5123
@ajeethsuryash5123 2 жыл бұрын
Amazing video... Expecting more of such class...
@piiumlkj6497
@piiumlkj6497 3 жыл бұрын
This is a masterpiece , I love this kind of videos
@rajneeshsingh6639
@rajneeshsingh6639 5 ай бұрын
This is the best tutorial for port register control
@sennabullet
@sennabullet Жыл бұрын
A,fantastic explanation made easier to understand with superb animations. Thank you for sharing your knowledge.
@Sekhar_Home
@Sekhar_Home 3 жыл бұрын
Pls make more and more video on 101 arduino. I need to learn embeded system from you.. you are the best in teaching microcontroller.
@nid274
@nid274 3 жыл бұрын
this is great..i never imagined there would nano to micro variation!!
@gemininyte279
@gemininyte279 2 жыл бұрын
Your videos are amazing and have helped me so much!! Thank you !!! Is there any way to read an analogue signal without using the analogRead function but rather the Port register instead?
@stark_energy
@stark_energy Жыл бұрын
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.
@moinshaikh6684
@moinshaikh6684 3 жыл бұрын
Very Nice Explaination! Fallen in love with this tutorial!
@PdroAlfMar
@PdroAlfMar 3 жыл бұрын
Puro Oro!!!! Saludos y Gracias por tu aporte a esta comunidad!!!!
@siddharthmali5841
@siddharthmali5841 3 жыл бұрын
Great video as usual. But (at 10.05) while explaining the truth table for OR gate you said multiply instead of addition.
@ChrisLocke1969
@ChrisLocke1969 3 жыл бұрын
One of your best arduino code videos yet, thanks!!
@SudhirKumar-bq4xz
@SudhirKumar-bq4xz 3 жыл бұрын
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.....
@pedroaugusto5995
@pedroaugusto5995 6 ай бұрын
Nice video, your didactics is something else!
@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.
@curiouslittledroid1234
@curiouslittledroid1234 3 жыл бұрын
Great presentation. Nice video editing and great use of motion graphics.
@vcrahul
@vcrahul 3 жыл бұрын
Dear frnd..excellent explanation...even better than greatscott's...on this subject...nice...
@chefseg
@chefseg 2 жыл бұрын
Great video! The explanation was clear and concise!
@SirLeecher
@SirLeecher 3 жыл бұрын
Explained it really well and helped me understand, very nice !
@littlemadness221990
@littlemadness221990 3 жыл бұрын
Great video ! This is a perfect foundation for future learning.
@juanmf
@juanmf Жыл бұрын
Great stuff! I bought the starter kit only to get disappointed at the analogRead sample rate. Do you have a similar video for analogRead?
@jstro-hobbytech
@jstro-hobbytech 2 жыл бұрын
Cool video man. Optimized code gets me going.
@naikganesh5677
@naikganesh5677 3 жыл бұрын
You nailed it 🔥🔥
@chiparooo
@chiparooo 3 жыл бұрын
Very interesting! Great graphics. Learned a lot. Thanks for sharing!
@vitorlima2908
@vitorlima2908 3 жыл бұрын
Muito show sua apresentação. Curto muito o seu canal. Vc é sensacional.
@johnni5254
@johnni5254 3 жыл бұрын
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?
@amnesie6615
@amnesie6615 3 жыл бұрын
This is what I've subscribed for! COOL! Thank you!
@SusanAmberBruce
@SusanAmberBruce 3 жыл бұрын
Thank you, I have been waiting for This tutorial, big help!
@tejaspatil5929
@tejaspatil5929 3 жыл бұрын
please explain even more about the arduino, this video helped me a lot, please make even more videos
@magnetservicecenter
@magnetservicecenter 3 жыл бұрын
First many many thanks for the video,I am from India,I am an ordinary television technical person . I don't know about programming of microcontroller. Sir you feel proud to know that after watching you video 10 to 15 times and doing some practice I found a mistakes at 12:25 in the video. I think you display PORTD|=B00000010;// set D3 to high should be PORTD|=B00001000; same to PORTD&=!B00000010, should be PORTD&=!B00001000;// set D3 to low. Many many thanks , please reply
@ChathuraJayasundaraIMD
@ChathuraJayasundaraIMD 3 жыл бұрын
Wow, awesome vid! please make a vid on timers n interrupts if it's possible. thank you
@technicalpeaks
@technicalpeaks 2 жыл бұрын
what do we use for analog read?? Thanks for the rest of explanation though. great work!!
@NiHaoMike64
@NiHaoMike64 3 жыл бұрын
There's a header file that turns digitalWrite and digitalRead into direct register accesses. It's not enabled by default since some programs expect the delay in order to work properly, plus it only works on the "classic" Arduinos and not the ARM based ones.
@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).
@DustinWill
@DustinWill 3 жыл бұрын
Best explanation and great animation. Very clearly stated.
@shoumikahmed6373
@shoumikahmed6373 3 жыл бұрын
Waiting for it for a long time......
@VorpalForceField
@VorpalForceField Жыл бұрын
Absolutely Fantastic Content.. Thank You !!!
@RinksRides
@RinksRides 3 жыл бұрын
Awesome floating graphics and text!! I just finished a tutorial on Attiny85 complimentary output PWM 250KHz to 1MHz+ this could inspire me to finally make YT tutorials.
@ELECTRONOOBS
@ELECTRONOOBS 3 жыл бұрын
Go for it :)
@tomszky88
@tomszky88 Жыл бұрын
Hi great video. How can I display value of the input in serial monitor?
@astrogerard
@astrogerard 3 жыл бұрын
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 жыл бұрын
Next part will be on interrupts
@k0pR0LiTh0s
@k0pR0LiTh0s 2 жыл бұрын
Awesome! but with the register control, the sample seems to vary between 0 and 5v, instead of digitalwrite () that looks super square. (0 or 5v)
@nyakoi
@nyakoi 3 жыл бұрын
Thank you! Always good to learn something new 😀
@webslinger2011
@webslinger2011 3 жыл бұрын
Wow! Thanks for a very good explanation on the Arduino ports.
@aleisterlavey9716
@aleisterlavey9716 2 жыл бұрын
Did I understand it correctly, that the high time of the pulse is the time above the yellow line ?
@simplyishan06
@simplyishan06 2 жыл бұрын
Incredible is an understatement...
@FixTronics
@FixTronics 3 жыл бұрын
U R absolutely awesome I needed these information way long time ago Thank you for sharing it 🥰⚘
@arduinomaquinas
@arduinomaquinas Жыл бұрын
Good job, like 3.1K and subscribed 👏👏👏👏👏
@simran_army_ot7215
@simran_army_ot7215 3 жыл бұрын
Sir, please make a video about extending the range of 433mhz using transistor or ICs. Lot of people are interested in making FM transmitters. There is not even a single video about that. Hope, you will help the community.
@VoltZero83
@VoltZero83 3 жыл бұрын
if i have the port set to output, can i read the state of this port / register? In order not to use additional variables?
@damascussteel672
@damascussteel672 3 жыл бұрын
Thank you very much the signal with digital write was quickly 5 volt, by register it needed more time. am i correct? :)
@sawansihag6974
@sawansihag6974 3 жыл бұрын
Thanks for sharing this precious knowledge ❤️❤️🔥
@luisarielgonzalez4778
@luisarielgonzalez4778 Жыл бұрын
Great video. Nevertheless at the end of the video (minute 12:41) a NOT (!) operator was missing through the explanation. Just a note. Thanks
@user-ir2fu4cx6p
@user-ir2fu4cx6p 2 жыл бұрын
9:42 After two years of trying PCM/PWM code on my ATtiny85 code I found in the internet, which I never fully understand (they use port register) , now I fully understand that code very well, BTW I study C language in the school I don't remember how boolean operators works(maybe I just past it by) , neither bit shift
Pin Change Interruptions ISR | PCINT | Arduino101
14:19
Electronoobs
Рет қаралды 56 М.
Timer Interrupt ISR + Examples | Arduino101 | Set Registers & Modes
16:13
Happy 4th of July 😂
00:12
Alyssa's Ways
Рет қаралды 64 МЛН
WHO LAUGHS LAST LAUGHS BEST 😎 #comedy
00:18
HaHaWhat
Рет қаралды 23 МЛН
Llegó al techo 😱
00:37
Juan De Dios Pantoja
Рет қаралды 28 МЛН
Best KFC Homemade For My Son #cooking #shorts
00:58
BANKII
Рет қаралды 54 МЛН
World's worst video card? The exciting conclusion
24:23
Ben Eater
Рет қаралды 2,9 МЛН
I tried the Cheapest Arduino Alternative (that Nobody heard of)
13:31
Advanced Arduino Code Optimisation with Pin Registers
15:16
Mario's Ideas
Рет қаралды 14 М.
EEPROM Memory - Store Anything - Arduino101
13:16
Electronoobs
Рет қаралды 102 М.
Bare-Metal MCU #1 - Intro to registers
13:10
Mitch Davis
Рет қаралды 69 М.
Running Apple 1 software on a breadboard computer (Wozmon)
14:23
Internal Comparator | Full Tutorial On How To Use It - Arduino101
11:23
Лазер против камеры смартфона
1:01
NEWTONLABS
Рет қаралды 218 М.
iPhone, Galaxy или Pixel? 😎
0:16
serg1us
Рет қаралды 801 М.