??? 01/26/06 15:21 Read: times |
#108369 - Quasi bidirectional Responding to: ???'s previous message |
Dear Mohit,
These ports are quasi bidirectional so they are always in output mode. if yopu connect these pins to some digital inputs those inputs will follow the voltages on the pins. which is echo of the latch values. so you dont have to initialize a port as output port. But if yo want to let the other digital outputs drive it you must initialize latch values to all '1's. Refer to standard 8051 port schematics you will see by writin '1's to latches you actually turn off the Driver FET so that external world can drive the pins to a high logic level. reading the port not reads the latches but the interprets the voltage on the pins according to VIL and VIH specs (i.e. nett effect of all the pull ups and pulldowns acting on the pin) once during the cycle . Abhishek |