Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Microprocessor system: switch and led interface, Summaries of Computer Science

Summary of Microprocessor system: switch and led interface

Typology: Summaries

2023/2024

Available from 04/18/2024

US-Summery
US-Summery 🇮🇹

4.2

(15)

937 documents

1 / 9

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
J. Stokes,
Microprocessor system: switch
and led interface
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download Microprocessor system: switch and led interface and more Summaries Computer Science in PDF only on Docsity!

J. Stokes,

Microprocessor system: switch

and led interface

Lab 2. Switch and LED Interface

Preparation: You will need a LaunchPad, two push buttons, two 10KΩ resistors, three color LEDs: red, yellow, and green, and three resistors for the LEDs. Book Reading: Textbook Sections 2.7, 4. Starter project: Labware/Lab10_TrafficLight Purpose: Lab 2 is our first lab requiring you to build circuits on the breadboard and connect them to the LaunchPad. The purpose of this lab is to learn how to interface a switch and an LED. You will perform explicit measurements on the circuits to verify they are operational and to improve your understanding of how they work. System Requirements: In this lab, you will build two switch interface that implement positive logic, and you will build three LED interface that implement positive logic. You will attach this switch and LED to your breadboard, and interface them to your TM4C123. Overall functionality is given below:

  1. Port B will be used to control 3 LEDs: red, green, yellow
  2. Port E will be used for the two switches
  3. The system starts with the red LED on, the other two LEDs off. The three LEDs aligned in the following order red, yellow, and green.
  4. Wait about 100 ms
  5. If the sw1 is pressed, the currently on LED will be turned off, the next LED will be turned on.
  6. If sw2 is pressed, currently on LED will flash at a speed of 50 ms.
  7. Repeat steps 4 to 6. The starter project Labware/Lab10_TrafficLight provides the following simulation interface to two sets of color LEDs and three switches. See Figure 1. We only need three color LEDs and two push buttons in this lab. To use the simulation interface provided in the starter lab, you can choose one set of color LEDs connected to port B and two switches connected to port E as shown in Figure 1 below. Figure 1. Starter project Labware/Lab10_TrafficLight simulation interface.

Operation At reset the only LED that is lit should be the read LED. As you toggle the first push button, it cycles through the red, yellow, and green LED respectively. When the first push button is pressed and held it should cycle through in the mentioned order with a delay of 100ms. Letting go of the button should stop the LEDs from cycling through and stop at the LED that is currently on. The second push button toggles the blinking part of the lit LED. When the second button is pressed and held, the LED will start blinking in 50ms intervals. Once the button is let go, it will stop blinking and will stay lit. Circuit Design

Hardware Design