Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Redo the LED blink code below using c language, this time using for loops to generate the delays, instead of calling the delay function. *

Redo the LED blink code below using c language, this time using for loops to generate the delays, instead of calling the delay function.

* Author: KVega20

*

* Created on February 17, 2020, 8:02 PM

*/

// CONFIG

#pragma config FOSC = HS // Oscillator Selection bits (RC oscillator)

#pragma config WDTE = OFF // Watchdog Timer (WDT enabled)

#pragma config PWRTE = OFF // Power-up Timer Enable bit (Power-up Timer is disabled)

#pragma config CP = OFF // Code Protection bit (Code protection disabled)

#include

#include

#define LED RA0

#define _XTAL_FREQ 20000000

void main()

{

TRISA = 0;

LED = 1;

while(1)

{

__delay_ms(500);

LED =0;

__delay_ms(500);

LED=1;

}

}

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

Database Management System MCQs Multiple Choice Questions And Answers

Authors: Arshad Iqbal

1st Edition

1073328554, 978-1073328550

More Books

Students also viewed these Databases questions

Question

design a simple performance appraisal system

Answered: 1 week ago