Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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.

Latest threads

New Articles From Microcontroller Tips

Back
Top