Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Requirements: 1. All LEDs are initially off 2. When the button is pushed the first time the red led blinks at a rate of

Requirements: "

1. All LEDs are initially off 2. When the button is pushed the first time the red led blinks at a rate of 5Hz 3. When the button is pushed the second time the blue led blinks at a rate of 8Hz 4. When the button is pushed a third time all the LEDs shutoff. 5. Repeat this pattern

You should use the button, LEDS, debouncer, and interrupts to accomplish this program."

My code is down below. Can you please tell me what's wrong with it, it is not blinking?

Note: This is a beginners thing, we are only allowed to use a handful of tools.

image text in transcribed

#include "project . h" #define ON Oxon #define OFF 0x01 CY ISR (Handle Button) if (RLED_Read )OFF BLED Write (OFF): RLED Write (!RLED Read)) CyDelay (200): else RLED Write (OFF): CyDelay (125); EXVJ')) Wr::i.ix: ( !')) BLED Write!BLED Ik:ad () ) ; Button_clearInterruptO; int main (void) CyGlobalIntEnable: //Initilize LEDS RLED Write (OFF): BLEDWrite (OFF) ; - //Start ISR ISR_Button_StartEx (Handle_Button); for ) Place your application code here

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

Data Management Databases And Organizations

Authors: Watson Watson

5th Edition

0471715360, 978-0471715368

More Books

Students also viewed these Databases questions

Question

Differentiate the function. r(z) = 2-8 - 21/2 r'(z) =

Answered: 1 week ago