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.
Maybe replace the 74HCT541 with a 74HCT540?