Microchip Technology MA180027 User Manual

Page of 66
PICDEM™ LCD 2 Demonstration Kit User’s Guide
DS51662C-page 50
 2010 Microchip Technology Inc.
A.14.1
Using the Adjustable Voltage Regulator
The PICDEM LCD 2 board features an adjustable voltage regulator, the venerable 
LM317. It is U3 on the board, and can be recognized by the SO-223 package on the 
upper left side. Nearby, there is a header, J10, and two resistors, R25 and R26. R25 
and R26 are used to set the output voltage of the LM317. By default, R25 = 1K and 
R26 = 330R, which results in an output voltage of 5.0V.
The reason an adjustable voltage regulator is provided is so that the PICDEM LCD 2 
Demonstration Board can be used with a wide range of LCD PIC microcontrollers. The 
PIC18FXXJ90 family of devices tolerates a maximum V
DD
 of 3.6V, whereas the 
PIC18FXX90, PIC16F91X and PIC16F946 tolerate a maximum V
DD
 of 5.5V. The 
adjustable voltage regulator allows a different V
DD
 to be provided for PIC18FJ devices 
and PIC18F and PIC16F LCD devices.
The switching between 3.6V and 5.5V parts is very convenient. The plug-in module 
boards are populated with the R101 and R102, appropriately, according to the proces-
sor module requirement which mates with the daughter board/emulator header that 
surrounds the ICE module (U1A). J10 on the PICDEM LCD 2 board is intended to con-
nect with the 3-pin header on the plug-in module. This allows the resistors, R101 and 
R102, on the plug-in module to be connected in parallel to the resistors, R25 and R26. 
This way V
DD
 can automatically be adjusted to the voltage appropriate to the part 
soldered onto the plug-in module.
The plug-in module is prepopulated with the values shown in Table A-22:
For V
DD
 = 3.3 volts, R101 can be left unpopulated and R102 can be 1.18K. 
(1% resistors are recommended for precise adjustment of V
DD
.)
Now, let’s look at how to determine R101 and R102 if a different V
DD
 is desired. First, 
it is a good idea to look at the data sheet for the LM317 to understand how the voltage 
is adjusted. We will not duplicate all the details here. The following equation is taken 
from an LM317 data sheet:
EQUATION A-1:
 
I
ADJ
 is minimized by the LM317, so it can be assumed to be zero or at least very small. 
V
REF
 =1.25V; it is the reference voltage developed by the LM317 between the output 
and adjustment terminal.
That gives us the following equation:
EQUATION A-2:
 
TABLE A-22:
PIM PREPOPULATED VALUES
Module
R101
R102
V
DD
PIC18F87J90
Open
1.18K
3.3V
PIC18F85J90
Open
1.18K
3.3V
PIC18F8490
Open
Open
5.0V
PIC16F914/917
Open
Open
5.0V
PIC16F946
Open
Open
5.0V
PIC16F1946/7
Open
Open
5.0V
PIC16LF1946/7
Open
1.18K
3.3V
V
OUT
 = V
REF
 (1+ R2/R1) + I
ADJ
 * R2
V
OUT
 = 1.25V(1+R2/R1)
R2 = R25 || R102 = (R25* R102)/(R25+R102)
R1 = R26 || R101.= (R26* R101)/(R26+R101)