(Solved) : 6 Write Complete C Program Following 1 Setup Timera0 Mode Generate Periodic Interrupt Ever Q44021100 . . .
6. Write a complete C program to do the following:
1. Setup TimerA_0 in UP mode to generate a periodic interruptevery 125 ms.
2. In the TA0 interrupt service routine (ISR), control P1.0 (LEDconnected) to toggle it at a rate of about 4 Hz.
3. Assume a pushbutton switch is connected to P1.1 withappropriate debounce circuitry (activating the switch will forcethe pin low). Setup the input pin with the pullup enabled, andwrite an ISR for Port 1 to implement the following behavior: eachpress of the switch should change the frequency that P2.2 istoggled. Alternate between 1 Hz and 0.5 Hz. Do not change theTimerA_0 setup to change the frequency of P2.2.
Be sure to compile it in CCS to catch any syntax errors. Showyour work (e.g., calculations of timer parameters).
Yesand an ISR is needed for port 1. This is for the msp432p401r
what additional information is needed?
Expert Answer
Answer to 6. Write a complete C program to do the following: 1. Setup TimerA_0 in UP mode to generate a periodic interrupt every 1…
OR