findbuddha Posted July 30, 2011 Report Share Posted July 30, 2011 TK, can you please check the schematic in mbhp_blm_map.pdf? In the extra row, buttons 9-16 have the LEDs mirrored in their groups of 4 with respect to the switches. To explain another way, on my PCB, if I push button 9, LED 12 will light, and vice versa. Also, could you please offer some guidance as to how I should modify the scalar app(MIOS32) to remap these? This PCB is 5x17 version of the full BLM16x16, just to use for buttons for a mixer section ie. mute, solo, arm etc. So I won't need the 'packed format' pattern matching, just toggling of specific LEDs on MIDI in and button push. I suspect I need to do my remapping in this function: if( note <= 0x0f ) { // BLM16x16 LEDs led_mod_ix = chn >> 2; led_row_ix = ((chn&3) << 1) + ((note >> 3) & 1); led_column_ix = note & 0x7; modify_led = 1; } else if( note == 0x40 ) { // extra column LEDs led_mod_ix = 4; led_row_ix = (chn&3) << 1; led_column_ix = chn >> 2; modify_led = 1; } else if( chn == 0 && note >= 0x60 && note <= 0x6f ) { // extra row LEDs led_mod_ix = 4; led_row_ix = 1 + ((note >> 1) & 6); led_column_ix = note & 3; modify_led = 1; } else if( chn == 0xf && note >= 0x60 && note <= 0x6f ) { // additional extra LEDs led_mod_ix = 4; led_row_ix = 1 + ((note >> 1) & 6); led_column_ix = 4 + (note & 3); modify_led = 1; } and also maybe in DIN_BLM_NotifyToggle depending on what MIDI feedback I can get Reaper to give me. Thanks :) Quote Link to comment Share on other sites More sharing options...
TK. Posted July 30, 2011 Report Share Posted July 30, 2011 This is very strange, because the LEDs and buttons should be connected to the same common lines (blue lines in the mbhp_blm_map.pdf file), accordingly there is no reason why the LEDs should be mirrored. Could I have a look into your PCB layout? Modification: // extra row LEDs led_mod_ix = 4; led_row_ix = 1 + ((note >> 1) & 6); led_column_ix = note & 3; if( note >= 0x68 ) led_column_ix ^= 3; // mirrror LEDs 9..12 and 13..16 modify_led = 1; [/code] Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
findbuddha Posted July 30, 2011 Author Report Share Posted July 30, 2011 TK, As far as I can tell from the schematic it's not the cathodes that are swapped but the LED anodes. (I think that is the correct terminology) Comparing extra row buttons 1-4 and 5-8 with 9-12 and 13-16, for eg. Switch 1, 5, 9, 13 -> I0 Red 1, 5 -> R0 Green 1, 5 -> G0 BUT: Red 9, 13 -> R3 Green 9, 13 -> G3 I've attached an image of my PCB which I think is consistent with the schematic. I'll have the full design files up on my wiki page once I've got this sorted. Also, I realised that for this PCB I'll need to mod the following section, as I don't have the full chain of BLM_SCALAR preceding the +X section. I'll have to have a think about it. // BLM16x16 LEDs led_mod_ix = chn >> 2; led_row_ix = ((chn&3) << 1) + ((note >> 3) & 1); led_column_ix = note & 0x7; modify_led = 1; Thanks heaps :) :flowers: Quote Link to comment Share on other sites More sharing options...
TK. Posted July 30, 2011 Report Share Posted July 30, 2011 Ah - now I got it, and corrected the schematic! I'm sorry that this mistake caused trouble at your side! :-/ Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
findbuddha Posted July 30, 2011 Author Report Share Posted July 30, 2011 No worries - thanks for all your hard work :) 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.