Picc C

Status
Not open for further replies.

Yes, PicC is being used. It looks like you have some out of date directives.

Mike.
 
Thanks Pommie. Has PicC gone through some radical changes in the last few years that render quite a few bits of code useless? I should look up what a 'directive' actually IS. My understanding is that it's a lump of code which is already written and you include a reference to it via the #use command, saving time.

My impression was that the whole point of proprietary compilers like PicC was that they bundled stuff in that saved time, like below:-
#use delay (clock=2457600)
#use rs232 (baud=2400,xmit=PIN_B2,rcv=PIN_B3)
#rom 0x2100={A,B,C,D,E,F,G,H,I,J}

I assume that the fact that I have changed deviced wouldn't matter, so I'm confused as to why these directives are no longer valid.
 
It's been a long time since I've posted here, but this looks like a good place to jump back in.
The code you posted is not for PICC (HiTech's) compiler, but rather for the CCS
compiler. Yes, the HiTech C is around 950 dollars per family, but the CCS compilers are around 125 dollars per family. The 12Fxxx compiler was given away free with MPLab 7.40, or something like that.
That is why you are getting the errors for #fuses, etc. CCS is an inexpensive compiler, and not too bad, as long as you write your own functions, and stay away from thier built in functions. These compilers, however, will not do pointers to constants, although there is a workaround, and do not have a linker, yet. (I understand they are working on both of these issues, but are nowhere close.)
HiTech, on the other hand is pretty close to ANSI C, but also way more expensive.
I'm trying out SourceBoost C, at the moment, and quite like what I'm finding, so far. It seems pretty close to ANSI C, and seems to have good optimization. I managed to pick up a license on ebay, for under 50 dollars Canadian, and you should be able to do the same, if you are on ebay. I'll let everyone know how much I like it, after I've played with it for a while.
Regards,
Robert
 
Really if you want to run C, the best thing is a PICC18. The architecture is more compatible with C. You can find PIC18 parts basically equivalent to PIC16 parts at not too much greater cost.

Then you have the PICC18 compiler or the free MCC18 compiler available to compile your C code.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…