Write a UART driver (Polling and Interrupt) | Embedded System Project Series #18

Опубликовано: 26 Февраль 2023
на канале: Artful Bytes
17,804
576

I explain what UART is and show how I use it to print text from my microcontroller to my desktop computer. I first implement a UART driver based on polling and then improve on it by making it interrupt-driven with a ring buffer. This driver will serve as the foundation for when I implement log tracing (printf) in my next video.

0:00 Goal
0:50 Outline
2:30 What is UART?
4:25 RS232
5:43 Why UART?
6:48 USB-to-UART bridge
8:42 Implement polling driver
10:45 Start, data, parity, stop bits
11:50 New project
15:40 Initialize UART peripheral
20:15 Compile
25:46 UART send function
27:35 Print to terminal
30:15 Interrupt + Ring buffer
36:00 Implement ring buffer
40:40 Implement interrupt driver
49:00 Verify interrupt driver
51:40 Move to robot project
53:15 Commit

#embeddedsystems #cprogramming #microcontroller

🌍 Links related to this video
code - https://github.com/artfulbytes/nsumo_...
circular buffer - https://en.wikipedia.org/wiki/Circula...
circular buffer - https://embeddedartistry.com/blog/201...
datasheet - https://www.ti.com/lit/ug/slau144k/sl...

🌍 Find me here
GitHub - https://github.com/artfulbytes
Instagram -   / artfulbytescom  
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.


Смотрите видео Write a UART driver (Polling and Interrupt) | Embedded System Project Series #18 онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Artful Bytes 26 Февраль 2023, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 17,80 раз и оно понравилось 57 людям.