-------------------------------------------------- From: "David Duffy (AVD)" Sent: Wednesday, August 11, 2010 1:33 AM To: "Microcontroller discussion list - Public." Subject: Re: [PIC] 18F45K20 newbie help > On 11/08/2010 9:20 AM, Oli Glaser wrote: >> From: "David Duffy (AVD)" >> >>> I should really get into C programming. I actually program in Delphi >>> (think "visual pascal") daily, but C seems to do my head in every time = I >>> look at it. >>> >> I understand that, but once you get past a certain point it makes life a= =20 >> lot >> easier and speeds things up. I find for most projects C will do fine,=20 >> with >> the larger flash in PIC18s program size is much less of a problem and fo= r >> optimisation assembly code can be linked (one reason to get the hang of >> linker scripts/ relocatable mode, stack, argument passing etc) I learnt = a >> lot about the architecture when doing this kind of thing. >> > > Thanks Oli. Can you recommend a C compiler / environment? It doesn't > have to be free. > David... The one that springs to mind first for PIC18 is Microchip C18. My experienc= e=20 of it is very good - it's now pretty solid and bug free, and seems to do=20 very well optimising and keeping the program size down, plus it has lots of= =20 useful libraries available. You get a 60 day trial with full optimisation=20 features etc, then they are turned off but you can still use it. Price is=20 $495 for full version. Hi-tech C is available for all PICs in 4 separate flavours: for PIC10/12/16= ,=20 PIC18, PIC32 and finally one for PIC24 and dsPIC. I have used the 10/12/16= =20 version and the also the 18 version - I think they also a very good=20 compilers, the version for PIC18 *seems to* produces smaller code on averag= e=20 than Microchips C18, but *maybe* a little more buggy and harder to use,=20 although not in any significant way. However now that Microchip have taken= =20 over Hi-Tech it is likely to improve even more and you will get regular=20 updates/improvements for the foreseeable future. Comes with full trial=20 version for 45 days then turns into lite version with less optimisation.=20 Price is $1195 for PRO and $495 for standard version. Both the above are integrated into the MPLAB IDE. If you want to go really professional (but very expensive I hear) then ther= e=20 is the IAR PIC18 compiler with its own IDE. There is a trial version=20 available I think, but have never used this myself so not sure if there are= =20 any great benefits over the above two, especially if you are not writing=20 very large and complex stuff on a regular basis. Maybe someone else may hav= e=20 some input here.. Personally to start with I would give the C18 and Hi-Tech trial versions a= =20 go, and see which you like best, as you can use them straight from MPLAB an= d=20 use your PicKit3 to program/debug with (you may have both versions already= =20 installed depending on the options you selected when installing MPLAB).=20 Don't start the trial until you intend to use it a lot then you can plenty= =20 of practice with the full version in, and they are both still very useful=20 afterwards too for stuff where speed and size is not *hugely* important. Hope this helps a bit. =20 --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .