View previous topic :: View next topic |
Author |
Message |
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Thu Dec 09, 2004 10:26 am |
|
|
I downloaded their demo and got the same error. I changed the device type to an 18F458 and the code compiles. Are you using the demo or a full version? |
|
|
davt
Joined: 07 Oct 2003 Posts: 66 Location: England
|
|
Posted: Thu Dec 09, 2004 10:30 am |
|
|
I am using the full version.
I tried changing the chip as you did but same result! |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Thu Dec 09, 2004 10:35 am |
|
|
Are you sure that you have the PCH compiler? I believe the full version is called PCWH and not PCW. |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Thu Dec 09, 2004 10:37 am |
|
|
Also, make sure the dropdown at the top says "Microchip PIC18" and not "Microchip 14 bit" |
|
|
davt
Joined: 07 Oct 2003 Posts: 66 Location: England
|
|
Posted: Thu Dec 09, 2004 10:51 am |
|
|
According to the manual - quote " PCW is the professional package that includes both the PCM and PCB compilers ".
I tried a test project and selected the device - 18f252 but up pops a message saying it cannot find 18f252.h - I do not seem to have CCS's header file although the chip is listed! |
|
|
davt
Joined: 07 Oct 2003 Posts: 66 Location: England
|
|
Posted: Thu Dec 09, 2004 10:54 am |
|
|
I have only 2 options - Microchip 12 bit / Microchip 14 bit - strange? |
|
|
Ttelmah Guest
|
|
Posted: Thu Dec 09, 2004 10:57 am |
|
|
davt wrote: | I have only 2 options - Microchip 12 bit / Microchip 14 bit - strange? |
Not at all.
You have PCW, which includes the PCB, and PCM compilers, not PCWH, which includes the PCB, PCM, and _PCH_ compilers.
You need to upgrade to PCWH to get access to the PIC18 chips.
Best Wishes |
|
|
davt
Joined: 07 Oct 2003 Posts: 66 Location: England
|
|
Posted: Thu Dec 09, 2004 11:15 am |
|
|
More expense!!!! |
|
|
future
Joined: 14 May 2004 Posts: 330
|
|
Posted: Thu Dec 09, 2004 11:44 am |
|
|
Mark, nice code!
Is there anything special to use the #org directive?
I always get "Invalid ORG range" at the end of main.c
Thank you. |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Thu Dec 09, 2004 12:50 pm |
|
|
future wrote: | Mark, nice code!
Is there anything special to use the #org directive?
I always get "Invalid ORG range" at the end of main.c
Thank you. |
Not sure what you mean. Do you get an invalid org range with my code or just when you try and use it. |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Thu Dec 09, 2004 12:52 pm |
|
|
davt wrote: | I have only 2 options - Microchip 12 bit / Microchip 14 bit - strange? |
Oops That stinks. Is it in your budget to upgrade to the PCH compiler? |
|
|
future
Joined: 14 May 2004 Posts: 330
|
|
Posted: Thu Dec 09, 2004 1:12 pm |
|
|
Mark:
I'm using the 18f458, compiler 3.212.
When I try to use the #ORG 0x08 it shows the error.
Copy/pasting your handlers for example at the top of my code and below the mcu's definition doesnt work.
I dont know if there's something different to do when org'ing to an already used code section. Maybe it is conflicting with the complier dispatcher.
I searched your code for something that would disable the default dispatcher but found nothing. |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Thu Dec 09, 2004 1:16 pm |
|
|
I did not use any of the CCS int handlers and you cannot with that code. It handles both the high and low priority interrupts and saves only the scratch data that those interrupt handlers use. |
|
|
future
Joined: 14 May 2004 Posts: 330
|
|
Posted: Thu Dec 09, 2004 2:23 pm |
|
|
Done, made my dispatcher insite ext1 fast, testing both ext1 and timer2 flags. Timer2 is configured as High priority in main(). |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Thu Dec 09, 2004 2:37 pm |
|
|
So are you saying that you are using the CCS int handlers. You declared ext1 as "Fast" and manually setup Timer2 to use high priority. Then you added a test inside of ext1 interrupt for timer2? Or are you saying that you created you own dispatcher and the code executes very quickly (fast)? |
|
|
|