Jump to content

DIO Matrix going haywire


Highcooley

Recommended Posts

Hey fellow midiboxers

I start feeling bad, always coming with more problems instead of solutions. But another unsolved mystery in my Midibox_NG project (next to operating more than 2 AOUT_NGs) is an odd behavior of my DIO Matrix.

Basically, it is configured like in the example for 8x16 buttons and 8x8 LEDs. In my configuration, I have a couple of rotary switches configured as OnOnly for the different states as wells as some toggle buttons with included LEDs:

IMG_1618.thumb.JPG.db900536995262ecf84c7

 

the matrix is wired as follows:

matrix.thumb.jpg.063744aa32170e92a9b2d2b

and this is how the configuration looks like:

# DIN_MATRIX hardware
DIN_MATRIX n=1   rows=8  sr_dout_sel1=1 sr_din1=1 sr_din2=2 button_emu_id_offset=1001

# DOUT_MATRIX hardware
DOUT_MATRIX n=1 rows=8 sr_dout_sel1=1 sr_dout_r1=2 led_emu_id_offset=2001

# EVENTs
#MOD BUS
EVENT_BUTTON id=  1001  type=CC    button_mode=OnOnly chn= 1 CC= 68  range=   0:0   lcd_pos=1:1:4  label="MW Source  Tri       "
EVENT_BUTTON id=  1002  type=CC    button_mode=OnOnly chn= 1 CC= 68  range=  25:25  lcd_pos=1:1:4  label="MW Source  Square    "
EVENT_BUTTON id=  1003  type=CC    button_mode=OnOnly chn= 1 CC= 68  range=  51:51  lcd_pos=1:1:4  label="MW Source  OSC 3     "
EVENT_BUTTON id=  1004  type=CC    button_mode=OnOnly chn= 1 CC= 68  range=  76:76  lcd_pos=1:1:4  label="MW Source  S&H       "
EVENT_BUTTON id=  1005  type=CC    button_mode=OnOnly chn= 1 CC= 68  range= 102:102 lcd_pos=1:1:4  label="MW Source  ON/MOD2   "
EVENT_BUTTON id=  1006  type=CC    button_mode=OnOnly chn= 1 CC= 68  range= 127:127 lcd_pos=1:1:4  label="MW Source  Noise/PGM "

EVENT_BUTTON id=  1017  type=CC    button_mode=OnOnly chn= 1 CC= 69  range=   0:0   lcd_pos=1:1:4  label="MW Dest  Pitch       "
EVENT_BUTTON id=  1018  type=CC    button_mode=OnOnly chn= 1 CC= 69  range=  25:25  lcd_pos=1:1:4  label="MW Dest  OSC 2       "
EVENT_BUTTON id=  1019  type=CC    button_mode=OnOnly chn= 1 CC= 69  range=  51:51  lcd_pos=1:1:4  label="MW Dest  OSC 3       "
EVENT_BUTTON id=  1020  type=CC    button_mode=OnOnly chn= 1 CC= 69  range=  76:76  lcd_pos=1:1:4  label="MW Dest  Filt        "
EVENT_BUTTON id=  1021  type=CC    button_mode=OnOnly chn= 1 CC= 69  range= 102:102 lcd_pos=1:1:4  label="MW Dest  Wave        "
EVENT_BUTTON id=  1022  type=CC    button_mode=OnOnly chn= 1 CC= 69  range= 127:127 lcd_pos=1:1:4  label="MW Dest  LFO Rate/PGM"

EVENT_BUTTON id=  1033  type=CC    button_mode=OnOnly chn= 1 CC= 70  range=   0:0   lcd_pos=1:1:4  label="MW Shaping  Filt     "
EVENT_BUTTON id=  1034  type=CC    button_mode=OnOnly chn= 1 CC= 70  range=  48:48  lcd_pos=1:1:4  label="MW Shaping  Velocity "
EVENT_BUTTON id=  1035  type=CC    button_mode=OnOnly chn= 1 CC= 70  range=  80:80  lcd_pos=1:1:4  label="MW Shaping  Pressure "
EVENT_BUTTON id=  1036  type=CC    button_mode=OnOnly chn= 1 CC= 70  range= 127:127 lcd_pos=1:1:4  label="MW Shaping  ON/PGM   "

EVENT_BUTTON id=  1037  type=CC    button_mode=OnOnly chn= 1 CC= 73  range=   0:0   lcd_pos=1:1:4  label="Ped Shaping  Filt    "
EVENT_BUTTON id=  1038  type=CC    button_mode=OnOnly chn= 1 CC= 73  range=  48:48  lcd_pos=1:1:4  label="Ped Shaping  Velocity"
EVENT_BUTTON id=  1039  type=CC    button_mode=OnOnly chn= 1 CC= 73  range=  80:80  lcd_pos=1:1:4  label="Ped Shaping  Pressure"
EVENT_BUTTON id=  1040  type=CC    button_mode=OnOnly chn= 1 CC= 73  range= 127:127 lcd_pos=1:1:4  label="Ped Shaping  ON/PGM  "

EVENT_BUTTON id=  1049  type=CC    button_mode=OnOnly chn= 1 CC= 71  range=   0:0   lcd_pos=1:1:4  label="Ped Source  Tri      "
EVENT_BUTTON id=  1050  type=CC    button_mode=OnOnly chn= 1 CC= 71  range=  25:25  lcd_pos=1:1:4  label="Ped Source  Square   "
EVENT_BUTTON id=  1051  type=CC    button_mode=OnOnly chn= 1 CC= 71  range=  51:51  lcd_pos=1:1:4  label="Ped Source  OSC 3    "
EVENT_BUTTON id=  1052  type=CC    button_mode=OnOnly chn= 1 CC= 71  range=  76:76  lcd_pos=1:1:4  label="Ped Source  S&H      "
EVENT_BUTTON id=  1053  type=CC    button_mode=OnOnly chn= 1 CC= 71  range= 102:102 lcd_pos=1:1:4  label="Ped Source  ON/MOD2  "
EVENT_BUTTON id=  1054  type=CC    button_mode=OnOnly chn= 1 CC= 71  range= 127:127 lcd_pos=1:1:4  label="Ped Source  Noise/PGM"

EVENT_BUTTON id=  1065  type=CC    button_mode=OnOnly chn= 1 CC= 72  range=   0:0   lcd_pos=1:1:4  label="Ped Dest  Pitch      "
EVENT_BUTTON id=  1066  type=CC    button_mode=OnOnly chn= 1 CC= 72  range=  25:25  lcd_pos=1:1:4  label="Ped Dest  OSC 2      "
EVENT_BUTTON id=  1067  type=CC    button_mode=OnOnly chn= 1 CC= 72  range=  51:51  lcd_pos=1:1:4  label="Ped Dest  OSC 3      "
EVENT_BUTTON id=  1068  type=CC    button_mode=OnOnly chn= 1 CC= 72  range=  76:76  lcd_pos=1:1:4  label="Ped Dest  Filt       "
EVENT_BUTTON id=  1069  type=CC    button_mode=OnOnly chn= 1 CC= 72  range= 102:102 lcd_pos=1:1:4  label="Ped Dest  Wave       "
EVENT_BUTTON id=  1070  type=CC    button_mode=OnOnly chn= 1 CC= 72  range= 127:127 lcd_pos=1:1:4  label="Ped Dest  LFO Rate/PGM"

#OSC
EVENT_BUTTON id=  1009  type=CC    button_mode=OnOnly chn= 1 CC= 74  range=  64:64  fwd_id=SENDER:3001  lcd_pos=1:1:4  label="OSC 1  Octave 32     "
EVENT_BUTTON id=  1010  type=CC    button_mode=OnOnly chn= 1 CC= 74  range=  65:65  fwd_id=SENDER:3001  lcd_pos=1:1:4  label="OSC 1  Octave 16     "
EVENT_BUTTON id=  1011  type=CC    button_mode=OnOnly chn= 1 CC= 74  range=  66:66  fwd_id=SENDER:3001  lcd_pos=1:1:4  label="OSC 1  Octave 8      "
EVENT_BUTTON id=  1012  type=CC    button_mode=OnOnly chn= 1 CC= 74  range=  67:67  fwd_id=SENDER:3001  lcd_pos=1:1:4  label="OSC 1  Octave 4      "
EVENT_BUTTON id=  1013  type=CC    button_mode=OnOnly chn= 1 CC= 74  range=  68:68  fwd_id=SENDER:3001  lcd_pos=1:1:4  label="OSC 1  Octave 2      "
EVENT_BUTTON id=  1014  type=CC    button_mode=OnOnly chn= 1 CC= 74  range=  69:69  fwd_id=SENDER:3001  lcd_pos=1:1:4  label="OSC 1  Octave 1      "

EVENT_BUTTON id=  1025  type=CC    button_mode=OnOnly chn= 1 CC= 75  range=  64:64  fwd_id=SENDER:3002  lcd_pos=1:1:4  label="OSC 2  Octave 32     "
EVENT_BUTTON id=  1026  type=CC    button_mode=OnOnly chn= 1 CC= 75  range=  65:65  fwd_id=SENDER:3002  lcd_pos=1:1:4  label="OSC 2  Octave 16     "
EVENT_BUTTON id=  1027  type=CC    button_mode=OnOnly chn= 1 CC= 75  range=  66:66  fwd_id=SENDER:3002  lcd_pos=1:1:4  label="OSC 2  Octave 8      "
EVENT_BUTTON id=  1028  type=CC    button_mode=OnOnly chn= 1 CC= 75  range=  67:67  fwd_id=SENDER:3002  lcd_pos=1:1:4  label="OSC 2  Octave 4      "
EVENT_BUTTON id=  1029  type=CC    button_mode=OnOnly chn= 1 CC= 75  range=  68:68  fwd_id=SENDER:3002  lcd_pos=1:1:4  label="OSC 2  Octave 2      "
EVENT_BUTTON id=  1030  type=CC    button_mode=OnOnly chn= 1 CC= 75  range=  69:69  fwd_id=SENDER:3002  lcd_pos=1:1:4  label="OSC 2  Octave 1      "

EVENT_BUTTON id=  1041  type=CC    button_mode=OnOnly chn= 1 CC= 76  range=  64:64  fwd_id=SENDER:3003  lcd_pos=1:1:4  label="OSC 3  Octave 32     "
EVENT_BUTTON id=  1042  type=CC    button_mode=OnOnly chn= 1 CC= 76  range=  65:65  fwd_id=SENDER:3003  lcd_pos=1:1:4  label="OSC 3  Octave 16     "
EVENT_BUTTON id=  1043  type=CC    button_mode=OnOnly chn= 1 CC= 76  range=  66:66  fwd_id=SENDER:3003  lcd_pos=1:1:4  label="OSC 3  Octave 8      "
EVENT_BUTTON id=  1044  type=CC    button_mode=OnOnly chn= 1 CC= 76  range=  67:67  fwd_id=SENDER:3003  lcd_pos=1:1:4  label="OSC 3  Octave 4      "
EVENT_BUTTON id=  1045  type=CC    button_mode=OnOnly chn= 1 CC= 76  range=  68:68  fwd_id=SENDER:3003  lcd_pos=1:1:4  label="OSC 3  Octave 2      "
EVENT_BUTTON id=  1046  type=CC    button_mode=OnOnly chn= 1 CC= 76  range=  69:69  fwd_id=SENDER:3003  lcd_pos=1:1:4  label="OSC 3  Octave 1      "

#LFO
EVENT_BUTTON id=  1007  type=CC    button_mode=OnOnly chn= 1 CC= 67  range=   0:0   lcd_pos=1:1:4  label="LFO Sync  OFF        "
EVENT_BUTTON id=  1008  type=CC    button_mode=OnOnly chn= 1 CC= 67  range=  48:48  lcd_pos=1:1:4  label="LFO Sync  MIDI       "
EVENT_BUTTON id=  1015  type=CC    button_mode=OnOnly chn= 1 CC= 67  range=  80:80  lcd_pos=1:1:4  label="LFO Sync  KB         "
EVENT_BUTTON id=  1016  type=CC    button_mode=OnOnly chn= 1 CC= 67  range= 127:127 lcd_pos=1:1:4  label="LFO Sync  Env Gate   "

EVENT_BUTTON id=  1057  type=CC    fwd_id=LED:2025  button_mode=Toggle  chn= 1 cc= 65  range=   0:127 lcd_pos=1:1:4  label="Glide       ^onoff      "
EVENT_BUTTON id=  1058  type=CC    fwd_id=LED:2026  button_mode=Toggle  chn= 1 cc= 77  range=   0:127 lcd_pos=1:1:4  label="1-2 Sync    ^onoff      "
EVENT_BUTTON id=  1059  type=CC    fwd_id=LED:2027  button_mode=Toggle  chn= 1 cc= 78  range=   0:127 lcd_pos=1:1:4  label="3-1 FM      ^onoff      "
EVENT_BUTTON id=  1060  type=CC    fwd_id=LED:2028  button_mode=Toggle  chn= 1 cc= 90  range=   0:127 lcd_pos=1:1:4  label="5Pulser     ^onoff      "
EVENT_BUTTON id=  1061  type=CC    fwd_id=LED:2029  button_mode=Toggle  chn= 1 cc= 95  range=   0:127 lcd_pos=1:1:4  label="2-3 Ring    ^onoff      "
EVENT_BUTTON id=  1062  type=CC    fwd_id=LED:2030  button_mode=Toggle  chn= 1 cc= 79  range=   0:127 lcd_pos=1:1:4  label="3 KB Cont   ^onoff      "
EVENT_BUTTON id=  1063  type=CC    fwd_id=LED:2031  button_mode=Toggle  chn= 1 cc= 80  range=   0:127 lcd_pos=1:1:4  label="3 Freq      ^highlow     "

EVENT_BUTTON id=  1073  type=CC    fwd_id=LED:2033  button_mode=Toggle  chn= 1 cc= 91  range=   0:127 lcd_pos=1:1:4  label="Pulse 3     ^onoff      "
EVENT_BUTTON id=  1074  type=CC    fwd_id=LED:2034  button_mode=Toggle  chn= 1 cc= 92  range=   0:127 lcd_pos=1:1:4  label="Pulse 5     ^onoff      "
EVENT_BUTTON id=  1075  type=CC    fwd_id=LED:2035  button_mode=Toggle  chn= 1 cc= 93  range=   0:127 lcd_pos=1:1:4  label="Pulse 7     ^onoff      "
EVENT_BUTTON id=  1076  type=CC    fwd_id=LED:2036  button_mode=Toggle  chn= 1 cc= 94  range=   0:127 lcd_pos=1:1:4  label="Pulse 9     ^onoff      "

EVENT_BUTTON id=  1081  type=CC    fwd_id=LED:2041  button_mode=Toggle  chn= 1 cc= 81  range=   0:127 lcd_pos=1:1:4  label="External Audio  ^onoff  "
EVENT_BUTTON id=  1082  type=CC    fwd_id=LED:2042  button_mode=Toggle  chn= 1 cc= 82  range=   0:127 lcd_pos=1:1:4  label="OSC 1  ^onoff           "
EVENT_BUTTON id=  1083  type=CC    fwd_id=LED:2043  button_mode=Toggle  chn= 1 cc= 83  range=   0:127 lcd_pos=1:1:4  label="OSC 2  ^onoff           "
EVENT_BUTTON id=  1084  type=CC    fwd_id=LED:2044  button_mode=Toggle  chn= 1 cc= 84  range=   0:127 lcd_pos=1:1:4  label="OSC 3  ^onoff           "
EVENT_BUTTON id=  1085  type=CC    fwd_id=LED:2045  button_mode=Toggle  chn= 1 cc= 85  range=   0:127 lcd_pos=1:1:4  label="Noise  ^onoff           "

EVENT_BUTTON id=  1086  type=CC    fwd_id=LED:2046  button_mode=Toggle  chn= 1 cc= 86  range=   0:127 lcd_pos=1:1:4  label="Filter Mode  ^filmode   "
EVENT_BUTTON id=  1087  type=CC    fwd_id=LED:2047  button_mode=Toggle  chn= 1 cc= 87  range=   0:127 lcd_pos=1:1:4  label="Env Gate  ^envgate     "

 

If I reboot the midibox, all buttons and LEDs work as intended. But after a couple of button presses, suddenly two strange things happen:

- Rotary switches start to lock each other out. If one switch is in position green on the matrix table, the same position in terms of DIN row of other switches is not registered any longer.

- Switches trigger all button events in the same row (e.g. the ones marked yellow in the matrix table). One small detail is that if this happens, the LEDs of the corresponding buttons are getting brighter, the more switches of this row are in the actual ON position. For example, if ID 1009 suddenly starts to trigger ID1025. 1041, 1057 and 1073, LED 2025 and 2033 switch on. If the second rotary switch is set to the position wit the ID1025, the LEDs 2025 and 2033 get brighter. If I toggle on button 1057 (pressing and releasing it), both LEDs 2025 and 2033 even get brighter. In reverse, if I toggle buttons off, the LEDs get dimmer again. You can actually see differently bright lit LEDs in the picture I took of the front panel mockup.

 

Now what could the actual problem behind this behavior be? What is strange is, that everything always works after rebooting and suddenly starts, after I pressed a couple of buttons or did a couple of switches. Can it be some capacitive behavior of the ribbon cables I used to connect the switches (some are up to 40cm long) which builds up over time? Or could it have something to do with the fact that the rotary switches trigger one of the 4 to 8 switches in every scan (some kind of stack overflow)? What do you think I could try to get closer to a solution?

 

I appreciate your thoughts and hints regarding this behavior. 

 

Best regards and a happy weekend

Andy

 

 

Link to comment
Share on other sites

Hi Andy,

long cables between DIO_MATRIX and buttons/LEDs shouldn't cause a big problem, but it's important that the cable between CORE and DIO module is as short as possible (typically 10cm and not more than 20 cm), otherwise random things can happen due to transfer failures to the shift registers.

If this isn't already the reason, I would recommend two strategies:

1) SW side: reduce the configuration and check if the problem comes up again. E.g. remove all parts from a matrix row, and/or from a matrix column

2) HW side: disconnect cables from a row or column

Best Regards, Thorsten.

P.S.: I assume that the 1N4148 diodes have been soldered for all buttons/switches, because without them one switch could influence the other switches of the same row

Link to comment
Share on other sites

Hey guys

Thanks for your suggestions.

@Thorsten:

- The serial cable length is below 10cm. If I take a 20cm long one, nothing changes in the behavior.
- I tried to reduce the config to only 15 toggle buttons, but that won't change anything. A couple of button presses and suddenly they influence each other again, where before they work individually.
- On the hardware side it gets a bit trickier, since all buttons are soldered to the distribution board. The only thing I know is, that the same problem occurred ever since I assembled my front panel, when I only had the rotary switches connected before the toggle switches.
- Jup, 1n4148s are all good.

@latigid on: I measure 5V with +/-400mV noise from the CPU. Should I be worried about the noise? I tried attaching an additional larger cap, but that didn't help with noise of course. Supplying extra 5V won't help unless I would cut the connection to the processor board.

@FantomXR: It's a print screen out of the Moog Voyager Synth PDF manual. Horrible resolution, but a start to get the front panel together :-) I am currently redesigning the layout in inkscape which is a freakin pain in the butt since lines get misaligned frequently and I didn't manage to get nice concentric scales around the buttons (the nice plugin for exactly that which I found online doesn't work with my installation).

I'm still not happy about the fact, that the config always works fine after a reboot for a couple of button presses. Any other idea how to nail this?

 

Cheers

Andy

 

 

Link to comment
Share on other sites

The 0.4V noise is unusual, but shouldn't cause a problem.

However, another possible reason could be, that you forgot to stuff Jumper J6 to select the pull-ups, and/or that there is a problem with the pull-up resistors (see schematic: http://www.ucapps.de/mbhp/mbhp_dio_matrix.pdf )

This hint might sound strange for you, but I learnt that sometimes it makes sense to mention even the obvious things: http://midibox.org/forums/topic/19699-flashed-bootloader-onto-lpc17-ok-but-cannot-flash-apps-help/?do=findComment&comment=171514 ;-)

Best Regards, Thorsten.

 

 

Link to comment
Share on other sites

Alright, a little step closer:

J6 is set correctly, the pull-up resistors are the right value and solidly solderd and I also checked J27 which is fine as well (also the signal itself, not just the jumper).

But what I figured out is, that if I feed both 5V and GND directly from the PSU to the board, the fault happens much less (which means it does happen but much later). Also the noise level on the 5V rail lowers from +/-400mW to +/-60mV. But still, it does happen far too often. Also, if I connect my scope to the rail at the board, it happens more often. I soldered some 100uF cap and a 1000p cap to the board which unfortunately did not help at all. But it even gets more mysterious. If I turn AINSER64 pots, I can provoke the fault as well, which never happened before. Of course, the wires of these pots cross the button wires at some point, which won't be possible to avoid.

 

Well, I am a bit lost here with this mystery.

Link to comment
Share on other sites

You're right...here is what we are talking about:

IMG_1621.thumb.JPG.8977a82899b1199fa6ad3

Marked red is the DIO Matrix board close to the processor right below (8cm ribbon). Then green is the distribution board which is connected with two 20cm flat flex cables and orange is another 20cm flat flex with three LED push button boards (two mounted on the front panel and the one with visible buttons floating). In the back you can see the rotary switches also connected to the distribution board and the smaller parts are pots connected directly to the AINSER_64.

Ignore the other ribbon cables in the lower part of the image. These are temporary CV connections of the analog section. I don't think they can be causing interference, since the CVs are all static voltages from the AOUT_NGs so far (no modulation yet). The audio path is running through shielded cables.

I know, the front panel cabling is a terrible mess, but so far I don't see a better solution for parts mounted such far away from each other. Everything will be tidied up with cable ties in the end, but that won't help if the cables of the DIO and the AINSER scanning matrices are even closer together. Since the front panel is over 60cm wide, PCBs won't be a good solution to connect the parts either.

 

Cheers,

Andy

 

 

Link to comment
Share on other sites

Yes, it's an LPC17. I run two 20cm long flat flex cables from a DIO-Matrix module to a veroboard at the front pannel (distribution board). From there, I wired the different matrix strands. 

The buttons are TC011s which I described here a while ago: http://midibox.org/forums/topic/19468-led-button-switch-tc011/

Meanwhile I can say that the quality is quite decent.

Cheers,

Andy

Link to comment
Share on other sites

Please do following test before we continue with software based troubleshooting: once the circuit becomes unstable, enter the "reset" command in MIOS terminal -> is the circuit stable again, or does it stay unstable?

Best Regards, Thorsten.

Hey Thorsten

Good point. Yes, it does get stable again when I reset via the terminal.

One new finding is, that if I disconnect the AINSER64 from J19 of the Processor board and the AOUTs subsequently, I cannot provoke the error on the DIO-Matrix anymore regardless of whether or not I have the DIO-Matrix supplied separately from the PSU or not. The scope shows the same noise of +/-60mV at the 5V rail. I checked, if the problem also occurs if the AINSER is connected without the AOUTs and the answer is yes. So the question arises if this is a software bug which only happens if AINSER64 is connected or if it has something to do with interference from the AINSER64 scan cables. But even if I turn a pot which is on a strand 20cm away from the DIO-Matrix cables, the problem still occurs. If I disconnect the scan cables of the AINSER64 which cross my DIO-Matrix cable, and the processor goes into unlimited value change scanning at these lines, the error of the DIO-Matrix occurs instantly. One last thing I can test is if the error can be provoked if I disconnect the crossing lines but also ground these inputs in order to not having value changes at these inputs all the time.

Find the whole config file. Maybe there is a clue about the problem in there:

 default.ngc

 

Thanks guys for bearing with me and best regards,

Andy

Edited by Highcooley
added NGC
Link to comment
Share on other sites

Hi Andy,

meanwhile I've an idea under which conditions this behaviour could be observed (although I've no idea how this could happen with your configuration): if a LED (DOUT) function overwrites the pins at DOUT #1, D7..D0, the matrix row selection pattern would be falsified so that a single row could trigger multiple button events, and turn on multiple LEDs of the same row.

In order to check if this hypothesis is the reason for the problems, I added a new debug command "show douts", which should output:

[351689.954] Page  0: 7f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[351689.954] Page  1: bf 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[351689.954] Page  2: df 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[351689.956] Page  3: ef 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[351689.956] Page  4: f7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[351689.958] Page  5: fb 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[351689.958] Page  6: fd 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[351689.960] Page  7: fe 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[351689.960] Page  8: 7f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[351689.961] Page  9: bf 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[351689.962] Page 10: df 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[351689.963] Page 11: ef 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[351689.964] Page 12: f7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[351689.965] Page 13: fb 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[351689.965] Page 14: fd 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[351689.966] Page 15: fe 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[351689.967] Page 16: 7f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[351689.968] Page 17: bf 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[351689.969] Page 18: df 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[351689.970] Page 19: ef 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[351689.971] Page 20: f7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[351689.972] Page 21: fb 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[351689.972] Page 22: fd 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[351689.973] Page 23: fe 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[351689.974] Page 24: 7f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[351689.975] Page 25: bf 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[351689.976] Page 26: df 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[351689.977] Page 27: ef 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[351689.978] Page 28: f7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[351689.979] Page 29: fb 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[351689.979] Page 30: fd 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[351689.981] Page 31: fe 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

So, we've 32 pages which are cycled with each SRIO update, and the first column (which corresponds to a matrix row) shows the output pattern of the SRIO cycle.

We should see 8 times the sequence 7f bf df ef f7 fb fd fe (which is nothing else than a running-zero, here the binary representation: 01111111 10111111 11011111 11101111 11110111 11111011 11111101 11111110)

Could you please run following firmware version:
http://www.ucapps.de/mios32/midibox_ng_v1_033_pre11.zip

Wait until random events are triggered, and then enter the "show douts" command.
Check if you see four times the value sequence that I explained above, if you notice a different value please let me know
(Note that MIOS terminal output can be copy&pasted, just select multiple lines and right-click on the lines)

 

Additional experiment (now considering more the HW side): 

What happens if you disable the AINSER (configuration) command, what happens when you disable the AOUT (configuration) command, what happens when you disable both?

And last but not least: do you have a .NGR file, and what is the content?

Best Regards, Thorsten.

 

Edited by TK.
Link to comment
Share on other sites

As soon as the error occurs, I get:

[523254.412] Page  0: 6f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[523254.412] Page  1: af 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[523254.414] Page  2: cf 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[523254.414] Page  3: ef 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[523254.416] Page  4: e7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[523254.416] Page  5: eb 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[523254.418] Page  6: ed 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[523254.418] Page  7: ee 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[523254.419] Page  8: 6f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[523254.419] Page  9: af 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[523254.421] Page 10: cf 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[523254.421] Page 11: ef 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[523254.423] Page 12: e7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[523254.423] Page 13: eb 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[523254.424] Page 14: ed 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[523254.426] Page 15: ee 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[523254.426] Page 16: 6f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[523254.428] Page 17: af 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[523254.428] Page 18: cf 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[523254.428] Page 19: ef 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[523254.430] Page 20: e7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[523254.430] Page 21: eb 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[523254.432] Page 22: ed 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[523254.432] Page 23: ee 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[523254.434] Page 24: 6f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[523254.434] Page 25: af 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[523254.436] Page 26: cf 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[523254.436] Page 27: ef 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[523254.436] Page 28: e7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[523254.438] Page 29: eb 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[523254.438] Page 30: ed 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[523254.439] Page 31: ee 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

before that, all is well. I used this command several times when I had the error with the same sequence. I'm wondering how this zero gets to the fifth position of the string. But of course, all is off afterwards.

 

Also, if I disable AINSER, the error never occurs. Also with AINSER and AOUT. But with AOUT off and AINSER on, I have the problem regularly. So it's the AINSER command which seems to have something to do with the problem.

 

I didn't have a .NGR but now do have one with the following in it:

if ^section == 0
  exec_meta RetrieveAinserValues
  exec_meta DumpSnapshot
endif

...since I accidentally had it in the .NGC which didn't work of course. Unfortunately this also doesn't initialize the Ainsers somehow. So I have to turn each knob once to initialize it until I can test the synth.

 

Cheers

Andy

Link to comment
Share on other sites

Ok, we are coming closer to the root cause! :)

Next tests with AOUT and AINSER enabled

1) remove the fwd_id=CV:x statements from EVENT_AINSER - problem still occurs?

2) remove the fwd_id=LED:x statements from EVENT_BUTTON - problem still occurs?

Best Regards, Thorsten.

Link to comment
Share on other sites

Thanks! For me it's clear now (although it's still a hypothesis - I haven't doublechecked yet - but I'm very sure ;-):
it seems to be related to a software bug indeed!

EVENT_AINSER forwards the value to CV; the AINSER event has some custom flags:

  struct {
    u16 ain_mode:4; // mbng_event_ain_mode_t
    u16 ain_sensor_mode:4;  // mbng_event_ain_sensor_mode_t
  } AINSER;

and CV has some custom flags as well - they will be shared with the same variable:

  struct {
    u16 fwd_gate_to_dout_pin:9;
    u16 cv_inverted:1;
    u16 cv_hz_v:1;
    u16 cv_gate_inverted:1;
  } CV;

You are using a special ain_mode in your configuration: parallax.

The corresponding value for this mode is 4

From MBNG_CV_NotifyReceivedValue():

      if( item->custom_flags.CV.fwd_gate_to_dout_pin ) {
        if( debug_verbose_level >= DEBUG_VERBOSE_LEVEL_INFO ) {
          DEBUG_MSG("-> Setting DOUT Pin #%d=%d\n", item->custom_flags.CV.fwd_gate_to_dout_pin-1, gate_value);
        }       
        MIOS32_DOUT_PinSet(item->custom_flags.CV.fwd_gate_to_dout_pin-1, gate_value);
      }

Which means: custom_flags.AINSER.ain_mode=4 will turn into custom_flags.CV.fwd_gate_to_dout_pin
And therefore MBNG_CV_NotifyReceivedValue() could set DOUT pin 1.D3 to 0 under certain cirumstances (value=0), with the result that the row selection pattern will be influenced!

Now I've to find a way how to handle the shared custom_flags for the case that values are forwarded.
Currently I think that it's safe to clear the flags before forwarding under the assumption, that the receiver will handle them as "passive".

Could you please check this "blind" (untested) change?
-> http://www.ucapps.de/mios32/midibox_ng_v1_033_pre12.zip

Best Regards, Thorsten.

Edited by TK.
Link to comment
Share on other sites

Hey Thorsten

Unfortunately, the pre12 didn't have the expected effect and I still get the same scanning sequence. But you are definitely close. I changed all the ain_modes to "direct" and repeatedly get the following sequence as soon as the error occurs:

[607193.357] Page  0: 7f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[607193.357] Page  1: 3f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[607193.359] Page  2: 5f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[607193.360] Page  3: 6f 42 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[607193.361] Page  4: 77 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[607193.361] Page  5: 7b 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[607193.363] Page  6: 7d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[607193.363] Page  7: 7e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[607193.365] Page  8: 7f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[607193.365] Page  9: 3f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[607193.367] Page 10: 5f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[607193.367] Page 11: 6f 42 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[607193.369] Page 12: 77 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[607193.369] Page 13: 7b 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[607193.371] Page 14: 7d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[607193.371] Page 15: 7e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[607193.373] Page 16: 7f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[607193.373] Page 17: 3f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[607193.375] Page 18: 5f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[607193.375] Page 19: 6f 42 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[607193.377] Page 20: 77 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[607193.377] Page 21: 7b 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[607193.377] Page 22: 7d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[607193.379] Page 23: 7e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[607193.379] Page 24: 7f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[607193.381] Page 25: 3f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[607193.381] Page 26: 5f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[607193.383] Page 27: 6f 42 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[607193.383] Page 28: 77 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[607193.385] Page 29: 7b 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[607193.385] Page 30: 7d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[607193.386] Page 31: 7e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Changing back to parallax results in the old wrong sequence again.

I hope, these info helps for further debugging.

Best Regards,

Andy

 

Link to comment
Share on other sites

Hey TK

You're the man! All fine, the AINSER doesn't affect the DIO Matrix anymore. Thank you very much for your super fast support.

Now I only have to figure out why I ...

a) always have a "note on" event staying on, when I hit a key on the midi keyboard attached for the first time after restart. It stays on until I hit the lowest note of the keyboard once. I already tried to set another dout pin to rule out an overflow of the DIO matrix scan pattern, but get the same effect.

and ...

b) why my .NGR script always only writes 0s into the .NGS file during startup. I do have to slightly turn every single knob once to get the AINSER values and output them to the AOUTS. So I was not able to test the parallax mode yet. However, I haven't implemented a menue with a manual dump and load snapshot command.

 

Anyways, you brought me a huge step further with my project. I owe you one.

Cheers,

Andy

Link to comment
Share on other sites

Great that we finally solved this mysterious issue! :)

a) always have a "note on" event staying on, when I hit a key on the midi keyboard attached for the first time after restart. It stays on until I hit the lowest note of the keyboard once. I already tried to set another dout pin to rule out an overflow of the DIO matrix scan pattern, but get the same effect.

you mean, that you attach the keyboard during runtime, or is it already connected while the .NGC script is loaded?

b) why my .NGR script always only writes 0s into the .NGS file during startup. I do have to slightly turn every single knob once to get the AINSER values and output them to the AOUTS. So I was not able to test the parallax mode yet. However, I haven't implemented a menue with a manual dump and load snapshot command.

You've to capture the AINSER values once they have been scanned.

This can be done from the .NGR file:

if ^section == 0
  # wait until all values have been scanned (should be after >= 50 mS)
  delay_ms 50
  
  # now capture the AINSER values
  exec_meta RetrieveAinserValues
endif

Best Regards, Thorsten. 

Link to comment
Share on other sites

Jup, I am very happy too, since I really was at my wit's end.

To a) The Midi Keyboard is attached, running and the midibox also connected to MIOS studio. After the .NGC script is loaded, the assigned note on DOUT pin is low. But as soon as I hit the first key, using either the midi keyboard or the soft keyboard of the MIOS studio, the DOUT pin goes high and stays when I release the key. The only way to get it low again is to press the C-2 key (lowest in the scale) once. After that, the note on event acts as it should and only goes high as long as the key is pressed.

To b) Except for the delay, this is what I wrote into the .NGR file. But for good measure, I copied your code and replaced mine to err out typers. The ^section == 0 gets executed (I checked with a "Hello World" to the LCD) but the show pool command in MIOS studio shows only zeros for all inputs. As soon as I move a pot, the actual value of this pot is shown if I do show pool again. I tried to switch the pot mode to direct instead of parallax but this does not change anything.

 

Best Regards, Andy

Link to comment
Share on other sites

To a) The Midi Keyboard is attached, running and the midibox also connected to MIOS studio. After the .NGC script is loaded, the assigned note on DOUT pin is low. But as soon as I hit the first key, using either the midi keyboard or the soft keyboard of the MIOS studio, the DOUT pin goes high and stays when I release the key. The only way to get it low again is to press the C-2 key (lowest in the scale) once. After that, the note on event acts as it should and only goes high as long as the key is pressed

could you please determine with the "show id DOUT:1" command the values between the different states?
I could imagine, that this is a side effect caused by the snapshot function

To b) Except for the delay, this is what I wrote into the .NGR file. But for good measure, I copied your code and replaced mine to err out typers. The ^section == 0 gets executed (I checked with a "Hello World" to the LCD) but the show pool command in MIOS studio shows only zeros for all inputs. As soon as I move a pot, the actual value of this pot is shown if I do show pool again. I tried to switch the pot mode to direct instead of parallax but this does not change anything.

Meanwhile I know the reason: after reset the MBNG firmware will wait for 2 seconds until controllers will be enabled. This is to ensure that SD Card content has been read, and voltages are settled.

Could you please increase the delay to 2500 mS?

if ^section == 0
  # wait until all values have been scanned (consider 2 seconds startup delay + a little bit margin)
  delay_ms 2500
  
  # now capture the AINSER values
  exec_meta RetrieveAinserValues
endif

Best Regards, Thorsten.

 

Link to comment
Share on other sites

Aaaah, 2500ms did the trick. I already tried 500ms before, but this was obviously to short.

 

"show id DOUT:1" only responds with "Invalid element name 'DOUT'!". But using "show id CV:4", i get the following values:

After reset (Note on DOUT pin is low):

[782449.918] id=CV:4 (hw_id=CV:4)
[782449.918]   - bank=0
[782449.918]   - condition: none
[782449.918]   - fwd_id=DISABLED:0
[782449.918]   - fwd_value=off
[782449.918]   - fwd_to_lcd=1
[782449.918]   - type=NoteOn
[782449.919]   - chn=1
[782449.919]   - key=128
[782449.919]   - use_key_number=1
[782449.919]   - ports=10001000000010000000
[782449.919]   - value=424
[782449.919]   - secondary_value=3
[782449.919]   - map=0
[782449.919]   - map_ix=0
[782449.919]   - min=0
[782449.919]   - max=127
[782449.919]   - offset=0
[782449.919]   - dimmed=0
[782449.920]   - rgb=0:0:0
[782449.920]   - syxdump_pos=0:0
[782449.920]   - radio_group=0
[782449.920]   - fwd_gate_to_dout_pin=3.D0
[782449.920]   - cv_inverted=0
[782449.920]   - cv_gate_inverted=0
[782449.921]   - cv_hz_v=0
[782449.921]   - led_matrix_pattern=Undefined
[782449.921]   - colour=0
[782449.921]   - lcd_pos=1:1:6
[782449.921]   - label="^std_key"

 

After first key press and release (Note on DOUT pin is high, the audible frequency defers from the key just pressed): 

[782449.918] id=CV:4 (hw_id=CV:4)
[782449.918]   - bank=0
[782449.918]   - condition: none
[782449.918]   - fwd_id=DISABLED:0
[782449.918]   - fwd_value=off
[782449.918]   - fwd_to_lcd=1
[782449.918]   - type=NoteOn
[782449.919]   - chn=1
[782449.919]   - key=128
[782449.919]   - use_key_number=1
[782449.919]   - ports=10001000000010000000
[782449.919]   - value=424
[782449.919]   - secondary_value=3
[782449.919]   - map=0
[782449.919]   - map_ix=0
[782449.919]   - min=0
[782449.919]   - max=127
[782449.919]   - offset=0
[782449.919]   - dimmed=0
[782449.920]   - rgb=0:0:0
[782449.920]   - syxdump_pos=0:0
[782449.920]   - radio_group=0
[782449.920]   - fwd_gate_to_dout_pin=3.D0
[782449.920]   - cv_inverted=0
[782449.920]   - cv_gate_inverted=0
[782449.921]   - cv_hz_v=0
[782449.921]   - led_matrix_pattern=Undefined
[782449.921]   - colour=0
[782449.921]   - lcd_pos=1:1:6
[782449.921]   - label="^std_key"

 

After pressing the correct key with the same as the audible frequency (it turns out, that it is not always key 0 but this time was key 40) --> (Note on DOUT pin is low):

[782449.918] id=CV:4 (hw_id=CV:4)
[782449.918]   - bank=0
[782449.918]   - condition: none
[782449.918]   - fwd_id=DISABLED:0
[782449.918]   - fwd_value=off
[782449.918]   - fwd_to_lcd=1
[782449.918]   - type=NoteOn
[782449.919]   - chn=1
[782449.919]   - key=128
[782449.919]   - use_key_number=1
[782449.919]   - ports=10001000000010000000
[782449.919]   - value=424
[782449.919]   - secondary_value=3
[782449.919]   - map=0
[782449.919]   - map_ix=0
[782449.919]   - min=0
[782449.919]   - max=127
[782449.919]   - offset=0
[782449.919]   - dimmed=0
[782449.920]   - rgb=0:0:0
[782449.920]   - syxdump_pos=0:0
[782449.920]   - radio_group=0
[782449.920]   - fwd_gate_to_dout_pin=3.D0
[782449.920]   - cv_inverted=0
[782449.920]   - cv_gate_inverted=0
[782449.921]   - cv_hz_v=0
[782449.921]   - led_matrix_pattern=Undefined
[782449.921]   - colour=0
[782449.921]   - lcd_pos=1:1:6
[782449.921]   - label="^std_key"

As described, everything works as it should afterwards.

 

Best Regards, Andy

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...
×
×
  • Create New...