Specifications
mikroElektronika | Free Online Book | PIC Microcontrollers | Introduction: World of Microcontrollers
Fig. 0-19 Input / Output ports
One of the more important specifications of input/output (I/O) pins is the maximum current they can handle. For most microcontrollers, current
obtained from one pin is sufficient to activate an LED or other similar low-current device (10-20 mA). If the microcontroller has many I/O pins,
then the maximum current of one pin is lower. Simply put, you cannot expect all pins to give maximum current if there are more than 80 of them
on one microcontroller. Another way of putting it is that the maximum current stated in the data specifications sheet for the microprocessor is
shared across all I/O ports.
Another important pin function is that it can have pull-up resistors. These resistors connect pins to the positive power supply voltage and their
effect is visible when the pin is configured as an input connected to mechanical switch or push button. Newer versions of microcontrollers have
pull-up resistors configurable by software.
Usually, each I/O port is under control of another SFR, which means that each bit of that register determines the state of the corresponding
microcontroller pin. For example, by writing logic one (1) to one bit of that control register SFR, the appropriate port pin is automatically
configured as input. It means that voltage brought to that pin can be read as logic 0 or 1. Otherwise, by writing zero to the SFR, the appropriate
port pin is configured as an output. Its voltage (0V or 5V) corresponds to the state of the appropriate bit of the port register.
Memory Unit
Memory is part of the microcontroller used for data storage. The easiest way to explain it is to compare it with a filing cabinet with many
http://www.mikroe.com/en/books/picmcubook/ch0/ (14 of 30)5/3/2009 11:28:39 AM