This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Read P1 or Pins?

look at following code, i have no idea about what does "KEY_RESET" in the "if" statement read from, "P1" or "Pin of P1" ?("Parallel Port 1" window display in the simulator)

sbit KEY_RESET = P1^5;

if(KEY_RESET == 1) {
...


in C51 v8.0

thanks in advance
sorry for my poor english... ;)

Parents
  • i have no idea about what does "KEY_RESET" in the "if" statement read from, "P1" or "Pin of P1" ?("Parallel Port 1" window display in the simulator)

    Do you mean that you would like to know if the if statement reads the Pin P1 or the Latch of P1 ? That is, whether it uses a read-modify-write instruction or not ?

    If so, then your best bet would be to look at the actual assembly code of the statement.

Reply
  • i have no idea about what does "KEY_RESET" in the "if" statement read from, "P1" or "Pin of P1" ?("Parallel Port 1" window display in the simulator)

    Do you mean that you would like to know if the if statement reads the Pin P1 or the Latch of P1 ? That is, whether it uses a read-modify-write instruction or not ?

    If so, then your best bet would be to look at the actual assembly code of the statement.

Children