Page 1 of 1

RS RS EE D2 LED LED 00 PO PO Pos PO V DS LED 04 LEO R7 RS RI R3 R2 10 w Figure 04: Switches and LEDs to an RX63N microco

Posted: Mon May 09, 2022 7:33 am
by answerhappygod
Rs Rs Ee D2 Led Led 00 Po Po Pos Po V Ds Led 04 Leo R7 Rs Ri R3 R2 10 W Figure 04 Switches And Leds To An Rx63n Microco 1
Rs Rs Ee D2 Led Led 00 Po Po Pos Po V Ds Led 04 Leo R7 Rs Ri R3 R2 10 W Figure 04 Switches And Leds To An Rx63n Microco 1 (42.07 KiB) Viewed 22 times
RS RS EE D2 LED LED 00 PO PO Pos PO V DS LED 04 LEO R7 RS RI R3 R2 10 w Figure 04: Switches and LEDs to an RX63N microcontroller 4 switches and 4 LEDs are connected to an RX63N microcontroller 1. Write the initialisation function of the port so that the LEDs can be controlled, and the switches read. Activate the interrupt for the switches inputs on both edges. (5 marks) 2. Write two functions to control the LEDs. One to turn individual LED on and one to turn individual LED off. (10 marks) 3. Write a function that returns the value of a selected switch. The switch should be selected by writing its number in the parameter of the function (8 marks) 4. Write the necessary code to: - Pressing SW3 turns LED3 on • Releasing SW3 turns LED3 off - Pressing SW2 turns LED2 on Releasing SW2 turns LED2 off The detection of a press or release should be done by interrupt. 110 marks