Jump to content

Final confirmation before wiring my BUTTON LED matrix appreciated


Gridracer
 Share

Recommended Posts

Hello out there,

I will start soldering on the button LED matrix of my CHAINRECTOR project soon.

I am a newbie and read a lot to sort this out without bothering anyone.

But now, before i make avoidable mistakes,

I hope someone experienced could confirm what I have learned so far or tell me where I am wrong:

1.:

Assuming I will set "DEFAULT_SRM_CATHODES_INV_MASK"  to 0xf0 (as i will use sink drivers),

The BUTTON rows are connected to DEFAULT_SRM_DOUT_CATHODES1 register

              -Top row      (track1) goes to Pin D7

              -second row (track2)  goes to Pin D6

              -third row    (track3) goes to Pin D5

              -bottom row    (track4) goes to Pin D4   

The LED cathode lines go to DEFAULT_SRM_DOUT_CATHODES1 register

              -Top row      (track1) goes to Pin D3

              -second row (track2)  goes to Pin D2

              -third row    (track3) goes to Pin D1

              -bottom row  (track4) goes to Pin D0

 

2.:

As I use use sink drivers I will not use register "DEFAULT_SRM_DOUT_CATHODES2" and define it as Number 0,

All buttons and all LED cathodes are connected to "DEFAULT_SRM_DOUT_CATHODES1"

3.:

As I will not use the buttonmatrix for User Interface functions I set

"DEFAULT_SRM_BUTTONS_NO_UI" to 1.

As I have only singlecouor LED's I set "DEFAULT_SRM_DOUT_DUOCOLOUR" to 0

So i can connect my Matrix LED;s anodes to register DEFAULT_GP_DOUT_SR_L and R

Or would you reccomend to keep them on DEFAULT_SRM_DOUT_R1 and L1 to be prepared

for future updates (whereas singlecolour is already fixed for me)

4.:

Point 1-3 made me save some registers, to save a DOUTX4 module i only have to change the

register number in setup_mbseq_v3.asm and nowhere else, (besides recompileing)

If you like you can have a look on my project here:

http://www.midibox.org/forum/index.php/topic,12903.0.html

BIG THANKS in ADVANCE!!

Link to comment
Share on other sites

Bit of confusion there... There are two types of registers to consider - memory registers, and shift registers. One is an area of memory used by the PIC (which can be given a name), and one is a chip used in a DOUT module. I'll let google tell you which does what :)

Link to comment
Share on other sites

...

2.:

As I use use sink drivers I will not use register "DEFAULT_SRM_DOUT_CATHODES2" and define it as Number 0,

All buttons and all LED cathodes are connected to "DEFAULT_SRM_DOUT_CATHODES1"

while this can be done, it will require circuit and/or code changes, and i would avoid it...

...

4.:

Point 1-3 made me save some registers, to save a DOUTX4 module i only have to change the

register number in setup_mbseq_v3.asm and nowhere else, (besides recompileing)

...

no this is not true. with sink drivers the pins have to be inverted (using the mask you mentioned)

thus the button rows are high while the led rows are low and vis versa...

Link to comment
Share on other sites

Bit of confusion there... There are two types of registers to consider.

Sorry if I wrote my question a bit confusing, I am talking about the phsical wiring of the shiftregister pins

on the dout module(s) for the BLM matrix and their assignments in setup_mbseq_v3.asm.

Point one referes to this chapter in the CHANGELOG:

"

MIDIboxSEQ V3.0

~~~~~~~~~~~~~~~

.

.

.

        Note: compared to the old schematic, the cathodes are now mirrored!

              This means that you have to change the wiring on your existing hardware

              Upper Row:  DOUT pin D7

              second Row: DOUT pin D6

              third Row:  DOUT pin D5

              fourth Row: DOUT pin D4

"

I think it is obsolete as I can change the pinning with the parameter "DEFAULT_SRM_CATHODES_INV_MASK"

(Sink drivers are connected)

Right?

I only have to ensure that the highest pin in number is connected to the highest LED Row in number.

for Example:

-> Upper Row: connected to DOUT pin D7 ->set "DEFAULT_SRM_CATHODES_INV_MASK 0x0f"

otherwise:

-> Upper Row: connected to DOUT pin D3 ->set "DEFAULT_SRM_CATHODES_INV_MASK 0xf0"

Right?

Similar the Buttons are connected, highest row in number -> highest pin in number

Right?

or in short terms, I connect them as shown in

http://www.ucapps.de/mbhp/button_duoled_matrix.pdf

and set "DEFAULT_SRM_CATHODES_INV_MASK 0xf0" in setup_mbseq_v3.asm

Next Question:

As I have already saved 2 DOUT shiftregisters by using only singlecolour LEDS, and one by using

sinkdrivers, i could save a complete DOTX4 module by finally connecting the LED Matrix to the

shiftregisters of the General Purpose LEDs and so abstain from using the matrix for

User Interface functions.

Or would you say that I should not mind for those extra Shiftregisters with the advantage to be able to

use the Buttonmatrix for User Interface functions and perhaps future updates.

Last question:

There is no other file than setup_mbseq_v3.asm where I have to assign the position of a specifi shiftregister

in the dout chain? (CORE-SR1-SR2-SR3......SR16 max)

Right?

thanks for your patience.

Link to comment
Share on other sites

Quote from: Gridracer on Yesterday at 02:58

...

2.:

As I use use sink drivers I will not use register "DEFAULT_SRM_DOUT_CATHODES2" and define it as Number 0,

All buttons and all LED cathodes are connected to "DEFAULT_SRM_DOUT_CATHODES1"

??? But I think I found in setup_mbseq_v3.asm that the shiftregister DEFAULT_SRM_DOUT_CATHODES2 is only required due to the high power of 16LEDs which is so reduced to the power of 8LEDs.

So with sink drivers it is also not required. It is  commented that it should be set to 0 just as I plan and so can use the one set free on the DOUT4x module for something else.

; define the shift register to which the cathodes of these LEDs are connected
; Note that the whole shift register (8 pins) will be allocated! The 4 select lines are duplicated (4 for LED matrix, 4 for button matrix)
; The second DOUT_CATHODES2 selection is optional if LEDs with high power consumption are used - set this to 0 if not used
#define DEFAULT_SRM_DOUT_CATHODES1	5
#define DEFAULT_SRM_DOUT_CATHODES2	8
Or did you mean changing line #define DEFAULT_SRM_DOUT_CATHODES2 from8 to 0 in setup_mbseq_v3.asm and adding the sink drivers to the DOUT module with circuit/code changes??
Quote ... 4.: Point 1-3 made me save some registers, to save a DOUTX4 module i only have to change the register number in setup_mbseq_v3.asm and nowhere else, (besides recompileing) ...
As far as I understand the Inversion mask is required only to compensate the signal inversion that does the sink driver itsself, (as twice inverted equals out) so after the sinkdriver the button rows and LED rows are even again. I think it has nothing to do with the correspondance to the Tracks. But I am no expert. from looking at the circuitplan: http://www.ucapps.de/mbhp/button_duoled_matrix.pdf and regarding the notes to the inversion mask in setup_mbseq_v3.asm:
;           0xf0 - sink drivers connected to D0..D3
;           0x0f - sink drivers connected to D7..D4

I can only assume  :-[ the following:

There are fourpossible connections:

A (to be prefered as it matches the circuit plan)

TRACK1: LED ROW connected to PIN D3 , BUTTON ROW connected to PIN D7

TRACK2: LED ROW connected to PIN D2 , BUTTON ROW connected to PIN D6

TRACK3: LED ROW connected to PIN D1 , BUTTON ROW connected to PIN D5

TRACK4: LED ROW connected to PIN D0 , BUTTON ROW connected to PIN D4

#define DEFAULT_SRM_CATHODES_INV_MASK  0xf0

B (If you have "mirrored" the connection compared to the circuitplan:Buttons on the right pins, LEDs on the left pins)

TRACK1: LED ROW connected to PIN D7 , BUTTON ROW connected to PIN D3

TRACK2: LED ROW connected to PIN D6 , BUTTON ROW connected to PIN D2

TRACK3: LED ROW connected to PIN D5 , BUTTON ROW connected to PIN D1

TRACK4: LED ROW connected to PIN D4 , BUTTON ROW connected to PIN D0

#define DEFAULT_SRM_CATHODES_INV_MASK  0x0f

No the in my eyes unlikely ones:

(highest TRACK number corresponds to the highest Pin Number)

C

TRACK1: LED ROW connected to PIN D0 , BUTTON ROW connected to PIN D4

TRACK2: LED ROW connected to PIN D1 , BUTTON ROW connected to PIN D5

TRACK3: LED ROW connected to PIN D2 , BUTTON ROW connected to PIN D6

TRACK4: LED ROW connected to PIN D3 , BUTTON ROW connected to PIN D7

#define DEFAULT_SRM_CATHODES_INV_MASK  0xf0

B (If you have "mirrored" the connection compared to the circuitplan:Buttons on the right pins, LEDs on the left pins)

TRACK1: LED ROW connected to PIN D4 , BUTTON ROW connected to PIN D0

TRACK2: LED ROW connected to PIN D5 , BUTTON ROW connected to PIN D1

TRACK3: LED ROW connected to PIN D6 , BUTTON ROW connected to PIN D2

TRACK4: LED ROW connected to PIN D7 , BUTTON ROW connected to PIN D3

#define DEFAULT_SRM_CATHODES_INV_MASK  0x0f

Am I on the right way?? or do i just have no clue of what I am trying to do ???

I will start with version A but it would be nice to leave this not an open question.

Link to comment
Share on other sites

I finished the circuitplan for my singlecolour BLM with sink drivers.

I would like to post it here for a easier discussionbase.

But I am not sure whether I may upload it to my flickr account, as it is just

a simple variation of the original duocolour version from TK which I made with a graphic tool. ???

I dont want to violate copyrights!

Link to comment
Share on other sites

ok, i think we might have had a misunderstanding here.

seeing your schematic would help, and you don't need to worry about copyright, but should post it here, not on an external site...

but i think i get where you are going: with only single color leds, you could get away with connecting left and right rows both to the same DEFAULT_SRM_DOUT_CATHODES1 pin.  i thought you were planning to connect switches and sink transistors to the same pin...

Link to comment
Share on other sites

I got away from connecting the Matrix LED's to the DEFAULT_GP_DOUT_SR_L / R shiftregisters

as it would make the GP Butoon LED's useless. As they would display a "mixture" of all four Tracks

due to the multiplexing.

So the final Question that remains to me is very simple an a real newbie one:

I do not want to have unused shiftregisters on my DOUT modules

(as i saved some due to Singlecolour + Sink Drivers)

So i Will change the assignment in setup_mbseq_v3.asm (and recompile)

for example #define DEFAULT_SRM_DOUT_R1 9 to #define DEFAULT_SRM_DOUT_R1 7

But I do not have to touch other files like mios_tables.inc for example

Thanks for all you patience.

Link to comment
Share on other sites

  • 4 weeks later...
  • 2 weeks later...

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