Welcome, Guest
Username: Password: Secret Key Remember me

TOPIC: Microchip XC compilers

Re: Microchip XC compilers 5 years 2 months ago #16706

  • Baldor
  • Baldor's Avatar
  • Offline
  • Expert Boarder
  • Posts: 135
  • Thanks received: 91
C18 and C30 are out of suport, and have been replaced by XC8, XC16 and XC32. (Formerly HITech).

Maybe is time to update the forums title to include those "new" compilers, no need to create new forums. (ie. "MPlab C18 & XC8" instead of "MPlab C18").

I'm compiling my current project with XC8, and the libraries are more ANSI C compliant than C18. I also plan to post all the source code here, and publishing it under C18 will be confusing.
Aprendiz de mucho, maestro de casi nada.

Re: Microchip XC compilers 5 years 2 months ago #14220

  • lespic
  • lespic's Avatar
  • Offline
  • Junior Boarder
  • Posts: 36
  • Thanks received: 35
I have not adventured into C for 8 bit mcu but read on other forums XC8 is not rated very well , I have been using XC16 since i started with PIC24's and C ( very bad C !) I get along with assembler for my PIC16F's currently coding a 16F1939 for a I2C display + 22 keypad back-back. agree with forum tweak please. I have a few XC16 questions........

Re: Microchip XC compilers 5 years 2 months ago #14221

  • jmessina
  • jmessina's Avatar
  • Offline
  • Senior Boarder
  • Posts: 44
  • Thanks received: 189
XC8 used to be the HI-TECH C compiler, which at one point was actually pretty good.

The free version of XC8 doesn't do any optimizations and produces some pretty inefficient code from what I've seen (but it is free). You need to pay money to get the optimized versions.

XC16 and XC32 are GCC-based.

Re: Microchip XC compilers 5 years 2 months ago #14222

  • MMcLaren
  • MMcLaren's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 13
  • Thanks received: 30
Could you make it a more generic "C" sub-forum (I often use the free/lite version of BoostC)?

Cheerful regards, Mike

Re: Microchip XC compilers 5 years 2 months ago #14225

  • lespic
  • lespic's Avatar
  • Offline
  • Junior Boarder
  • Posts: 36
  • Thanks received: 35
Baldor may I hijack your thread to ask a possibly silly MPLABX XC16 question ...

As I type code for setting individual register bits (uppercase) , like the screen shot example, the as I hit the . (period) a window pops up giving me the bit names, great just click and add a value, but then I have to change the upper case BITS. to lower case bits. before it will compile ? its annoying...

Attachments:

Re: Microchip XC compilers 5 years 2 months ago #14227

  • Baldor
  • Baldor's Avatar
  • Offline
  • Expert Boarder
  • Posts: 135
  • Thanks received: 91
I always type U1MODEbits. bits lowercase, and the list apears and works well (Doesn't change the lowercase bits to upercase. Using MPLABX with C18 or XC8.

A lot of times I don't use the bits window and type the desired bit away, as I'm looking at the datasheet while typing. (And yes, the compiler macros coincide with the name of the registers and register bits in the datasheets)

Of course, C is case sensitive.
Aprendiz de mucho, maestro de casi nada.
Time to create page: 0.251 seconds