Posts

Showing posts with the label Ports

I O Ports Microcontroller 8051

Image
PORT 0 : The structure of a Port-0 pin is shown in fig 6.It has 8 pins (P0.0-P0.7). Add caption Port-0 can be used as a normal bidirectional I/O port or it can be used for address/data interfacing for accessing external memory. When control is '1', the port is used for address/data interfacing. When the control is '0', the port can be used as a  bidirectional I/O port. PORT 0 as an Input Port Let us assume that control is '0'. When the port is used as an input port, '1' is written to the latch. In this situation both the output MOSFETs are 'off'. Hence the output pin have floats hence whatever data written on pin is directly read by read pin.   PORT 0 as an Output  Port Suppose we want to write 1 on pin of Port 0, a '1' written to the latch which  turns 'off' the lower FET while due to '0' control signal upper FET also turns off as shown in fig. above. Here we wants logic '1' on pin but we getting floating value s...