View previous topic :: View next topic |
Author |
Message |
GunasekaR
Joined: 07 Nov 2008 Posts: 3
|
Program not downloaded in J-series micro |
Posted: Wed Nov 12, 2008 6:38 am |
|
|
I'm using ICD-U40 and pic18F85J15.
Target test passed.
After downloading programmer popups some errors:
Actual ... and expected... values
So my code is not loading.
this is the code i'm using to check:
Code: | #include <18F85J15.h>
#fuses HS,NOWDT,NOXINST
#use delay(clock=12288000)
#define RED_LED PIN_H2
void main()
{
while(1)
{
OUTPUT_HIGH(RED_LED);
DELAY_MS(1000);
OUTPUT_LOW(RED_LED);
DELAY_MS(2000);
}
}
|
Can anyone help me for this issue......
ICD shows the device ID is not matching
the required ID is 1700 but the ic is showing 1703
i verified it many time but it showing the same value
anyone help for me .. this is serious issue for me ......
Last edited by GunasekaR on Fri Nov 14, 2008 11:51 pm; edited 3 times in total |
|
|
treitmey
Joined: 23 Jan 2004 Posts: 1094 Location: Appleton,WI USA
|
|
Posted: Wed Nov 12, 2008 9:46 am |
|
|
In the ICD program has a checkbox in the lower left.
"J series PIC"
Did you check that box? |
|
|
GunasekaR
Joined: 07 Nov 2008 Posts: 3
|
|
Posted: Wed Nov 12, 2008 9:57 am |
|
|
Yes we did. |
|
|
GunasekaR
Joined: 07 Nov 2008 Posts: 3
|
|
Posted: Sat Nov 15, 2008 12:01 am |
|
|
I checked that microchip datasheet for device id.
1700 is the real ID.
1703 this caused because of Reserved bit.
I don't know why the ICD is checking the reserved bit.
Is anyone can help me plz do it as much as soon this is very important to me.
(This IC belongs to pic18f87j10 family) |
|
|
rajshek_2010
Joined: 24 Nov 2005 Posts: 5
|
|
Posted: Tue Nov 18, 2008 8:52 am |
|
|
Now we are able to dump the code into micro controller by hard coding the 300000 and 300002 memory locations. But the program doesn’t seem to be working.
Following is the sample code written using CCS compiler J Series.
Code: |
#include <18F85J15.h>
#use delay(clock=20000000)
#byte CONFIG1L = 0X300000
#BIT DEBUG = CONFIG1L.7
#BIT XINST = CONFIG1L.6
#BIT WDTEN = CONFIG1L.0
#byte CONFIG2L = 0X300002
#BIT FOSC2 = CONFIG1L.2
#BIT FOSC1 = CONFIG1L.1
#BIT FOSC0 = CONFIG1L.0
#define RED_LED PIN_H3
void main()
{
WDTEN = 0;
DEBUG = 1;
XINST = 0;
FOSC1 = 0;
FOSC0 = 0;
FOSC2 = 1;
while(1)
{
OUTPUT_HIGH(RED_LED);
DELAY_MS(500);
OUTPUT_LOW(RED_LED);
DELAY_MS(500);
}
} |
As a next step, we removed
Code: | #use delay(clock=20000000) |
from the code. The program started working but couldn’t use delay_ms routines.
Kindly advise. |
|
|
|