Hi Thorsten,
That doesn’t work, no LEDs light at all.
I’m wondering if my question caused some confusion.
First, the LEDs act like ‘OnOff’ mode, when the buttons are in OnOnly, i.e. they do not stay on in ‘OnOnly’ button mode.
Is this correct?
Your suggestion to use ;
MB64_BUTTON_OnOnly
;; new
SET_BSR MB64_BUTTON_VALUES_SR0+3
clrf MB64_BUTTON_VALUES_SR0+3, BANKED
actually works well, though inverted, except it is reflected in the LCD display by the buttons all being ‘on’ in that SR, which I would expect because BUTTON_VALUES are being altered, but it does not happen with the ‘un-altered’ App.
But it does inticate which button was pressed, by it’s LED being off.
Because your suggestion, above, affects the display, is this a better method?
I could use this;
MB64_BUTTON_OnOnly
;; save status of button
rcall MB64_BUTTON_Hlp_SaveStat
;; my new lines to clear DOUT SR3
movlw 0
movwf MIOS_PARAMETER1
movlw 3
call MIOS_DOUT_SRSet
;; restore MIOS_PARAMETER1 in case it’s needed, I’m not sure yet?
movff TMP3, MIOS_PARAMETER1
;; when on: send button value defined in dump
;; when off: send nothing
BRA_IFSET TMP1, 0, ACCESS, MB64_BUTTON_NotifyChangeEnd
rgoto MB64_BUTTON_Send
This would not affect the display. But it is not inverted, and as the current button LED does not stay on in ‘OnOnly’ mode, I could invert the LEDS by changing to;
;; my new lines to set DOUT SR3
movlw 1
movwf MIOS_PARAMETER1
Then I would see the last pressed button as the one with the LED off?
But all this is because the LED does not follow the button mode ‘OnOnly’.
I did not know this when I asked the first question, as I was still building the box, I just assumed. Now that the box is built and working just fine, (great job Thorsten and Smash), I do not know what the LED should do in ‘OnOnly’ mode. I thought that the LED would follow the button mode. Is there something wrong, or have I assumed wrong?
Perhaps you could help my confusion?
thanks again, and my first MB64 is working 1st time, no problems except this issue (which is minor, really), your time and effort is greatly appreciated.
Keith