Jump to content

Recommended Posts

Posted

As far as I see in lc_buttons_inc are not filtered:

;; --------------------------------------------------------------------------

;;  This function is called when an button has been toggled

;;  Input:

;;     o Button number in WREG and MIOS_PARAMETER1

;;     o Button value MIOS_PARAMETER2:

;;       - 1 if button has been released (=5V)

;;       - 0 if button has been pressed (=0V)

;; --------------------------------------------------------------------------

LC_BUTTON_Handle

...

r;; send third MIDI byte: 0x7f if button pressed, else 0x00

movlw 0x7f

IFSET MIOS_PARAMETER2, 0, movlw 0x00

call MIOS_MIDI_TxBufferPut

...

The handling of the special purpose buttons are handled in lc_sfb.inc.

Thre you can see how to filter 0->1 transitions. Just return if MIOS_PARAMETER2 is 0 ;)

;; switch to display page 0

LC_SFB_DISPLAY_Page0

;; don't continue if button has been depressed

IFSET MIOS_PARAMETER2, 0, return

Posted

raphael,

Thank you for your post.

This is the part of the code I'm after. Do you think I am right in thinking that the Host itself "Logic" is really only interested in the 0x00 >  0x7f  >  0x00 transition  ??? thereby toggling the specified host function?

I'm going to have to modify the app, but I trying to understand how MIOS handels voltages on spacific shit register pins, can I define different behaviour (i.e. some buttons momentary and others latching) for individule pins  ???

 

;; send third MIDI byte: 0x7f if button pressed, else 0x00

  movlw  0x7f

  IFSET  MIOS_PARAMETER2, 0, movlw 0x00

Posted
This is the part of the code I'm after. Do you think I am right in thinking that the Host itself "Logic" is really only interested in the 0x00 >  0x7f  >  0x00 transition  Huh thereby toggling the specified host function?

yes!

Best Regards, Thorsten.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...