Electronics > Microcontrollers

MPLAB X, PIC18F2420 AND MICROCHIP C COMPILER?

(1/2) > >>

kolbep:
Hi All.
It has been some time since I did some Pic'ing.
I used to use MPLAB (The Version just before X), Microchip C18 Compiler, and my 18f2420's.
I also used the libraries for the C18 Compiler

Now I have put on MPLAB X, and want to start new projects from scratch. Does anybody know if the XC8 Compiler has the same libraries, or should I just put C18 on again, and use that?

Thanks
Peter

mamalala:
Better stay with C18. The XC8 generates extremely lousy code in the free version. You might also want to check SDCC, which also produces rather decent code and has some advantages over C18. But going with SDCC means you have to rework the libraries you already have a little bit.

Greetings,

Chris

kolbep:
Thanks.
I am sticking to C18. The change to Mplab X has confused me enough as it is.

Just another question, has anybody used the XLCD Library by Microchip for a 16x2 LCD with Data on Port C, and RA1-3 for the control lines.
I have been trying the whole day so far. It seems still to be doing something to PortB instead of the LED's on PortC (for debugging) doing what they are supposed to do.

I can get the LCD to work if I do my own code (after wasting about 3 hours because I had the LCD plugged the wrong way into the dev board - it was giving black squares, so I thought it was ok). but I thought if the lib works, it would be easier.


So again, do you all use the lib, or rather code your own external LCD driver

Thanks
Peter

JVR:
For the LCD not working, follow the defines for the data port.  IIRC there was a problem there somewhere. The lib just defaulted to some port, regardless of the setting

poorchava:
free version of XC8 is only recommended when u need to write a non time-critical code and have plenty of flash space to waste. It is kinda user-friendly, especially when compared to C18, but if u need any tight coding, you have to go _asm or buy the commercial licence.

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod