We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I want to assign value 0x0f to port P1 of 8051(which is to be configured as an output port). If I give the instruction P1 = 0x00 it assigns P1 as output port. Now suppose I want to out data 0x0f on it, then will the subsequent instruction P1 = 0x0f out the required data on P1 or will it again initialise the P1 pins 0-3 as input and pins 4-7 as output pins? How can we distinguish whether the statement is assigning data on the output port or initialising port as input/output? Regards, Mohit