Hello,
I'm using a PIC18F1220 to control a lead-acid battery charger circuit.
I'm having troubles in the A/D conversion in the simulations with Proteus.
The follow message appears:
''ADC conversion clock period (8e-06) is below recommended 1.6us."
I'm using 2 ADC channels (10-bits) (to read temperature and battery voltage)
Temperature function:
int read_temp (void)
{
restart_WDT();
set_adc_channel (sAN0);
delay_ms(30);
Trd = read_adc();
delay_ms(30);
restart_WDT();
return (Trd);
}
Voltage reading function:
float read_voltage (void)
{
restart_WDT();
set_adc_channel (sAN1);
delay_ms(30);
restart_WDT();
Vrd = read_adc();
delay_ms(30);
V = ((Vrd*150)/1023);
restart_WDT ();
return (V);
}
What I need to do to solve this problem?
Thx.
I'm using a PIC18F1220 to control a lead-acid battery charger circuit.
I'm having troubles in the A/D conversion in the simulations with Proteus.
The follow message appears:
''ADC conversion clock period (8e-06) is below recommended 1.6us."
I'm using 2 ADC channels (10-bits) (to read temperature and battery voltage)
Temperature function:
int read_temp (void)
{
restart_WDT();
set_adc_channel (sAN0);
delay_ms(30);
Trd = read_adc();
delay_ms(30);
restart_WDT();
return (Trd);
}
Voltage reading function:
float read_voltage (void)
{
restart_WDT();
set_adc_channel (sAN1);
delay_ms(30);
restart_WDT();
Vrd = read_adc();
delay_ms(30);
V = ((Vrd*150)/1023);
restart_WDT ();
return (V);
}
What I need to do to solve this problem?
Thx.