Hacker News new | past | comments | ask | show | jobs | submit login

One detail of note: PIC32 is a modern microcontroller built up around a MIPS core instead of one of the older (oddball) 8- or 16-bit PIC cores. MIPS is much easier to support in a compiler than the legacy PIC instruction set.

It is certainly possible to make an 8-bit core based on RISC principles (ex: AVR), but the PIC wasn't. Classic PIC has a hard-earned reputation for awful compiler support.




> Classic PIC has a hard-earned reputation for awful compiler support

Luckily the assembly language is one of the nicest in existence.


Agree. My 4th year robotics course was 8-bit PIC assembly. They wouldn't let us use AVRs because they were too powerful.

Turns out that PIC assembly is super fun.


> Luckily the assembly language is one of the nicest in existence.

Ah, this I totally agree with. Brought back memories from my undergrad days, programming with PIC was a joy compared to AVR in assembly.


The Hi-Tec (sp?) Compiler was excellent on those parts. Microchip even recommended it over their own.

Those parts didnt support stack variables, so that compiler would analyze the call tree and essentially use global (fixed address) variables for locals, but it could reuse them in different functions.

Yes a pain for the compiler, but at least one did it really well.


Microchip bought HI-TECH a few years ago and rebranded the 8-bit PIC compiler as XC8 (and discontinued their own compiler).

It’s the only one of Microchip’s compilers that’s not GCC-based, which can be a pain. Also I remember at -O0, the generated code is just huge and inefficient.


> Classic PIC has a hard-earned reputation for awful compiler support.

Did it? I didn't realize.

Though I did find at least one bug in the code generation for the compiler we were using ~15 years ago... Something funny was happening with the generation of an if statement, don't remember the rest of the details.


It’s true.

They struggled with C8 or something, then they purchased HiTech C and renamed it XC8 (and 16). Then I think expanded it to the DSP33s and PIC32 which for some reason are drastically different. Then at some point they forced everything into MPLABX (netbeans) and Harmony code generation… it’s never been good.

I hate that I’ve never found anything I completely love.

They have niches though.


When I was coding for 16C71 all the C compilers were buggy. It's one reason never call them the good old days. We are so luck to have the tools we have today!


May I ask, what language you were using back then?


No OP, but I used C and asm. Hi-Tech c compiler. I had no issues with it. Very simple and straightforward to code the PIC chips. I forget how much I paid for it.


Good old C. I am moderately sure it was the MPLAB software, I remember we had several of their ICD JTAG units (the round ones). But it might have been Hitech.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: