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 and Write

Hi

Since I want to set three input and one output so

my code would be like that:

//Configurations
sbit READ_1=P1^0;
sbit READ_2=P1^1;
sbit READ_3=P1^2;
sbit SEND=P1^3;

READ_1=1; //INPUT
READ_2=1; //INPUT
READ_3=1; //INPUT
SEND=0; //OUTPUT

//Main program

bit x1,x2,x3;


x1=READ_1;
x2=READ_2;
x3=READ_3;

SEND=x1;

Is it correct?

Arron

0