valveone Posted November 3, 2010 Report Share Posted November 3, 2010 Hi Midiboxers - this is my first post. Sadly, it is a question! My setup: I'm running MIOS 1.9G on a PIC18F6485. I have a generic LCD connected to the core. I have connected LEDs w/current limiting Rs to J5. I have uploaded J5_dout_v1e as a test program. I'm using a custom script to send midi messages from my PC (winXP Pro) through a Tascam US144 usb midi interface. I have confirmed valid midi messages using MidiOx, so I "know" that I'm sending valid instructions. My 1st problem: I have confirmed proper J5 operation of note-on and note-off messages *except for RA0 (pin2)*. I have confirmed with a DVM that RA0 does NOT change state. RA0 is always low, at ~40mV and a bit noisier than, say, RA1 in the low state, which is about 10mV. The LCD indicates that RA0 is changing state (the display changes from "0" to "*") I am guessing that the TRIS PORT or LAT registers for portA are not set correctly, but I don't know where to start to correct this. I can read a data sheet, and program assembly for PICs in simpler apps, but the level of complexity of the MIOS structure has me confused. Can anyone help? My 2nd problem: J5_dout_v1e does not respond to CC 120 (All sounds off) or CC 123 (all notes off) messages or the reset (status = 255) message. Is this normal? I'd like to be able to turn all the LEDs off with one button push. Thanks in advance. You rule. Peace. Valveone Quote Link to comment Share on other sites More sharing options...
valveone Posted November 4, 2010 Author Report Share Posted November 4, 2010 UPDATE - PROBLEM 1 SOLVED Ok, so I tried to dig in and find out how all this works, and I figured it out. Here's what I found. 1. I realized that the J5_dout main.asm application is not executable code - it is only a function set that MIOS calls. I know that may seem obvious, but for a while I couldn't figure why the code I was adding to troubleshoot wasn't executing. I'm new. So that delayed my figuring things out. 2. Modified code is attached. 3. The J5_IO_Init function looks like it calculates the TRISA values from a value that MIOS passes to J5_IO_Init via the W register, so I guess there's an error, but I'm not sure about the value in W when J5_IO_Init is called. 4. So does anybody know how to make it listen to "all notes off" messages? Thanks again. Valveone Quote Link to comment Share on other sites More sharing options...
valveone Posted November 4, 2010 Author Report Share Posted November 4, 2010 OK, the file attachment didn't work the first time. How about now?patchRA0.txt Quote Link to comment Share on other sites More sharing options...
seppoman Posted November 7, 2010 Report Share Posted November 7, 2010 1. I realized that the J5_dout main.asm application is not executable code - it is only a function set that MIOS calls. well the main.asm is part of the source code of this J5 DOUT example application. To apply any changes here, you'll need to compile the project in order to get your changes into the main.hex file you upload. S Quote Link to comment Share on other sites More sharing options...
valveone Posted November 8, 2010 Author Report Share Posted November 8, 2010 (edited) well the main.asm is part of the source code of this J5 DOUT example application. To apply any changes here, you'll need to compile the project in order to get your changes into the main.hex file you upload. S Hi Seppoman, Thanks for the reply! I should have phrased it differently. What I meant was that I initially put my patch code *outside* the function calls, thinking that main.asm was executed line by line during operation. But the contents of main.asm are all functions that get called from somewhere else, so to get my code patch to work, I had to put it *inside* the function call. It was a big revelation to me because I don't have much experience with these object-module style structures (I've only done single file programs up to this point). So I figured I would post it in case there are other people who look at the hundreds of files in MIOS and get confused. Fun stuff. BTW, any idea which files I should look at to make J5_dout respond to "all notes off" controller changes? Thanks again. Valveone Edited November 8, 2010 by valveone Quote Link to comment Share on other sites More sharing options...
TK. Posted November 14, 2010 Report Share Posted November 14, 2010 In USER_MPROC_NotifyReceivedEvent you could check if the CC has been received and set all J5 outputs to 0 in this case. It might be easier for you to implement this in C Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.