Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

c code to hex file convert pic 16F676

Status
Not open for further replies.

elanshul

Junior Member level 2
Junior Member level 2
Joined
Apr 27, 2013
Messages
22
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,283
Location
Muzaffarnagar, Uttar Pradesh, India
Activity points
1,448
Dear All, i am new in microcontroller can any one change my c code to hex file thanks in advance. i will be highly obliged.
 

Attachments

  • Stabilizer.c.txt
    10.1 KB · Views: 269

convert the [text] file to hex? why?

or do you mean convert the C code to machine language?

is there a reason for it?
 

Your code is for Hi-Tech PICC Compiler. Download the lite version of the Compiler from htsoft.com or download the 45 day evaluation version of the Compiler which will work in Pro mode with out limitations for 45 days but will work in lite mode after 45 days. The only difference between lite and Pro modes is that lite version doesn't have code optimizations and the .hex file generated by lite version will be bigger than the one obtained using Pro mode.

Also download MPLAB 8.92 from microchip which is free software.
 

Dear all I am not familiar hardware language I am 0 about PIC programing I have only PICKIT 2 for writing hex file into PIC. I also have MPLAB 8.92 from microchip website but not aware how can I convert this c file to hex file. kindly help
 
Provide the link from where you got that code.
 

Dear Milan please find the screen shot as attached image 16f676.gif
 

If possible copy the url of that page from the address bar of the browser and past it in your post using tags. [URL] your url [/URL ]. Remo...piled the code. You might need that settings.
 

Attachments

  • PIC16F676 Stabilizer.rar
    100.9 KB · Views: 314
Last edited:

This is the 1st line in void main() function


Code C - [expand]
1
OSCCAL=_READ_OSCCAL_DATA();



and

Code C - [expand]
1
_READ_OSCCAL_DATA();

definition is missing. So you have to check the datasheet and set the bits of OSCCAL register as required for your project. Ask the code's author to provide full working code.
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top