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

Migrating 16F876 to 18F2620

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



Joined: 07 Jan 2004
Posts: 22
Location: Frankfurt, Germany

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

Migrating 16F876 to 18F2620
PostPosted: Thu Jan 20, 2005 2:28 am     Reply with quote

Hy Folks,
after successfully working with 16F876 I came to the memory ceiling and have to go for a 18F2620, because it seemed to be more or less pin compatible. Now the probleems started. Perhaps any can help me to overcome it:
I am using PCWH 3.212 and ICD U-40.

The program was working fine on 16F876.

Main program starts:

#pragma list
#device ICD = TRUE
#include "18F2620m.h" (slieghtly modified original header file)
......

Headerfile starts:

#device PIC18F2620
#device *=16
.....

During compilation I get the message. "unknown device type"

After deleting the #device command in the main program and changing the headerfile to:
#device PIC18F2620m.h
#device ICD = TRUE
#device *=16
...

I get the message "cannot change device type this far into code"

Without the debugging #device ICD=TRUE the compilation is finished and during program loading the message comes "your code does not have ICD mode enable; recompile with this mode" .
Confirming this message the compilation is done again and during loading the verification windows pops up showing that the expected code is different from the actual

Any idea??
_________________
dl 2 kp
newguy



Joined: 24 Jun 2004
Posts: 1908

View user's profile Send private message

PostPosted: Thu Jan 20, 2005 11:02 am     Reply with quote

I'm not 100% sure on this, but with the 18 series processors, isn't the #device *=16 line not needed?

Maybe try commenting it out and see what happens.
Ttelmah
Guest







PostPosted: Thu Jan 20, 2005 11:26 am     Reply with quote

As another poster has said, the *=16 declaration is unnecessary. However the problem is that you are confusing #include, and #device. #device specifies a device number, not a file to include. The normal syntax is to _include_ the file for the processor, which has #device as the first statement. You are trying to use a modified header file, as a device type...

Best Wishes
Georg Prinz



Joined: 07 Jan 2004
Posts: 22
Location: Frankfurt, Germany

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

#device option
PostPosted: Sat Jan 22, 2005 9:57 am     Reply with quote

Hi,

thanks for replying. Now I found the first bug. The #device ICD = TRUE
was the problem. The preprocessor does not accept blanks between the parameters!!! After correcting to #device ICD=TRUE the program was compiled correctly.

Now the more severe propblem stays still waiting. The compiled program cannot be loaded correctly as the verifying table is showing.

I checked the MCLR voltage during programming, 13V seems to be ok.;
Then I removed the capacitor at MCLR pin - no effect.



Gues???
_________________
dl 2 kp
Georg Prinz



Joined: 07 Jan 2004
Posts: 22
Location: Frankfurt, Germany

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

PostPosted: Wed Jan 26, 2005 4:08 am     Reply with quote

Very Happy Hi folks,

now the second problem shall be solved. CCS send me an upgrade software V1.35 for the U-40 ICD. This software can be downloaded from the CCS web-page too. (Thanks to CCS for prompt service!).

Furthermore, Microchip is offering an an so called PUM "PIC-Upgrade-Kit" for the PICSTART programmer to program the new PICs like 18F2620. The 18PIC252 can be programmed still by the old version.

Saludos

George
_________________
dl 2 kp
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