Jump to content




Recent Status Updates

  • Photo
      18 Aug
    KodeKool

    When faced with a wall of errors and no hope to fix them, remember the following "Programs always do what you tell them to, and seldom what you want them to, but eventually you'll run out of things that can go wrong and it'll just work. and that's the secret to good programming."

    Show comments (2)
  • Photo
      11 Aug
    Error

    Should I be practicing programming every day? I feel if I don't, I'll get instantly rusty or something.

    Show comments (4)
View All Updates

Developed by Kemal Taskin
Photo
- - - - -

how to convert C code to HEX file


  • Please log in to reply
6 replies to this topic

#1 fysl

fysl

    CC Lurker

  • Just Joined
  • Pip
  • 4 posts

Posted 24 October 2008 - 10:01 PM

hi there, i wanna ask if anybody know what software used to convert C codes to HEX file and how to do it....Please help me though..i'm new in these thing..Plus its urgent thou..
  • 0

#2 dcs

dcs

    CC Devotee

  • Just Joined
  • PipPipPipPipPipPip
  • 730 posts

Posted 24 October 2008 - 10:38 PM

Take a breath in all the urgency and try to ask a better question, please. I might assume you are asking about a compiler, or possibly about a week one assignment. That leaves a bit of a gap.
  • 0

#3 fysl

fysl

    CC Lurker

  • Just Joined
  • Pip
  • 4 posts

Posted 24 October 2008 - 11:38 PM

ok..see here...i 've been writing a C language codes to burn into my pic project..
to burn this program, i found a software called PICKit2...
but to do so, i have to use HEX files only...
so,i'm trying to find a compiler/program that can help change from C codes to HEX files(my friends say there a program to change from C to HEX..)..
that is my problem....could you help me with this??
  • 0

#4 Termana

Termana

    CC Devotee

  • Just Joined
  • PipPipPipPipPipPip
  • 971 posts

Posted 25 October 2008 - 02:32 AM

By HEX do you by chance mean you want the C code turned into assembly?
  • 0

#5 fysl

fysl

    CC Lurker

  • Just Joined
  • Pip
  • 4 posts

Posted 25 October 2008 - 03:12 AM

just to let u know.. i've already found the answer for my problem...
thanks 4 every1 try to help me..
thanks guys..:)
  • 0

#6 dcs

dcs

    CC Devotee

  • Just Joined
  • PipPipPipPipPipPip
  • 730 posts

Posted 25 October 2008 - 07:38 AM

ok..see here...i 've been writing a C language codes to burn into my pic project..
to burn this program, i found a software called PICKit2...
but to do so, i have to use HEX files only...
so,i'm trying to find a compiler/program that can help change from C codes to HEX files(my friends say there a program to change from C to HEX..)..
that is my problem....could you help me with this??

Much clearer -- you had me at PIC. :P

just to let u know.. i've already found the answer for my problem...
thanks 4 every1 try to help me..
thanks guys..:)

Considering folks who may be curious or later on search and find this thread, perhaps you could be so kind as to mention the hex translator used for the PIC system to translate the linked executable into a downloadable hex file used for programming the device.
  • 0

#7 fysl

fysl

    CC Lurker

  • Just Joined
  • Pip
  • 4 posts

Posted 25 October 2008 - 04:39 PM

Considering folks who may be curious or later on search and find this thread, perhaps you could be so kind as to mention the hex translator used for the PIC system to translate the linked executable into a downloadable hex file used for programming the device.

sure:):)..

Anyway, what you're looking for is a C compiler. I recommend SourceBoost BoostC. The demo is only code size/RAM limited - works for all supported PICs. And when you hit the limits of the demo, a full license for the compiler is only about $75! Compare with C18's price of ~$500 and PICC's price of ~$1000. It's a no brainer! Better yet, BoostC comes with both 16F (supports some 12F also) and 18F compilers.


Anyway, to program a chip you install the compiler, being sure that it gets integrated into MPLAB properly. Then start MPLAB and run the Project Wizard. Make a new project for your chip and select the compiler you just installed as the toolsuite. Add the necessary files to the project to suit your compiler (BoostC wants the appropriate lib file added) and also add the source file (put both the source and any associated header files in the project dir first).

Select your programmer (assuming it's MPLAB compatible) and compile. Then program the chip. If your programmer is not MPLAB compatible you may have to run a different program to program the chip. The hex file will be in the project directory you created before compiling.


So that what i must do..
  • 0