View previous topic :: View next topic |
Author |
Message |
Bernd
Joined: 13 Oct 2003 Posts: 5
|
PIC18C801 |
Posted: Mon Oct 13, 2003 1:47 am |
|
|
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
|
|
Posted: Mon Oct 13, 2003 11:55 am |
|
|
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
|
|
Posted: Tue Oct 14, 2003 1:34 am |
|
|
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
|
|
Posted: Tue Oct 14, 2003 9:04 am |
|
|
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
|
|
Posted: Tue Oct 14, 2003 9:42 am |
|
|
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
|
|
Posted: Tue Oct 14, 2003 10:35 am |
|
|
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
|
|
Posted: Tue Oct 14, 2003 10:45 am |
|
|
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
|
|
Posted: Tue Oct 14, 2003 1:04 pm |
|
|
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
|
|
Posted: Tue Oct 14, 2003 2:06 pm |
|
|
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
|
|
Posted: Tue Oct 14, 2003 2:51 pm |
|
|
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
|
|
Posted: Tue Oct 14, 2003 4:09 pm |
|
|
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
|
|
Posted: Tue Oct 14, 2003 5:09 pm |
|
|
They probably just read the datasheets and thought the ICD was not available From the looks of it, Microchip doesn't even know if it is supported by the ICD, at least their Marketing department |
|
|
Ttelmah Guest
|
|
Posted: Wed Oct 15, 2003 6:56 am |
|
|
Mark wrote: | They probably just read the datasheets and thought the ICD was not available From the looks of it, Microchip doesn't even know if it is supported by the ICD, at least their Marketing department |
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
|
|
Posted: Wed Oct 15, 2003 6:59 am |
|
|
Probably just a ploy to increase the sales of the ICE4000 |
|
|
|