Answered step by step
Verified Expert Solution
Question
1 Approved Answer
assembly language Question 3 (40 Points): RBG LEDs are connected to PF1 to PF3. SW1 switch is connected to PF4. Below is the register list
assembly language
Question 3 (40 Points): RBG LEDs are connected to PF1 to PF3. SW1 switch is connected to PF4. Below is the register list you need, and some useful subroutines: Write a subroutine names BlackHolesun which will simply create an infinite loop that ignites White color on LEDS. However, the brightness of this White color is designated by how much you press the switch. Here are the rules: - When first started the subroutine will create the brightest White (i.e. red+green+blue always on) - You may be able to change the brightness by pressing the switch. For example, if you press the switch, wait for 1 second (or more) and release the switch, the LEDs will be brightest white. - (If you press less than 1 second1) Depending on how much you wait between press and release of the switch; the brightness of the white color will be designated. - For example: if you make a quick click (press, and instantly release) of 10ms, the LEDs should burn in %1 brightness %1(10ms/1sec=0.01). - Assume that SW1 interrupt event register is configured such that, you receive interrupts in both falling and rising edges (i.e. both press and release) - Use a timer. Assume 16Mhz internal clock. Assume no bouncing occurs for the switch. - Do NOT write any initialization code. Assume they are all handled properly. Do NOT write any main code. - Just write the "BlackHoleSun" subroutine and "GPIOPortFHandler" Interrupt Servise Routine (ISR). - Assume that a global variable is already defined, for you to use. You will need to use it
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started