ADC driver with DMA in C | Embedded System Project Series #22

Artful Bytes
Artful Bytes
1.7 هزار بار بازدید - پارسال - My sumobot has four line
My sumobot has four line sensors to detect the white border that surrounds the platform. In this video, I write an ADC driver to sample the values from these sensors. To reduce CPU load, I employ a sequential sampling strategy where the ADC peripheral samples and writes all channel values to memory via DMA before interrupting the CPU. Finally, I add additional software abstractions to turn the raw voltage values into actual line positions.

0:00 Line sensors
1:11 Code overview
2:12 ADC driver
4:40 Assign ADC pins
8:26 My ADC strategy
18:10 Interrupt
19:18 Get values
21:43 Test ADC driver
23:00 Fix bugs
24:10 It works!
25:00 Commit 1
27:25 QRE1113 driver
32:15 Works!
32:45 Commit 2
33:41 Voltage to Line position
37:58 Test with real sensor
40:05 Commit 3

#embeddedsystems  #cprogramming #microcontroller

🌍 Related links
https://github.com/artfulbytes/nsumo_...

🌍 Find me here
GitHub - https://github.com/artfulbytes
Website - https://www.artfulbytes.com

👨‍💻 About me
Hi and welcome. I'm Niklas, an embedded systems engineer from Sweden. On this channel, I make practical videos about embedded systems or, in general terms, about building and programming hardware.
پارسال در تاریخ 1402/03/03 منتشر شده است.
1,718 بـار بازدید شده
... بیشتر