Tiva Lab 14: Police Siren with LED Police Lights
- Using the lookup table to generate the pattern outputs.
Required Reading Material
In this lab, you will learn how to program patterns using lookup tables.
Required Components List
|Blue LED||× 3|
|Red LED||× 3|
|White LED||× 2|
|220 Ohm Resistor||× 8|
|Passive Buzzer||× 1|
|S8050 NPN Transistor||× 1|
|Breadboard Power Adapter||× 1|
Circuit / Schematic Diagram
- 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.
- Launch the Keil μVisio and create a new project, save the project as Lab15_PoliceLightsSound.
- Add MyDefines.h to the Source Group, and then add the Common folder to the under the "Options for Target" setting.
- 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 under the "Options for Target" setting. (Lesson 09: Add ezTiva Library into Your Project)
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.