Maker Pro
Maker Pro

PIC prograaming Issue.

sid2286

Aug 24, 2011
102
Joined
Aug 24, 2011
Messages
102
Hello,

I am using a programmer to burn my hex file into pic18F4520.
http://www.nskelectronics.com/pickit2.html

now the problem that i am facing is as follows:
when i use a DIP package and burn the program into IC it works fine.

however i have designed a circuit using QFP80P1200X1200X120-44 package, it is here that i am facing a problem.

when I write a following code:
Code:
#include <18F4520.h>
#device ICD=TRUE ADC=10
#fuses HS,NOLVP,NOWDT
#use delay (clock=16Mhz)

void main()
{
   while(1)
   {
     output_high(Pin_c6);
     delay_ms(500);
     output_low(Pin_c6);
     delay_ms(500);
   }
}

it is burning into the controller and working ok,
however when I write the following code:
Code:
#include <18F4520.h>
#device ICD=TRUE ADC=10
#fuses HS,NOLVP,NOWDT
#use delay (clock=16Mhz)
#include <flex_lcd.c>

void main()
{
  lcd_init();

 while(1)
 {
    printf(lcd_putc,"\f hello\nworld");
    delay_ms(1000);
   output_high(Pin_c6);
   delay_ms(500);
   output_low(Pin_c6);
   delay_ms(500);
 }
here i am facing a problem the error that i get is as follows:
programming failed at program memory address 0x00000.

however both the program get dumped in pic18f4520 DIP packages.

I have no clue what exactly is the problem now,.

please help..

-Sid
 

sid2286

Aug 24, 2011
102
Joined
Aug 24, 2011
Messages
102
sorry didnt post the circuit diagram for the above post, please find it attached.

components are as follows:

R11 is 10K
R16 is 1K
R17 is 10K

please reply,

thanks,
-Sid
 

Attachments

  • ckt1.pdf
    15.2 KB · Views: 118

sid2286

Aug 24, 2011
102
Joined
Aug 24, 2011
Messages
102
Please reply if you have the solution,

If i write only
printf(lcd_putc,""); and compile it work, but if i write printf(lcd_putc,"\f hello\nworld"); it doesnt,

its when the ROM comes into picture is when the problem is created.

please help.
-sid
 
Top