Microcontrollers - AVR Atmega32 - Timers/Counters and Binary/Hex Numbers
Loading...
4,639
Loading...
Uploader Comments (anajonesr)
see all
All Comments (43)
-
so we have used the statement:"PORTB = 0b00000001" a lot now so thats in decimal
you could use "PORTB = 0x01" with the same result.
just like 0b10010001 would be the same as 0x91.
so the 0b means Binairy and 0x means heXadecimal
pretty neat.
-
great job! thanks a lot.
-
@Azlateen Thanks.
-
Man can you come teach classes at my school? you make it so dang easy!
Loading...
Something may not be obvious to beginners: at around 23:00, the code after 100 repeats sets the pin value to 1 and then after repeatcount is set to 0 and another 100 increments, it sets it to 0 - that's what the ^ operator does in front, inverts the set value.
So you're not directly setting it in on and off in that two lines of code, you're initially setting it to on and then after a second it gets set off, then repeat all..
I think... I'm not 100% sure as I'm also a beginner at microprocessors.
mariushmedias 3 weeks ago
@mariushmedias Thanks for the clarification. That is correct. I am "toggling" the pin (or LED) every second. I mentioned that it would toggle every second, but I also mentioned that it would blink every second, and that was just a brain slip. It is definitely toggling every second.
In an earlier video in this series, I explain the toggle code and bitwise operations, but many beginners may not see that video before this video.
Thanks
anajonesr 3 weeks ago
best video on timers, ever!!! Thanks for taking the time and effort to make this video. we should pay you for watching this video...
averagemale2000 3 weeks ago
@averagemale2000 Thanks!!
anajonesr 3 weeks ago
@anajonesr
Thanks a million for sharing your knowledge. Keep up the great job.
lohitbk 1 month ago in playlist Microcontroller Tutorial - A Beginners Guide
@lohitbk Thanks!
anajonesr 1 month ago