Gridracer Posted February 1, 2009 Report Share Posted February 1, 2009 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 0So i can connect my Matrix LED;s anodes to register DEFAULT_GP_DOUT_SR_L and ROr would you reccomend to keep them on DEFAULT_SRM_DOUT_R1 and L1 to be preparedfor 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.htmlBIG THANKS in ADVANCE!! Quote Link to comment Share on other sites More sharing options...
stryd_one Posted February 1, 2009 Report Share Posted February 1, 2009 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 :) Quote Link to comment Share on other sites More sharing options...
bugfight Posted February 1, 2009 Report Share Posted February 1, 2009 ...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... Quote Link to comment Share on other sites More sharing options...
Gridracer Posted February 1, 2009 Author Report Share Posted February 1, 2009 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 pinson 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.pdfand set "DEFAULT_SRM_CATHODES_INV_MASK 0xf0" in setup_mbseq_v3.asmNext 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 theshiftregisters 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 touse 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 shiftregisterin the dout chain? (CORE-SR1-SR2-SR3......SR16 max)Right?thanks for your patience. Quote Link to comment Share on other sites More sharing options...
Gridracer Posted February 2, 2009 Author Report Share Posted February 2, 2009 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..D4I 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 0xf0B (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 0x0fNo 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 0xf0B (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 0x0fAm 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. Quote Link to comment Share on other sites More sharing options...
Gridracer Posted February 2, 2009 Author Report Share Posted February 2, 2009 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! Quote Link to comment Share on other sites More sharing options...
bugfight Posted February 3, 2009 Report Share Posted February 3, 2009 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... Quote Link to comment Share on other sites More sharing options...
Gridracer Posted February 3, 2009 Author Report Share Posted February 3, 2009 OK, I attached the circuitplan. :)EDIT: NOT TESTED note removed Quote Link to comment Share on other sites More sharing options...
Gridracer Posted February 3, 2009 Author Report Share Posted February 3, 2009 I got away from connecting the Matrix LED's to the DEFAULT_GP_DOUT_SR_L / R shiftregistersas it would make the GP Butoon LED's useless. As they would display a "mixture" of all four Tracksdue 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 exampleThanks for all you patience. Quote Link to comment Share on other sites More sharing options...
Gridracer Posted February 28, 2009 Author Report Share Posted February 28, 2009 Circuit + setup.asm settings work well :D Quote Link to comment Share on other sites More sharing options...
bugfight Posted March 14, 2009 Report Share Posted March 14, 2009 sorry, just catching up...i think a more likely (or just another) reason you need lower R is that the darlingtons have a fairly large voltage drop... 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.