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 support@ccsinfo.com

PIC18C801

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



Joined: 13 Oct 2003
Posts: 5

View user's profile Send private message

PIC18C801
PostPosted: Mon Oct 13, 2003 1:47 am     Reply with quote

Hi,

I am using PCH compiler for a project with PIC18C801. From beginning (februar 2002) the compiler didn´t work properly with the features of this chip. Time by time the bugs was repaird but now I have a new problem. I am using PCH 3.176 and the compiler now does not understand something in the Header PIC18C801.H. I get the message:
*** Error 104 "C:\PROGRAMME\PICC\devices\18c801.h" Line 2(9,18): Extra characters on preprocessor command line

It would be nice if anybody could help.

Thanks,

Bernd
_________________
Bernd Eckel
Eckel Electronic
Trofaiach, Austria
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Oct 13, 2003 11:55 am     Reply with quote

It works fine for me, with PCH 3.176.

Post the first part of your program, with all the preprocessor statements.
Then I can compile it and find where the problem is.
Bernd



Joined: 13 Oct 2003
Posts: 5

View user's profile Send private message

PostPosted: Tue Oct 14, 2003 1:34 am     Reply with quote

If I use #device icd=true or if I use the ICD option in the build option this error occurs. I am using the ICD2 as development tool and I think I need this option. I will try if I can manually reserve the used memory space.
_________________
Bernd Eckel
Eckel Electronic
Trofaiach, Austria
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

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

PostPosted: Tue Oct 14, 2003 9:04 am     Reply with quote

I didn't think 18C parts had the ICD module in them. 18C parts are write one time.
Bernd



Joined: 13 Oct 2003
Posts: 5

View user's profile Send private message

PostPosted: Tue Oct 14, 2003 9:42 am     Reply with quote

The PIC18C801 and PIC18C601 are romless and I use it with external 8Mbit Flash and a 4MBit RAM.
_________________
Bernd Eckel
Eckel Electronic
Trofaiach, Austria
Ttelmah
Guest







PostPosted: Tue Oct 14, 2003 10:35 am     Reply with quote

Bernd wrote:
The PIC18C801 and PIC18C601 are romless and I use it with external 8Mbit Flash and a 4MBit RAM.

However they do _not_ have ICD.
If you go to the MicroChip site, and open the 'product' page for the 18 family, look at the column for ICD, and track it down, the first entry with 'yes' for ICD, is the 18F1220. All the 18C models (which come above this), lack the feature.
I'm afraid that if you want in-circuit development with this device, you have to pay the money for an ICE unit.

Best Wishes
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

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

PostPosted: Tue Oct 14, 2003 10:45 am     Reply with quote

Quote:

If you go to the MicroChip site, and open the 'product' page for the 18 family, look at the column for ICD, and track it down, the first entry with 'yes' for ICD, is the 18F1220. All the 18C models (which come above this), lack the feature.


http://www.microchip.com/download/lit/rlit/00148H4.pdf

I agree with you on this. But I have found conflicting information. Take a look at this document. It is their Line Card. Look under development systems and you will find ICD2 listed as being supported! I don't see how this is possible if you can't program in the debug module. They also list the programming sockets to use? What is there to program??? I found some documents that say it support ICSP and others that say it does not. I think Bernd should contact Microchip and ask them directly what the deal is. But it looks like he will have to use the ICE 4000.

Regards,
Mark
Bernd



Joined: 13 Oct 2003
Posts: 5

View user's profile Send private message

PostPosted: Tue Oct 14, 2003 1:04 pm     Reply with quote

Thanks for your help,

My problem is, that the version 3.176 of PCH compiler gives me an error message if I select ICD. The previous versions had no problem with ICD, there was other bugs to prevent doing my job.
_________________
Bernd Eckel
Eckel Electronic
Trofaiach, Austria
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

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

PostPosted: Tue Oct 14, 2003 2:06 pm     Reply with quote

Have you used the ICD with that processor before. Not just compile code but actually used the ICD for debugging?
Bernd



Joined: 13 Oct 2003
Posts: 5

View user's profile Send private message

PostPosted: Tue Oct 14, 2003 2:51 pm     Reply with quote

Yes, I did. I am working now for about twenty months with PIC18C801 and ICD2. First I wanted to buy an ICE4000 but Microchip was not able to deliver this tool for more than one year (after they promised). Now my project is nearly finished and I don´t want to spend the money.
_________________
Bernd Eckel
Eckel Electronic
Trofaiach, Austria
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Oct 14, 2003 4:09 pm     Reply with quote

I possibly have a fix for you. I installed PCH vs. 3.173 and used WinHex
to find the section in the Device.Dat file, which is for the 18C801.
I saved out that section.

Then I re-installed PCH vs. 3.176 and found the same section for the
18C801 in Device.dat. I compared the two sections, which are 0x400
bytes long, and found only one difference. At offset 0x2A, vs. 3.173
has 0x08, but vs. 3.176 has 0x00.

Since vs. 3.173 compiles OK with #device ICD=TRUE, I suspect that
this single bit tells the compiler that the chip supports ICD.

For some reason, when CCS released vs. 3.176, they (possibly
accidently) disabled ICD for the 18C801.

So, as a test, I used WinHex ( http://www.winhex.com) and edited the
Device.dat file for PCH vs. 3.176. I changed the value at offset 0x2A
to be 0x08, and it now it works. Or at least, it compiles without errors
if you use the ICD statement.

So, you could try that. The absolute offset within the Device.dat file
is 0x3622A. But make sure that you're in the 18C801 section.


Code:
Offset      0  1  2  3  4  5  6  7   8  9  A  B  C  D  E  F

00036200   09 50 49 43 31 38 43 38  30 31 06 89 44 04 89 54   .PIC18C801.‰D.‰T
00036210   21 03 03 00 00 00 01 0C  00 00 01 00 01 01 01 01   !...............
00036220   01 01 01 00 00 00 00 00  00 05 08 89 04 EB D6 47   ...........‰.ëÖG

Notice that offset 0x3662A is now 0x08.

You could either try this fix, or you could contact CCS and ask them
to email you a corrected Device.dat file.
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

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

PostPosted: Tue Oct 14, 2003 5:09 pm     Reply with quote

They probably just read the datasheets and thought the ICD was not available Laughing From the looks of it, Microchip doesn't even know if it is supported by the ICD, at least their Marketing department Smile
Ttelmah
Guest







PostPosted: Wed Oct 15, 2003 6:56 am     Reply with quote

Mark wrote:
They probably just read the datasheets and thought the ICD was not available Laughing From the looks of it, Microchip doesn't even know if it is supported by the ICD, at least their Marketing department Smile

Yes. This is looking very odd indeed. If you read the data sheet for the chip, the 'development support' section, does not mention it supporting ICD. Also the product matrix specifically says it doesn't. However if you open the 'ICD' tab in the CCS development enviroment, it lists the 18C801, as supported by ICDH. If you then look at the data sheet 'fuse map' for the chip, the bit used on other chips for the background debug, is marked as "reserved 'maintain as 1'". However as another poster has said, the ICD2 unit lists the chip as supported!...
It definately looks as if MicroChip, are radiating some very conflicting information about this, and CCS may well have modified the support because of this.
If the original poster had not had the system working with the older compiler, I'd be suspicious that the fault was that the marketting department just though all 18xxxx chips were supported. However it looks as if the hardware is there, but for some reason, MicroChip don't want to admit this (there is no mention of a problem in the errata sheets).
I would suggest he talks to MicroChip, points out the conflicting data, and gets the reply from them. Assuming this comes back that the feature is there and supported, then a copy of the email, sent to CCS, should encourage them to re-enable the feature.

Best Wishes
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

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

PostPosted: Wed Oct 15, 2003 6:59 am     Reply with quote

Probably just a ploy to increase the sales of the ICE4000 Laughing
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