← portfolio
AVR / ATmega328
2024
Bare-metal UART, Bluetooth, and SPI
Bare-metal AVR C on an ATmega328: a hand-written UART driver, HC-05 Bluetooth setup, and SPI bring-up, with no Arduino framework.
highlights
- Interrupt-driven UART with a receive-line buffer and separate data/command baud rates.
- A bt_configurer program that sends AT commands and parses the OK responses to configure an HC-05 module.
- A bt_mega program that drives buttons and LEDs over the Bluetooth link, plus an SPI implementation (spi.c/spi.h).
- Direct register, DDR, and PORT manipulation and ISRs, built with hand-written Makefiles.
tech
C
AVR (ATmega328)
USART
SPI
HC-05
avr-gcc / Make
demo