Introduction: Tiva C Projects: Control External LED by Push Button on PORTB

About: Embedded Systems

How to control external LED by push button on PORTB.

Let`s do it

Step 1: Watch the Video

Step 2: Hardware Components

  • Tiva C board (TM4C123)
  • Breadboard
  • LED
  • 330 Ohms Resistor
  • Push button
  • Jumpers

Step 3: Schematic of the Circuit

  • 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

Step 4: Let`s Write the Code

Look at the code on GitHub: Link

Attachments