Jump to content

Mios8 and custom program : is it possible?


Recommended Posts



I used a pic based Core to make a midi pedalboard. 

As I know how to use PIC micro controllers and that I needed very special features, I developed my own code (from scratch).


In order to be able to update my pedalboard software if needed, without having to open the enclosure each time, I thought implementing a boot loader.


Mios 8 is ready to use, with midi functionalities, and it could be a good solution...


Just One question :


Can I use it with my custom program or is it only working with Mios dedicated programs? 


All configuration are made by my program. It is fully standalone.

Therefore, after Mios procedure, my program must be loaded and executed as if Mios was not there...


Is it what it does?


Thank you for your help,



Link to comment
Share on other sites

Your software would have to run using the MIOS code that also includes the boot loader software, functions for Din & Dout and LCD functions.  The Midi code that decodes the Midi commands is also part of this MIOS code.  There is a skeleton code example that can be modified by you and compiled for your application needs.  It is located at http://svnmios.midibox.org/listing.php?repname=svn.mios&path=%2Ftrunk%2Fapps%2Ftemplates%2Fasm_skeleton%2F


Your code would have to work around all the code and variables used by MIOS.  This skeleton code does this for you.  I've used it for my Midi projects.

Link to comment
Share on other sites

This is what I wrote him via mail:


Hi Alexandre,

in order to use the bootloader, you've to locate the reset vector of your code to 0x0400, and the interrupt vector to 0x0408
At 0x0404 the value "0x4711" is expected.

       org     0x0400
       goto    Start
       dw      0x4711          ; magic number - if != 0x4711, the bootloader won't branch to 0x0400!
       org     0x0408
       goto    Irq

I'm not sure how this can be done in C, but I'm sure that you will find a way (google might help)

The bootloader itself doesn't use the EEPROM
The device ID is stored in the ID header instead, which is normally not used by an application.
The ID header should be all-zero (by default it's all-one)
If your PIC programmer doesn't allow to program the ID directly, you could use the program linked in "TEST SW2" from this page: http://www.ucapps.de/howto_debug_midi.html

In MIOS Studio you can upload new code the following way:
- open the .hex file
- push the "start" button
- reset (or power-cycle) your core

The query button won't work while your application is running because it expects a SysEx based communication with the PIC which is only implemented in MIOS.
However, the upload via power-cycling is already more comfortable than using a PIC programmer...

Best Regards, Thorsten.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...