Tiva C Projects: Control External LED by Push Button on PORTB
by EslamG11 in Circuits > Microcontrollers
2120 Views, 0 Favorites, 0 Comments
Tiva C Projects: Control External LED by Push Button on PORTB
![FQ2XD84KX39E5E0.jpeg](/proxy/?url=https://content.instructables.com/FCU/PCXQ/KX39EA8N/FCUPCXQKX39EA8N.jpg&filename=FQ2XD84KX39E5E0.jpeg)
How to control external LED by push button on PORTB.
Let`s do it
Watch the Video
![Tiva C Projects: Control External LED by Push Button on PORTB](/proxy/?url=https://content.instructables.com/F8W/HC7J/KX39FIMI/F8WHC7JKX39FIMI.jpg&filename=Tiva C Projects: Control External LED by Push Button on PORTB)
Hardware Components
- Tiva C board (TM4C123)
- Breadboard
- LED
- 330 Ohms Resistor
- Push button
- Jumpers
Schematic of the Circuit
![Untitled Sketch 2=_bb.jpg](/proxy/?url=https://content.instructables.com/FS7/ZO11/KX39FJ55/FS7ZO11KX39FJ55.jpg&filename=Untitled Sketch 2=_bb.jpg)
- Connect 330Ohms resistor with PB2
- Connect the other pin of 330Ohms resistor to positive pin of LED
- Connect the negative pin of LED with GND on Tiva C Board
- Connect the first terminal of push button with PB3
- Connect the other terminal of push button with ground
Let`s Write the Code
Look at the code on GitHub: Link