Skip to content

morlabhaskar/UART-I2C-SPI-CAN-PROTOCALS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 UART-I2C-SPI-CAN-PROTOCALS


📘 Overview

A complete embedded C practice repository implementing:

UART • I2C • SPI • CAN

using register-level programming on LPC21xx (ARM7) microcontrollers.

Designed for:

  • 📘 Embedded systems learning
  • 🎯 Interview preparation
  • 🧠 Protocol-level understanding
  • 🛠 Hands-on hardware practice

❓ Why This Repository?

Most learners understand protocols theoretically, but struggle with:

  • Registers
  • Pin configuration
  • Real hardware behavior

This repository focuses on how protocols actually work inside the MCU:

✔ Direct register manipulation
✔ Pin Connect Block configuration
✔ Polling-based communication
✔ Industry-oriented embedded C code


📡 Protocols Implemented

🔹 UART – Universal Asynchronous Receiver Transmitter

  • Baud rate calculation
  • LSR, THR, RBR registers
  • TX/RX polling mechanism
  • Serial debugging support

🔹 I2C – Inter-Integrated Circuit

  • Master mode implementation
  • START / STOP / ACK / NACK
  • EEPROM byte read & write
  • Status register analysis

🔹 SPI – Serial Peripheral Interface

  • Master mode configuration
  • Full-duplex communication
  • CPOL & CPHA modes
  • High-speed data transfer

🔹 CAN – Controller Area Network

  • Message-based communication
  • Arbitration & error handling
  • Multi-node network
  • Automotive-grade protocol

📁 Repository Structure

About

A collection of embedded C practice programs implementing UART, I2C, SPI, and CAN protocols. Includes register-level drivers, debugging exercises, and microcontroller experiments on LPC21xx. Useful for learning communication protocols with hands-on examples.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages