I borrowed some code from a EDN.com article for what they call a "rainbow voltmeter" programmed in PBP.. the article takes a 12F675 and uses a RGB led to display a different color based on an 8 bit ADC input, shifting from "aqua" to "white" based on a voltage from 0 to 5 volts. at 2.5 volts the circuit switches the LED off for center dark. I modified the code a bit to get rid of the dark part, as i thought it was un-needed. I would like however, to scale the software to the lowest color "aqua" to = 1.60V and the highest color "white" = to 2.25V. I cant access the VREF pin (not because its in use by the LED, but because the circuit is already built)and "biasing" my input is a no go as well. It will have to be a mod of the software. they say that it is possible to do so in the article, but don't really say how and my math is terrible, like learning disability terrible! so if someone could show me some code, or the math, thank you! anyway, the following is the orignal code as printed by EDN.com

' PicBasic Pro program to read A/D on 12F675 ADC
' and display voltage A/D output using multi-color LED
' using a cold-to-hot color pallette. Center of range
' is dark.
'
' (c) 2003 by David Prutchi
'

i VAR BYTE ' Define loop variable
blue VAR BYTE ' Define blue pulse-width variable
green VAR BYTE ' Define green pulse-width variable
red VAR BYTE ' Define red pulse-width variable
' GPIO port 0 to GREEN LED
' GPIO port 1 TO RED LED
' GPIO port 2 to BLUE LED
color VAR BYTE ' Define LED color variable
x VAR BYTE ' Allocate A/D variable

' Set A/D Parameters
DEFINE ADC_BITS 8 ' Use 10-bit A/D as 8-bit A/D
ANSEL.3=1 ' Set ANS3 as analog input pin
ANSEL.4 = 0 ' Set A/D clock
ANSEL.5 = 1
ANSEL.6 = 0
ADCON0.0 = 1 ' Turn On A/D
ADCON0.2 = 1 ' A/D channel 3
ADCON0.3 = 1
ADCON0.6 = 0 ' VDD is voltage reference
ADCON0.7 = 0 ' Left Justify result

' Set GPIO port pins 0, 1 and 2 as outputs
TRISIO.0=0
TRISIO.1=0
TRISIO.2=0


GoTo mainloop ' Skip subroutines

' SUBROUTINES
' -----------

' Subroutine to read a/d converter
getad:

ADCON0.1 = 1 ' Start conversion
PauseUs 50 ' Wait for conversion
x = ADRESH
Return


' MAIN
' ----

mainloop:


GoSub getad ' Get x value by performing A/D conversion


' RGB ENCODING FUNCTION
' Convert A/D reading into color table
' Each color has 14 possible intensity levels


IF x<=42 Then 'aqua
red=x/3
blue=14
green=(42-x)/3
EndIF
IF x>42 AND x<=84 Then 'shades of violet
red=(84-x)/3
green=0
blue=14
EndIF
IF x>84 AND x<=126 Then 'shades of green
red=0
green=0
blue=(126-x)/3
EndIF
IF x>126 AND x<=130 Then 'dark
red=0
green=0
blue =0
EndIF
IF x>130 AND x<=172 Then 'shades of red
red=(x-130)/3
green=0
blue=0
EndIF
IF x>172 AND x<=214 Then 'red / orange / yellow
red=14
green=(x-172)/3
blue=0
EndIF
IF x>214 Then 'yellow to white
red=14
green=14
blue=(x-214)/3
EndIF


' PULSE WIDTH MODULATOR
' Each PWM frame has 14 steps.

For i = 1 TO 14 ' Cycle through 14 steps of frame
color=0
IF red>0 Then
color=color+2
red=red-1
EndIF
IF green>0 Then
color=color+1
green=green-1
EndIF
IF blue>0 Then
color=color+4
blue=blue-1
EndIF
GPIO=color
PauseUs 100 ' Allow LEDs to shine for a few microseconds
Next i
GPIO=0
GoTo mainloop ' Do it forever

End