Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Have to initialize timer0 (with function initTimer0()). The micro-controller is the ATmega2560. The program must compile. This can be tested using the check mark icon.

Have to initialize timer0 (with function initTimer0()). The micro-controller is the ATmega2560.

image text in transcribed

The program must compile. This can be tested using the check mark icon. The project must be pushed to GitLab and an appropriate response from the server must be received: "Got your submission. Thanks! Arduino libraries are not allowed at all for this lab for the exception of debug functionality using Serial.println. A function implementation that returns void and has no parameters called initswitchPB3 must be present and is used in the main function to initialize the switch on the pin named PB3 PB3 must be initialized with an input pull-up resistor Fin-Change interrupts must be enable for pin PB3 A function implementation that returns void and has no parameters called inilED must be present and is used in the main function to initialize all LED pins as outputs. Pins named PA0, PA1, PA2, and PA3 must be used to control the LEDs A function implementation called turnOnLEDWithChar that returns void and has a parameter called num of type unsigned char must be present. The turnOnLEDWithChar function must be one line of code. See LED control section for more details. A function implementation that returns void and has no parameters called initSwitch must be present and is used in the main function to initialize pin 32 on the development board as an input. A function implementation that returns void and has no parameters called initTimer0 must be present and must initialize timer 0. A function implementation that returns void and has no pas called delayMs must be present and must implement a precise millisecond delay and can work at least up to 100 milliseconds. For loops are allowed. A call to initLED0 and initswitchPB3() must be present in the main function. An infinite while loop must be present. A state machine for the entire project must be implemented using a typedefenum for states. An ISR to handle the switch being pressed must be present and be used to change states appropriately. The switch press must be debounced using an appropriately designed state machine. When the switch is pressed and released, the LEDs change the pace at which they link (either half or twice depending on the state) LEDs must blink either every 100 ms or 200 ms depending on the state

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

Visual Basic 4 Ole Database And Controls Superbible

Authors: Michael Hatmaker, C. Woody Butler, Ibrahim Malluf, Bill Potter

1st Edition

1571690077, 978-1571690074

More Books

Students also viewed these Databases questions