Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Input program file in Intel Hex Format contains errors

Status
Not open for further replies.

fruitkiwi

New Member
Hi, Dear all,

I am trying to write a simple flashing led with MPLAB IDE X and test it on Oshonsoft PIC simulator IDE.
Although the code can be built in mplab, but when i load it into the simulator, it has the following error

"Input program file in Intel Hex Format contains errors.
Line number 11:invalid data byte in the record."

but when i remove the following line, and reload the hex , the file can be running in oslon soft,
"__CONFIG(FOSC_HS & WDTE_ON & PWRTE_OFF & BOREN_ON & LVP_ON & CPD_OFF & WRT_OFF & CP_OFF);"

as i would like to change the configuration bit to high speed oscillator (HS), so i need to modify the configuration bits , the default is not suitable.
May i know any solution for me to add the line in? i am interested to know about it.
I attach the led.c file for your references

Thank you.
 

Attachments

  • LED.c
    839 bytes · Views: 365
  • delay.h
    1.3 KB · Views: 360
hi,
Before you load the hex file into Oshonsoft, set the correct PIC type, then load the file, then change the Oshonsoft clock speed to your xtal frequency, using Options menu, then run the sim.
E
 
hi,
Before you load the hex file into Oshonsoft, set the correct PIC type, then load the file, then change the Oshonsoft clock speed to your xtal frequency, using Options menu, then run the sim.
E

Thanks guy for the helpful advice
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top