I have to initialise the port P1 of the 89C51 as output port with all port lines initialised to a high state i.e. 1. Now for initialising the port P1 as output, I have to give the instruction P1 = 0x00 To make all the lines of this port as High, can I give the instruction: P1 = 0xff; Will it not make the port P1 as input port? Or will I have to define each pin of port P1 independently as: P1.0 = 1 P1.1 = 1 and so on. Mohit
Unlike some other architectures, In the standard 8051, there is no way to "make a port an output" nor to "make a port an input" - see: http://www.8052.com/forum/read.phtml?id=104320
answered (STOP THE BABBLE) in crosspost http://www.8052.com/forum/read.phtml?id=108368 Erik