Tiva Lab 14: Police Siren with LED Police Lights

Objective

  • Using the lookup table to generate the pattern outputs.

Required Reading Material

Background Information

In this lab, you will learn how to program patterns using lookup tables.

Required Components List

BlueLED 02 s Blue LED × 3
RGBLED 02 s Red LED × 3
WhiteLED 02 s White LED × 2
R220ohm 220 Ohm Resistor × 8
PassiveBuzzer 64 Passive Buzzer × 1
Trnasistor 64 S8050 NPN Transistor × 1
breadboard Breadboard × 1
breadboard power s Breadboard Power Adapter × 1

Circuit / Schematic Diagram

PoliceLights smidi player circuit sNPN S8050 Pinout 2

BreadboardConnection s

Pin configurations:

DevicePort.Pin Signal TypePCTLDirectionDrive Mode

Procedures

  1. Create a new folder under the EE3450 folder and name it Lab15_PoliceLightsSound. Then double-click the folder you just created to jump into it.
  2. Launch the Keil μVisio and create a new project, save the project as Lab15_PoliceLightsSound.
  3. Add MyDefines.h to the Source Group, and then add the Common folder to the include paths under the "Options for Target" setting.
  4. Add ezTiva LIB into your project, increase the stack and heap size under the "startup_TM4cXXX.s (Startup)" setting, and then add the ezTivaLIB folder to the include paths under the "Options for Target" setting.

Configurations

Implement the Setup_GPIO() function to initialize the GPIO Ports based on the PIN Configuration table.

Example Source Code

Copy the following example code to your main.c file.

Note: The example code is not yet complete, you must implement all functions following the lab instructions.

EK-TM4C123GXL LaunchPad-main.c

Lab Experiments

  

Questions

© 2024 Air Supply Information Center (Air Supply BBS)