Lawrence Lile wrote: > Log onto the hi-tech support board and look for a long thread by me entitled > "12 step program for CCS users" It details nuts and bolts the agonies and > ecstacies of porting from CCS to Hitech C. http://www.htsoft.com/ Hitech > Support Board > > There are several main Gotchas: > > 1. Words, ints, longs etc. are not the same number of bits from Hitech to > CCS. I have started declaring "int8" instead of "byte" or "word" in CCS, > because someday when I port it, this will translate correctly. An int is 16 > bits in Hitech, 8 bits in CCS, IFIRC Good, this tells me it won't be as hard to go either way >IF< I declare things properly from the beginning. > 2. Hitech's paradigm about Printf is different, and printf'ing will > generate more PIC code bloat in Hitech than CCS. Score one point for CCS > 4. I was able to feel confident about porting CCS code to Hitech after a > coupla days of head scratching. Another point for CCS knowing that I can upgrade later to Hi-Tech if I really wanted to. > 5. Virtually all of CCS's PIC specific functions have to be hacked or > re-written to port to Hitech. (stuff like read_eeprom(), set_pwm_duty_1() > and so on. ) I ended up scrapping them and writing my own. There will be > some code which would need extensive revision, esp. if you could not pull > off a function that duplicates CCS' syntax exactly. Mostly I just wrote a > function that uses the same syntax, so it could substitute. But not having > infinite time, I would always end up with functions that only worked on one > PIC, and maybe not others. OTOH, the effort put into this could make a nice > little personal library. This kind of supports Dales comment below: Dale Botkin wrote: > > 2) If I have to write functions for CCS, are these functions not already included > > in the higher price tag of Hi-Tech 'C'? > > The other way around, I think. There are a lot of functons included with > CCS that you'd have to write for Hi-Tech. Most of what I'm talking about > are device drivers and such... LCD, matrix keypad, Dallas 1-wire, > external ADC, EEPROM, plus all of the internal peripherals are supported > by CCS built-in functions or included driver and/or example files. I was originally under the impression that Hi-Tech would have been of more help in this area. Sounds like with CCS, I get the drivers, etc and if I don't like them I can re-write something around them. With Hi-Tech I don't get them at all. > 6. Advice? You will probably be able to produce projects from here to > eternity with either compiler. I've used (and cussed) CCS for maybe 4 > years, and despite all the cussing I am still writing new projects with it. > More than likely you'll stick with whatever you learn first. True, human nature usually dictates this. Which is why I'm looking at this from the point of "This is not the only version of 'C' that I'll be useing". I've had the headaches of trying to write assembly for too many different PIC's at the same time and try to keep track of what features went to which PIC. Dale Botkin also wrote: > If you're talking about stdio.h, stdlib.h, string.h, math.h, ctype.h, > they're there. I don't know what libraries weren't there a few years ago, > but I've taken code snippets back and forth between CCS and GCC to debug > stuff on my Linux machine. All the functions I've used have worked the > same on both systems. This is one of the things I was worried about. Just have heard too many negitive things about CC5X in this respect and didn't want to fall into that same trap with CCS. > Having looked at the compiler comparisons (www.ccsinfo.com/compare.html if > you're interested), I'm even more convinced I made the right choice for > what I do. I looked as well but noticed it was only one users opinion on that comparison. Thanks to the list, I know have many more. > > Again, someone please PLEASE tell me that I am completely confused and have no > > idea what I am talking about. > > How would I know? I'm in the same boat... 'cept I can almost guarantee > I don't kow what I'm talking about. 8-) I've done 6 hours of reading and research and am still convinced that I know nothing. Based on that, I have just purchased CCS. At the very worst, I use it for my one current project and sell it for half price afterwards (altho I will probally keep it just to have as a backup). -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body