Subversion Repositories svn.mios

Rev

Rev 1116 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1116 Rev 1177
Line 1... Line 1...
1
;$Id: main.inc 1116 2013-03-17 17:33:07Z tk $
1
;$Id: main.inc 1177 2014-08-10 16:15:49Z tk $
2
;
2
;
3
;  Source Code of MBHP_MF_NG Firmware
3
;  Source Code of MBHP_MF_NG Firmware
4
;
4
;
5
; ==========================================================================
5
; ==========================================================================
6
;
6
;
Line 91... Line 91...
91
	movwf	TRISE
91
	movwf	TRISE
92

92

93
	;; ------------------------------------------------------------------
93
	;; ------------------------------------------------------------------
94
	;; configure SRIO (only a single DIN SR is connected for touchsensors)
94
	;; configure SRIO (only a single DIN SR is connected for touchsensors)
95
	;; ------------------------------------------------------------------
95
	;; ------------------------------------------------------------------
96
	movlw	0x01			; use 1 shift register
96
	movlw	1			; use 1 shift register
97
	call	MIOS_SRIO_NumberSet
97
	call	MIOS_SRIO_NumberSet
98
	movlw	0x01			; set update frequncy to 1/1 mS
98
	movlw	1			; set update frequncy to 1/1 mS
99
	call	MIOS_SRIO_UpdateFrqSet
99
	call	MIOS_SRIO_UpdateFrqSet
100
	movlw	10			; 10 mS debouncing
100
	movlw	10			; 10 mS debouncing
101
	call	MIOS_SRIO_DebounceSet
101
	call	MIOS_SRIO_DebounceSet
102

102

103
	;; ------------------------------------------------------------------
103
	;; ------------------------------------------------------------------
Line 840... Line 840...
840
	call	MF_SuspendGet
840
	call	MF_SuspendGet
841
	skpnz
841
	skpnz
842
	rgoto	LC_MF_FaderEvent_End
842
	rgoto	LC_MF_FaderEvent_End
843
843
844
USER_AIN_NotifyChange_SendAlways
844
USER_AIN_NotifyChange_SendAlways
-
 
845
-
 
846
	;; map MIOS_PARAMETER[23] to calibration table
-
 
847
	clrc
-
 
848
	rlf	MIOS_PARAMETER2, W
-
 
849
	movwf	TBLPTRL
-
 
850
	rlf	MIOS_PARAMETER3, W
-
 
851
	movwf	TBLPTRH
-
 
852
	clrf	TBLPTRU
-
 
853
-
 
854
	movlw	LOW(CAL_FADER_TABLE)
-
 
855
	addwf	TBLPTRL, F
-
 
856
	movlw	HIGH(CAL_FADER_TABLE)
-
 
857
	addwfc	TBLPTRH, F
-
 
858
	tblrd*+
-
 
859
	movff	TABLAT, MIOS_PARAMETER2
-
 
860
	tblrd*+
-
 
861
	movff	TABLAT, MIOS_PARAMETER3
-
 
862
845
863
846
	;; branch depending on selected operation mode
864
	;; branch depending on selected operation mode
847
	SET_BSR	MF_BASE
865
	SET_BSR	MF_BASE
848
	movf	MF_OPERATION_MODE, W, BANKED
866
	movf	MF_OPERATION_MODE, W, BANKED
849
	JUMPTABLE_2BYTES 26	; entries
867
	JUMPTABLE_2BYTES 26	; entries
Line 1100... Line 1118...
1100
	
1118
	
1101
;; ---------------------------------------------------------
1119
;; ---------------------------------------------------------
1102
LC_MF_FaderEvent_End
1120
LC_MF_FaderEvent_End
1103
	;; thats all
1121
	;; thats all
1104
	return
1122
	return
-
 
1123

-
 
1124
;; ---[ Calibration Tables ]---
-
 
1125
-
 
1126
	org 0x6000
-
 
1127
CAL_MOTOR_TABLE
-
 
1128
#include "cal_motor.inc"
-
 
1129
-
 
1130
	org 0x6800
-
 
1131
CAL_FADER_TABLE
-
 
1132
#include "cal_fader.inc"
1105

1133
1106
1134
1107
;; ---[ EEPROM content ]---
1135
;; ---[ EEPROM content ]---
1108
#include "mf_presets.inc"
1136
#include "mf_presets.inc"
-
 
1137

1109

1138
1110
	END
1139
	END