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

Initializing Port 0 and Port 2 with 0x00 value

The hardware that I am working on has Relays connected on Port 0 and Port 2 pins of AT89S52 uc. I would like to know if it is possible to initialize the port pins with 0x00 values before the main application starts. I tried doing this:

P0 = P2 = 0xFF;
P0 = P2 = 0x00;

but in this case the relay stops to respond. The uc does not communicate after doing this.

Please advice.

Parents Reply Children
No data