How to convert an ASM file to a HEX file for midibox applications

I had built a Midibox seq v3 and got it working just by using the default hex file but sooner or later you’ll have to produce a HEX file yourself from the provided ASM file.

This caused me no end of problems and took hours to find out how to do it. All thanks to someone on the midibox forum who spent ages over two days replying to messages about my multiple failed attempts and giving me encouragement after I had given up.

Googling, usually the first thing I do when I’m stuck, lead me to use MPLAB I found it hugely complicated and trying to find answers to the many questions lead me round in circles, I tried downloading older versions of the program as instructions and YouTube videos were shown for those versions but to no avail. I couldn’t get anything to work.

I tried reading the instructions on the midibox site but as brilliant as the whole concept and the projects are I’ve found trying to find exactly how things are done and in what order bewildering. I seem to end up going round and round in circles again so even if the correct information is there exactly how to achieve the end result remained beyond me.

The CMD functions

Once I had got the correct programs installed the main problem I encountered was with the things you had to type in, it’s like the CMD screen in the Windows operating systems, I’ve always had problems with it when following instructions, usually because the instructions are specific to peoples drives and I’ve found you need an understanding that I’ve struggled with. Following instructions exactly won’t always work as you need to interpret them to your system.

So what exactly do you have to do?

First you need to download two programs from the midibox pages. They are

MSYS and GNU PIC UTILITIES

When you install MSYS, towards the end of the installation a Dos type screen will ask you if you want to proceed with the post install. You need to type n and then enter.

For GNU PIC UTILITIES you need to install the full option.

Editing the ASM file

For me this was the easy bit. I had built the midibox midi to cv converter with the AOUT NG and unfortunately it wasn’t working, checking the hardware didn’t help and the display was showing menus indicating that it was halfway there and the buttons and menus were all there the only thing was there was no control voltage outputs so I suspected the actual AOUT NG board. One last check and I realised there were no gate outputs. As these came from the midibox core board something else was the problem.

Upon further reading I realised that I had to change the ASM file for the MIDIBOX CV. This was simply a case of changing one digit in the text file from a 1 to a 3, this was done with WordPad and then saved.

The next part is something I’ve never been comfortable with, using command prompts. I’m afraid I don’t fully understand switching file directories, were the spaces are supposed to go and such like half the commands don’t seem to work for me. Luckily the help from the forum identified an easy method for me so I’m just sticking to that.

The big mistake that I was making was that I didn’t realise that you couldn’t just put the ASM file and convert it to a HEX, you have to have all the associated files so I was getting nowhere.

Just get the unrared folder with all the files in, edit the ASM with WordPad and copy the whole file to the C drive, not inside anything else. Then rename the folder CV.

I deleted the HEX file that was already in the folder to check that I was actually generating a new one.

Then I opened up MSYS by clicking on the desktop icon which opens up the scary black command prompt screen and typed the command

cd C:CV

make

This then did the magic bit that I was unable to do for about two days. The new HEX file appeared and after loading it into my midibox CV I ended up with a fully working unit. That’s all that was wrong the default ASM file needed a digit changing to make the software work with the AOUT NG board.

Thanks again for the help from the midibox forum for helping me get to this stage and I hope that my writing it from the point of view of a complete beginner helps someone else to achieve what appears to be a simple task, but only if you know what you’re doing.