Skip to content

nagabonthu/GPIO_Switch_LED_Control

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

GPIO Switch Controlled LED Logic (ARM7 LPC2129)

Project Overview

This project demonstrates basic GPIO input and output control using the ARM7 LPC21xx microcontroller. Two push-button switches are used to control two LEDs based on defined logic conditions.

The project focuses on understanding:

  • GPIO input handling
  • Bit manipulation
  • Active-low switch logic
  • Conditional control of multiple outputs

Objective

To implement switch-based conditional LED control logic using direct register-level programming in Embedded C.

Hardware

  • LPC2129 (ARM7TDMI) Microcontroller
  • 2 Push Button Switches
  • 2 LEDs
  • Regulated Power Supply

Software

  • Embedded C
  • Keil µVision IDE
  • Flash Magic

Working Principle

Case 1:

When Switch 1 is pressed, only then Switch 2 functionality becomes active.

Case 2:

If Switch 2 is pressed (while Switch 1 is pressed):

  • LED1 turns ON
  • LED2 turns OFF

Case 3:

If Switch 2 is released (while Switch 1 is pressed):

  • LED2 turns ON
  • LED1 turns OFF

Additional Condition:

If Switch 1 is not pressed:

  • Both LEDs remain OFF

About

GPIO-based switch and LED control logic implemented on ARM7 LPC2129 using Embedded C.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages