Serial Communication and GPIO Control for Master-Slave Microcontroller Network
This repository hosts the software for a communication network between one master and three slave microcontrollers, designed as part of the coursework for the Sistemas Microcontrolados class in the Computer Engineering program at UNISINOS. It demonstrates serial communication and GPIO for chip selection, controlling LEDs on slave microcontrollers based on button inputs on the master.
- Monitors three buttons, each linked to a specific slave microcontroller.
- Sends serial commands to toggle LEDs on or off on the slave microcontrollers.
- Utilizes GPIO pins for chip select functionality, ensuring that only the targeted slave microcontroller processes the command.
- Listen for serial commands from the master.
- Toggle an LED based on the received commands.
- Only the selected slave via chip select will act upon the command.
- Button Press: A button press on the master microcontroller identifies which slave microcontroller's LED should be toggled.
- Serial Command: The master sends a command via serial communication to turn the LED on or off, using GPIO pins for chip selection.
- LED Toggle: The targeted slave microcontroller toggles its LED based on the command, while non-selected slaves ignore the command.
- Communication: Utilizes serial communication for command transmission.
- Chip Selection: Employs GPIO pins on the master for selecting the active slave microcontroller.
- Includes code for both master and slave microcontrollers, detailed protocol explanation, and hardware setup instructions.