the “how to connect 16 LED rings to a DOUT4” example shows how to connect 16 X 11 cathodes to the first 2 shift registers and 11 X 16 anodes to the 3rd and 4th shift registers.
now i have 4 LED rings and i ve connected 4 X 11 cathodes to the 1st SR and 11 x 4 anodes to SR number 2 and number 3
so i used only 3 shift register and here is my main.asm code about the LED rings
#define LEDRINGS_SR_ENC1_16_CATHODES_1 1 ; 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 2 ; first shift register with anodes of the first 16 LED rings
#define LEDRINGS_SR_ENC1_16_ANODES_2 3 ; 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
will that work? i prototyped a custom dout double layer PCB with LED rings on it and i can t be sure if fails (cause it doesn t work for the moment) because of software or hardware problems.
SR 1 2 and 3 are connected to the ledrings, while SR 4 to the buttons
if i cut the traces on the pcb and solder 2 cables/bridges i can change it like this: SR 1 3 and 4 to the ledrings and SR 2 to the buttons.In this way the ledrings will be connected as in the original MB64e except for the SR 2 which should be connected to ledrings 9-16.
Since i am going to do a “dirty” job on the pcb i d like to receive some comment or advice before going on, thanks
hasn t anybody used less than 9 ledrings on a MB64e project with only 3 SRs ?
#define LEDRINGS_SR_ENC1_16_CATHODES_1 1 ; first shift register with cathodes of the first 16 LED rings
#define LEDRINGS_SR_ENC1_16_CATHODES_2 1 ; second shift register with cathodes of the first 16 LED rings
#define LEDRINGS_SR_ENC1_16_ANODES_1 2 ; first shift register with anodes of the first 16 LED rings
#define LEDRINGS_SR_ENC1_16_ANODES_2 3 ; second shift register with anodes of the first 16 LED rings
in this case all the leds will light up while with code like this
#define LEDRINGS_SR_ENC1_16_CATHODES_1 1 ; 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 2 ; first shift register with anodes of the first 16 LED rings
#define LEDRINGS_SR_ENC1_16_ANODES_2 3 ; second shift register with anodes of the first 16 LED rings
no led will light up
i have to admit i am completely lost and dunno if i have to modify the mb64e_ledrings.inc and that scares me cause i can t understand a line in it!!
so far led ring #1 will work ok but the other 3 shows problems: leds not so bright or getting darker o brighter as there are more or less leds on.
If i use the dout_enc example i can see that all leds on position number 2,7,8,9,11 (on the four led rings) are not working while the rest works ok.
I searched for bad solder joints, vias etc but i can t figure out what s wrong.
I tried to apply some current to the not-working leds and they didn t light up unless i desoldered them from the pcb, that sounds like a shortcut! is it possible that the SRs are shortcutting the cathodes?
My question is, being the first time i work with led rings: what is the best way to debug led rings trouble? any idea?
Simone, I learned you have test all you can before soldering. I am buying parts in big local store but one time they sold me few nonworking pushbutons. They felt OK, but make connection only if you press them really hard. I found that after I solder them onto PCB.
So, no matter is it Conrad or some other reseller you cant be sure parts are OK unless you test them. I dont belive that case is for all electronics, but can be case for cheap pasive/mechanical parts.
so now all the ledrings are working and i can trigger them if i send some MIDI from MiosStudio for example .. but only 2 of the encoders are actually triggering 2 ledrings while the other 2 ledrings are triggered by other MIDI event.Now if i try to change the MIDI CC of the encoders to match the MIDI CC that triggers the ledrings it won t work anyway because also the MIDI CC of theledrigns will change.. ???
how am i supposed to fix this? why the first (and only) 4 encoders are not related to the first (and only) 4 ledrings? any idea?
i remember now that the pins of DIN SRs were not directly related to the DOUT SRs .. i mean that you can “say” to MIOS that the DIN SR #1 is related to the DOUT SR #3 (for example) but that doesn t mean that pin #6 and #7 of the DIN SR #1 are related to pin #6 and #7 of the DOUT SR #3.. as far as i remember it was something like
DIN - DOUT
0 - 0
1 - 1
2 - 2
3 - 3
4 - 7
5 - 6
6 - 5
7 - 4
still i am not sure if this was the case and also if this can be the cause of my troubles!
to be more precise i have 4 encoders connected to the DIN SR #1 but only the 2 encoders conencted to pins # 4,5 and 6,7 are triggering 2 ledrings while the other 2 encoders connected to pins #0,1 and 2,3 are working properly but not triggering ledrings, i can say that all ledrings are working ok because i can trigger them from an external MIDI input..
MRE we need to laugh a little when hard times come … better than making hara-kiri with a 30 watts Weller iron..
so i ve found the little bug and … surprise surprise … the error was mine: somehow the cathodes lines were connected to D2 D3 D4 D5 instead of D0 D1 D2 D3 so (since i had 4 pins of the DIN SR#3 free, without use) i decided to use encoders on DIN SR1 pins 4,5,6,7 and DIN SR2 0,1,2,3 leaving DIN SR1 pins 0,1,2,3 free.