In the datasheet of the PIC16F877A http://ww1.microchip.com/downloads/en/D ... 39582b.pdf in Chapter 13 (p 141) the reference voltage can be set by means of the CVRON register. There are 2 possibility/sensivities, to be chosen by bit 5 (CVRR).
The datasheet gives for CVRR:
1= 0 to 0.75 CVrsrc, with CVrsrc/24 step size
0= 0.25 CVrsrc 70 0.75 CVrsrc, with CVrsrc/32 step size
However chosing CVRR=1, the reference voltage can be varied between 0 to 0.667 CVrsrc instead of 0 to 0.75 CVrsrc in 24 step size. This can be seen in the correct formulea's shown at bit 3-0.
Figure 13.1 (p.142) also shows:
CVRR=1: Vmin =0 and Vmax = 16R/24R Vdd = 0.667 Vdd (with Vdd nearly CVrsrc, see remark datasheet)
CVRR=0: Vmin = 8R/32R Vdd = 0.25 Vdd and Vmax = 24R/32R Vdd= 0.75 Vdd
Kind regards
Jan Lichtenbelt
Reference Voltage PIC16F877A datasheet
- Jan Lichtenbelt
- Posts: 797
- Joined: Tue Feb 17, 2009 8:35 pm
- Location: Haren GN, the Netherlands
- Has thanked: 128 times
- Been thanked: 264 times
- Contact: