cimo Posted August 30, 2006 Report Share Posted August 30, 2006 hi alli ve got a midibox with12 encoders32 buttons (12 backlit)4 faders4 pots1 joystick (analog)no lcd no menueverything works wonderfully with a slightly modified mb64e but there is no way i can thoseleds light upi used the test example to check that the dout2 and the leds are ok and they arei tried everything i could imagine but with no resultobviously i am missing something: where should i modify the code to link the leds to the buttons? somewhere in the main.asm it says that the first 4 dout are reserved to the ledrings by default but i have no ledrings enabledany help is appreciatedthankssimone Quote Link to comment Share on other sites More sharing options...
KealyPaul Posted September 2, 2006 Report Share Posted September 2, 2006 Let me know when you have a solution.At present, I am just beginning my organ MIDIfication, and have a plan that could benefit from your design to make this work:I'm wiring the stoptabs on my horseshoe curve to send MIDI events to the MidiTzer. They work OK for individual stop selection up/down ... duh, I think I can understand which stops are on and which are off.But I wonder, since there are many piston buttons that can be adjusted for pre-configured registrations that will not be displayed by up-down toggle positions (SAMS that are actuated on a true theatre pipe organ) ...I'd like to install an LED above every stop tab tongue to signify which are selected as "on" when a particular piston has been selected.Since MidiTzer does not operate true SAMS, I wonder if there's a way to notify an LED that resides above each stoptab to signify it has been chosen as a part of the current registered piston selection.These would not be displayed when the stop tabs are toggled on or off (their up/down positions are visual enough to indicate they have been selected), but rather by the piston buttons engaged to signify which individual stops comprise the particular registration that otherwise would not be visible.Any ideas?pk Quote Link to comment Share on other sites More sharing options...
TK. Posted September 3, 2006 Report Share Posted September 3, 2006 Cimo: you don't need to modify the code, you just only need to use the mk_syx script, or Serge's Editor to send a new setup where the LEDs are mapped to incoming MIDI events. There are a number of different mapping possibilities:################################################################################# LED Map: assignes the LED shift registers to the Button Shift# registers or special values# Currently following values are supported:# 0 Default Setting (see Map below)# 1 Button Shift Register 1 (Button ID #1-#8)# 2 Button Shift Register 2 (Button ID #9-#16)# 3 Button Shift Register 3 (F1-F4 and Navigation Buttons: ID #17-#24)# 4 Button Shift Register 4 (Button ID #25-#32)# 5 Button Shift Register 5 (Button ID #33-#40)# 6 Button Shift Register 6 (Button ID #41-#48)# 7 Button Shift Register 7 (Button ID #49-#56)# 8 Button Shift Register 8 (Button ID #57-#64)# 9 Selected Group (1 of 8)# 10 Selected Bank (1 of 8)# 11-15 reserved# 16 MIDI Status received for Button ID #1-#8# 17 MIDI Status received for Button ID #9-#16# 18 MIDI Status received for Button ID #17-#24# 19 MIDI Status received for Button ID #25-#32# 20 MIDI Status received for Button ID #33-#40# 21 MIDI Status received for Button ID #41-#48# 22 MIDI Status received for Button ID #49-#56# 23 MIDI Status received for Button ID #57-#64# 24-31 reserved################################################################################[LED_MAP] LED_SR1 = 1 # (Button ID #1-#8) LED_SR2 = 2 # (Button ID #9-#16) LED_SR3 = 3 # (F1-F4 and Navigation Buttons: ID #17-#24) LED_SR4 = 4 # (Button ID #57-#64) LED_SR5 = 5 # (Button ID #25-#32) LED_SR6 = 6 # (Button ID #33-#40) LED_SR7 = 7 # (Button ID #41-#48) LED_SR8 = 8 # (Button ID #49-#56)[/code]pk: I don't know the MidiTizer so much, but if it sends any MIDI events in order to notify the states, then you only need to select the right mapping value in order to forward this information to LEDsBest Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
cimo Posted September 3, 2006 Author Report Share Posted September 3, 2006 hithanks for the help out therebut maybe i didn t make it clear enough that i am stuck at a earlier point: i can t make those leds light up with my customised MB64e applicationi see some flickering while i move pots and that means that ledrings are still enabled: but i have disabled them in main.asmi have encoders on the first 3 DINbuttons on DIN 4 5 6 7 leds on DOUT 1 2 (they are backlit buttons on DIN 4 and 5)and 12 potseverything just works fine but i can t link those leds to the buttons (i am sure 100% there is no hardware/connection problem)i was thinking about moving to a mbhp_lc since i am going to use it with Ableton Live5 but i want to learn how to setup the leds on MB64ei also "decided2 today to upload a corrupted application and now the PIC has just gone crazy i can t even upload MIOS anymore hop i can reburn and reset the poor thing, it s time to make my own burneranyway here a little extract from the main.asm#define LEDRINGS_SR_ENC1_16_CATHODES_1 0 ; first shift register with cathodes of the first 16 LED rings#define LEDRINGS_SR_ENC1_16_CATHODES_2 0 ; second shift register with cathodes of the first 16 LED rings#define LEDRINGS_SR_ENC1_16_ANODES_1 0 ; first shift register with anodes of the first 16 LED rings#define LEDRINGS_SR_ENC1_16_ANODES_2 0 ; second shift register with anodes of the first 16 LED rings #define LEDRINGS_SR_ENC17_32_CATHODES_1 0 ; first shift register with cathodes of the first 16 LED rings#define LEDRINGS_SR_ENC17_32_CATHODES_2 0 ; second shift register with cathodes of the first 16 LED rings#define LEDRINGS_SR_ENC17_32_ANODES_1 0 ; first shift register with anodes of the first 16 LED rings#define LEDRINGS_SR_ENC17_32_ANODES_2 0 ; second shift register with anodes of the first 16 LED rings#define LEDRINGS_SR_ENC33_48_CATHODES_1 0 ; first shift register with cathodes of the first 16 LED rings#define LEDRINGS_SR_ENC33_48_CATHODES_2 0 ; second shift register with cathodes of the first 16 LED rings#define LEDRINGS_SR_ENC33_48_ANODES_1 0 ; first shift register with anodes of the first 16 LED rings#define LEDRINGS_SR_ENC33_48_ANODES_2 0 ; second shift register with anodes of the first 16 LED rings;#define LEDRINGS_SR_ENC49_64_CATHODES_1 0 ; first shift register with cathodes of the first 16 LED rings#define LEDRINGS_SR_ENC49_64_CATHODES_2 0 ; second register with cathodes of the first 16 LED rings#define LEDRINGS_SR_ENC49_64_ANODES_1 0 ; first shift register with anodes of the first 16 LED rings#define LEDRINGS_SR_ENC49_64_ANODES_2 0 ; second shift register with anodes of the first 16 LED rings#define DEFAULT_DIN_SR_PIN_01_08 4#define DEFAULT_DIN_SR_PIN_09_16 5#define DEFAULT_DIN_SR_PIN_17_24 6#define DEFAULT_DIN_SR_PIN_25_32 7#define DEFAULT_DOUT_SR_PIN_01_08 1#define DEFAULT_DOUT_SR_PIN_09_16 2hey Paul i have to admit i don t have an idea of how those pistons look like and i just imagine your organ like a huge machine with a big smoking chimeney on top.;-)anyway good luck with your project !! Quote Link to comment Share on other sites More sharing options...
TK. Posted September 4, 2006 Report Share Posted September 4, 2006 It looks ok, maybe you compiled or selected the wrong .hex file?Which file date has the file you are uploading?Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
cimo Posted September 5, 2006 Author Report Share Posted September 5, 2006 as you can imagine i compiled and uploaded the same thing 100000 times and i am uploading the main.hex file and i compile it before and there are no errors .. i was wondering if there is any change in mb64e_leds.ini (i only changed the number of connected pins) i have to do .. i am just lost and i am sure i am lost in a glass of water (free translation from Italian) :-) cheers Quote Link to comment Share on other sites More sharing options...
TK. Posted September 5, 2006 Report Share Posted September 5, 2006 No, you don't need to change the code, you have to change the configuration, and upload it via SysExFor this we have the mk_syx script and - alternatively - Serge's Editor.See also my answer above.Look into the mk_syx package, file: pic18f/midibox64e.iniBest Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
cimo Posted September 6, 2006 Author Report Share Posted September 6, 2006 FIAT LUX !!!! .. that was it, thanks Thorsten i only need to resolder a few connections in order to link the proper leds to the buttons but it s all working now .. ... i am using those famous RJS backlit buttons and they are very nice buttons indeed but they are not good for triggering samples since they can easily double trigger or not trigger at all.I know there is a parameter for low quality buttons i will try with that but i can t consider low quality buttons something i paid about 4 euros !!!They are great for activating effects, solo, mute etc Thanks again to George and Thorsten for the support Simone Quote Link to comment Share on other sites More sharing options...
DavidBanner Posted September 6, 2006 Report Share Posted September 6, 2006 which type of buttons from RJS are you using? Quote Link to comment Share on other sites More sharing options...
cimo Posted September 6, 2006 Author Report Share Posted September 6, 2006 sp12 squared (12x12x8) blu leds ... i have to admit they are quite nice buttons .. but i will go for bigger self made buttons next time Quote Link to comment Share on other sites More sharing options...
TK. Posted September 6, 2006 Report Share Posted September 6, 2006 I think that the debouncing parameter will help, just insert following code below the USER_Init label in main.asm: movlw 8 call MIOS_SRIO_DebounceSet[/code](the spaces before the instructions are important)W/ MB64E this works only properly in conjunction with MIOS V1.9cBest Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
cimo Posted December 3, 2008 Author Report Share Posted December 3, 2008 what s your problem? debouncing or linking buttons to leds? Quote Link to comment Share on other sites More sharing options...
stryd_one Posted December 3, 2008 Report Share Posted December 3, 2008 Stentor, when a thread's this old, it might be best to PM the person first, rather than 'resurrect' the thread :) 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.