Hi Group
I have purchased a PIC18F2423 to make a pressure meter with 12 bit resolution.
To test the circuit I hooked up a 1k pot to +5 and ground and the wiper to the ADC input AN1. I noticed that the result of the ADC does not output a bit with an input voltage under 11.5mV. Here is the code:


'PIC18F2423, 4MHz Resonator, 4x20 LCD, Input AN1, Vref 4096mV

'Defines ADC
DEFINE ADC_BITS 12
DEFINE ADC_SAMPLEUS 50

Define OSC 4

'Defines LCD
Define LCD_DREG PORTB 'set lcd data port to PORTB
Define LCD_DBIT 0 'set data starting bit to 0 (RC0 to RC3)
Define LCD_RSREG PORTB 'set rs register port to PORTB
Define LCD_RSBIT 4 'set rs register bit to 4 (RC4)
Define LCD_EREG PORTB 'set E register port (PORTB)
Define LCD_EBIT 5 'set E register bit to 5 (RC5)
Define LCD_BITS 4 'set to 4-bit operation
Define LCD_LINES 4 'set to 4-line lcd
Define LCD_COMMANDUS 500 'delay 500us

'Variable
Press Var Word

TrisA =%00111111

'reset lcd display
Lcdout $FE,1


'Start to measure Pressure---------------------------------------
Let Press=0

Adcon1=%00011010 'Analog AN0 to AN4, Ref Gnd, Ext Ref 4096mV
ADCON0=%00000101 'ADC enabled, ADC idle, AN1 on,
Adcon2=%10010100 'Fosc/4, 4Tad, Right justified

Adcon0.1=1 'start conversion
notdon:
IF ADCON0.1 = 1 THEN notdon 'wait for conversion to finish

Press.highbyte=ADRESH 'move result of highbyte to Press
Press.lowbyte=ADRESL 'move result of lowbyte to Press
Pause 100
LCDOUT $FE,$80, "Press " , DEC Press 'to see value of "Press"
Pause 1000
Let Press=Press*5
Pause 50
Lcdout $FE,$94, "Pressure: ",DEC Press/10, ".", DEC1 Press, " mb"
Pause 3000

Goto Start
End

Does anyone know why there is no ADC output with <11.5mV input? Help is appreciated.