Jump to content

help needed with button handling


eptheca
 Share

Recommended Posts

Hi,

I'm building a MB64 and would really apprechiate some help with the button handling

I trying to get the led's for "onOnly" buttons to stay on until the next button in that shift reg. is pushed

I use this code in the mb64_buttons.inc file:


;; (button value stored in TMP1)

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 SR1 8 LEDs 

    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 

        ;; save status of button 

        rcall   MB64_BUTTON_Hlp_SaveStat 

        rgoto   MB64_BUTTON_Send

this works in a way, but it affects the other buttons as well

see video

I need help to have the first 8 led's only light the last pressed og theese 8,

the next 3 toggle, and the last 4 only light the last pressed of theese 4

I have posted this the wrong place earlier, hope this is the right one

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