Junior Member level 3
I want to read data from MCS51 's pin instead of the output latch, but I find no relavent instructions to accompish this task. MOV, ORL only handle the data stored in the output latch, but not the pin. I want to create a program to detect the pin's level, what should I do? I Just couldn't understand why there is no input latch and why many programs use if(P0^0==0) to test the level of the p0^0 pin. For me, what the if sentence tests is the value of the latch, which is pointless.