I'm writing a program for a 8051 microcontroller. In the first part of the program I do some calculations and based on the result, I either light the LED or not (using CLR P1.7
, where P1.7 is the port the LED is attached to in the microcontroller).
In the next part of the program I want to retrieve the bit, perhaps store it somewhere, and use it in a if-jump instruction like JB
. How can I do that?
Also, I've seen the instruction MOV C, P1.7
in a code sample. What's the C
here?
PUSH PSW
to push theC
flag (along with the rest of the status word), for example to store the previous interrupt state when using#pragma disable
. – Comedian