| View previous topic :: View next topic |
| Author |
Message |
newguy
Joined: 24 Jun 2004 Posts: 1946
|
|
Posted: Fri Jan 21, 2005 9:28 am |
|
|
| By "C18" are you referring to Microchip's C compiler? |
|
 |
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Fri Jan 21, 2005 9:28 am |
|
|
For PIC16 devices, I use PCM
For PIC18 devices, I tried PCH. Had too many problems so I switched to C18. I like the C18 compiler better. It makes my life much easier especially when pointers to functions and constants are needed. CCS has some functions that make setting up a little easier. Other than that, the C18 is far better.
Last edited by Mark on Fri Jan 21, 2005 9:30 am; edited 1 time in total |
|
 |
alexz
Joined: 17 Sep 2004 Posts: 133 Location: UK
|
|
Posted: Fri Jan 21, 2005 9:29 am |
|
|
| newguy wrote: | | By "C18" are you referring to Microchip's C compiler? |
Yes _________________ Alex |
|
 |
alexz
Joined: 17 Sep 2004 Posts: 133 Location: UK
|
|
Posted: Fri Jan 21, 2005 9:31 am |
|
|
| Mark wrote: | For PIC16 devices, I use PCM
For PIC18 devices, I tried PCH. Had too many problems so I switched to C18. I like the C18 compiler better. It makes my life much easier especially when pointers to functions and constants are needed. |
As far as I know, you can not use pointers to constants in CCS.
Can you in C18?
also, the interrupt part in C18 is a bit confusing.
I think the interrupt things in CCS are easier aren't they? _________________ Alex |
|
 |
newguy
Joined: 24 Jun 2004 Posts: 1946
|
|
Posted: Fri Jan 21, 2005 9:32 am |
|
|
You should take Mark's word, as I've never used the C18 compiler myself. That said, a colleague did use it. From what little I saw of it, I wasn't impressed.
Long answer short: if you like PCM and it does what you need, then you'll also like PCH.
And one other thing: even though PCH and PCM are different compilers, the screen interface (if you have the windows interface, PCW) is exactly the same. |
|
 |
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Fri Jan 21, 2005 9:34 am |
|
|
As far as I know, you can not use pointers to constants in CCS.
Can you in C18?
Yes in C18.
also, the interrupt part in C18 is a bit confusing.
Not once you understand it. You have to write you own handler.
I think the interrupt things in CCS are easier aren't they?
Easier and more bloated. |
|
 |
alexz
Joined: 17 Sep 2004 Posts: 133 Location: UK
|
|
Posted: Fri Jan 21, 2005 9:34 am |
|
|
| newguy wrote: | You should take Mark's word, as I've never used the C18 compiler myself. That said, a colleague did use it. From what little I saw of it, I wasn't impressed.
Long answer short: if you like PCM and it does what you need, then you'll also like PCH.
And one other thing: even though PCH and PCM are different compilers, the screen interface (if you have the windows interface, PCW) is exactly the same. |
I am just using MPLAB for editing _________________ Alex |
|
 |
alexz
Joined: 17 Sep 2004 Posts: 133 Location: UK
|
|
Posted: Fri Jan 21, 2005 9:35 am |
|
|
| Mark wrote: | I think the interrupt things in CCS are easier aren't they?
Easier and more bloated. |
what do you mean by that? _________________ Alex |
|
 |
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Fri Jan 21, 2005 9:38 am |
|
|
| By bloat, that means that there may be stuff in there that is not needed. |
|
 |
newguy
Joined: 24 Jun 2004 Posts: 1946
|
|
Posted: Fri Jan 21, 2005 9:39 am |
|
|
| I think he means that CCS's interrupt handlers are easier to implement, but this comes at the expense of execution speed. With C18, you have total control over your interrupt service routine, which means that there are very few (if any) extra instructions which serve to slow down execution. CCS's ISRs tend to have more code (thus "bloated"), and tend to run a hair slower than something you've written yourself. |
|
 |
alexz
Joined: 17 Sep 2004 Posts: 133 Location: UK
|
|
Posted: Fri Jan 21, 2005 9:41 am |
|
|
So, other any advantages of the CCS over the C18 then at all? _________________ Alex |
|
 |
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Fri Jan 21, 2005 9:43 am |
|
|
| newguy wrote: | | I think he means that CCS's interrupt handlers are easier to implement, but this comes at the expense of execution speed. With C18, you have total control over your interrupt service routine, which means that there are very few (if any) extra instructions which serve to slow down execution. CCS's ISRs tend to have more code (thus "bloated"), and tend to run a hair slower than something you've written yourself. |
CCS also allows you to write your own handler as well. Most people just don't choose to do it because it requires most thought and effort. I write code for a living. If I was going to just write a few programs for a class, one time project or something along those lines, then definitely CCS is the way to go. Day in, day out - C18 is what I like. |
|
 |
alexz
Joined: 17 Sep 2004 Posts: 133 Location: UK
|
|
Posted: Fri Jan 21, 2005 9:46 am |
|
|
Another advantage of C18 over CCS is that you can include in the project number of sources, what you can't unfortunately do in the CCS.
Isn't it? _________________ Alex |
|
 |
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Fri Jan 21, 2005 9:46 am |
|
|
| alexz wrote: | | So, other any advantages of the CCS over the C18 then at all? |
I can do anything in C18 that I can in CCS.
Pointers to constants and functions are a must for some of my applications which causes grief with CCS. That being said, I don't really see any advantage other than it is cheaper for the first few years  |
|
 |
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Fri Jan 21, 2005 9:47 am |
|
|
| alexz wrote: | Another advantage of C18 over CCS is that you can include in the project number of sources, what you can't unfortunately do in the CCS.
Isn't it? |
Yes which is really nice. Especially if you use libraries. |
|
 |
|