Jump to content

DOUT Matrix question


Marxon
 Share

Recommended Posts

Hi Midiboxers!
 
Thorsten's Midibox NG can be a little beast in terms of complexity for me ;)
It would be great if someone can help me.
 
I like to equip my Midibox NG with 16 8-segment led bars. 
Each bar should be controlled with a separate received CC event like this way:
CC value = 0 -> all bar segments off
CC value = 64 -> bar segment 1,2,3,4 on
CC value = 127 -> all bar segments on
 
Due to the conditions of my box, I decided to divide them into two 4x16 matrices (one column = 2x8-led bars)
Every matrix is driven by 3 DOUT-SRs.
Matrix 1
SR1 D7 - D0 are connected to the anodes of LED Bar 1, 3, 5, 7 (column 1-8)
SR2 D7 is connected to all cathodes of bar 1, 2 (row 1)
SR2 D6 is connected to all cathodes of bar 3, 4 (row 2)
SR2 D5 is connected to all cathodes of bar 5, 6 (row 3)
SR2 D4 is connected to all cathodes of bar 7, 8 (row 4)
SR3 D7 - D0 are connected to the anodes of LED Bar 2, 4, 6, 8 (column 9-16)
...
 
But now i am confused how to control the led bars independently via CCs because they are parts of led matrix columns. 
Led matrix patterns?
Each led separately with emu_led_offset?
Range mapping?
 
 
Thanks for any suggestions!
 
Best regards
Marxon
Edited by Marxon
Link to comment
Share on other sites

There is nothing more to say!

I mistakenly missed out the LED Digit topic and thought to have no usecase for it.

Thank you Thorsten.

Marxon

 

This was probably a little bit hasty...

The LED Digit example does not clarify the issue because

it is a pair of 8x8 matrices.

I have made a sketch to explain what my problem is.

 

post-4098-0-56820700-1385843172_thumb.jp

How can i control led bar 1 with a CC and

led bar 2 with another one although they are in the same column?

I tried to assign two diffewrent patterns but as expected they interrupt each other.

 

DOUT_MATRIX n=1   rows=4   sr_dout_r1=3  sr_dout_sel1=4  sr_dout_r2=5  
DOUT_MATRIX n=2   rows=4   sr_dout_r1=6  sr_dout_sel1=7  sr_dout_r2=8  

EVENT_LED_MATRIX id=1  led_matrix_pattern=1  fwd_to_lcd=1  type=CC chn= 1 cc= 1  lcd_pos=1:1:2  label="1:%3d%B"
EVENT_LED_MATRIX id=2  led_matrix_pattern=2  fwd_to_lcd=1  type=CC chn= 1 cc= 2  lcd_pos=1:1:2  label="1:%3d%B"

LED_MATRIX_PATTERN n= 1   pos= 0  pattern=0000000000000000
LED_MATRIX_PATTERN n= 1   pos= 1  pattern=1000000000000000
LED_MATRIX_PATTERN n= 1   pos= 2  pattern=1000000000000000
LED_MATRIX_PATTERN n= 1   pos= 3  pattern=1100000000000000
LED_MATRIX_PATTERN n= 1   pos= 4  pattern=1110000000000000
LED_MATRIX_PATTERN n= 1   pos= 5  pattern=1110000000000000
LED_MATRIX_PATTERN n= 1   pos= 6  pattern=1111000000000000
LED_MATRIX_PATTERN n= 1   pos= 7  pattern=1111000000000000
LED_MATRIX_PATTERN n= 1   pos= 8  pattern=1111100000000000
LED_MATRIX_PATTERN n= 1   pos= 9  pattern=1111100000000000
LED_MATRIX_PATTERN n= 1   pos=10  pattern=1111110000000000
LED_MATRIX_PATTERN n= 1   pos=11  pattern=1111110000000000
LED_MATRIX_PATTERN n= 1   pos=12  pattern=1111111000000000
LED_MATRIX_PATTERN n= 1   pos=13  pattern=1111111000000000
LED_MATRIX_PATTERN n= 1   pos=14  pattern=1111111100000000
LED_MATRIX_PATTERN n= 1   pos=15  pattern=1111111100000000

LED_MATRIX_PATTERN n= 2   pos= 0  pattern=0000000000000000
LED_MATRIX_PATTERN n= 2   pos= 1  pattern=0000000010000000
LED_MATRIX_PATTERN n= 2   pos= 2  pattern=0000000010000000
LED_MATRIX_PATTERN n= 2   pos= 3  pattern=0000000011000000
LED_MATRIX_PATTERN n= 2   pos= 4  pattern=0000000011100000
LED_MATRIX_PATTERN n= 2   pos= 5  pattern=0000000011100000
LED_MATRIX_PATTERN n= 2   pos= 6  pattern=0000000011110000
LED_MATRIX_PATTERN n= 2   pos= 7  pattern=0000000011110000
LED_MATRIX_PATTERN n= 2   pos= 8  pattern=0000000011111000
LED_MATRIX_PATTERN n= 2   pos= 9  pattern=0000000011111000
LED_MATRIX_PATTERN n= 2   pos=10  pattern=0000000011111100
LED_MATRIX_PATTERN n= 2   pos=11  pattern=0000000011111100
LED_MATRIX_PATTERN n= 2   pos=12  pattern=0000000011111110
LED_MATRIX_PATTERN n= 2   pos=13  pattern=0000000011111110
LED_MATRIX_PATTERN n= 2   pos=14  pattern=0000000011111111
LED_MATRIX_PATTERN n= 2   pos=15  pattern=0000000011111111

 

 

Edited by Marxon
Link to comment
Share on other sites

Ah! Sorry, I picked up the wrong example.

 

This is a better one: http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Ftpd.ngc

(it tests the TPD, which consists of two 8x8 duo-LED matrices, driven by DOUT_MATRIX n=2 and n=3)

 

As you can see, each DOUT_MATRIX has 16 EVENT_LED_MATRIX entries, regardless of the number of rows.

In order to ensure individual access, I would propose to define 4 DOUT_MATRIX items:

/edit: corrected DOUT_MATRIX assignments.

DOUT_MATRIX n=1   rows=4   sr_dout_sel1=4  sr_dout_r1=3  
DOUT_MATRIX n=2   rows=4   sr_dout_sel1=4  sr_dout_r1=5
DOUT_MATRIX n=3   rows=4   sr_dout_sel1=7  sr_dout_r1=6  
DOUT_MATRIX n=4   rows=4   sr_dout_sel1=7  sr_dout_r1=8  

you should be able to control the LED bars with:

EVENT_LED_MATRIX id= 1 type=CC  chn= 1 cc= 16  led_matrix_pattern=1
EVENT_LED_MATRIX id= 2 type=CC  chn= 1 cc= 17  led_matrix_pattern=1
EVENT_LED_MATRIX id= 3 type=CC  chn= 1 cc= 18  led_matrix_pattern=1
EVENT_LED_MATRIX id= 4 type=CC  chn= 1 cc= 19  led_matrix_pattern=1

EVENT_LED_MATRIX id=17 type=CC  chn= 1 cc= 20  led_matrix_pattern=1
EVENT_LED_MATRIX id=18 type=CC  chn= 1 cc= 21  led_matrix_pattern=1
EVENT_LED_MATRIX id=19 type=CC  chn= 1 cc= 22  led_matrix_pattern=1
EVENT_LED_MATRIX id=20 type=CC  chn= 1 cc= 23  led_matrix_pattern=1

EVENT_LED_MATRIX id=33 type=CC  chn= 1 cc= 24  led_matrix_pattern=1
EVENT_LED_MATRIX id=34 type=CC  chn= 1 cc= 25  led_matrix_pattern=1
EVENT_LED_MATRIX id=35 type=CC  chn= 1 cc= 26  led_matrix_pattern=1
EVENT_LED_MATRIX id=36 type=CC  chn= 1 cc= 27  led_matrix_pattern=1

EVENT_LED_MATRIX id=49 type=CC  chn= 1 cc= 28  led_matrix_pattern=1
EVENT_LED_MATRIX id=50 type=CC  chn= 1 cc= 29  led_matrix_pattern=1
EVENT_LED_MATRIX id=51 type=CC  chn= 1 cc= 30  led_matrix_pattern=1
EVENT_LED_MATRIX id=52 type=CC  chn= 1 cc= 31  led_matrix_pattern=1

 

Best Regards, Thorsten.

Link to comment
Share on other sites

Hi Thorsten,

 

unfortunately your Code

DOUT_MATRIX n=1   rows=4   sr_dout_r1=3  sr_dout_r2=5  
DOUT_MATRIX n=2   rows=4   sr_dout_r1=4  sr_dout_r2=5
DOUT_MATRIX n=1   rows=4   sr_dout_r1=6  sr_dout_r2=8  
DOUT_MATRIX n=2   rows=4   sr_dout_r1=7  sr_dout_r2=8  

EVENT_LED_MATRIX id= 1 type=CC  chn= 1 cc= 16  led_matrix_pattern=1
EVENT_LED_MATRIX id= 2 type=CC  chn= 1 cc= 17  led_matrix_pattern=1
EVENT_LED_MATRIX id= 3 type=CC  chn= 1 cc= 18  led_matrix_pattern=1
EVENT_LED_MATRIX id= 4 type=CC  chn= 1 cc= 19  led_matrix_pattern=1

EVENT_LED_MATRIX id=17 type=CC  chn= 1 cc= 20  led_matrix_pattern=1
EVENT_LED_MATRIX id=18 type=CC  chn= 1 cc= 21  led_matrix_pattern=1
EVENT_LED_MATRIX id=19 type=CC  chn= 1 cc= 22  led_matrix_pattern=1
EVENT_LED_MATRIX id=20 type=CC  chn= 1 cc= 23  led_matrix_pattern=1

EVENT_LED_MATRIX id=33 type=CC  chn= 1 cc= 24  led_matrix_pattern=1
EVENT_LED_MATRIX id=34 type=CC  chn= 1 cc= 25  led_matrix_pattern=1
EVENT_LED_MATRIX id=35 type=CC  chn= 1 cc= 26  led_matrix_pattern=1
EVENT_LED_MATRIX id=36 type=CC  chn= 1 cc= 27  led_matrix_pattern=1

EVENT_LED_MATRIX id=49 type=CC  chn= 1 cc= 28  led_matrix_pattern=1
EVENT_LED_MATRIX id=50 type=CC  chn= 1 cc= 29  led_matrix_pattern=1
EVENT_LED_MATRIX id=51 type=CC  chn= 1 cc= 30  led_matrix_pattern=1
EVENT_LED_MATRIX id=52 type=CC  chn= 1 cc= 31  led_matrix_pattern=1

 

does not work.

Would you please explain it to me?

1) Why are the sr_dout_sel missing or are they just declared as sr_dout_r2?

 

As you can see, each DOUT_MATRIX has 16 EVENT_LED_MATRIX entries, regardless of the number of rows.

2) Do you mean EVENT_LED_MATRIX entry has a 16 step pattern?

 

3) Shouldn't be the code

DOUT_MATRIX n=1   rows=4   sr_dout_r1=3  sr_dout_r2=5  
DOUT_MATRIX n=2   rows=4   sr_dout_r1=4  sr_dout_r2=5  
DOUT_MATRIX n=1   rows=4   sr_dout_r1=6  sr_dout_r2=8  
DOUT_MATRIX n=2   rows=4   sr_dout_r1=7  sr_dout_r2=8  

like this (different matrix numbering)

DOUT_MATRIX n=1   rows=4   sr_dout_r1=3  sr_dout_r2=5
DOUT_MATRIX n=2   rows=4   sr_dout_r1=4  sr_dout_r2=5  
DOUT_MATRIX n=3   rows=4   sr_dout_r1=6  sr_dout_r2=8  
DOUT_MATRIX n=4   rows=4   sr_dout_r1=7  sr_dout_r2=8  

 

Best regards

Marxon

Edited by Marxon
Link to comment
Share on other sites

Sorry, my fault.

 

It should be:

DOUT_MATRIX n=1   rows=4   sr_dout_sel1=4  sr_dout_r1=3  
DOUT_MATRIX n=2   rows=4   sr_dout_sel1=4  sr_dout_r1=5
DOUT_MATRIX n=3   rows=4   sr_dout_sel1=7  sr_dout_r1=6  
DOUT_MATRIX n=4   rows=4   sr_dout_sel1=7  sr_dout_r1=8  

Does this make more sense? ;)

 

 

2) Do you mean EVENT_LED_MATRIX entry has a 16 step pattern?

 

no, I mean that

EVENT_LED_MATRIX id=1..16 are assigned to DOUT_MATRIX id=1

EVENT_LED_MATRIX id=17..32 are assigned to DOUT_MATRIX id=2

EVENT_LED_MATRIX id=33..48 are assigned to DOUT_MATRIX id=3

EVENT_LED_MATRIX id=49..64 are assigned to DOUT_MATRIX id=4

 
each id controls a column (LED bar)
You've only 4 LED bars per DOUT_MATRIX, accordingly only id=1..4, id=17..20, id=33=36, id=49..52 are relevant, the others can be ignored.
 

Best Regards, Thorsten.

Link to comment
Share on other sites

no, I mean that

EVENT_LED_MATRIX id=1..16 are assigned to DOUT_MATRIX id=1

EVENT_LED_MATRIX id=17..32 are assigned to DOUT_MATRIX id=2

EVENT_LED_MATRIX id=33..48 are assigned to DOUT_MATRIX id=3

EVENT_LED_MATRIX id=49..64 are assigned to DOUT_MATRIX id=4

 
each id controls a column (LED bar)
You've only 4 LED bars per DOUT_MATRIX, accordingly only id=1..4, id=17..20, id=33=36, id=49..52 are relevant, the others can be ignored.
 

Best Regards, Thorsten.

 

Ah now i got it:

this why you count in your tpd.ngc example:

...
EVENT_LED_MATRIX id=22 type=CC  chn= 1 cc= 21  led_matrix_pattern=1  rgb=15:15:15
EVENT_LED_MATRIX id=23 type=CC  chn= 1 cc= 22  led_matrix_pattern=1  rgb=15:15:15
EVENT_LED_MATRIX id=24 type=CC  chn= 1 cc= 23  led_matrix_pattern=1  rgb=15:15:15

# CC 24..31
EVENT_LED_MATRIX id=33 type=CC  chn= 1 cc= 24  led_matrix_pattern=1  rgb=15:15:15
EVENT_LED_MATRIX id=34 type=CC  chn= 1 cc= 25  led_matrix_pattern=1  rgb=15:15:15
EVENT_LED_MATRIX id=35 type=CC  chn= 1 cc= 26  led_matrix_pattern=1  rgb=15:15:15
.....

 and not

...
EVENT_LED_MATRIX id=22 type=CC  chn= 1 cc= 21  led_matrix_pattern=1  rgb=15:15:15
EVENT_LED_MATRIX id=23 type=CC  chn= 1 cc= 22  led_matrix_pattern=1  rgb=15:15:15
EVENT_LED_MATRIX id=24 type=CC  chn= 1 cc= 23  led_matrix_pattern=1  rgb=15:15:15

# CC 24..31
EVENT_LED_MATRIX id=25 type=CC  chn= 1 cc= 24  led_matrix_pattern=1  rgb=15:15:15
EVENT_LED_MATRIX id=27 type=CC  chn= 1 cc= 25  led_matrix_pattern=1  rgb=15:15:15
EVENT_LED_MATRIX id=28 type=CC  chn= 1 cc= 26  led_matrix_pattern=1  rgb=15:15:15
.....

 

Thank you again!

Now it really works like wanted :)

 

 

Have a nice day!

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.

Guest
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.

Loading...
 Share

×
×
  • Create New...