i found this thread earlier <___base_url___>/index.php?/topic/10513-can-i-get-help-in-changing-the-button-handler-routine-in-midibox64/page__view__findpost__p__88556&do=embed
would this do what i want? and how would i implelent it into my current setting
dout sr1 pins 1-8 are assigned to dinx4 sr8 button 54-64
I don’t know what application you are using, but this is the way I did it in the MB64.
In the file mb64_buttons.inc, around line 237, I changed the routine to this.
MB64_BUTTON_OnOnly
;; when on: send button value defined in dump
;; when off: send nothing
BRA_IFSET TMP1, 0, ACCESS, MB64_BUTTON_NotifyChangeEnd
;; turn off SR4 8 LEDs
SET_BSR MB64_BUTTON_VALUES_SR0+3
setf MB64_BUTTON_VALUES_SR0+3
;; save status of button
rcall MB64_BUTTON_Hlp_SaveStat
rgoto MB64_BUTTON_Send
The shift registers that you want to affect is determined by the two lines, I wanted to use sr4.
SET_BSR MB64_BUTTON_VALUES_SR0+3
setf MB64_BUTTON_VALUES_SR0+3
So in your case you want to affect sr1, so the two lines would look like this
SET_BSR MB64_BUTTON_VALUES_SR0+0
setf MB64_BUTTON_VALUES_SR0+0
You can affect more than 1 shift register, by adding the two lines again, for every shift register you want to affect. For example;
SET_BSR MB64_BUTTON_VALUES_SR0+0
setf MB64_BUTTON_VALUES_SR0+0
SET_BSR MB64_BUTTON_VALUES_SR0+1
setf MB64_BUTTON_VALUES_SR0+1
SET_BSR MB64_BUTTON_VALUES_SR0+2
setf MB64_BUTTON_VALUES_SR0+2
SET_BSR MB64_BUTTON_VALUES_SR0+3
setf MB64_BUTTON_VALUES_SR0+3
That would do all 4 shift registers.
Bassman