void main()
{
float value1,value2;
setup_adc_ports(ALL_ANALOG);
setup_adc(ADC_CLOCK_INTERNAL);
setup_psp(PSP_DISABLED);
setup_spi(FALSE);
setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
setup_timer_1(T1_DISABLED);
setup_timer_2(T2_DISABLED,0,1);
setup_comparator(NC_NC_NC_NC);
setup_vref(FALSE);
while(1)
{
set_adc_channel(0);
delay_ms(10);
value1=read_adc();
value2=(value1*5)/1023;
printf("voltage=%f\r\n",value2);
delay_ms(500);
}
}
No it is not an advance system,it is very common system.it is an advanced system
interface with PC
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?