Hi all,
I need some info about below program for embedded C,
void main (void ){
unsigned char mybyte;
P1=0xFF; // make port input enabled
while (1){
mybyte=P1;
MSDelay(500);
P2=mybyte; // buzzer signal
}
}
In above program, 0xFF signal is sent to port 1 for enabling it for input.
Now if, i am passing 0xFF as an input signal to port 1 then the same data will get assigned to mybyte and after that it will be sent to P2.
Now my question is, will P2 become input enabled or it will just send that data to output device?
How does the port differentiate between output signal and latch signal?
Regards,
Mahesh Kedari