CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

ICD2 CANīT PROGRAM PIC18F8680

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Bill_Smith



Joined: 06 Feb 2004
Posts: 26
Location: Curitiba, Brazil

View user's profile Send private message Visit poster's website

ICD2 CANīT PROGRAM PIC18F8680
PostPosted: Thu Mar 10, 2005 3:21 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Thu Mar 10, 2005 5:58 pm     Reply with quote

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

View user's profile Send private message Send e-mail

PostPosted: Thu Mar 10, 2005 7:49 pm     Reply with quote

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

View user's profile Send private message Visit poster's website

PostPosted: Fri Mar 11, 2005 8:26 am     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group