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

Multiple PWM outputs
Goto page Previous  1, 2, 3, 4  Next
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Mark



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

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

PostPosted: Thu Dec 09, 2004 10:26 am     Reply with quote

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

View user's profile Send private message

PostPosted: Thu Dec 09, 2004 10:30 am     Reply with quote

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

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

PostPosted: Thu Dec 09, 2004 10:35 am     Reply with quote

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

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

PostPosted: Thu Dec 09, 2004 10:37 am     Reply with quote

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

View user's profile Send private message

PostPosted: Thu Dec 09, 2004 10:51 am     Reply with quote

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

View user's profile Send private message

PostPosted: Thu Dec 09, 2004 10:54 am     Reply with quote

I have only 2 options - Microchip 12 bit / Microchip 14 bit - strange?
Ttelmah
Guest







PostPosted: Thu Dec 09, 2004 10:57 am     Reply with quote

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

View user's profile Send private message

PostPosted: Thu Dec 09, 2004 11:15 am     Reply with quote

More expense!!!! Rolling Eyes
future



Joined: 14 May 2004
Posts: 330

View user's profile Send private message

PostPosted: Thu Dec 09, 2004 11:44 am     Reply with quote

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

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

PostPosted: Thu Dec 09, 2004 12:50 pm     Reply with quote

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

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

PostPosted: Thu Dec 09, 2004 12:52 pm     Reply with quote

davt wrote:
I have only 2 options - Microchip 12 bit / Microchip 14 bit - strange?


Oops Confused That stinks. Is it in your budget to upgrade to the PCH compiler?
future



Joined: 14 May 2004
Posts: 330

View user's profile Send private message

PostPosted: Thu Dec 09, 2004 1:12 pm     Reply with quote

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

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

PostPosted: Thu Dec 09, 2004 1:16 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Thu Dec 09, 2004 2:23 pm     Reply with quote

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

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

PostPosted: Thu Dec 09, 2004 2:37 pm     Reply with quote

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)?
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2, 3, 4  Next
Page 3 of 4

 
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