Question: J - Link Lab 2 and 3 C Program Review Lab 2 and 3 to finish the following questions about using w 4 and
JLink Lab and
C Program
Review Lab and to finish the following questions about using w and mem commands:
Which register is used to configure port as an input port? What is the address of this register? Register: and its address is
Which register is used to read port data into microprocessor? What is the address of this register? Register and its address is
Which register is used to configure port as an output port? What is the address of this register? Register: and its address is
Use JLink w command to configure port as an input port:
Use JLink w command to configure port as an output port:
Use JLink "mem command to read data from port into microprocessor:
Use bitwise operation to get bit of port in order to see whether are pressed or not.
If bit is is pressed P in SKSG schematic and turn on the green LED connected to P eg reset P PODR If is releases, turn off green LED.
Use JLink command to turn on the green LED connected to P
Use JLink w command to turn off the green LED connected to P
If POdata
;
;
read data from port
Unsigned long data ;
Using logic calculation get bit value
data data & ; bit pressed, and
POdata
write data LED;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
