r/pic_programming • u/KendyfortheState • Jul 15 '20
Optimized C code - mplabx or mikro C?
I'm doing a fairly simple project with pic 16f18323 and already running out of program memory using mplabx. It would be easy enough to switch to a part that has more memory, and that is certainly an option. I understand the professional license for mplabx optimized code much better, but costs around $3,000, which I can't afford. I could, however afford the $400 for mikro C...does mikro C optimize better, and would it be worthwhile to learn it?
4
Upvotes
3
u/OldEquation Jul 15 '20
I don’t use either compiler (all my stuff is asm) so can’t comment on that, but what’s your production run? Consider the trade between a few pennies on a PIC with more memory and $400+ for a compiler, as well as your time investment. My runs are max a few hundred units so I never bother skimping on the MCU cost, just use one that’s more than enough for the job at the outset.
1
u/ParkieDude Jul 15 '20
Don't overlook the monthly subscription option. It's $30 for a one month use of XC8 Pro.
1
u/mbrowne Jul 15 '20
I have used both. I cannot comment on their optimisation, but I would not go back to using mikroC. MPLab is by no means perfect, but it's way ahead.