Arduino Timer Interrupts tutorial

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

You can help support this channel by using the Amazon affiliate link above for any of you future Amazon purchases. I will receive a small commission from Amazon at no additional cost to you which will enable me to produce continuing content for this channel.
Thank you for your support.

DISCLAIMER: This video and description contains affiliate links, which means that if you click on one of the product links, I’ll receive a small commission. This helps support the channel and allows me to continue to make videos like this. Thank you for the support!
Рекомендации по теме
Комментарии
Автор

I believe that crystal is for the USB chip. The 16Mhz resonator just above the 328 is what the controller uses. Good video.

larryd
Автор

I am impressed, and this tutorial has made me travel to the gate of Multi tasking. Yet I have no idea how will i implement the timer interrupts in my programs where lots is going on, 6 servos, GY 80, 6 ultrasound range finders, distance, comparisons etc etc but I Thank you for your generosity for Extending this charity of Knoledge. I salute

DevineIshaq
Автор

Excellent tutorial. I have gone through at least a dozen tutorials claiming to explain how timer interrupt works, but none of them made any sense because they added so much bloat. Keep it up.

soronemus
Автор

Little correction:
Timers are 0, 1, 2. Not 1, 2, 3.

Timer 0 is 8 bit used tor timer functions delay(), millis() or micros().
Timer 1 is 16 bit used for the servo library. (Which you can tweak with Timerone.h library).
Timer 2 is also 8 bit and used for the tone() function.

This for the UNO. Arduino Mega has 0-4.

Nevertheless, nice tutorial :-)

vigi
Автор

I love such traditional handwriting teaching style, it is much easier to fellow the step of the teacher

gingarrison
Автор

Well done. It wasn't until I watched your video that the light bulb went off in my head on how I can use the hardware timer to facilitate the variable control I need to operate a stepper motor. I particularly like the single line code for flipping pin state. Very elegant.
Thank you.

Ken-oech
Автор

Excellent!!!! You spoke clearly for people whose English is a foreign language

skmash
Автор

One of the better tutorials out there. I understood all the presentation which was presented in a very simple way so that all could understand. Thanks so much and thanks for turning me onto the Timer1 library.

pukaseek
Автор

You are very good at explaining these concepts. I found the video clear and easy to follow. Much appreciated.

NateLeeDub
Автор

great Video.
A little addition: the shown big crystal 16 MHz is not for the Arduino, but for the USb Controller. Very often the arduinos have a ceramic resonator, very little and very inaccurate, not good for a clock. This resonator sits nearby the microcontroller. Sometimes (here?) it is a real quartz crystal...

volkerblock
Автор

Thanks for going though the code and explaining it line by line. I was always confused by the bitwise operator but your explanation really helped me get it.

chistogo
Автор

Many thanks for your video and information given. Only the pin 13 is managed by the bit N°5 of the port B register and not by the Bit N°1 like in your video !! (Port B register : Bit0 for pin 8, Bit1 for pin 9, Bit2 for pin 10, Bit3 for pin 11, Bit4 for pin 12 and Bit5 for pin 13).

boualemkalai
Автор

Very clear talk, steady flow, and followable

naraveera
Автор

This Crystal you mentioned is only used for the ATmega that does the USB communication. The ATmega328 on an Adruino Board uses a cheap and very inaccurate resonator instead, that is placed right next to the side of the ATmega328. It's a pity they did not export the USB-ATmega clock to make use of it as well for the main processor (ATmega328). But sadly that is the way it is...
Apart from this little misinterpretation, well done!

asagk
Автор

Great explanation. Your digitalWrite() statements much more elegant than the if..else statements commonly used to toggle

josephanthony
Автор

You are a great instructor with deep knowledge.

ytkdmr
Автор

I like the 1st toggle string. Might be useful.

Marc_Wolfe
Автор

really helpful.god bless to guy who designed timer one library

prabhjotsingh
Автор

Great video man, finally someone who is making a little more advanced class arduino videos, we all know there are a zillion arduino for beginners videos out there. I really like being taught the code in detail like that. Will you do some advanced coding for arduino videos, that would be awesome with your teaching style.
Thank you for your work, I subscribed.

JRoode
Автор

Very helpful. I liked the added info re using ! instead of ^1

JerryHoward