I would like to hire an Arduino Engineer - 06/02/2019 10:19 EST

Completato Pubblicato 5 anni fa Pagato alla consegna
Completato Pagato alla consegna

Functional Requirements

You are required to recreate one of the Arduino functions.

You must be able to set an arbitrary delay (in milliseconds) using your own function, mimicking the behavior of delay().

You must be able to turn on and off an LED attached to pin 13. Each second you must toggle the state of the LED.

Technical Requirements

This section will serve as a guideline of what is necessary for the program to behave correctly.

You need to implement the following functions:

void delay_one_ms(): This function uses Timer0 to implement a one millisecond delay. Follow the steps below to get this function working properly:

Choose a prescaler for the desired delay

Disable the I-Flag in the SREG. Alternatively, save a copy of SREG to restore later.

Set the proper value in TCNT0.

Set Timer0 to Normal Mode.

Set the prescaler bits.

Wait until the overflow flag TOV0 is set.

Stop the clock.

Clear the TOV0 flag by setting it.

Restore the interrupts by setting the I-Flag in the SREG. Or load SREG from the copy you made before.

void delayone_ms(){

...

}

void delayGeneric(unsigned long ms): This function calls the delayone_ms() function to implement a delay for an arbitrary amount of milliseconds. This function recreates the behavior of the Arduino delay() function.

void delayGeneric(unsigned long ms){

...

// call delayone_ms()

...

}

Arduino

Rif. progetto: #18670644

Info sul progetto

1 proposta Progetto a distanza Attivo 5 anni fa

Assegnato a:

raminoser

I am an Embedded systems designer with experience in Avr microcontrollers and C . it is a relatively simple task and will not take more than an hour .

$25 USD in 1 giorno
(1 Recensione)
1.1