Question: Problem 1 6 : ( 6 0 points ) Refer to the circuit diagram in Figure 1 and the C code in Figure 3 for

Problem 16: (60 points)
Refer to the circuit diagram in Figure 1 and the C code in Figure 3 for the dsPIC33EP64MC502 microcontroller.
(6 points) Complete the initialize_IO_ports() function to configure pin 21 for the interrupt signal, and include comments for each line.
(12 points) Complete line 30 to assign INT1 to pin 21.
(12 points) Complete the initialize_-INT() function.
(10 points) Add comments to lines 30-34.
(6 points) Complete lines 38 and 39.
(14 points) Refer to Table 4-32, Table 4-7 and Register 7-4 in the datasheet of dsPIC33EP64MC502. Modify the codes to assign INT2 instead of INT1 to pin 21. Include the line numbers and corresponding modified codes.24
25
26
27
28
29
30
31
32
33
34
35
36
37
void initialize_INT (void){
38
39
40
void q, attribute q,
q,
q,,auto_psv))_INT1Interrupt (void){
}
//
{// Turn off LED // clear interrupt flag b
Figure 3: C code for Problem 16.
Problem 1 6 : ( 6 0 points ) Refer to the circuit

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!