MPASM 03.60 Released SSW.ASM 3-21-2004 19:34:18 PAGE 1 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00001 ; 00002 ; 00003 ; Code for the 12F675 PIC based Servo Controlled Camera Switch. 00004 ; SCCS: @(#) ssw.asm 1.6@(#) 00005 00006 processor 12F675 00007 radix dec 00008 errorlevel -302 00009 ; 00010 ; This module is configurable for a number of different combinations of 00011 ; facilities. 00012 ; 00013 ; It is *your* responsibility to ensure that the configuration parameters set 00014 ; in the code below match your components and features required. 00015 ; 00016 ; The options are: 00017 ; 00018 ; FIXED - selects fixed (ie. non configurable mode) 00019 ; set FIXED to 0 for the configurable mode 00020 ; set FIXED to 1 for the non-configurable mode 00021 ; *NOTE* when you set FIXED to 1 you also need 00022 ; to ensure the fixed mode parameters below are 00023 ; set correctly 00024 ; 00025 ; SERVOOUT - selects the output to be via a servo. 00026 ; set SERVOOUT to 0 for an open-collector output 00027 ; drive that is suitable for Aiptek/Jazz etc. 00028 ; set SERVOOUT to 1 for servo pulse output 00029 ; 00030 ; LEDOUT - selects whether there is an output LED or not 00031 ; set LEDOUT to 0 to disable the LED drive 00032 ; set LEDOUT to 1 to enable the LED drive 00033 ; 00000000 00034 FIXED equ 0 00000001 00035 SERVOOUT equ 1 00000001 00036 LEDOUT equ 1 00037 00038 ; 00039 ; If fixed (ie. non-configurable) mode is selected then 00040 ; these are the parameters that will apply. 00041 ; These are correct for the Jazz camera with non-servo 00042 ; output. (ie. FIXED == 1, SERVOOUT == 0) 00043 if FIXED 00044 fix_servoidle equ 1500 ; Servo idle position 00045 fix_servofocus equ 1500 ; Servo focus position 00046 fix_servoshutter equ 1500 ; Servo shutter position 00047 00048 fix_timefocus equ 0 ; Time for focuusing 00049 fix_timeshutter equ 2 ; Time for the shutter 00050 fix_timepost equ 10 ; Time post shutter 00051 fix_timekalive equ 55 ; Camera keep-alive time 00052 00053 fix_inputidle equ 1500 ; Input position for idle MPASM 03.60 Released SSW.ASM 3-21-2004 19:34:18 PAGE 2 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00054 fix_inputshutter equ 1800 ; Input position for shutter 00055 fix_inputpoweroff equ 1800 ; Input position for power off 00056 00057 fix_timepoweroff equ 10 ; Time to power off 00058 endif 00059 00060 ; 00061 ; In configurable mode these defaults are loaded into 00062 ; the PIC's EEDATA area during programming so that 00063 ; the PIC starts with 'sensible' values. 00064 if !FIXED 000005DC 00065 ini_servoidle equ 1500 ; Servo idle position 000005DC 00066 ini_servofocus equ 1500 ; Servo focus position 000006D6 00067 ini_servoshutter equ 1750 ; Servo shutter position 00068 00000000 00069 ini_timefocus equ 0 ; Time for focuusing 00000005 00070 ini_timeshutter equ 5 ; Time for the shutter 0000000A 00071 ini_timepost equ 10 ; Time post shutter 00000037 00072 ini_timekalive equ 55 ; Camera keep-alive time 00073 000005DC 00074 ini_inputidle equ 1500 ; Input position for idle 00000708 00075 ini_inputshutter equ 1800 ; Input position for shutter 000004B0 00076 ini_inputpoweroff equ 1200 ; Input position for power off 00077 0000000A 00078 ini_timepoweroff equ 10 ; Time to power off 00079 endif 00080 00081 ; 00082 ; Assumes: 00083 ; Bandgap as calibrated at factory 00084 ; CPD disabled 00085 ; CP disabled 00086 ; BODEN enabled 00087 ; MCLR disabled 00088 ; PWRTE enabled 00089 ; WDT (Watchdog) enabled 00090 ; OSC internal RC (no clockout) 00091 ; 00092 ; The basic circuit for the switch is as follows, this is *not* 00093 ; the complete circuit and the associated Web documentation should 00094 ; be consulted for the full circuit diagram. 00095 ; 00096 ; 00097 ; power ----------------------- 00098 ; | | 00099 ; ----------------- 00100 ; | + (1) (8) - | 00101 ; | PIC12F675 | 00102 ; | | 00103 ; rx | (3) GP4 |-<- 00104 ; >--XXXX-------| GP1 (6) | | (active low rx pulse) 00105 ; 4k7 | (5) GP2 |->- 00106 ; | | MPASM 03.60 Released SSW.ASM 3-21-2004 19:34:18 PAGE 3 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00107 ; | | 00108 ; | (2) GP5 | ----------> LED 00109 ;Switch >----| GP3 (4) | 00110 ; | (7) GP0 | ----------> Servo Out 00111 ; ----------------- 00112 ; 00113 ; 00114 ; Features of this software are as follows: 00115 ; 00116 ; Watchdog timer ensure the software is running, this is used to ensure 00117 ; that the software always gets back to the main sensing code. If 00118 ; it doesn't the chip is reset. 00119 ; 00120 ; Timer 0 is used to measure the elapsed time. 00121 ; 00122 ; This timer runs at 1Mhz with a 1:2 prescaler and is used to 00123 ; run a 2kHz timer channel. 00124 ; 00125 ; Timer 1 is used to measure the input pulse width. Pulse width should be 00126 ; 1.5msec nominal at central position +/- 0.5msec depending on the 00127 ; control direction. 00128 ; 00129 ; At 4Mhz clock timer 1 will run at 0.001msec count rate. This gives 00130 ; count values for 1.5msec that are well within 16-bit resolution. 00131 ; 00132 ; Timer 1 is also used to measure the output pulse width for servo 00133 ; control. 00134 ; 00135 00136 #include 00001 LIST 00002 ; P12F675.INC Standard Header File, Version 1.04 Microchip Technology, Inc. 00283 LIST 00137 2007 3FCC 00138 __CONFIG(_BODEN_ON & _MCLRE_OFF & _PWRTE_ON & _WDT_ON & _INTRC_OSC_NOCLKOUT) 00139 00140 ; Main parameters 00000005 00141 autopulse equ 5 ; Required number 'same value' to program 00000003 00142 autofuzz equ 3 ; +/- autofuzz is the same value 00000019 00143 framems equ 25 ; servo control frame rate 0000000A 00144 debounce equ 10 ; Jumper debounce time in 20msec increments 00000014 00145 lostime equ 20 ; LOS time in 'framems' increments 0000000B 00146 ncfgitems equ 11 ; The number of configuration items 0000055F 00147 stickAat equ 1500-125 ; Position A is < this 00000659 00148 stickBat equ 1500+125 ; Position B is > this 00149 00150 ; GPIO register bits and other constants 00000001 00151 inrxraw equ 1 ; Active high servo input signal 00000002 00152 outrxinv equ 2 ; Active low receiver output (inverted inrxraw) 00000004 00153 inrxbit equ 4 ; Active low rx input always on GP4 00000003 00154 videoswitch equ 3 ; Video mode command switch on GP3 00000000 00155 outservo equ 0 ; Servo drive for shutter operation 00000005 00156 outled equ 5 ; LED drive for flashing signals MPASM 03.60 Released SSW.ASM 3-21-2004 19:34:18 PAGE 4 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00157 00158 ; Timer 0 operates at 2kHz rate for timing purposes 000007D0 00159 T0rate equ 2000 ; 2000 interrupts per second 000000FA 00160 T0cnt equ ((1000000+T0rate/2) / T0rate + 1)/2 00161 00162 00163 ; EEPROM Data offsets 00164 cblock 0 00000000 00165 eep_sidle:3 ; Servo Idle Position and check digit 00000003 00166 eep_sfocus:3 ; Servo Focus Position and check digit 00000006 00167 eep_sshutter:3 ; Servo Shutter Position and check digit 00168 00000009 00169 eep_tfocus:2 ; Focus time 0000000B 00170 eep_tshutter:2 ; Shutter time 0000000D 00171 eep_tpost:2 ; Post shutter tim 0000000F 00172 eep_tkalive:2 ; Keep alive time 00173 00000011 00174 eep_iidle:3 ; Input Idle Position 00000014 00175 eep_ishutter:3 ; Input Shutter Position 00000017 00176 eep_ipoweroff:3 ; Input Power off Position 00177 0000001A 00178 eep_tpoweroff:2 ; Power off time 00179 00180 endc 00181 00182 ; Initialise the EEDATA if we are a configurable version 00183 if !FIXED 00184 eedata16 macro eep, val 00185 org 2100h+eep 00186 de low val 00187 de high val 00188 de (low val) ^ (high val) 00189 endm 00190 eedata8 macro eep, val 00191 org 2100h+eep 00192 de val 00193 de ~val 00194 endm 00195 00196 eedata16 eep_sidle, ini_servoidle 2100 M org 2100h+eep_sidle 2100 00DC M de low ini_servoidle 2101 0005 M de high ini_servoidle 2102 00D9 M de (low ini_servoidle) ^ (high ini_servoidle) 00197 eedata16 eep_sfocus, ini_servofocus 2103 M org 2100h+eep_sfocus 2103 00DC M de low ini_servofocus 2104 0005 M de high ini_servofocus 2105 00D9 M de (low ini_servofocus) ^ (high ini_servofocus) 00198 eedata16 eep_sshutter, ini_servoshutter 2106 M org 2100h+eep_sshutter 2106 00D6 M de low ini_servoshutter 2107 0006 M de high ini_servoshutter MPASM 03.60 Released SSW.ASM 3-21-2004 19:34:18 PAGE 5 LOC OBJECT CODE LINE SOURCE TEXT VALUE 2108 00D0 M de (low ini_servoshutter) ^ (high ini_servoshutter) 00199 00200 eedata8 eep_tfocus, ini_timefocus 2109 M org 2100h+eep_tfocus 2109 0000 M de ini_timefocus 210A 00FF M de ~ini_timefocus 00201 eedata8 eep_tshutter, ini_timeshutter 210B M org 2100h+eep_tshutter 210B 0005 M de ini_timeshutter 210C 00FA M de ~ini_timeshutter 00202 eedata8 eep_tpost, ini_timepost 210D M org 2100h+eep_tpost 210D 000A M de ini_timepost 210E 00F5 M de ~ini_timepost 00203 eedata8 eep_tkalive, ini_timekalive 210F M org 2100h+eep_tkalive 210F 0037 M de ini_timekalive 2110 00C8 M de ~ini_timekalive 00204 00205 eedata16 eep_iidle, ini_inputidle 2111 M org 2100h+eep_iidle 2111 00DC M de low ini_inputidle 2112 0005 M de high ini_inputidle 2113 00D9 M de (low ini_inputidle) ^ (high ini_inputidle) 00206 eedata16 eep_ishutter, ini_inputshutter 2114 M org 2100h+eep_ishutter 2114 0008 M de low ini_inputshutter 2115 0007 M de high ini_inputshutter 2116 000F M de (low ini_inputshutter) ^ (high ini_inputshutter) 00207 eedata16 eep_ipoweroff, ini_inputpoweroff 2117 M org 2100h+eep_ipoweroff 2117 00B0 M de low ini_inputpoweroff 2118 0004 M de high ini_inputpoweroff 2119 00B4 M de (low ini_inputpoweroff) ^ (high ini_inputpoweroff) 00208 00209 eedata8 eep_tpoweroff, ini_timepoweroff 211A M org 2100h+eep_tpoweroff 211A 000A M de ini_timepoweroff 211B 00F5 M de ~ini_timepoweroff 00210 endif 00211 00212 ; RAM Definitions 00213 cblock 20h 00000020 00214 w_save ; Int save: !! Both banks used !! 00000021 00215 sts_save ; 00216 00000022 00217 int_p1sec ; Used for 0.1sec timing by interrupts 00000023 00218 int_1sec ; Used for 1sec timing by interrupt 00219 00220 ; ---- These are the working copies of 00221 ; the EEPROM data. In addition enough 00222 ; bits are maintained for the status 00223 ; on the configuration variables. MPASM 03.60 Released SSW.ASM 3-21-2004 19:34:18 PAGE 6 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00224 00000024 00225 cfg_faultyA ; Faulty config items 00000025 00226 cfg_faultyB 00227 00000026 00228 cfg_servoidleL ; Servo idle position 00000027 00229 cfg_servoidleH 00000028 00230 cfg_servofocusL ; Servo focus position 00000029 00231 cfg_servofocusH 0000002A 00232 cfg_servoshutterL ; Servo shutter position 0000002B 00233 cfg_servoshutterH 00234 0000002C 00235 cfg_timefocus ; Time for focuusing 0000002D 00236 cfg_timeshutter ; Time for the shutter 0000002E 00237 cfg_timepost ; Time post shutter 0000002F 00238 cfg_timekalive ; Camera keep-alive time 00239 00000030 00240 cfg_inputidleL ; Input position for idle 00000031 00241 cfg_inputidleH 00000032 00242 cfg_inputshutterL ; Input position for shutter 00000033 00243 cfg_inputshutterH 00000034 00244 cfg_inputpoweroffL ; Input position for power off 00000035 00245 cfg_inputpoweroffH 00246 00000036 00247 cfg_timepoweroff ; Time to power off 00248 00249 ; ---- Status information 00000037 00250 istatus ; Input signal status information (is_*) 00000038 00251 rxstatus ; Radio Control input status 00252 00000039 00253 gpioout ; Current GPIO output values 00254 0000003A 00255 trigger_icnt ; Trigger operation counter... (0.1sec) 0000003B 00256 kalive_icnt ; Keep alive counter (1sec) 00257 endc 00258 00259 ; Possible istatus bits 00000000 00260 is_programmode equ 0 ; Program mode selected on power up 00000001 00261 is_idlelt equ 1 ; Idle is when input LT cfg_inputidle:16 00000002 00262 is_powerofflt equ 2 ; Poweroff is when input LT cfg_inputpoweroff:16 00000003 00263 is_nokeepalive equ 3 ; Keepalive has been turned off 00000004 00264 is_wnoshutter equ 4 ; Wait for the no shutter state 00000005 00265 is_videoon equ 5 ; We think the camera is running in video 00000006 00266 is_doubleka equ 6 ; Double keep-alive for video mode 00267 00268 ; Possible rxstatus bits 00000000 00269 rx_timeout equ 0 ; Frame timeout in RX signal 00000001 00270 rx_rshutter equ 1 ; Signal is in shutter position now 00000002 00271 rx_rpoweroff equ 2 ; Signal is in poweroff position now 00000003 00272 rx_flos equ 3 ; Signal is filtered in LOS 00000004 00273 rx_fshutter equ 4 ; Signal is filtered in shutter posn 00000005 00274 rx_fpoweroff equ 5 ; Signal is filtered in power off posn 00275 00276 ; MPASM 03.60 Released SSW.ASM 3-21-2004 19:34:18 PAGE 7 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00277 ; Reset vector 0000 00278 org 0000h 0000 2838 00279 goto start 00280 00281 ; 00282 ; Interupt vector 00283 ; 00284 ; The interrupt routine. Monitors the passage of time... 0004 00285 org 0004h 00286 ; Save the state (see page 64 of PIC12F675 data) 0004 00A0 00287 movwf w_save ; Save W register 0005 0E03 00288 swapf STATUS,W ; Save status (don't touch flags) 0006 1283 00289 banksel sts_save ; Back to bank 0 0007 00A1 00290 movwf sts_save 00291 00292 ; Clear the timer interrupt, and reload counter. Use addition 00293 ; to preserve interrupt rate even if interrupts are off for a while 0008 3006 00294 movlw -T0cnt 0009 0781 00295 addwf TMR0,F 000A 110B 00296 bcf INTCON, T0IF 00297 00298 ; Now perform the processing of the interrupt 00299 ; - Timer for LED flashing 000B 03C8 00300 decf flash_icnt,F ; LED flash timer 00301 ; - Timer for receiver frame rate and LOS 000C 0BC0 00302 decfsz rxfrmtL,F ; frame monitor timer 000D 280F 00303 goto srvtmr1 000E 03C1 00304 decf rxfrmtH,F 000F 00305 srvtmr1 00306 ; - Timers based on 0.1sec increments 000F 0BA2 00307 decfsz int_p1sec,F 0010 2820 00308 goto exitint ; Not a 0.1 sec boundary yet 0011 30C8 00309 movlw T0rate / 10 0012 00A2 00310 movwf int_p1sec ; Reinitialise for 10 Hz rate 00311 ; - - The shutter drive counter (in 0.1sec) 0013 083A 00312 movfw trigger_icnt 0014 1D03 00313 btfss STATUS,Z 0015 03BA 00314 decf trigger_icnt,F 00315 00316 ; - Timers based on 1sec increments 0016 0BA3 00317 decfsz int_1sec,F 0017 2820 00318 goto exitint ; Not a 1 sec boundary yet 0018 300A 00319 movlw 10 0019 00A3 00320 movwf int_1sec ; Reinitialise for 1Hz rate 00321 ; - - The power off counter (in seconds) 001A 083F 00322 movfw powerofficnt 001B 1D03 00323 btfss STATUS,Z 001C 03BF 00324 decf powerofficnt,F 00325 ; - - Keep alive counter (in seconds) 001D 083B 00326 movfw kalive_icnt 001E 1D03 00327 btfss STATUS,Z 001F 03BB 00328 decf kalive_icnt,F 00329 MPASM 03.60 Released SSW.ASM 3-21-2004 19:34:18 PAGE 8 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00330 ; All done, restore status 0020 00331 exitint 0020 0E21 00332 swapf sts_save,w 0021 0083 00333 movwf STATUS 0022 0EA0 00334 swapf w_save,f 0023 0E20 00335 swapf w_save,w 0024 0009 00336 retfie 00337 00338 ; Record the information we need, we want this to appear in ic_prog on an 00339 ; 8 word boundary so that it is clearly visible 00340 ; The source version information, and the circuit type 00341 while ($ & 7) != 0 0025 3420 00342 dt " " 0026 3420 00342 dt " " 0027 3420 00342 dt " " 00343 endw 0028 3473 3473 3477 00344 dt "ssw.asm" ; Source information 342E 3461 3473 346D 00345 while ($ & 7) != 0 002F 3420 00346 dt " " 00347 endw 0030 3456 3431 342E 00348 dt "V1.6" ; Source information 3436 00349 while ($ & 7) != 0 0034 3420 00350 dt " " 0035 3420 00350 dt " " 0036 3420 00350 dt " " 0037 3420 00350 dt " " 00351 endw 00352 00353 ; -------------------------- Main code ---------------------- 00354 00355 ; 00356 ; Chip reset, or similar, operation. 0038 00357 start 00358 ; Calibrate the internal oscilator 0038 1683 00359 banksel OSCCAL 0039 23FF 00360 call 3FFh 003A 0090 00361 movwf OSCCAL 003B 1283 00362 banksel GPIO 00363 00364 ; Default to output driven low when enabled 003C 0185 00365 clrf GPIO 00366 00367 ; Configure the analog input bits, and the comparator that 00368 ; is used as an inverter, so that the control signal can control TMR1 00369 ; Note: don't configure WPU on inrxbit as this will cause unreliable 00370 ; input pulse detection due to the 4k7 resistor between COUT and the 00371 ; !T1G input. 003D 1683 00372 banksel ANSEL 003E 3032 00373 movlw 00110000b | (1<= 2.303 msec signal pulse is faulty 0133 020F 00786 subwf TMR1H,W 0134 1803 00787 btfsc STATUS,C 0135 293E 00788 goto toolong 0136 1E05 00789 btfss GPIO,inrxbit 0137 292F 00790 goto whileon 00791 00792 ; Stop timer so we can convert things 0138 0190 00793 clrf T1CON 00794 00795 ; Now the pulse has ended and we are ready to consider the outcome of this... 00796 ; First drop pulses that are too small to be valid, these must be an error... 0139 3003 00797 movlw 3 013A 020F 00798 subwf TMR1H,W MPASM 03.60 Released SSW.ASM 3-21-2004 19:34:18 PAGE 17 LOC OBJECT CODE LINE SOURCE TEXT VALUE 013B 1C03 00799 btfss STATUS,C 013C 2924 00800 goto apulselp ; < 0.768msec 013D 0008 00801 return 00802 00803 ; A pulse > 2.560msec is present, wait for it to end and ignore it 013E 00804 toolong 013E 2144 00805 call checktime 013F 1838 00806 btfsc rxstatus,rx_timeout 0140 0008 00807 return 0141 1E05 00808 btfss GPIO,inrxbit 0142 293E 00809 goto toolong 0143 2924 00810 goto apulselp 00811 00812 ; Watch for timeout, this routine is called about once every 12 cycles, 00813 ; and checks the frame counter timeout decremented in the ISR. 00814 ; The watchdog is cleared so that if the PIC doesn't get back to 00815 ; processing the next receiver pulse in 18msec the chip resets... 00816 ; 0144 00817 checktime 0144 0064 00818 clrwdt ; track software is working... 0145 1BC1 00819 btfsc rxfrmtH,7 0146 1438 00820 bsf rxstatus,rx_timeout ; Flag end of time 0147 0008 00821 return 00822 00823 ; 00824 ; --------------- Supply fixed parameters -------------------- 00825 if FIXED 00826 recall 00827 movlw low fix_servoidle 00828 movwf cfg_servoidleL 00829 movlw high fix_servoidle 00830 movwf cfg_servoidleH 00831 00832 movlw low fix_servofocus 00833 movwf cfg_servofocusL 00834 movlw high fix_servofocus 00835 movwf cfg_servofocusH 00836 00837 movlw low fix_servoshutter 00838 movwf cfg_servoshutterL 00839 movlw high fix_servoshutter 00840 movwf cfg_servoshutterH 00841 00842 movlw fix_timefocus 00843 movwf cfg_timefocus 00844 00845 movlw fix_timeshutter 00846 movwf cfg_timeshutter 00847 00848 movlw fix_timepost 00849 movwf cfg_timepost 00850 00851 movlw fix_timekalive MPASM 03.60 Released SSW.ASM 3-21-2004 19:34:18 PAGE 18 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00852 movwf cfg_timekalive 00853 00854 movlw low fix_inputidle 00855 movwf cfg_inputidleL 00856 movlw high fix_inputidle 00857 movwf cfg_inputidleH 00858 00859 movlw low fix_inputshutter 00860 movwf cfg_inputshutterL 00861 movlw high fix_inputshutter 00862 movwf cfg_inputshutterH 00863 00864 movlw low fix_inputpoweroff 00865 movwf cfg_inputpoweroffL 00866 movlw high fix_inputpoweroff 00867 movwf cfg_inputpoweroffH 00868 00869 movlw fix_timepoweroff 00870 movwf cfg_timepoweroff 00871 return 00872 00873 endif 00874 ; 00875 ; --------------- Manage the operation of the EEPROM ------------- 00876 ; 00877 if !FIXED 00878 cblock 00000042 00879 eep_rom ; ROM address 00880 endc 00881 00882 markflt macro id 00883 if id <= 8 00884 bsf cfg_faultyA, id-1 00885 else 00886 bsf cfg_faultyB, id-9 00887 endif 00888 endm 00889 00890 read_16bit macro id, rom, ram 00891 movlw ram 00892 movwf FSR 00893 movlw rom 00894 call read_ees16 00895 btfss STATUS,Z 00896 markflt id 00897 endm 00898 00899 read_8bit macro id, rom, ram 00900 movlw ram 00901 movwf FSR 00902 movlw rom 00903 call read_ee8 00904 btfss STATUS,Z MPASM 03.60 Released SSW.ASM 3-21-2004 19:34:18 PAGE 19 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00905 markflt id 00906 endm 00907 00908 write_16bit macro id, rom, ram 00909 movlw ram 00910 movwf FSR 00911 movlw rom 00912 call write_ee16 00913 endm 00914 00915 write_8bit macro id, rom, ram 00916 movlw ram 00917 movwf FSR 00918 movlw rom 00919 call write_ee8 00920 endm 00921 00922 ; Recall all the EEPROM data and perform the data integrity 00923 ; checks on what is in the EEPROM 0148 00924 recall 00925 ; Parameter 1: Servo Idle Position 00926 read_16bit 1, eep_sidle, cfg_servoidleL 0148 3026 M movlw cfg_servoidleL 0149 0084 M movwf FSR 014A 3000 M movlw eep_sidle 014B 2197 M call read_ees16 014C 1D03 M btfss STATUS,Z M markflt 1 M if 1 <= 8 014D 1424 M bsf cfg_faultyA, 1-1 M else M bsf cfg_faultyB, 1-9 M endif 00927 ; Parameter 2: Servo Focus Position 00928 read_16bit 2, eep_sfocus, cfg_servofocusL 014E 3028 M movlw cfg_servofocusL 014F 0084 M movwf FSR 0150 3003 M movlw eep_sfocus 0151 2197 M call read_ees16 0152 1D03 M btfss STATUS,Z M markflt 2 M if 2 <= 8 0153 14A4 M bsf cfg_faultyA, 2-1 M else M bsf cfg_faultyB, 2-9 M endif 00929 ; Parameter 3: Servo Shutter Position 00930 read_16bit 3, eep_sshutter, cfg_servoshutterL 0154 302A M movlw cfg_servoshutterL 0155 0084 M movwf FSR 0156 3006 M movlw eep_sshutter 0157 2197 M call read_ees16 0158 1D03 M btfss STATUS,Z MPASM 03.60 Released SSW.ASM 3-21-2004 19:34:18 PAGE 20 LOC OBJECT CODE LINE SOURCE TEXT VALUE M markflt 3 M if 3 <= 8 0159 1524 M bsf cfg_faultyA, 3-1 M else M bsf cfg_faultyB, 3-9 M endif 00931 ; Parameter 4: Focus time 00932 read_8bit 4, eep_tfocus, cfg_timefocus 015A 302C M movlw cfg_timefocus 015B 0084 M movwf FSR 015C 3009 M movlw eep_tfocus 015D 218B M call read_ee8 015E 1D03 M btfss STATUS,Z M markflt 4 M if 4 <= 8 015F 15A4 M bsf cfg_faultyA, 4-1 M else M bsf cfg_faultyB, 4-9 M endif 00933 ; Parameter 5: Shutter time 00934 read_8bit 5, eep_tshutter, cfg_timeshutter 0160 302D M movlw cfg_timeshutter 0161 0084 M movwf FSR 0162 300B M movlw eep_tshutter 0163 218B M call read_ee8 0164 1D03 M btfss STATUS,Z M markflt 5 M if 5 <= 8 0165 1624 M bsf cfg_faultyA, 5-1 M else M bsf cfg_faultyB, 5-9 M endif 00935 ; Parameter 6: Post shutter time 00936 read_8bit 6, eep_tpost, cfg_timepost 0166 302E M movlw cfg_timepost 0167 0084 M movwf FSR 0168 300D M movlw eep_tpost 0169 218B M call read_ee8 016A 1D03 M btfss STATUS,Z M markflt 6 M if 6 <= 8 016B 16A4 M bsf cfg_faultyA, 6-1 M else M bsf cfg_faultyB, 6-9 M endif 00937 ; Parameter 7: Keep-alive 00938 read_8bit 7, eep_tkalive, cfg_timekalive 016C 302F M movlw cfg_timekalive 016D 0084 M movwf FSR 016E 300F M movlw eep_tkalive 016F 218B M call read_ee8 0170 1D03 M btfss STATUS,Z M markflt 7 MPASM 03.60 Released SSW.ASM 3-21-2004 19:34:18 PAGE 21 LOC OBJECT CODE LINE SOURCE TEXT VALUE M if 7 <= 8 0171 1724 M bsf cfg_faultyA, 7-1 M else M bsf cfg_faultyB, 7-9 M endif 00939 ; Parameter 8: Input position for idle 00940 read_16bit 8, eep_iidle, cfg_inputidleL 0172 3030 M movlw cfg_inputidleL 0173 0084 M movwf FSR 0174 3011 M movlw eep_iidle 0175 2197 M call read_ees16 0176 1D03 M btfss STATUS,Z M markflt 8 M if 8 <= 8 0177 17A4 M bsf cfg_faultyA, 8-1 M else M bsf cfg_faultyB, 8-9 M endif 00941 ; Parameter 9: Input position for shutter 00942 read_16bit 9, eep_ishutter, cfg_inputshutterL 0178 3032 M movlw cfg_inputshutterL 0179 0084 M movwf FSR 017A 3014 M movlw eep_ishutter 017B 2197 M call read_ees16 017C 1D03 M btfss STATUS,Z M markflt 9 M if 9 <= 8 M bsf cfg_faultyA, 9-1 M else 017D 1425 M bsf cfg_faultyB, 9-9 M endif 00943 ; Parameter 10: Input for power off 00944 read_16bit 10,eep_ipoweroff, cfg_inputpoweroffL 017E 3034 M movlw cfg_inputpoweroffL 017F 0084 M movwf FSR 0180 3017 M movlw eep_ipoweroff 0181 2197 M call read_ees16 0182 1D03 M btfss STATUS,Z M markflt 10 M if 10 <= 8 M bsf cfg_faultyA, 10-1 M else 0183 14A5 M bsf cfg_faultyB, 10-9 M endif 00945 ; Parameter 11: Time for power off 00946 read_8bit 11,eep_tpoweroff, cfg_timepoweroff 0184 3036 M movlw cfg_timepoweroff 0185 0084 M movwf FSR 0186 301A M movlw eep_tpoweroff 0187 218B M call read_ee8 0188 1D03 M btfss STATUS,Z M markflt 11 M if 11 <= 8 MPASM 03.60 Released SSW.ASM 3-21-2004 19:34:18 PAGE 22 LOC OBJECT CODE LINE SOURCE TEXT VALUE M bsf cfg_faultyA, 11-1 M else 0189 1525 M bsf cfg_faultyB, 11-9 M endif 018A 0008 00947 return 00948 00949 ; Read an 8-bit time value... 00950 ; FSR is the address to put it into 00951 ; W is the eeprom offset 00952 ; returns Z on OK, NZ on fail 018B 00953 read_ee8 018B 00C2 00954 movwf eep_rom 018C 21AC 00955 call read_eep 018D 0080 00956 movwf INDF 018E 0A42 00957 incf eep_rom,W 018F 21AC 00958 call read_eep 0190 0600 00959 xorwf INDF,W 0191 3AFF 00960 xorlw 0FFh 0192 1903 00961 btfsc STATUS,Z 0193 0008 00962 return 0194 0180 00963 clrf INDF ; Supply a default of zero 0195 1103 00964 bcf STATUS,Z ; force NZ status 0196 0008 00965 return 00966 00967 ; Read a 16-bit servo position... 00968 ; FSR is the address to put it into 00969 ; W is the eeprom offset 00970 ; returns Z on OK, NZ on fail 0197 00971 read_ees16 0197 00C2 00972 movwf eep_rom 0198 21AC 00973 call read_eep 0199 0080 00974 movwf INDF 019A 0A84 00975 incf FSR,F 019B 0AC2 00976 incf eep_rom,F 019C 0842 00977 movfw eep_rom 019D 21AC 00978 call read_eep 019E 0080 00979 movwf INDF 019F 0A42 00980 incf eep_rom,W 01A0 21AC 00981 call read_eep 01A1 0600 00982 xorwf INDF,W 01A2 0384 00983 decf FSR,F 01A3 0600 00984 xorwf INDF,W 01A4 1903 00985 btfsc STATUS,Z 01A5 0008 00986 return 01A6 30DC 00987 movlw low 1500 ; Supply a default parameter 01A7 0080 00988 movwf INDF 01A8 0A84 00989 incf FSR,F ; Note: leaves status NZ for return 01A9 3005 00990 movlw high 1500 01AA 0080 00991 movwf INDF 01AB 0008 00992 return 00993 00994 ; Read the location in the W register into the W register 01AC 00995 read_eep MPASM 03.60 Released SSW.ASM 3-21-2004 19:34:18 PAGE 23 LOC OBJECT CODE LINE SOURCE TEXT VALUE 01AC 1683 00996 banksel EEADR 01AD 009B 00997 movwf EEADR 01AE 141C 00998 bsf EECON1,RD 01AF 081A 00999 movfw EEDATA 01B0 1283 01000 banksel w_save 01B1 0008 01001 return 01002 01003 ; 01004 ; Write a 16 bit value with checksum to the storage 01005 ; FSR is the data address 01006 ; W is the EEPROM address 01B2 01007 write_ee16 01B2 00C2 01008 movwf eep_rom 01B3 21CA 01009 call write_eepa 01B4 0800 01010 movfw INDF 01B5 21CF 01011 call write_eepd 01B6 0AC2 01012 incf eep_rom,F 01B7 0A84 01013 incf FSR,F 01B8 0842 01014 movfw eep_rom 01B9 21CA 01015 call write_eepa 01BA 0800 01016 movfw INDF 01BB 21CF 01017 call write_eepd 01BC 0A42 01018 incf eep_rom,W 01BD 21CA 01019 call write_eepa 01BE 0800 01020 movfw INDF 01BF 0384 01021 decf FSR,F 01C0 0600 01022 xorwf INDF,W 01C1 29CF 01023 goto write_eepd 01024 01C2 01025 write_ee8 01C2 00C2 01026 movwf eep_rom 01C3 21CA 01027 call write_eepa 01C4 0800 01028 movfw INDF 01C5 21CF 01029 call write_eepd 01C6 0A42 01030 incf eep_rom,W 01C7 21CA 01031 call write_eepa 01C8 0900 01032 comf INDF,W 01C9 29CF 01033 goto write_eepd 01034 01035 ; Select the EEPROM address we are going to write to 01036 ; W is the address 01CA 01037 write_eepa 01CA 1683 01038 banksel EEADR 01CB 151C 01039 bsf EECON1,WREN 01CC 009B 01040 movwf EEADR 01CD 1283 01041 banksel w_save 01CE 0008 01042 return 01043 01044 ; Write the contents of W to the EEPROM, 01045 ; Z status -> written OK 01CF 01046 write_eepd 01CF 138B 01047 bcf INTCON,GIE 01D0 1683 01048 banksel EEDATA MPASM 03.60 Released SSW.ASM 3-21-2004 19:34:18 PAGE 24 LOC OBJECT CODE LINE SOURCE TEXT VALUE 01D1 009A 01049 movwf EEDATA 01D2 3055 01050 movlw 55h 01D3 009D 01051 movwf EECON2 01D4 30AA 01052 movlw 0AAh 01D5 009D 01053 movwf EECON2 01D6 149C 01054 bsf EECON1,WR 01D7 1283 01055 banksel PIR1 01D8 01056 eepwlp 01D8 0064 01057 clrwdt 01D9 1F8C 01058 btfss PIR1,EEIF 01DA 29D8 01059 goto eepwlp 01DB 138C 01060 bcf PIR1,EEIF 01DC 1683 01061 banksel EEDATA 01DD 081A 01062 movfw EEDATA 01DE 111C 01063 bcf EECON1,WREN 01DF 141C 01064 bsf EECON1,RD 01E0 061A 01065 xorwf EEDATA,W 01E1 1283 01066 banksel w_save 01E2 178B 01067 bsf INTCON,GIE 01E3 0008 01068 return 01069 endif 01070 ; 01071 ; -------- Output servo drive ------------ 01072 ; 01073 cblock 00000043 01074 servoL ; Desired servo position in usec 00000044 01075 servoH 01076 endc 01077 01078 01079 if SERVOOUT 01080 ; Pulse the output servo pin high for the currently selected servo 01081 ; position. This uses timer 1 in manual count mode to perform the 01082 ; best timing we can with timer 0 in use for interrupts. 01083 ; Interrupts are disabled for at most 128 usec. 01084 ; Note that the output pulse will be a small number of usec greater 01085 ; than the select input value. However, this doesn't matter because it 01086 ; can be adjusted out via the adjustment stuff anyway. 01E4 01087 driveservo 01E4 138B 01088 bcf INTCON,GIE ; Disable interrupts while we start timer 01089 ; Enable Timer 1 for counting 01E5 0190 01090 clrf T1CON ; Ensure the timer is not counting 01E6 0943 01091 comf servoL,W ; Initialise the register with -servo position 01E7 008E 01092 movwf TMR1L ; no need to add 1 +/1 1usec can be adjusted 01E8 0944 01093 comf servoH,W 01E9 008F 01094 movwf TMR1H 01095 ; Turn on the servo output 01EA 0839 01096 movfw gpioout 01EB 3801 01097 iorlw 1< 3 mod 4 TCY 01117 ; 1 -> 2 mod 4 TCY 01118 ; 2 -> 1 mod 4 TCY 01119 ; 3 -> 0 mod 4 TCY 01F5 080E 01120 movfw TMR1L 01F6 3903 01121 andlw 03h ; find out where we are in the cycle mod 4 Tcy 01F7 1903 01122 btfsc STATUS,Z 01F8 2A01 01123 goto ds_w3 ; 0 -> 3 TCY 01F9 3EFF 01124 addlw -1 01FA 1903 01125 btfsc STATUS,Z 01FB 2A01 01126 goto ds_w3 ; 1 -> 6 TCY (2 mod 4) 01FC 3EFF 01127 addlw -1 01FD 1903 01128 btfsc STATUS,Z 01FE 2A01 01129 goto ds_w3 ; 2 -> 9 TCY (1 mod 4) 01130 ; FALLTHROUGH ; 3 -> 8 TCY (0 mod 4) 01FF 2A00 01131 goto $+1 0200 2A01 01132 goto $+1 0201 01133 ds_w3 0201 0000 01134 nop ; force this loop to 4 Tcy in length 0202 1B8F 01135 btfsc TMR1H,7 0203 2A01 01136 goto ds_w3 01137 ; Clobber output 0204 0839 01138 movfw gpioout 0205 0085 01139 movwf GPIO 01140 ; Enable interrupts 0206 178B 01141 bsf INTCON,GIE 01142 ; Disable timer 1 0207 0190 01143 clrf T1CON 0208 01144 cameratoggle 0208 0008 01145 return 01146 01147 else 01148 ; 01149 ; Copy the GPIO status to the output pins 01150 driveservo 01151 movfw gpioout 01152 movwf GPIO 01153 return 01154 MPASM 03.60 Released SSW.ASM 3-21-2004 19:34:18 PAGE 26 LOC OBJECT CODE LINE SOURCE TEXT VALUE 01155 ; 01156 ; Toggle the camera output 01157 cameratoggle 01158 banksel TRISIO 01159 movlw 1<= 0x300 02D0 3C02 01490 sublw 2 02D1 1C03 01491 btfss STATUS,C 02D2 2ABB 01492 goto prg_eos1 ; All ok 02D3 2AC3 01493 goto prg_eosB ; Add one count back 01494 01495 ; User has signaled that the edit is complete, 01496 ; save the current output servo position in FLASH 02D4 01497 prg_oservodone 02D4 0844 01498 movfw servoH ; Copy the servo:16 value back to correct place 02D5 0080 01499 movwf INDF 02D6 0384 01500 decf FSR,F 02D7 0843 01501 movfw servoL 02D8 0080 01502 movwf INDF 02D9 0826 01503 movfw cfg_servoidleL ; Restore servo to idle position 02DA 00C3 01504 movwf servoL 02DB 0827 01505 movfw cfg_servoidleH 02DC 00C4 01506 movwf servoH 02DD 2AF0 01507 goto prg_editok 01508 01509 ; 01510 ; Input servo edit just allows you to position the control stick 01511 ; in the appropriate place 02DE 01512 prg_editiservo 01513 flashon 0 02DE 3000 M movlw 0 * 5 02DF 00C9 M movwf flash_cnt 02E0 16B9 M bsf gpioout,outled 02E1 1045 M bcf pstatus,ps_flshdone 02E2 01514 prg_eis1 02E2 224B 01515 call iflasher 02E3 1D85 01516 btfss GPIO,videoswitch 02E4 2AE6 01517 goto prg_iservodone 02E5 2AE2 01518 goto prg_eis1 01519 01520 ; Save the input position 02E6 01521 prg_iservodone 02E6 1838 01522 btfsc rxstatus, rx_timeout 02E7 2AF0 01523 goto prg_editok 02E8 080E 01524 movfw TMR1L ; Copy the TMR1:16 value back to correct place 02E9 0080 01525 movwf INDF 02EA 0A84 01526 incf FSR,F 02EB 080F 01527 movfw TMR1H 02EC 0080 01528 movwf INDF MPASM 03.60 Released SSW.ASM 3-21-2004 19:34:18 PAGE 34 LOC OBJECT CODE LINE SOURCE TEXT VALUE 02ED 2AF0 01529 goto prg_editok 01530 01531 ; 01532 ; Numeric entry flashes the current number and then uses 01533 ; fstickA to decrement the number and fstickB to increment the number 02EE 01534 prg_editnumber 02EE 3063 01535 movlw 99 02EF 22F6 01536 call prg_getnumber 01537 ; Save the number we have been editing 02F0 01538 prg_editok 01539 ledoff ; Turn off the LED 02F0 12B9 M bcf gpioout,outled 02F1 0839 M movfw gpioout 02F2 0085 M movwf GPIO 02F3 2382 01540 call prg_editdone ; Complete and save data 02F4 2270 01541 call prg_videowait ; Wait for jumper to be removed 02F5 2AA5 01542 goto prg_mainlp ; All done 01543 01544 ; 01545 ; Edit the value pointed to by FSR as an integer. 01546 ; Permitted values are 0 .. W 01547 cblock 0000004E 01548 prg_gnlimit ; Maximum permitted value 0000004F 01549 prg_gnten ; Number of tens 00000050 01550 prg_gnone ; Number of ones 00000051 01551 gnstatus ; status of this routine 01552 endc 01553 00000000 01554 gn_ipause equ 0 ; We have done the initial pause 00000001 01555 gn_tendigit equ 1 ; Shown tens 00000002 01556 gn_tenpause equ 2 ; Done inter-digit pause 01557 02F6 01558 prg_getnumber 01559 ; Remember the limit 02F6 00CE 01560 movwf prg_gnlimit 02F7 01561 prg_gnloop 02F7 01D1 01562 clrf gnstatus 01563 ; Divide into the 10s and the 1s.... 02F8 01CF 01564 clrf prg_gnten 02F9 01D0 01565 clrf prg_gnone 02FA 0800 01566 movfw INDF 02FB 1903 01567 btfsc STATUS,Z 02FC 2B07 01568 goto prg_gnnext ; Special case for zero... 01569 ; We need to count it out... 02FD 00CD 01570 movwf prg_count 02FE 01571 prg_gnlp1 02FE 0AD0 01572 incf prg_gnone,F 02FF 0850 01573 movfw prg_gnone 0300 3A0A 01574 xorlw 10 0301 1D03 01575 btfss STATUS,Z 0302 2B05 01576 goto prg_gnlp2 0303 0ACF 01577 incf prg_gnten,F 0304 01D0 01578 clrf prg_gnone MPASM 03.60 Released SSW.ASM 3-21-2004 19:34:18 PAGE 35 LOC OBJECT CODE LINE SOURCE TEXT VALUE 0305 01579 prg_gnlp2 0305 0BCD 01580 decfsz prg_count,F 0306 2AFE 01581 goto prg_gnlp1 0307 01582 prg_gnnext 01583 ; Decide what to do next 0307 1851 01584 btfsc gnstatus, gn_ipause 0308 2B11 01585 goto prg_gn_ipause 01586 ; perform the initial pause 0309 1451 01587 bsf gnstatus, gn_ipause 01588 flashof 10 030A 3032 M movlw 10 * 5 030B 00C9 M movwf flash_cnt 030C 12B9 M bcf gpioout,outled 030D 1045 M bcf pstatus,ps_flshdone 030E 01589 prg_gn_1flash 030E 3001 01590 movlw 1 030F 00CD 01591 movwf prg_count 0310 2B2F 01592 goto prg_gnflash 0311 01593 prg_gn_ipause 0311 18D1 01594 btfsc gnstatus, gn_tendigit 0312 2B1E 01595 goto prg_gn_tendigit 01596 ; display the tens digit 0313 14D1 01597 bsf gnstatus, gn_tendigit 0314 084F 01598 movfw prg_gnten 0315 1903 01599 btfsc STATUS,Z 0316 2B26 01600 goto prg_gn_tenpause 0317 01601 prg_gn_adigit 0317 00CD 01602 movwf prg_count 0318 07CD 01603 addwf prg_count,F 01604 flashon 2 0319 300A M movlw 2 * 5 031A 00C9 M movwf flash_cnt 031B 16B9 M bsf gpioout,outled 031C 1045 M bcf pstatus,ps_flshdone 031D 2B2F 01605 goto prg_gnflash 031E 01606 prg_gn_tendigit 031E 1951 01607 btfsc gnstatus, gn_tenpause 031F 2B26 01608 goto prg_gn_tenpause 01609 ; Display the tens pause 0320 1551 01610 bsf gnstatus, gn_tenpause 01611 flashof 6 0321 301E M movlw 6 * 5 0322 00C9 M movwf flash_cnt 0323 12B9 M bcf gpioout,outled 0324 1045 M bcf pstatus,ps_flshdone 0325 2B0E 01612 goto prg_gn_1flash 0326 01613 prg_gn_tenpause 0326 01D1 01614 clrf gnstatus ; The next thing is to pause and start again 01615 ; Display the number of ones 0327 0850 01616 movfw prg_gnone 0328 1D03 01617 btfss STATUS,Z 0329 2B17 01618 goto prg_gn_adigit 01619 ; Display zero MPASM 03.60 Released SSW.ASM 3-21-2004 19:34:18 PAGE 36 LOC OBJECT CODE LINE SOURCE TEXT VALUE 01620 flashon 6 032A 301E M movlw 6 * 5 032B 00C9 M movwf flash_cnt 032C 16B9 M bsf gpioout,outled 032D 1045 M bcf pstatus,ps_flshdone 032E 2B0E 01621 goto prg_gn_1flash 032F 01622 prg_gnflash 032F 224B 01623 call iflasher 0330 1D85 01624 btfss GPIO,videoswitch 0331 0008 01625 return 0332 1A45 01626 btfsc pstatus,ps_fstickA 0333 2B47 01627 goto prg_gnfA 0334 1B45 01628 btfsc pstatus,ps_fstickB 0335 2B4E 01629 goto prg_gnfB 0336 1C45 01630 btfss pstatus,ps_flshdone 0337 2B2F 01631 goto prg_gnflash 01632 ; Done the flash 0338 03CD 01633 decf prg_count,F 0339 1903 01634 btfsc STATUS,Z 033A 2B07 01635 goto prg_gnnext 01636 ; Do the next bit... 033B 1AB9 01637 btfsc gpioout,outled 033C 2B42 01638 goto prg_gnfoff 01639 flashon 2 033D 300A M movlw 2 * 5 033E 00C9 M movwf flash_cnt 033F 16B9 M bsf gpioout,outled 0340 1045 M bcf pstatus,ps_flshdone 0341 2B2F 01640 goto prg_gnflash 0342 01641 prg_gnfoff 01642 flashof 2 0342 300A M movlw 2 * 5 0343 00C9 M movwf flash_cnt 0344 12B9 M bcf gpioout,outled 0345 1045 M bcf pstatus,ps_flshdone 0346 2B2F 01643 goto prg_gnflash 01644 01645 ; Stick A in decrements the config item number 0347 01646 prg_gnfA 0347 0380 01647 decf INDF,F 0348 0900 01648 comf INDF,W 0349 1D03 01649 btfss STATUS,Z 034A 2B53 01650 goto prg_gnfAB 034B 084E 01651 movfw prg_gnlimit 034C 0080 01652 movwf INDF 034D 2B53 01653 goto prg_gnfAB 01654 ; Stick B in increments the config item number 034E 01655 prg_gnfB 034E 0A80 01656 incf INDF,F 034F 0800 01657 movfw INDF 0350 024E 01658 subwf prg_gnlimit,W 0351 1C03 01659 btfss STATUS,C 0352 0180 01660 clrf INDF MPASM 03.60 Released SSW.ASM 3-21-2004 19:34:18 PAGE 37 LOC OBJECT CODE LINE SOURCE TEXT VALUE 0353 01661 prg_gnfAB 0353 228A 01662 call prg_centrewait 0354 2AF7 01663 goto prg_gnloop 01664 01665 ; Force this code into the last page so 01666 ; that all the computed gotos will function 01667 if $ < 0300h 01668 org 0300h 01669 endif 01670 01671 ; 01672 ; Initialise for the start of editing 0355 01673 prg_editsetup 0355 01C6 01674 clrf estatus ; Zap edit status 0356 3003 01675 movlw high prg_editsetup 0357 008A 01676 movwf PCLATH 0358 084C 01677 movfw prg_itemno 0359 0782 01678 addwf PCL,F 035A 28CC 01679 goto emptyreturn ; 0 - do nothing... 035B 2B66 01680 goto prg_es1 ; 1 035C 2B6A 01681 goto prg_es2 ; 2 035D 2B6C 01682 goto prg_es3 ; 3 035E 2B6E 01683 goto prg_es4 ; 4 035F 2B72 01684 goto prg_es5 ; 5 0360 2B74 01685 goto prg_es6 ; 6 0361 2B76 01686 goto prg_es7 ; 7 0362 2B78 01687 goto prg_es8 ; 8 0363 2B7C 01688 goto prg_es9 ; 9 0364 2B7E 01689 goto prg_es10 ; 10 0365 2B80 01690 goto prg_es11 ; 11 01691 ; parameter 1 0366 01692 prg_es1 0366 3026 01693 movlw cfg_servoidleL 0367 01694 prg_esosrvo 0367 0084 01695 movwf FSR ; Remember where this came from... 0368 14C6 01696 bsf estatus,es_editoservo 0369 0008 01697 return 01698 ; Setup parameter 2 036A 01699 prg_es2 036A 3028 01700 movlw cfg_servofocusL 036B 2B67 01701 goto prg_esosrvo 01702 ; Setup paramater 3 036C 01703 prg_es3 036C 302A 01704 movlw cfg_servoshutterL 036D 2B67 01705 goto prg_esosrvo 01706 01707 ; Setup parameter 4 036E 01708 prg_es4 036E 302C 01709 movlw cfg_timefocus 036F 01710 prg_esnumber 036F 0084 01711 movwf FSR 0370 1446 01712 bsf estatus,es_editnumber 0371 0008 01713 return MPASM 03.60 Released SSW.ASM 3-21-2004 19:34:18 PAGE 38 LOC OBJECT CODE LINE SOURCE TEXT VALUE 01714 01715 ; Setup parameter 5 0372 01716 prg_es5 0372 302D 01717 movlw cfg_timeshutter 0373 2B6F 01718 goto prg_esnumber 01719 01720 ; Setup parameter 6 0374 01721 prg_es6 0374 302E 01722 movlw cfg_timepost 0375 2B6F 01723 goto prg_esnumber 01724 01725 ; Setup parameter 7 0376 01726 prg_es7 0376 302F 01727 movlw cfg_timekalive 0377 2B6F 01728 goto prg_esnumber 01729 01730 ; Setup parameter 8 0378 01731 prg_es8 0378 3030 01732 movlw cfg_inputidleL 0379 01733 prg_esiservo 0379 0084 01734 movwf FSR 037A 1546 01735 bsf estatus,es_editiservo 037B 0008 01736 return 01737 ; Setup parameter 9 037C 01738 prg_es9 037C 3032 01739 movlw cfg_inputshutterL 037D 2B79 01740 goto prg_esiservo 01741 ; Setup parameter 10 037E 01742 prg_es10 037E 3034 01743 movlw cfg_inputpoweroffL 037F 2B79 01744 goto prg_esiservo 01745 01746 ; Setup parameter 11 0380 01747 prg_es11 0380 3036 01748 movlw cfg_timepoweroff 0381 2B6F 01749 goto prg_esnumber 01750 01751 ; 01752 ; Completion of editing 0382 01753 prg_editdone 0382 034C 01754 decf prg_itemno,W 0383 0782 01755 addwf PCL,F 0384 2B8F 01756 goto prg_ed1 ; 1 0385 2B94 01757 goto prg_ed2 ; 2 0386 2B99 01758 goto prg_ed3 ; 3 0387 2B9E 01759 goto prg_ed4 ; 4 0388 2BA3 01760 goto prg_ed5 ; 5 0389 2BA8 01761 goto prg_ed6 ; 6 038A 2BAD 01762 goto prg_ed7 ; 7 038B 2BB2 01763 goto prg_ed8 ; 8 038C 2BB7 01764 goto prg_ed9 ; 9 038D 2BBC 01765 goto prg_ed10 ; 10 038E 2BC1 01766 goto prg_ed11 ; 11 MPASM 03.60 Released SSW.ASM 3-21-2004 19:34:18 PAGE 39 LOC OBJECT CODE LINE SOURCE TEXT VALUE 01767 ; Save parameter 1 038F 01768 prg_ed1 01769 write_16bit 1, eep_sidle, cfg_servoidleL 038F 3026 M movlw cfg_servoidleL 0390 0084 M movwf FSR 0391 3000 M movlw eep_sidle 0392 21B2 M call write_ee16 0393 0008 01770 return 01771 ; Save parameter 2 0394 01772 prg_ed2 01773 write_16bit 2, eep_sfocus, cfg_servofocusL 0394 3028 M movlw cfg_servofocusL 0395 0084 M movwf FSR 0396 3003 M movlw eep_sfocus 0397 21B2 M call write_ee16 0398 0008 01774 return 01775 ; Save parameter 3 0399 01776 prg_ed3 01777 write_16bit 3, eep_sshutter, cfg_servoshutterL 0399 302A M movlw cfg_servoshutterL 039A 0084 M movwf FSR 039B 3006 M movlw eep_sshutter 039C 21B2 M call write_ee16 039D 0008 01778 return 01779 ; Save parameter 4 039E 01780 prg_ed4 01781 write_8bit 4, eep_tfocus, cfg_timefocus 039E 302C M movlw cfg_timefocus 039F 0084 M movwf FSR 03A0 3009 M movlw eep_tfocus 03A1 21C2 M call write_ee8 03A2 0008 01782 return 01783 ; Save parameter 5 03A3 01784 prg_ed5 01785 write_8bit 5, eep_tshutter, cfg_timeshutter 03A3 302D M movlw cfg_timeshutter 03A4 0084 M movwf FSR 03A5 300B M movlw eep_tshutter 03A6 21C2 M call write_ee8 03A7 0008 01786 return 01787 ; Save parameter 6 03A8 01788 prg_ed6 01789 write_8bit 6, eep_tpost, cfg_timepost 03A8 302E M movlw cfg_timepost 03A9 0084 M movwf FSR 03AA 300D M movlw eep_tpost 03AB 21C2 M call write_ee8 03AC 0008 01790 return 01791 ; Save parameter 7 03AD 01792 prg_ed7 01793 write_8bit 7, eep_tkalive, cfg_timekalive 03AD 302F M movlw cfg_timekalive 03AE 0084 M movwf FSR MPASM 03.60 Released SSW.ASM 3-21-2004 19:34:18 PAGE 40 LOC OBJECT CODE LINE SOURCE TEXT VALUE 03AF 300F M movlw eep_tkalive 03B0 21C2 M call write_ee8 03B1 0008 01794 return 01795 ; Save parameter 8 03B2 01796 prg_ed8 01797 write_16bit 8, eep_iidle, cfg_inputidleL 03B2 3030 M movlw cfg_inputidleL 03B3 0084 M movwf FSR 03B4 3011 M movlw eep_iidle 03B5 21B2 M call write_ee16 03B6 0008 01798 return 01799 ; Save parameter 9 03B7 01800 prg_ed9 01801 write_16bit 9, eep_ishutter, cfg_inputshutterL 03B7 3032 M movlw cfg_inputshutterL 03B8 0084 M movwf FSR 03B9 3014 M movlw eep_ishutter 03BA 21B2 M call write_ee16 03BB 0008 01802 return 01803 ; Save parameter 10 03BC 01804 prg_ed10 01805 write_16bit 10,eep_ipoweroff, cfg_inputpoweroffL 03BC 3034 M movlw cfg_inputpoweroffL 03BD 0084 M movwf FSR 03BE 3017 M movlw eep_ipoweroff 03BF 21B2 M call write_ee16 03C0 0008 01806 return 01807 ; Save parameter 11 03C1 01808 prg_ed11 01809 write_8bit 11,eep_tpoweroff, cfg_timepoweroff 03C1 3036 M movlw cfg_timepoweroff 03C2 0084 M movwf FSR 03C3 301A M movlw eep_tpoweroff 03C4 21C2 M call write_ee8 03C5 0008 01810 return 01811 01812 ; 01813 ; -------- Fault configuration has occured ------- 01814 ; 01815 01816 ; The configuration is faulty, so flash the fault code 01817 ; this is a sequence of short/long flashes, short 01818 ; flashes for OK and long flashes for fault... 03C6 01819 flash_faulty 01820 ; Show the fault status for all known config items 00000001 01821 i = 1 01822 while i <= ncfgitems 01823 if i <= 8 03C6 3001 01824 movlw 1<<(i-1) 03C7 23E4 01825 call ffaultA 01826 else 01827 movlw 1<<(i-9) 01828 call ffaultB MPASM 03.60 Released SSW.ASM 3-21-2004 19:34:18 PAGE 41 LOC OBJECT CODE LINE SOURCE TEXT VALUE 01829 endif 00000002 01830 i = i + 1 01823 if i <= 8 03C8 3002 01824 movlw 1<<(i-1) 03C9 23E4 01825 call ffaultA 01826 else 01827 movlw 1<<(i-9) 01828 call ffaultB 01829 endif 00000003 01830 i = i + 1 01823 if i <= 8 03CA 3004 01824 movlw 1<<(i-1) 03CB 23E4 01825 call ffaultA 01826 else 01827 movlw 1<<(i-9) 01828 call ffaultB 01829 endif 00000004 01830 i = i + 1 01823 if i <= 8 03CC 3008 01824 movlw 1<<(i-1) 03CD 23E4 01825 call ffaultA 01826 else 01827 movlw 1<<(i-9) 01828 call ffaultB 01829 endif 00000005 01830 i = i + 1 01823 if i <= 8 03CE 3010 01824 movlw 1<<(i-1) 03CF 23E4 01825 call ffaultA 01826 else 01827 movlw 1<<(i-9) 01828 call ffaultB 01829 endif 00000006 01830 i = i + 1 01823 if i <= 8 03D0 3020 01824 movlw 1<<(i-1) 03D1 23E4 01825 call ffaultA 01826 else 01827 movlw 1<<(i-9) 01828 call ffaultB 01829 endif 00000007 01830 i = i + 1 01823 if i <= 8 03D2 3040 01824 movlw 1<<(i-1) 03D3 23E4 01825 call ffaultA 01826 else 01827 movlw 1<<(i-9) 01828 call ffaultB 01829 endif 00000008 01830 i = i + 1 01823 if i <= 8 03D4 3080 01824 movlw 1<<(i-1) 03D5 23E4 01825 call ffaultA MPASM 03.60 Released SSW.ASM 3-21-2004 19:34:18 PAGE 42 LOC OBJECT CODE LINE SOURCE TEXT VALUE 01826 else 01827 movlw 1<<(i-9) 01828 call ffaultB 01829 endif 00000009 01830 i = i + 1 01823 if i <= 8 01824 movlw 1<<(i-1) 01825 call ffaultA 01826 else 03D6 3001 01827 movlw 1<<(i-9) 03D7 23E6 01828 call ffaultB 01829 endif 0000000A 01830 i = i + 1 01823 if i <= 8 01824 movlw 1<<(i-1) 01825 call ffaultA 01826 else 03D8 3002 01827 movlw 1<<(i-9) 03D9 23E6 01828 call ffaultB 01829 endif 0000000B 01830 i = i + 1 01823 if i <= 8 01824 movlw 1<<(i-1) 01825 call ffaultA 01826 else 03DA 3004 01827 movlw 1<<(i-9) 03DB 23E6 01828 call ffaultB 01829 endif 0000000C 01830 i = i + 1 01831 endw 01832 01833 flashof 12 ; Then a long delay 03DC 303C M movlw 12 * 5 03DD 00C9 M movwf flash_cnt 03DE 12B9 M bcf gpioout,outled 03DF 1045 M bcf pstatus,ps_flshdone 03E0 01834 fflt_l1 03E0 2241 01835 call flasher ; Update the LED flash, come back in ??msec 03E1 1C45 01836 btfss pstatus,ps_flshdone 03E2 2BE0 01837 goto fflt_l1 01838 03E3 2BC6 01839 goto flash_faulty ; And start again 01840 01841 ; Test the value in cfg_faultA 03E4 01842 ffaultA 03E4 0524 01843 andwf cfg_faultyA,W 03E5 2BE7 01844 goto ffault 03E6 01845 ffaultB 03E6 0525 01846 andwf cfg_faultyB,W 03E7 01847 ffault 03E7 1D03 01848 btfss STATUS,Z 03E8 2BEE 01849 goto faulty 01850 flashon 2 ; OK so a short flash MPASM 03.60 Released SSW.ASM 3-21-2004 19:34:18 PAGE 43 LOC OBJECT CODE LINE SOURCE TEXT VALUE 03E9 300A M movlw 2 * 5 03EA 00C9 M movwf flash_cnt 03EB 16B9 M bsf gpioout,outled 03EC 1045 M bcf pstatus,ps_flshdone 03ED 2BF2 01851 goto ffault1 03EE 01852 faulty 01853 flashon 6 03EE 301E M movlw 6 * 5 03EF 00C9 M movwf flash_cnt 03F0 16B9 M bsf gpioout,outled 03F1 1045 M bcf pstatus,ps_flshdone 03F2 01854 ffault1 03F2 2241 01855 call flasher 03F3 1C45 01856 btfss pstatus,ps_flshdone 03F4 2BF2 01857 goto ffault1 01858 flashof 2 ; And a pause 03F5 300A M movlw 2 * 5 03F6 00C9 M movwf flash_cnt 03F7 12B9 M bcf gpioout,outled 03F8 1045 M bcf pstatus,ps_flshdone 03F9 01859 ffault2 03F9 2241 01860 call flasher 03FA 1C45 01861 btfss pstatus,ps_flshdone 03FB 2BF9 01862 goto ffault2 03FC 0008 01863 return 01864 endif 01865 01866 end MPASM 03.60 Released SSW.ASM 3-21-2004 19:34:18 PAGE 44 SYMBOL TABLE LABEL VALUE ADCON0 0000001F ADCS0 00000004 ADCS1 00000005 ADCS2 00000006 ADFM 00000007 ADIE 00000006 ADIF 00000006 ADON 00000000 ADRESH 0000001E ADRESL 0000009E ANS0 00000000 ANS1 00000001 ANS2 00000002 ANS3 00000003 ANSEL 0000009F C 00000000 CAL0 00000002 CAL1 00000003 CAL2 00000004 CAL3 00000005 CAL4 00000006 CAL5 00000007 CHS0 00000002 CHS1 00000003 CINV 00000004 CIS 00000003 CM0 00000000 CM1 00000001 CM2 00000002 CMCON 00000019 CMIE 00000003 CMIF 00000003 COUT 00000006 DC 00000001 EEADR 0000009B EECON1 0000009C EECON2 0000009D EEDATA 0000009A EEIE 00000007 EEIF 00000007 F 00000001 FIXED 00000000 FSR 00000004 GIE 00000007 GO 00000001 GO_DONE 00000001 GP0 00000000 GP1 00000001 GP2 00000002 GP3 00000003 GP4 00000004 GP5 00000005 GPIE 00000003 MPASM 03.60 Released SSW.ASM 3-21-2004 19:34:18 PAGE 45 SYMBOL TABLE LABEL VALUE GPIF 00000000 GPIO 00000005 GPIO0 00000000 GPIO1 00000001 GPIO2 00000002 GPIO3 00000003 GPIO4 00000004 GPIO5 00000005 INDF 00000000 INTCON 0000000B INTE 00000004 INTEDG 00000006 INTF 00000001 IOC 00000096 IOC0 00000000 IOC1 00000001 IOC2 00000002 IOC3 00000003 IOC4 00000004 IOC5 00000005 IOCB 00000096 IOCB0 00000000 IOCB1 00000001 IOCB2 00000002 IOCB3 00000003 IOCB4 00000004 IOCB5 00000005 IRP 00000007 LEDOUT 00000001 NOT_BOD 00000000 NOT_DONE 00000001 NOT_GPPU 00000007 NOT_PD 00000003 NOT_POR 00000001 NOT_T1SYNC 00000002 NOT_TO 00000004 OPTION_REG 00000081 OSCCAL 00000090 PCL 00000002 PCLATH 0000000A PCON 0000008E PEIE 00000006 PIE1 0000008C PIR1 0000000C PS0 00000000 PS1 00000001 PS2 00000002 PSA 00000003 RD 00000000 RP0 00000005 RP1 00000006 SERVOOUT 00000001 STATUS 00000003 MPASM 03.60 Released SSW.ASM 3-21-2004 19:34:18 PAGE 46 SYMBOL TABLE LABEL VALUE T0CS 00000005 T0IE 00000005 T0IF 00000002 T0SE 00000004 T0cnt 000000FA T0rate 000007D0 T1CKPS0 00000004 T1CKPS1 00000005 T1CON 00000010 T1IE 00000000 T1IF 00000000 T1OSCEN 00000003 TMR0 00000001 TMR1CS 00000001 TMR1GE 00000006 TMR1H 0000000F TMR1IE 00000000 TMR1IF 00000000 TMR1L 0000000E TMR1ON 00000000 TRISIO 00000085 VCFG 00000006 VR0 00000000 VR1 00000001 VR2 00000002 VR3 00000003 VRCON 00000099 VREN 00000007 VRR 00000005 W 00000000 WPU 00000095 WR 00000001 WREN 00000002 WRERR 00000003 Z 00000002 _BODEN_OFF 00003FBF _BODEN_ON 00003FFF _CPD_OFF 00003FFF _CPD_ON 00003EFF _CP_OFF 00003FFF _CP_ON 00003F7F _EC_OSC 00003FFB _EXTRC_OSC_CLKOUT 00003FFF _EXTRC_OSC_NOCLKOUT 00003FFE _HS_OSC 00003FFA _INTRC_OSC_CLKOUT 00003FFD _INTRC_OSC_NOCLKOUT 00003FFC _LP_OSC 00003FF8 _MCLRE_OFF 00003FDF _MCLRE_ON 00003FFF _PWRTE_OFF 00003FFF _PWRTE_ON 00003FEF _WDT_OFF 00003FF7 MPASM 03.60 Released SSW.ASM 3-21-2004 19:34:18 PAGE 47 SYMBOL TABLE LABEL VALUE _WDT_ON 00003FFF _XT_OSC 00003FF9 __12F675 00000001 adjust_input 000000B9 apulselp 00000124 ashutter 000000AE ashutterlp 000000B4 autofuzz 00000003 autopulse 00000005 cameratoggle 00000208 cfg_faultyA 00000024 cfg_faultyB 00000025 cfg_inputidleH 00000031 cfg_inputidleL 00000030 cfg_inputpoweroffH 00000035 cfg_inputpoweroffL 00000034 cfg_inputshutterH 00000033 cfg_inputshutterL 00000032 cfg_servofocusH 00000029 cfg_servofocusL 00000028 cfg_servoidleH 00000027 cfg_servoidleL 00000026 cfg_servoshutterH 0000002B cfg_servoshutterL 0000002A cfg_timefocus 0000002C cfg_timekalive 0000002F cfg_timepost 0000002E cfg_timepoweroff 00000036 cfg_timeshutter 0000002D checktime 00000144 chk_poweroff 000000E0 chkdblka 000000A8 chkvideo 000000A6 clrlp 00000049 db_now_off 00000239 db_prgoff 00000234 db_still_on 0000023D db_vidoff 00000237 deb_count 00000047 debounce 0000000A driveservo 000001E4 ds_w1 000001F0 ds_w2 000001F2 ds_w3 00000201 eedata16 eedata8 eep_iidle 00000011 eep_ipoweroff 00000017 eep_ishutter 00000014 eep_rom 00000042 eep_sfocus 00000003 eep_sidle 00000000 eep_sshutter 00000006 MPASM 03.60 Released SSW.ASM 3-21-2004 19:34:18 PAGE 48 SYMBOL TABLE LABEL VALUE eep_tfocus 00000009 eep_tkalive 0000000F eep_tpost 0000000D eep_tpoweroff 0000001A eep_tshutter 0000000B eepwlp 000001D8 emptyreturn 000000CC es_editiservo 00000002 es_editnumber 00000000 es_editoservo 00000001 estatus 00000046 exitint 00000020 faulty 000003EE ffault 000003E7 ffault1 000003F2 ffault2 000003F9 ffaultA 000003E4 ffaultB 000003E6 fflt_l1 000003E0 filterrx 000000ED flash_cnt 00000049 flash_faulty 000003C6 flash_icnt 00000048 flash_lp 00000242 flashchk 00000247 flasher 00000241 flashof flashon fltr_dolos 0000010A fltr_dopower 000000FC fltr_exit 00000117 fltr_samelos 0000010F fltr_samepoweroff 00000101 fltr_sameshutter 000000F4 framems 00000019 frmT0cnt 00000033 frxstatus 0000003C getrxapulse 0000011E getrxpulse 000000CD gn_ipause 00000000 gn_tendigit 00000001 gn_tenpause 00000002 gnstatus 00000051 gpioout 00000039 i 0000000C idlepulsegt 000000DE iflasher 0000024B ini_inputidle 000005DC ini_inputpoweroff 000004B0 ini_inputshutter 00000708 ini_servofocus 000005DC ini_servoidle 000005DC ini_servoshutter 000006D6 MPASM 03.60 Released SSW.ASM 3-21-2004 19:34:18 PAGE 49 SYMBOL TABLE LABEL VALUE ini_timefocus 00000000 ini_timekalive 00000037 ini_timepost 0000000A ini_timepoweroff 0000000A ini_timeshutter 00000005 initdebounce inrxbit 00000004 inrxraw 00000001 int_1sec 00000023 int_p1sec 00000022 is_doubleka 00000006 is_idlelt 00000001 is_nokeepalive 00000003 is_powerofflt 00000002 is_programmode 00000000 is_videoon 00000005 is_wnoshutter 00000004 istatus 00000037 kalive_icnt 0000003B ktrigger 00000087 ledoff loscnt 0000003D lostime 00000014 markflt mtrigger 0000008A ncfgitems 0000000B notsetup 00000060 now_idle 00000077 outled 00000005 outrxinv 00000002 outservo 00000000 poffpulsegt 000000EB post 0000009B powerofficnt 0000003F prg_centrewait 0000028A prg_count 0000004D prg_cw1 0000028A prg_cw2 00000295 prg_cw3 00000291 prg_cwdone 0000029B prg_ed1 0000038F prg_ed10 000003BC prg_ed11 000003C1 prg_ed2 00000394 prg_ed3 00000399 prg_ed4 0000039E prg_ed5 000003A3 prg_ed6 000003A8 prg_ed7 000003AD prg_ed8 000003B2 prg_ed9 000003B7 prg_editdone 00000382 prg_editiservo 000002DE MPASM 03.60 Released SSW.ASM 3-21-2004 19:34:18 PAGE 50 SYMBOL TABLE LABEL VALUE prg_editnumber 000002EE prg_editok 000002F0 prg_editoservo 000002B2 prg_editsetup 00000355 prg_eis1 000002E2 prg_entry 0000029F prg_entrywait 00000257 prg_eos1 000002BB prg_eosA 000002CA prg_eosB 000002C3 prg_eosB1 000002C6 prg_es1 00000366 prg_es10 0000037E prg_es11 00000380 prg_es2 0000036A prg_es3 0000036C prg_es4 0000036E prg_es5 00000372 prg_es6 00000374 prg_es7 00000376 prg_es8 00000378 prg_es9 0000037C prg_esiservo 00000379 prg_esnumber 0000036F prg_esosrvo 00000367 prg_ew1 0000025A prg_ew2 00000265 prg_ew3 00000261 prg_ewdone 0000026C prg_fdiff 0000022E prg_filterAorB 0000021A prg_fnowA 0000022A prg_fnowB 0000022C prg_getnumber 000002F6 prg_gn_1flash 0000030E prg_gn_adigit 00000317 prg_gn_ipause 00000311 prg_gn_tendigit 0000031E prg_gn_tenpause 00000326 prg_gnfA 00000347 prg_gnfAB 00000353 prg_gnfB 0000034E prg_gnflash 0000032F prg_gnfoff 00000342 prg_gnlimit 0000004E prg_gnloop 000002F7 prg_gnlp1 000002FE prg_gnlp2 00000305 prg_gnnext 00000307 prg_gnone 00000050 prg_gnten 0000004F prg_iservodone 000002E6 prg_itemno 0000004C MPASM 03.60 Released SSW.ASM 3-21-2004 19:34:18 PAGE 51 SYMBOL TABLE LABEL VALUE prg_mainlp 000002A5 prg_oservodone 000002D4 prg_rawAorB 00000209 prg_videowait 00000270 prg_vw1 00000273 prg_vw2 0000027E prg_vw3 0000027A prg_vwdone 00000285 prg_waitlp 000002A3 ps_debdone 00000001 ps_flshdone 00000000 ps_fstickA 00000004 ps_fstickB 00000006 ps_fstickM 00000005 ps_rstickA 00000002 ps_rstickB 00000003 pstatus 00000045 read_16bit read_8bit read_ee8 0000018B read_eep 000001AC read_ees16 00000197 recall 00000148 rx_flos 00000003 rx_fpoweroff 00000005 rx_fshutter 00000004 rx_rpoweroff 00000002 rx_rshutter 00000001 rx_timeout 00000000 rxfrmtH 00000041 rxfrmtL 00000040 rxstatus 00000038 servoH 00000044 servoL 00000043 shutter 00000095 shuttercnt 0000003E srvtmr1 0000000F start 00000038 stickAat 0000055F stickBat 00000659 stick_cnt 0000004B stick_psts 0000004A sts_save 00000021 toolong 0000013E trigger 0000008D trigger_icnt 0000003A videoswitch 00000003 w_save 00000020 wait1 00000082 waiting 0000007B whileoff 00000128 whileon 0000012F write_16bit MPASM 03.60 Released SSW.ASM 3-21-2004 19:34:18 PAGE 52 SYMBOL TABLE LABEL VALUE write_8bit write_ee16 000001B2 write_ee8 000001C2 write_eepa 000001CA write_eepd 000001CF MEMORY USAGE MAP ('X' = Used, '-' = Unused) 0000 : X---XXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX 0040 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX 0080 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX 00C0 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX 0100 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX 0140 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX 0180 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX 01C0 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX 0200 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX 0240 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX 0280 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX 02C0 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX 0300 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX 0340 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX 0380 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX 03C0 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXX--- 2000 : -------X-------- ---------------- ---------------- ---------------- 2100 : XXXXXXXXXXXXXXXX XXXXXXXXXXXX---- ---------------- ---------------- All other memory blocks unused. Program Memory Words Used: 1018 Program Memory Words Free: 6 Errors : 0 Warnings : 0 reported, 0 suppressed Messages : 0 reported, 18 suppressed