View previous topic :: View next topic |
Author |
Message |
Bill_Smith
Joined: 06 Feb 2004 Posts: 26 Location: Curitiba, Brazil
|
ICD2 CANīT PROGRAM PIC18F8680 |
Posted: Thu Mar 10, 2005 3:21 pm |
|
|
I just started a new project using the PIC18F8680. Today I received my target PCB from the board maker, and began testing it. First, I connected the ICD2 pod to the target and applying power. After starting MPLAB 7.1 and reseting the ICD2 I received the following message:
Connecting to MPLAB ICD 2
...Connected
Setting Vdd source to target
Target Device PIC18F8680 found, revision = a1
...Reading ICD Product ID
Running ICD Self Test
...Passed
MPLAB ICD 2 Ready
So far, so good...
Then I compiled this program:
Code: |
#include <18F8680.h>
#use delay(clock=20000000)
#fuses HS,NOWDT,NOPROTECT,NOLVP
#use standard_io(C)
#zero_ram
void main(void)
{
while(1)
{
output_high(PIN_C7);
delay_ms(1);
output_low(PIN_C7);
delay_ms(1);
}
}
|
Still moving along in the right direction....
Then I tried to download the compiled program to the PIC18F8680īs FLASH Memory, but I receive the following error:
Programming Target...
...Validating configuration fields
...Erasing Part
...Programming Program Memory (0x0 - 0x7F)
...Loading DebugExecutive
...Programming DebugExecutive
...Programming Debug Vector
...Programming RSBUG
Verifying...
...Program Memory
ICD0161: Verify failed (MemType = Program, Address = 0x0, Expected Val = 0xEF15, Val Read = 0xFFFF)
ICD0275: Programming failed.
MPLAB ICD 2 Ready
Has anyone seen this problem with the PIC18F8680? I am using a 20MHz crystal on my target and using an oscilloscope I found that there is no clock at OSC1. The crystal is known to be good, and I ohmed out the traces between the crystal and the processor. I am pretty confident that I donīt have a worm in the hardware, but I do have my doubts about the fuse configurations since this chip has a ton of them. Does anybody have a standard setup for this processor they wouldnīt mind publishing?
Thank you.
Bill
P.S. I am using PCHW version 3.221 |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Thu Mar 10, 2005 5:58 pm |
|
|
I don't have an answer to this, other than try it with ICD2 as a
programmer. It has to do "more" as a debugger. Perhaps
it will work as a programmer. Also, perhaps manually download
the ICD2 operating system, just to be sure. It's in the Programmer
menu. |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Thu Mar 10, 2005 7:49 pm |
|
|
Verify that you supplied voltage to all the power pins on the processor. Also make sure that you have the power supply for the ICD2 connected. |
|
|
Bill_Smith
Joined: 06 Feb 2004 Posts: 26 Location: Curitiba, Brazil
|
|
Posted: Fri Mar 11, 2005 8:26 am |
|
|
Thank you PCM Programmer and Mark for your help. After rechecking all of the VDD and VSS pins for connection to power I found that Avdd and Avss pins were not connected. Once I jumpered them to VDD and VSS I was able to program the part and everything is working fine. |
|
|
|