How to convert c code to hex code for pic?

Thread Starter

new999

Joined Jan 18, 2016
12
Hello
I want to write code for pic and convert it to hex file as well. what software should i use? Also please tell me alternatives to proteus as demo version does not support PICs.
 
Hello
I want to write code for pic and convert it to hex file as well. what software should i use? Also please tell me alternatives to proteus as demo version does not support PICs.
Go to the microchip.com website. Look for the free software they offer to do just what you are asking.

And, you will have better answers here if you put your question in the proper sub-forum (this one is general electronics chat. You should ask the moderator to move the thread to Microcontroller thread

http://forum.allaboutcircuits.com/forums/embedded-systems-and-microcontrollers.17/

Just click the report button on the bottom of this post and say, please move to microcontrollers/embedded systems sub-forum.
 

Thread Starter

new999

Joined Jan 18, 2016
12
Thanks got the appropriate program named micro pro for pic . Also it would be great if you could help me out with this http://forum.allaboutcircuits.com/t...oblem-cant-figure-out-problem-proteus.120702/
Go to the microchip.com website. Look for the free software they offer to do just what you are asking.

And, you will have better answers here if you put your question in the proper sub-forum (this one is general electronics chat. You should ask the moderator to move the thread to Microcontroller thread

http://forum.allaboutcircuits.com/forums/embedded-systems-and-microcontrollers.17/

Just click the report button on the bottom of this post and say, please move to microcontrollers/embedded systems sub-forum.
 

Stuntman

Joined Mar 28, 2011
222
As SDT stated, microchip has free software (the free version does have a few limitations) to write either C or Assembly for the PIC controller. The code can also be exported to a hex format using that program.

Proteus is a schematic capture program that also supports some mcu simulation. This would mean you could use proteus to simulate your code instead of putting it on a real mcu.

In short, you are asking about two very different tasks in your post. Writing for PIC, use MPLab, at least to get started. As for the PIC simulator, I'm not sure if anyone offers a freeware simulator, I believe you have to pay for that capability in Proteus.
 

JohnInTX

Joined Jun 26, 2012
4,787
I agree with the others. If you are using PIC, try MPLABX Integrated Development Environment and the free version of XC8 C compiler with a PICkit3 debugger/programmer. Most of us have it installed and can provide more help that way. Avoid 3rd party clones of the PK3.

MikroC is used by several members too (including me) and might be an alternative. I still prefer XC8 because there are no code size restrictions in the free mode and it has some internal advantages over MikroC as well. MikroC DOES have extensive library support for common devices (LCD, PWM etc) suitable for beginners and quickie projects but not so much for more complex programs.

Both MPLABX and MikroC provide a simulation function - MPLAB is way better IMO. You can step programs and see variables (including outputs) work in 'watch' windows. You don't get the fancy pictorial representation that you do in Proteus but it does the job. Proteus simulations sometimes don't have the fidelity you would want making transition to actual hardware problematic.

Finally, since you are just starting out, consider something from the PIC 18F or 16F1xxx (enhanced midrange) families. These have much better internal architectures, better IO, more memory etc. for virtually the same price.
 
Last edited:
Top