DDP Lab 2
DDP Lab 2
“The objective of this lab is to create a project that contains two source files, main.c and tm4c123gh6pm_startup_ccs.c, which
contain the code to blink an LED on your LaunchPad board. The purpose of this lab is to practice creating projects and getting to
know the look and feel of Code Composer Studio. (Texas Instruments, 2013)
Theoretical Foundation:
Procedure to Create a New CCS Project:
Procedure to Add the INCLUDE search paths for the header files:
► Open main.c by double-clicking on the filename in the Project Explorer pane of CCS. You should see “?” warnings
in the left margin which indicate “unresolved inclusion”. Hover your cursor over the question mark to see the helpful
message. Until now, you haven’t told the project where to find these header files.
► Right-click on your lab2 project in the Project Explorer pane and select Properties.
► Click on Build → ARM Compiler → Include Options (as shown):
► In the lower-right panel, click the “+” sign next to Add dir to #include search path and add the following path using
the build variable you created earlier. Place the variable name inside braces, after the $ as shown:
${TIVAWARE_INSTALL}
► Click OK.
► Click OK again, and now you should see those “?” in main.c disappear after a moment. Problem solved
Procedure to Build:
Procedure to Load:
Procedure to Run (Debug):
► Assure that your LaunchPad is connected to your laptop. Build and load your project to the TM4C123GH6PM
flash memory by clicking the Debug button . If you ever want to build the project without loading it, click the
HAMMER (Build) button.
► Click the Resume button or press the F8 key on your keyboard: The tri-color LED on your target board should
blink showing the three colors in sequence. If not, attempt to solve the problem yourself for a few minutes, and then
ask your instructor for help. To stop your program running,
► click the Suspend button: If the code stops with a “No source available” indication, click on the main.c tab. Most of
the time in the while() loop is spent inside the delay function. That source file is not linked into this project.
Título de la práctica: Lab2 Int. Dev. Environment IDE
Nombre del alumno: Toribio Montoya Eduardo
Asignatura: Dispositivos Digitales Programables Hoja: 1 de 5
Unidad temática: I Entorno de programación de los dispositivos lógicos programables (PLD's) Fecha: 8 septiembre 2020
Problem Statement
Materials
Customer requirements:
N/A
Blocks diagram:
Terminal Assignment
Peripheral configuration
Ui8PinData
Ui8PinData= Ui8PinData*2
==8?
Ui8PinData==2?
Código desarrollado
#include <stdint.h> //incluye Definiciones de variables para estandar c99
#include <stdbool.h> //incluye Definiciones de boleanos para estandar c99
#include "inc/hw_memmap.h" //incluye Definiciones macros del mapa de memoria del dispositivo Tiva C
#include "inc/hw_types.h" //incluye Definiciones de tipos comunes de harware
#include "driverlib/sysctl.h" //incluye Definiciones y macros del sistema de control
#include "driverlib/gpio.h" //incluye Definiciones y macros para GPIO
//Configuracion de perifericos
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF); //Habilita periferico puerto F
GPIOPinTypeGPIOOutput(GPIO_PORTF_BASE, GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3);//Configurar de tipo GPIO salida las
terminales PF1, PF2, PF3
return 0;
} //fin función principal
Pruebas
Resultados
The build button was pressed.
Run is pressed
led sequence
Bibliografía
Texas Instruments. (2013). Getting Started with the Tiva™ TM4C123G LaunchPad Workshop Student Guide and Lab
Manual. Texas: Texas Instruments.
Annexed 1 Electronic diagram