Subversion Repositories svn.mios

Compare Revisions

Ignore whitespace Rev 1197 → Rev 1198

/trunk/apps/controllers/midio128/src/main.inc
89,6 → 89,20
;; init default LCD offsets
call MIDIO_LCD_SetDefaultOffsets
 
#if DEFAULT_AIN_ENABLED > 0
;; optional:
;; initialize the AIN driver
movlw DEFAULT_AIN_ENABLED
call MIOS_AIN_NumberSet
#if DEFAULT_AIN_ENABLED > 8
call MIOS_AIN_Muxed ; use multiplexer interface
#else
call MIOS_AIN_UnMuxed ; don't use multiplexer interface
#endif
movlw 0x07 ; set deadband to 7
call MIOS_AIN_DeadbandSet
#endif
 
;; ------------------------------------------------------------------
return
 
280,6 → 294,29
;; o MSB value in MIOS_PARAMETER3
;; --------------------------------------------------------------------------
USER_AIN_NotifyChange
#if DEFAULT_AIN_ENABLED > 0
;; store pot number in PRODL
movwf PRODL
 
;; copy 7bit value into MIOS_PARAMETER2 (pot number already in WREG)
call MIOS_AIN_Pin7bitGet
movwf MIOS_PARAMETER2
 
;; restore pot number
movff PRODL, MIOS_PARAMETER1
 
;; now: pot number in WREG and MIOS_PARAMETER1
;; 7-bit value in MIOS_PARAMETER2
 
movlw 0xb0 ; CC channel #1
call MIOS_MIDI_TxBufferPut
movf MIOS_PARAMETER1, W
addlw 16 ; CC#16 + pot number
call MIOS_MIDI_TxBufferPut
movf MIOS_PARAMETER2, W ; CC value
call MIOS_MIDI_TxBufferPut
#endif
return
 
/trunk/apps/controllers/midio128/setup_midio128.asm
47,6 → 47,22
; Default value of touch sensor sensitivity
#define DEFAULT_TS_SENSITIVITY 0x03
;
; Enable AIN option?
; Up to 64 pots can be connected to J5, unusued analog inputs have to be clamped to ground!
; The sent MIDI message is not configurable here, please customize in src/main.inc
; (USER_AIN_NotifyChange function) instead
; By default, it will send CC#16, 17, 18, ... over channel #1
; The parameter also specifies the number of pots
; 0: AIN disabled
; 1: 1 pot directly connected to J5.A0, remaining inputs don't need to be clamped
; 2: 2 pots directly connected to J5.A0 and J5.A1, remaining inputs don't need to be clamped
; ...
; 8: 8 pots directly connected to J5.A0..J5.A7
; 9: 9 pots, requires 4051 multiplexers (-> see MBHP_AIN page)
; ...
; 64: 64 pots, requires 4051 multiplexers (-> see MBHP_AIN page)
#define DEFAULT_AIN_ENABLED 0
;
; For MIDI activity monitor: define the DOUT pins for the Rx and Tx LED
#define DEFAULT_MIDI_MONITOR_ENABLED 0 ; if 1, the Tx/Rx LEDs are enabled
#define DEFAULT_MIDI_RX_LED 0x00 ; DOUT SR#1, pin D0