Computer Science, asked by CɾαȥყSσυL, 15 days ago

What are the alternate function of port 0 and port 2?¿

Answers

Answered by Anonymous
3

\\

Port 0 of the 8051 has two main functions:

  • To be used as a simple input-output port and to access external memory in conjunction with Port 2.
Answered by ankhidassarma9
0

Answer:

In 8051 Microcontroller, I/O operations are done using four ports

Port 0, Port 1 ,Port2 ,Port3 and 40 pins.

  • Alternate function of Port 0 is AD0-AD7, i.e. it is used for both address and data handling. When connecting an 8051 to an external memory, port 0 provides both address and data.
  • Besides working as I/O, the alternate function of Port 2 is ,it also used along with P0 to provide the 16-bit address for the external memory. Port 2 is also designated as (A0–A7).When connecting an 8051 to an external memory, it provides the path for upper 8-bits of 16-bits address.

Explanation:

  • Port 0 has 8 pins (32 to 39), hence generally used for input or output.
  • Port 2 occupies a total of 8 pins (pins 21 to 28) and also  used for both input and output operations.
  • When an 8051 is connected to an external memory of size maximum  64KB , the addressing is possible by 16 bit address bus because  216 = 64KB. Hence,Port2 is used to provide the path for upper 8-bits of 16-bits address.
Similar questions