Tuesday 18 March 2014

Input/outputs pins,ports circuits of 8051 microcontroller

One of the main feature of micro-controller 8051 is the built in input & output ports that connects the micro-controller to the outside world. To make it commercially viable it should incorporate a many functions as were technically & economically feasible. The micro-controller has 40 pins & it’s design success depends upon the flexibility in the use of pins.
It has 24 such pins which can be used to serve one of two entirely different function yielding a total configuration of 64 pins. The function that a pin performs depends on what is physically connected to it & what software commands are used to program the pins. Both these factors are under the control of 8051 programmer.
Given this flexibility, 8051 can simply be applied as a single component I/O only or can be expanded to include memory, parallel ports & serial data communication.
Each port has D-type output latch for each pin. SFR’s (Special Function Registers)  for each port is made up of these 8 output latches, which can be addressed at the SFR address for that port.
For example:- 8 latches for port 0 are addressed at location 80 H
There are 2 different paths that read the latch & pin data which is done by using two different buffers. The upper buffer is enable when latch data is to be read & lower buffer is enable when pin data is to read. The status of each latch can be read from  latch buffer while an input buffer is connected to each pin so that pin status can be read independently.

Port 1 pins do not have alternate functions where as all other ports i.e.  0,2,3 are  programmable ports. The programmable ports have different alternate functions. The configuration between the output latch & the port pins determines the function nature of a particular port pin. 

No comments:

Post a Comment