Microcontrollers - AVR Atmega32 - Timers/Counters and Binary/Hex Numbers

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
4,639
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Oct 11, 2011

Official Page with More Information:
http://newbiehack.com/TimersandCountersDefaultandBasicUsage.aspx

This is an introduction to the timer/counter functionality of the AVR Atmega32 microcontroller. I also give an introduction to binary and hexadecimal numbers.

  • likes, 0 dislikes

Link to this comment:

Share to:

Uploader Comments (anajonesr)

  • 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 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

  • 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 Thanks!!

  • @anajonesr

    Thanks a million for sharing your knowledge. Keep up the great job.

  • @lohitbk Thanks!

see all

All Comments (43)

Sign In or Sign Up now to post a comment!
  • 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...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more