Supplying the microcontroller
Examples given in this chapter will show you how to connect the PIC microcontroller with other peripheral components or devices when developing your own microcontroller system. Each example contains detailed description of hardware with electrical outline and comments on the program.
Generally speaking, the correct voltage
supply is of utmost importance for the proper functioning of the
microcontroller system. It can easily be compared to a man breathing in
the air. It is more likely that a man who is breathing in fresh air will
live longer than a man who's living in a polluted environment.
In order to function properly, or in order to have stable 5V at the output (pin 3), input voltage on pin 1 of LM7805 should be between 7V through 24V. Depending on current consumption of device we will use the appropriate type of voltage stabilizer LM7805. There are several versions of LM7805. For current consumption of up to 1A we should use the version in TO-220 case with the capability of additional cooling. If the total consumption is 50mA, we can use 78L05 (stabilizer version in small TO - 92 packaging for current of up to 100mA).