0

I wrote a program with c and compile it, I used the mingw.Now I need run the program on pic 18f2550!I've never worked with microcontroller.What should I do?

  • I personnally use the MPLABX platform and C18 (LITE version). See http://stackoverflow.com/questions/2185221/free-pic-c-compiler and http://www.microchip.com/pagehandler/en-us/family/mplabx/ and http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en534868 and a Pickit2 (now 3) programmer – francis Jan 12 '14 at 17:49

1 Answers1

0

First, you can't run the object file you have directly on your PIC. Your PC and microcontroller don't have the same architecture.

So you need to compile your code with the right compiler. I advise you to install MPLAB for free here : https://www.microchip.com/pagehandler/en_us/devtools/mplabxc/

The IDE comes with the great compiler.

Also, you must have a JTAG programmer to put your firmware onto the PIC...

  • Maybe a better link to download the IDE directly.. And not the compiler http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en019469&part=SW007002 – Cyril Fougeray Jan 12 '14 at 17:30
  • Can I use c code in MPLAB?is it similar with gcc?i first use Mikroc but i can't compile my code. – user3161225 Jan 12 '14 at 17:35
  • Yes you can. I looked for your PIC in MPLAB and you will need C18 compiler. Create a project using the wizard... I personnally don't have C18 compiler. If you don't, you can find it here : http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en010014&redirects=c18 Put .exe file in Program Files/Microchip/MPLAB C18/ and look for them with the wizard.. – Cyril Fougeray Jan 12 '14 at 17:45
  • C18 compiler is enough?i don't need anything?like header,library or any application? – user3161225 Jan 12 '14 at 18:02