This turn signal system is designed to control the indicators of a vehicle using a microcontroller. It utilizes LED lights to represent left and right turn signals, allowing for clear communication of directional intentions to other drivers. The system incorporates a button interface to activate or deactivate the signals, and it features a blinking functionality that adheres to standard signaling protocols. The microcontroller continuously monitors the button states and manages the timing of the LED blinks to ensure visibility and safety on the road.
- Microcontroller interface for controlling LEDs based on input from PORTA.
- LED control based on switch-case logic for different input states (0-6).
- Macro function to handle specific LED blinking patterns.
- Infinite loop for continuous input monitoring.
- Initialization: Sets up ADC and interrupt settings.
- LED Control: Turns on or blinks LEDs based on input.
- Delay Handling: Uses
delay_ms()
for visual confirmation of state changes.
- Connect LEDs to PORTB of the microcontroller.
- Input values can be provided to PORTA.
- The program will react according to the defined logic.
Figure 1: Display when blinking left (Simulation of the front and rear turn signals on the car left)
Figure 2: Display when we want to activate all four turn signals (Simulation)