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: 369
  • delay.h
    1.3 KB · Views: 363
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.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…