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.

MPLAB Problem !!!!!

Status
Not open for further replies.

Mike_uk

New Member
Hello all,

Is it possible to import a .hex file into MPLAB and then simulate the program using MPLAB SIM? I have created a project with the required PIC selected (16F648A) and I am trying to simulate a pre compiled piece of code. I have managed to import the .hex file and can view the program memory (and therefore the assembler). If I then try to simulate it an error appears saying I have no source file, which of course I don’t, is there any way of doing this?

Mike
 
The only way I know to do this is to use a disassembler to convert it back to an asm file. Nigel has a rather good disassembler.

Mike.
 
Hello all,

Is it possible to import a .hex file into MPLAB and then simulate the program using MPLAB SIM? I have created a project with the required PIC selected (16F648A) and I am trying to simulate a pre compiled piece of code. I have managed to import the .hex file and can view the program memory (and therefore the assembler). If I then try to simulate it an error appears saying I have no source file, which of course I don’t, is there any way of doing this?

Mike

It works for me to import the .hex file (import under the File pulldown) then view the program memory (under the View pulldown) and finally select MPLAB Sim as the debugger (under the Debugger pulldown). Then you can step through the code and observe the registers and so on.

Mike
 
Thanks for the advice guys, it appears my mistake was to try to import the file in a new project. As mike50 says, if you just import the file and then select MPLAB sim it works fine.

Cheers

Mike
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top