On Sun, 30 Dec 2001, Mark Newland wrote: > I can't speak for others but one of the main things I am looking at is NOT > learning 4+ versions of 'C'. I want to eventually learn 'C' so I can do some > programming for the palm pilot (take advantage of the IrDA port). I may also > want to learn some 'C' (maybe visual 'C') for the desktop environment (maybe do > IrDA programming there too or some test routines). Maybe even be able to do some > 'C' one day in the future for Linux. I know that these 3 versions of 'C' are not > going to be compatible with each other but they are at least simular (I least I > think they are). What I don't want is to learn a 'C' language for the PIC that > is dis-simular to the other 3. > > >From what I understand, Hi-Tech would be more simular to these others than CCS > would be (at least out of the box). Your right in that I don't have to use the > built in functions of CCS but now a question based on that. > > 1) Am I to assume that if I don't use the built-in functions, I would have to > write the functions myself from scratch or could I truely just have a creative > set of defines and macros? Hmmm... I never use macros, personally... but from the looks of it you could do most of the "setup_this_register()" type functions as macros quite easily. Some of the more complex functions I guess could be done either way. > 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. > 3) If I don't have to write functions for CCS to match the functions in Hi-Tech > 'C', why is Hi-Tech still in business at the outrages prices they have? Dunno. Why is Acura still in business selling overpriced Hondas? I'd say probably a mixture of personal preference, a different approach that some people prefer, and possibly a little bit of "best tool = most expensive tool" thinking. Hi-Tech also seems to at least give the impression of having their act together a little better when releasing new versions... CCS seems to be run by programmers, which has its good and bad points. > I agree that CCS is probally the best compiler in it's price range and if I > wasn't trying to compare it with other 'C' packages that I would have to learn, I > would probally buy it. The way I see it right now is that it comes down to a > simple "cost of the libraries" decision. The question of what is worth more to > me, good compiler with pre-written libraries or cheaper (but still good) compiler > without the libraries. 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. I'm no expert on C or C compilers, as I have said before. I'm not sure what the advantages are of having the libraries compiled separately and linked by a linker... have never used a PIC compiler that did that, frankly. I just #include the libraries I need and compile, which is the same thing I do with GCC. It's true that some of the built-in functions are actually built in, not in a library, and I don't have access to the source for those... but if I find one I don't like, I can always write my own and not use CCS'. I have looked at the generated .ASM code for about all of them and have yet to find one I thought I could do better, so it hasn't been an issue for me. I've heard the library & linker thing before... others have pointed out that CCS doesn't have a linker (it does, it's just not separate so I don't have to mess with it). My car doesn't have a hand crank for starting either, I haven't missed it so far. I also like letting the compiler worry about where to put variables and such. But then again I'm someone who hasn't got a CS degree or a formal programming education, maybe I was just never taught to care as much about the process of how the code gets generated as I do about just writing the code. Perhaps if I were taught the internals of compiler design on larger systems I might care more about the differences. 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. The last project I did involved extensive user interaction, and a less-useful printf() function would have killed me for sure. Of course that would not have been an issue for some people. I also *really* like the fact that unused functions are simply not compiled with CCS - so if I use only one function from a library, I get only the code for that function and not the whole library. If I understand correctly, this is not the case with some other compilers, using one function from math.c would get the whole library dropped into my code. That would be a killer for some of my projects. > 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-) Dale -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body