Загрузка страницы

Arduino Nano | 1 kHz interrupt based software PWM

For a project/video I need 8 PWM outputs, because of the amount I have to do it in software. I will do this without using any delay function, but with timer interrupts. The produced PWM will be a fast 1 kHz PWM with a resolution of 100. To get a resolution of 100, the interrupt routine has to run at 1 ms/100 = 10 μs, so no time messing around in the interrupt routine ;). Because of the speed it took some effort to made it done. Hope you enjoy and learn from it.

Links sketches:
https://www.dropbox.com/s/dpxs2ieny5l86ez/Sketches.zip?dl=0

Link TimerOne Library:
https://playground.arduino.cc/Code/Timer1/

Content:
0:00 Explanation goal
0:45 Explantion test code
1:38 Connect Arduino to the scope
2:02 Upload and check the signal
3:17 Try again with TimerOne library
3:50 Check signal on scope
4:26 Old school coding
5:06 Check signal on scope
5:42 Finally PWMing the LED
6:25 Check signal on scope

Music:
Escape - Atch https://soundcloud.com/atch-music​
Creative Commons — Attribution 3.0 Unported — CC BY 3.0
Free Download / Stream: https://bit.ly/-_escape​
Music promoted by Audio Library https://youtu.be/6WeknItDM24

Видео Arduino Nano | 1 kHz interrupt based software PWM канала Gatze Tech
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
12 февраля 2021 г. 0:55:09
00:06:49
Яндекс.Метрика