|
|||||||||||
|
Technical Support Support Resources
Product Information |
C51: Reading Port Input Versus Port LatchInformation in this article applies to:
QUESTIONHow can I create a program that reads and modifies a port pin using the values of the input pins rather than the values of the output latch? The ORL instruction will let me set a pin on a port, however, it reads the value of the output latch rather than the values of the input pins. The MOV, ORL, MOV instruction sequence is what I'm looking for. ANSWERThis is easily done in C using the Keil compiler. The following example demonstrates this:
The generated code is shown below:
MORE INFORMATION
Last Reviewed: Thursday, February 25, 2021 | ||||||||||
|
|||||||||||
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.