Level Up Your Arduino Code: Registers

preview_player
Показать описание

In this slightly-more-advanced edition of Adventures in Science, we dive into the inner workings of Arduino and microcontrollers. In order to understand how to set up interrupts on microcontrollers, we first need to cover the basics of interacting with registers. We take a simple example--turn an LED on whenever a button is pressed--and rewrite the program to manually read and write to registers on the ATmega328p.
Рекомендации по теме
Комментарии
Автор

This video genuinely saved my Digital Electronics semester. Got so confused as to why we were using this (it seemed counter-intuitive at first glance) and this explanation was so easy to follow that it solved all the issues I had with this matter

davidnascimentodeassissilv
Автор

Your visual props and paper, clear voice and audio, pacing, sequencing, spiriling, and script are SO HELPFUL. You are a really good teacher. Whereever you work, you deserve a raise, promotion, and an assistant. Go get 'em tiger!

jerryocrow
Автор

This is a great reference. Actually this is the first reference I found is comprehensive enough for me to understand the registers. Great job!

SudioT
Автор

i love this guy, just the vibe of the whole setup, it's so cool! the lab coat, yellow bowtie, glasses, red background, so on. you are like clark kent in modern days doing electronic engineering in stead of journalism. don't fly away, keep teaching!

mj
Автор

This perfectly demonstrates the benefits of more abstract programming languages: they are more readable and less prone to bugs. It also demonstrates benefits of avoiding abstract languages in microcontrollers. Damn! Now I need to rewrite all my code 😉

nderezic
Автор

Long before Arduino came, we MCU programmers had always been doing this. Took quite a while to learn all those bit banging, but it was worth the time spent. Anyway, good tutorial. :)

jwd.t
Автор

one of the most advanced Arduino tut I have ever seen. thank you a lot.

AhmadAsmndr
Автор

It's nice how you saved almost half the flash memory space, that's one nice perk of programming in a lower level language. It's just ridiculous how you did not mention literally that it will run much "faster" than Arduino "overhead". All in all, this is an excellent tutorial with zero confusion and explanation about making use of microcontroller registers using the bitwise operators.

sto
Автор

Awesome video. That was the best explanation I've seen on the matter.

gjljkkljglkjgljgl
Автор

The most wonderful thing I've seen in a long time.

gabriellgardin
Автор

This is the best explanatory bit math lesson i ever followed. Thanks very much Sir.

valerienihsimsion
Автор

This is the exact video I’ve been searching for to begin my bare metal journey. I wanna know all the tiny details in every nook and cranny.

petercorrea
Автор

I have never ever seen such a positive feedback command section before. It really is an iconic video!

rikkardo
Автор

feels like I'm enlightened! expecting more of this kind of videos! really really thankful to you!

luwang
Автор

@10:40 it is a better practice to manipulate the DDR register value by using the OR logic. For example,
DDRD = DDRD |
would be a better practice because digital pins 0 and 1 aren't supposed to be meddled with as they're used for serial communication.

sathvikswaminathan
Автор

If only I could hit Like every time I'm watching this video without dropping my previous one... Thank you!!

AlexanderBelikov
Автор

As an engineering student, this video was interesting and helpful ! Thank you.

martingentieu
Автор

Brilliant! I'm in the stage of shrinking Uno projects to the ATTiny85 chip and this was invaluable. That being said, I should have watched the entire video before trying the sample code. Especially the part where the pull up resistor was turned off and I spent a half hour wondering why my LED was coming on by itself lmao.

karlsangree
Автор

The 660 page monstrosity is what enthusiasts read and understood before meta languages and corporations made money making things more high level, easier to understand, and also slower and less efficient.

Now you make videos explaining what a register is.

Edit: Alright, I was kind of salty. This is a pretty good video that goes into depth and is quite understandable. Have a like.

TroyFletcherKeyboards
Автор

Another thing I found amazing, was the SPEED increase from doing multiple digital writes to being able to write multiple pins directly at once (as long as they are on the same port letter). It wasn't just "faster" it was Monumentally faster. When dealing with multiplexing Multiple 7 Segment LEDs, the "off segments went from having a ghost of the previous figures to being very sharp.

ColinRichardson
join shbcf.ru