Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program in C that follows steps 5 and 7-11. Thank you. y to labz. iCliek on blinky and then e 6. Strip out

Write a program in C that follows steps 5 and 7-11. Thank you.
image text in transcribed
y to labz. iCliek on blinky and then e 6. Strip out all the blinky code and update the include directives to have these header files include #include "inc/hw-types.h" 'include -inc/hw-mennap.h" #include "inc/hw-nvie.h" #inc lude "driver i ib/gpio.h" #include "driver 1 i b / sysctl h. #include "driver!ib/systick.h" Pinclude "buttons.h 6. Copy the buttons h and buttons.c into your project directory: for example "/tir...,exanples/boards/ek-tm4c 123gx1/drivers/buttons.tch] Now you are ready to begin 7. Review the requirements below and plan out the software needed for this project. No extra hardware circuit is needed for this lab, HINTI: Create two functions: maino) and mydelayO. HINT2: how will you alternate the two colers? HINTS: Where do you check for debounce in the design? 8. In the first part of maino. o set the clock frequency to 80 MH enable the port for the red and green LED o twait for it to be ready o set the GPIO direction 9. In the second part of nain). o set up the switchs (using ealls to button.c set SysTick RELOAD value for a 0.2 delay o enable the SywTick peripheral 10. In the last part of maino, o create a whi le(1) do forever loop o turn off all of the LED e turn on the current LED color o delay for 4 seconds e turn off the current LED ealor delay for d seconds 11. In nydelayo. you will need to get into the low-level details to poll the SyxTick periph- eral. o using HWREG macro to trander the reload register value to the count register o create a loop to count a 4 second delay based 0.2 second delay created by SysTck ue HGmacro to check the COUNT flag in the SysTick control register Last hint: here's where you want to check button.poll and use the BUTTON PRESSED macro

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Databases 11th British National Conference On Databases Bncod 11 Keele Uk July 7 9 1993 Proceedings Lncs 696

Authors: Michael F. Worboys ,Anna F. Grundy

1993rd Edition

3540569219, 978-3540569213

More Books

Students also viewed these Databases questions