Jump to content

(SOLVED) Bug / problem with button MATRIX


ABP Electronics
 Share

Recommended Posts

Hi MidiBoxers,

Hi TK,

 

Last time I had a problem with MAPS which didn't accept repeated values - TK solved this problem with version http://www.ucapps.de...v1_033_pre7.zip. Maps now working as expected.

 

But for the moment button MATRIX stopped working completely. Every time I press the button I get 1 of 8 values.

 

I had similar problem before - see my post:

 

TK solved this with version: http://www.ucapps.de...v1_033_pre1.zip

 

Simply: with version pre7 - maps working OK, but Button Matrix doesn't

with version pre1 - btton matrix works fine - MAPS don't accept repeated values.

 

I have tested both versions - checked twice and confirmed.

 

here is a part of my ngc file:

 

DIN_MATRIX n= 1   rows=8  sr_dout_sel1= 3   sr_din1= 1  button_emu_id_offset=1001 \
                  inverted_sel=0  inverted_row=0  mirrored_row=0 \
                  sr_dout_sel2= 0  sr_din2= 0
 
works OK with version pre1, doesn't work with pre7.
 
Help needed :smile: :happy:
 
Regards,
Edited by ABP Electronics
Link to comment
Share on other sites

Hello again,

 

More detailed investigation....

 

My hardware:

 

STM32F4

 

2x DIN Modules

2xDOUT modules

 

I have 2 cores - I could repeat the problem on both of them.

 

I was trying to find the fault on hardware side - I checked my prototyping 8x8 button matrix few times - I couldn't find a problem - so I decided to make another one. I took me few hours to make it, then I checked it again and again - looked good.

 

Connected everything to core - still the same problem. Changed DIN and DOUT boards - still the same. Finally changed core - still the same problem.

 

More detailed investigation:

 

There is always 1 button which starts the problem. Depending on script  / hardware configuration - there is always pair of pins which starts the crash. To prove it I used single wire with 1 diode to find which pins they are.

Also seems like DOUT module is the one which causes problem - doesn't matter which shift register is selected on DIN module.

 

For this configuration:

DIN_MATRIX n= 1   rows=8  sr_dout_sel1= 1   sr_din1= 2  button_emu_id_offset=1001

 

DOUT:D7 <--> DIN:D0 is a bad pair. Connecting these two with diode will generate stream of messages (on/OFF) as long as the connection is hold. After selecting this pair - the whole first row of the matrix will go crazy - every button will send 1 of 8 numbers assigned to buttons in the row. If any of these buttons is pressed - it will then affect the column as well.

 

For:

DIN_MATRIX n= 1   rows=8  sr_dout_sel1= 2   sr_din1= 2  button_emu_id_offset=1001

DOUT:D6 <--> DIN:D1 is a bad pair

 

For:

DIN_MATRIX n= 1   rows=8  sr_dout_sel1= 3   sr_din1= 2  button_emu_id_offset=1001

DOUT:D5 <--> DIN:D2 is a bad pair

 

For:

DIN_MATRIX n= 1   rows=8  sr_dout_sel1= 4   sr_din1= 2  button_emu_id_offset=1001

DOUT:D4 <--> DIN:D3 is a bad pair

 

Changing sr_din doesn't matter - bad pairs remain the same.

 

I have checked few versions of the firmware:

 

1.032 Pre1

1.032

1.033 Pre1

1.033 Pre6

1.033 Pre7

 

All versions have the same problem with bad pairs crashing the whole button matrix.

 

Any help would be very much appreciated,

 

Regards,

Bartosz

 

 

 

Link to comment
Share on other sites

Hi,

 

Strange...seems like I am the only one who uses MidiBox NG with button matrix configuration....or maybe the only one who have this problem. :sad:

 

I have performed few more tests today.

 

Changed all cables connecting modules together - did't help.

 

I have tested configuration with  4x8 , 4x16 and 16x16 buttons. 

 

Unfortunately  - there is always "bad pair" which crashes the whole button matrix.

 

Can any of you try above configuration and let me know if the problem exist on your side??

I am simply running out of ideas - t took me 3 days trying to find the hardware problem - and no results.... :sad:

 

Regards,

Bartosz

Link to comment
Share on other sites

I need more information to understand (and/or reproduce) the problem.

 

- how is the core module supplied? Did you already check voltages (e.g. ca. 5V between Vs and Vd at the DIN/DOUT modules?)

- could you please show a picture of your hardware? This may describe more than 100 words... ;)

- enter "set debug on" in MIOS terminal, then trigger the crash - which messages are displayed?

- your .NGC file might also help to understand the configuration.

 

Best Regards, Thorsten.

Link to comment
Share on other sites

  • 2 weeks later...
I need more information to understand (and/or reproduce) the problem.

 

- how is the core module supplied? Did you already check voltages (e.g. ca. 5V between Vs and Vd at the DIN/DOUT modules?)

- could you please show a picture of your hardware? This may describe more than 100 words... ;)

- enter "set debug on" in MIOS terminal, then trigger the crash - which messages are displayed?

- your .NGC file might also help to understand the configuration.

 

Best Regards, Thorsten.

Hi TK,

 

Problem solved.

No problems with voltage - nice stable 4.97V all time - 4000 mA stabilized power supply.

 

Problem was with my ngc file .... 

 

If I write something like:

#EVENT_BUTTON id=  1002 fwd_id=LED:2    type=NoteOn chn= 1 key= 39  range=  0:127  offset=  0  ports=10001000000010000000  lcd_pos=1:1:1  label="^std_btn"

 

 

with:

# DOUT_MATRIX hardware
DOUT_MATRIX n=1   rows=8  inverted_sel=0  inverted_row=0  mirrored_row=0 led_emu_id_offset=1001 \
                   sr_dout_sel1= 1 sr_dout_sel2= 0  sr_dout_r1= 2 sr_dout_r2= 0  sr_dout_g1= 0 sr_dout_g2= 0  sr_dout_b1= 0 sr_dout_b2= 0
DOUT_MATRIX n=2   rows=8  inverted_sel=0  inverted_row=0  mirrored_row=0 \
 
and:
# DIN_MATRIX hardware
DIN_MATRIX n= 1   rows=8  sr_dout_sel1= 3   sr_din1= 1  button_emu_id_offset=1001 \
                  inverted_sel=0  inverted_row=0  mirrored_row=0 \
                  sr_dout_sel2= 0  sr_din2= 0
 
It doesn't work - even if there is no single physical diode connected. Simply button matrix and Diode use the same sr_dout. 
 
With:
#EVENT_BUTTON id=  1002 fwd_id=LED:1002    type=NoteOn chn= 1 key= 39  range=  0:127  offset=  0  ports=10001000000010000000  lcd_pos=1:1:1  label="^std_btn" 
 
.....Everything works perfect.
 
Regards,
Bartosz
Link to comment
Share on other sites

Hi Bartosz,

 

I'm relieved that you found a way with the current firmware, because I've no explanation which change could have caused such kind of incompatibility. :-/

 

Best Regards, Thorsten.

Hi Thorsten

 

With first (bad) configuration of ngc script I had button matrix using using the same DOUT shift register as directly connected LED. My understanding is as follow - button matrix was trying to trigger LED which was directly connected to DOUT without matrix. In this situation pin assigned to this LED is set to active. When I changed configuration to LED matrix everything works fine because in matrix configuration LED is never ON - it changes ON/OFF very quickly giving the illusion that is ON.... I don't know how to describe it..... Anyway - button matrix couldn't work correctly because one of the pins was always ON on DOUT module - and this same shift register was used.

 

I have posted more interesting case on "MIDIbox NG release + feedback" topic.... I have found some more interesting studies and some workaround ...but I am not happy with this solution ....

 

Regards,

Bartosz 

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