He echado otro vistazo y me sale que para los siguientes valores de AN1:
AN1=0, duty = 0
AN1=510, duty = 158
AN1=854, duty = 255 'Maximo
AN1 = 1023, duty = 61
Define CONFIG = 0x2f50
Define CONFIG2 = 0x3ffc
Define CLOCK_FREQUENCY = 8
'device = 18f26k22
'xtal = 16
'config_start
'fosc = intio67
'pllcfg = On 'On ' Oscillator multiplied by 4
'priclken = On 'Primary clock enabled
'fcmen = off 'Fail-Safe Clock Monitor disabled
'ieso = off 'Internal/External Oscillator Switchover mode disabled
'pwrten = On 'Power up timer enabled
'boren = sbordis 'Brown-out Reset enabled in hardware only (SBOREN is disabled)
'borv = 190 'Brown Out Reset Voltage set to 1.90 V nominal
'wdten = off 'Watch dog timer is always disabled. SWDTEN has no effect.
'wdtps = 128 'Watchdog Timer Postscale 1:128
'ccp2mx = portc1 'CCP2 input/output is multiplexed with RC1
'pbaden = off 'PORTB<5:0> pins are configured as digital I/O on Reset
'ccp3mx = portc6 'P3A/CCP3 input/output is multiplexed with RC6
'hfofst = On 'HFINTOSC output and ready status are not delayed by the oscillator stable status
't3cmx = portc0 'Timer3 Clock Input (T3CKI) is on RC0
'p2bmx = portb5 'ECCP2 B (P2B) is on RB5 (EXTMCLR = Enable MCLR/Disable RE Input)
'mclre = intmclr 'MCLR pin enabled, RE3 input pin disabled (INTMCLR = Disable MCLR/Enabled RE Input)
'stvren = off 'Stack full/underflow will not cause Reset
'lvp = off 'Single-Supply ICSP disabled
'xinst = off 'Instruction set extension and Indexed Addressing mode disabled (Legacy mode)
'debug = off 'Disabled
'cp0 = off 'Block 0 (000800-001FFFh) not code-protected
'cp1 = off 'Block 1 (002000-003FFFh) not code-protected
'cp2 = off 'Block 2 (004000-005FFFh) not code-protected
'cp3 = off 'Block 3 (006000-007FFFh) not code-protected
'cpb = off 'Boot block (000000-0007FFh) not code-protected
'cpd = off 'Data EEPROM not code-protected
'wrt0 = off 'Block 0 (000800-001FFFh) not write-protected
'wrt1 = off 'Block 1 (002000-003FFFh) not write-protected
'wrt2 = off 'Block 2 (004000-005FFFh) not write-protected
'wrt3 = off 'Block 3 (006000-007FFFh) not write-protected
'wrtc = off 'Configuration registers (300000-3000FFh) not write-protected
'wrtb = off 'Boot Block (000000-0007FFh) not write-protected
'wrtd = off 'Data EEPROM not write-protected
'ebtr0 = off 'Block 0 (000800-001FFFh) not protected from table reads executed in other blocks
'ebtr1 = off 'Block 1 (002000-003FFFh) not protected from table reads executed in other blocks
'ebtr2 = off 'Block 2 (004000-005FFFh) not protected from table reads executed in other blocks
'ebtr3 = off 'Block 3 (006000-007FFFh) not protected from table reads executed in other blocks
'ebtrb = off 'Boot Block (000000-0007FFh) not protected from table reads executed in other blocks
'config_end
'declare adin_res = 10 'Resolucion 10 BITS
'declare adin_tad = frc 'Oscilator RC AD
'declare adin_stime = 100 'AD 100uS
Define SINGLE_DECIMAL_PLACES = 2
Define ADC_SAMPLEUS = 10
Define ADC_CLOCK = 5 'Tad 2uSeg a 8Mhz
Define SIMULATION_WAITMS_VALUE = 1
'declare ccp1_pin = portc.2 'Pin para PWM CCP1
'ansela = %00001111 'Port A4-A7 Digital=0 / A0-A3 Analog
ANSEL = %00001111
TRISA = %11101111 'Port A I/O
TRISB = ffh
ADCON1 = %10000000 'Puerto Analogico
TRISB.3 = 0 'PWM
'adcon2 = %10000000 'Right justified
Hseropen 4800
Dim duty As Byte 'Ciclo Duty PWM
Dim ad_tension As Word 'adresl.Word 'Señal Conversol AD
Dim ad_tmp As Word 'Valor Temporal
Dim valor_gas As Single 'float 'Calculo voltage
Dim volt As Single 'float 'En Voltios
Dim a As Byte
Dim aux As Single
duty = 0
volt = 0
ad_tension = 0
ad_tmp = 0
valor_gas = 0
'pwm
'cls
PWMon 1, 9
main:
Gosub adc_gas_manillar
Hserout #volt, " -", #duty 'print at 4, 6, dec2 volt, " - ", dec duty 'Display
PWMduty 1, duty 'hpwm 1, duty, 20000
'WaitMs 5 'delayms 5
Goto main
End
adc_gas_manillar:
For a = 1 To 15
Adcin 1, ad_tension '= adin 1 'Conversor AD
ad_tmp = ad_tmp + ad_tension 'Temporal para la Media de AD
Next a
ad_tmp = ad_tmp / 15 'Calcula la Media
valor_gas = (489 * (ad_tmp / 10)) - 0.8 '489 = (5V/1023) 10Bits / Vref 5V
volt = valor_gas / 10000 'Valor en Voltios
aux = (255 / 4.3) * volt '4.3V el voltage Maximos Gas al Ma´ximo (no los 5V)
duty = aux
Return