hanxu
Joined: 30 Jun 2005 Posts: 1
|
how to run my code without icd???? urgent~~~ |
Posted: Mon Aug 08, 2005 11:15 pm |
|
|
I have already tested my routin with icd, so try to download these code
to board, however, it does not work at all!!
I know from book, i should delete the line "#device ICD=TRUE", but
it is still not work,,, i do not know why, this is my first time doing this
job,,,, so ,,,, I need you help,,,, TQ!
#include <18f452.h>
//#device ICD=TRUE
#fuses HS, NOWDT, NODEBUG, NOLVP, PUT
#use delay(clock = 20000000)
#include <lcd_small.c>
void main( )
{
int x=0;
int y=0;
delay_ms(200);
setup_adc_ports( NO_ANALOGS );
setup_adc( ADC_OFF );
delay_ms(200);
lcd_init();
delay_ms(200);
printf(lcd_putc,"Hello ! ");
delay_ms(200);
while(1)
{
lcd_gotoxy(1,1); printf(lcd_putc," Voltage is: %u V",x++);
delay_ms(200);
lcd_gotoxy(1,2); printf(lcd_putc," Currency is: %u A",y++);
delay_ms(200);
}
} |
|
reblefire Guest
|
running without idc |
Posted: Thu Aug 11, 2005 1:55 pm |
|
|
Before you program the part, click configure/configuration bits, find background debug on the list and disable it. When you program the part it will warn you that it is disabled and ask if you want to enable it, say NO.
After programming it, unplug the ICD from the chip and it will start running. |
|