Adc Pic

Status
Not open for further replies.

richiealex

New Member
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
 
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?
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…