R richiealex New Member Jul 16, 2008 #1 i am using CCS C... what should i do to make my portA to ADC port...what should i write in my program ? i am using PIC18F4550
i am using CCS C... what should i do to make my portA to ADC port...what should i write in my program ? i am using PIC18F4550
R richiealex New Member Jul 16, 2008 #2 setup_adc_ports(ALL_ANALOG); setup_adc(ADC_CLOCK_DIV_64); setup_psp(PSP_DISABLED); setup_spi(FALSE); setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1); setup_timer_1(T1_INTERNAL|T1_DIV_BY_1); setup_timer_2(T2_DISABLED,0,1); setup_comparator(NC_NC_NC_NC); setup_vref(FALSE); lcd_init(); lcd_gotoxy(1,1); lcd_putc("Hello World"); i use this before lcd display.. and it cant work... but i put after it..it works... is the code correct?
setup_adc_ports(ALL_ANALOG); setup_adc(ADC_CLOCK_DIV_64); setup_psp(PSP_DISABLED); setup_spi(FALSE); setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1); setup_timer_1(T1_INTERNAL|T1_DIV_BY_1); setup_timer_2(T2_DISABLED,0,1); setup_comparator(NC_NC_NC_NC); setup_vref(FALSE); lcd_init(); lcd_gotoxy(1,1); lcd_putc("Hello World"); i use this before lcd display.. and it cant work... but i put after it..it works... is the code correct?