Too stupid to get ASM file into PIC with MPLAB X (Win7)

From circuitbending to homebrew stompboxes & synths, keep the DIY spirit alive!

Moderators: Joe., lisa, luketeaford, Kent

Post Reply
User avatar
sicpaul
Wiggling with Experience
Posts: 342
Joined: Thu Dec 22, 2011 9:28 am
Location: Berlin

Too stupid to get ASM file into PIC with MPLAB X (Win7)

Post by sicpaul » Wed Mar 25, 2020 2:46 pm

Dear folks,

after nearly one week of research, watching youtube, reading tutorials and of course the manual etc
i failed to get success loading an ASM file into MPLAB X IDE v5.00.

Seems like i am too stupid for that.
(I even do not know, what the correct name is for such a file, to get better searching results).

Electric Druid (Tom Wiltshire) published his Stompbox LFO code as HEX file and ASM file.
My guess ASM is assembler, it looks like.

My old Windows XP computer died (where i did my all my programming), so i installed MPLAB X IDE 5.00 to my Windows7(64).
I could manage (by using tutorials) to get a HEX file loaded into the MPLAB as a project.
It took me hours to find the reason, why my Pickit3 did not transfer the code. The "powering by Tool" switch was not set and it was a huzzle to find that switch in the MPLAB X IDE (on IPE it is much easier).
Now i am able to program my PICs. (Mark Fitzgreyve's 150LFO, new code for Hexinverter CV2MIDI and old EDruid TabLFO worked well).
;)

But how to prepare the code text of an ASM file to put it into a MPLAB project, for making small changes (changing order of waveform adressed by pot and alike)?. I did such things with my old computer but now I am totally stuck.
It is not the question how to manipulate the ASM text 8the program code), the question is how do i open the code text with MPLAB IDE to put the code into my PIC chip. :hmm:

Maybe one could give me a step by step advice to get the copyed code (let us take the STOMPBOX ASM code) into a valid MPLAB project.
Or maybe somone can provide a link to an youtube video explaining exactly this ...

By the way, if you know how to get a HEX file out of the ASM i am pleased to know that as well :hihi:

Many thanks for help in advice

User avatar
fitzgreyve
Wiggling with Experience
Posts: 481
Joined: Mon Jul 15, 2013 4:49 am
Location: UK

Re: Too stupid to get ASM file into PIC with MPLAB X (Win7)

Post by fitzgreyve » Thu Mar 26, 2020 10:12 am

MPLAB-X is not as easy to use as earlier versions. It is trying to be more professional by wanting to assign everything to a "project".

I assume you already found how to import a hex or "prebuilt" file:
screen1.jpg
To set up a project (sorry, english version):
Select menu "file/new project" (this starts the project wizard)

in the wizard:
select "microchip embedded" and "standalone project": then "next":
2.jpg
Select your PIC device.
3.jpg
Skip the "select header" step.

Select your programmer type:
4.jpg
for "Select Compiler", select "mpasm":
5.jpg
Give the project a name, and select a directory location:
6.jpg
The project is now set up, you now need to put the ASM file in the project.
right click on the project name (left hand side, in this case "ExampleProject"), then select "add existing item". Select the ASM file.
(MPLAB should recognise this as an ASM file and add it under "source files"):
7b.jpg
You can now do a test compile:
menu "production" / "build main project"

if all is well and no errors, you can connect you programmer and program the PIC:
8.jpg
If you have already programmed from a HEX file, I assume you know how to set the programmer to power the PIC during programming (if required).

Hope this helps.
You do not have the required permissions to view the files attached to this post.
Under developement:
- "Muse"
---------------------------------------
https://fitzgreyve2.blogspot.com/

User avatar
sicpaul
Wiggling with Experience
Posts: 342
Joined: Thu Dec 22, 2011 9:28 am
Location: Berlin

Post by sicpaul » Thu Mar 26, 2020 4:13 pm

Many many thanks, Mark!!!
I owe you a beer, you made my day.

It was the right klick on source file to import the asm files, which coursed me to fail before.

Now it is working well (after setting the power during programming).

For those, who may have similar problems and don't know how to turn power on:
1. Go to PRODUCTION menu, select "Set Project Configuration" -> "Customize..."
2. In the left row (overwritten with Categories) klick on the programmer (in my case it is PICKit3)
3. Now you see in the middle row "Option Categories" with selected "Memories to Program". Select "Power" instead.
4. Set the Programming Voltage matching the PIC and mark the field "Power Target circuit from PICKit3".

Again thanks for help.

Post Reply

Return to “Music Tech DIY”