MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 1 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00001 ;********************************************************************** 00002 ; Copyright (C) 2006 Dwayne Forsyth 00003 ; 00004 ; This program is free software; you can redistribute it and/or 00005 ; modify it under the terms of the GNU General Public License 00006 ; as published by the Free Software Foundation; either version 2 00007 ; of the License, or (at your option) any later version. 00008 ; 00009 ; This program is distributed in the hope that it will be useful, 00010 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 ; GNU General Public License for more details. 00013 ; 00014 ; You should have received a copy of the GNU General Public License 00015 ; along with this program; if not, write to the 00016 ; 00017 ; Free Software Foundation, Inc. 00018 ; 51 Franklin Street, Fifth Floor 00019 ; Boston, MA 02110-1301, USA. 00020 ; 00021 ;********************************************************************** 00022 ; 00023 ; This software drives 19-LED circuit board designed by Dwayne 00024 ; Forsyth. That flash the 19 color LEDs in pretty patterns. The 1st 00025 ; introduction of this blinkie kit was Duckon 15 (www.duckon.com) and 00026 ; is now sold on the www.2dkits.com webpage. 00027 ; 00028 ; If you use this code, find a bug, or improve it please sent an email 00029 ; to Dwayne. 00030 ; 00031 ;********************************************************************** 00032 ; 00033 ; Filename: 19led_stick_t1.asm 00034 ; Date: 06/03/2006 00035 ; File Version: V1 00036 ; 00037 ; Author: Dwayne Forsyth 00038 ; email: Dwayne@2DKits.com 00039 ; Company: www.2DKits.com 00040 ; 502 Rue Orleanias 00041 ; Deer Park, IL 60010 00042 ; 00043 ;********************************************************************** 00044 00045 list p=12f683 ; list directive to define processor 00046 #include ; processor specific variable definitions 00001 LIST 00002 ; P12F683.INC Standard Header File, Version 1.00 Microchip Technology, Inc. 00339 LIST 00047 2007 30C4 00048 __CONFIG _CP_OFF & _CPD_OFF & _BOD_OFF & _PWRTE_ON & _WDT_OFF & _INTRC_OSC_NOCLKOUT & _MCLRE_ OFF & _FCMEN_OFF & _IESO_OFF 00049 MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 2 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00050 00051 ; '__CONFIG' directive is used to embed configuration data within .asm file. 00052 ; The labels following the directive are located in the respective .inc file. 00053 ; See respective data sheet for additional information on configuration word. 00054 00055 mult_nop macro nup_count 00056 local i = 0 00057 while i < nup_count 00058 nop 00059 i += 1 00060 endw 00061 endm 00062 00063 LedOut macro word, bit, reg_dir, port 00064 btfsc word, bit 00065 bcf reg_dir, port 00066 endm 00067 00068 state_tbl macro num, zero, one, flag 00069 Lstate#v(num) 00070 if (flag == 0) 00071 clrf button 00072 endif 00073 if (flag == 1) 00074 bsf button,0 00075 endif 00076 00077 btfsc IR_in,0 00078 goto Lstate#v(num)a 00079 00080 movlw zero 00081 movwf instate 00082 00083 goto Lcontinue 00084 00085 Lstate#v(num)a 00086 movlw one 00087 movwf instate 00088 00089 goto Lcontinue 00090 endm 00091 00092 state2_tbl macro num, name, offset 00093 Lstate#v(num) 00094 ; save the 1st half of word 00095 movf IR_in,w ; save 1st half 00096 movwf IR_lhalf 00097 incf instate,f 00098 00099 goto Lcontinue 00100 00101 Lstate#v(num+1) 00102 ; save the 2nd half of word MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 3 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00103 ; check for protocal error should get 01 or 10 00104 movf IR_lhalf,w 00105 xorwf IR_in,w 00106 btfss STATUS, Z 00107 goto Lstate#v(num+1)a 00108 clrf instate ; error state = zero 00109 00110 goto Lcontinue 00111 00112 ; set the correct bit in output vars. 00113 Lstate#v(num+1)a 00114 btfsc IR_in,0 00115 bcf name, offset 00116 btfss IR_in,0 00117 bsf name, offset 00118 00119 incf instate,f 00120 goto Lcontinue 00121 endm 00122 00123 entry macro a0, a1, a2 00124 retlw a0 00125 retlw a1 00126 retlw a2 00127 endm 00128 00129 tbltype1 macro speed 00130 retlw 0x01 00131 retlw speed 00132 endm 00133 00134 make_mtab macro 00135 local i = 0 00136 while i <= NUM_TAB 00137 retlw HIGH table#v(i) 00138 retlw LOW table#v(i) 00139 i += 1 00140 endw 00141 endm 00142 00143 make_state_jump_table macro max_state 00144 local i = 0 00145 while i <= max_state 00146 retlw HIGH Lstate#v(i) 00147 retlw LOW Lstate#v(i) 00148 i += 1 00149 endw 00150 endm 00151 00152 00153 00000005 00154 PORTA EQU GPIO 00000085 00155 TRISA EQU TRISIO MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 4 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00000007 00156 NOT_RAPU EQU NOT_GPPU 00157 00158 00159 ;***** VARIABLE DEFINITIONS 00160 CBLOCK 0x71 ; all banks vars 00000071 00161 w_temp ; variable used for context saving 00000072 00162 status_temp ; variable used for context saving 00000073 00163 regA_dir ; temp TRISA storage 00000074 00164 pindex ; pattern index 00000075 00165 input 00166 ENDC 00167 00168 CBLOCK 0x21 ; bank 0 vars 00000021 00169 repeat 00000022 00170 IR_40k 00000023 00171 tx_on 00000024 00172 tx_1 00000025 00173 out0 00000026 00174 out1 00000027 00175 out2 00000028 00176 out3 00000029 00177 out4 0000002A 00178 scount 0000002B 00179 instate 0000002C 00180 pindex2 0000002D 00181 IR_in 0000002E 00182 command 0000002F 00183 address 00000030 00184 toggle 00000031 00185 IR_lhalf 00000032 00186 tbl2_hi 00000033 00187 tbl2_low 00000034 00188 button 00000035 00189 regA_out 00000036 00190 in0 00000037 00191 in1 00000038 00192 in2 00000039 00193 in3 0000003A 00194 in4 0000003B 00195 dcount 0000003C 00196 b2l_out_hi 0000003D 00197 b2l_out_low 0000003E 00198 b2l_lcount 0000003F 00199 b2l_in_red 00000040 00200 b2l_in_green 00000041 00201 count 00000042 00202 speed 00000043 00203 pspeed 00000044 00204 max_instate 00000045 00205 count1 00000046 00206 count2 00000047 00207 pattern 00000048 00208 tbl_hi MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 5 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00000049 00209 tbl_low 0000004A 00210 temp 0000004B 00211 tbltype 0000004C 00212 qcount 0000004D 00213 IR_in_good 0000004E 00214 dirty 0000004F 00215 ploop 00000050 00216 out_address 00000051 00217 out_command 00000052 00218 out_toggle 00000053 00219 out_pattern 00000054 00220 demo_mode 00000055 00221 nextf 00000056 00222 flip_in 00000057 00223 flip_out 00224 ENDC 00225 00000011 00226 NUM_TAB EQU d'17' ; number of tables 00227 00228 ;********************************************************************** 0000 00229 ORG 0x000 ; processor reset vector 0000 2BAF 00230 goto main ; go to beginning of program 00231 0004 00232 ORG 0x004 ; interrupt vector location 0004 00F1 00233 movwf w_temp ; copy W to TEMP register 0005 0E03 00234 swapf STATUS,w ; Swap status to be saved into W 0006 0183 00235 clrf STATUS ; Bank 0 0007 00F2 00236 movwf status_temp ; save off contents of PCLATH register 00237 0008 0000 00238 nop 0009 0FC5 00239 incfsz count1,f 000A 280E 00240 goto skipf 00241 000B 0FC6 00242 incfsz count2,f 000C 280E 00243 goto skipf 00244 000D 1455 00245 bsf nextf,0 00246 000E 00247 skipf 000E 3021 00248 movlw D'33' ; 38k ; E20 256-((27*64)/8) 000F 0081 00249 movwf TMR0 ; E21 00250 0010 082A 00251 movf scount,w ; F22 0011 3E00 00252 addlw 0 ; F23 0012 1903 00253 btfsc STATUS,Z ; F24 for now don't send! 0013 2830 00254 goto send_nothing ; F25 00255 0014 1C24 00256 btfss tx_1,0 ; F26 0015 282E 00257 goto send_zero ; F27 00258 00259 ;-------------------------------------------------------------------------------------- 0016 00260 send_one ; we are slaming the 36K IR siginal, its like a busy wait! 00261 ;-------------------------------------------------------------------------------------- MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 6 LOC OBJECT CODE LINE SOURCE TEXT VALUE 0016 1683 00262 bsf STATUS, RP0 ; switch to bank 1 0017 1303 00263 bcf STATUS, RP1 00264 0018 30DE 00265 movlw 0xDE ; set A0 & A5 led to output Message[302]: Register in operand not in bank 0. Ensure that bank bits are correct. 0019 0085 00266 movwf TRISA 00267 001A 1283 00268 bcf STATUS, RP0 ; switch to bank 0 001B 1303 00269 bcf STATUS, RP1 00270 001C 0185 00271 clrf PORTA ; set all outputs to zero 00272 001D 1405 00273 bsf PORTA,0 ; A01 00274 001E 2050 00275 call get_next_tx_bit ; 2 + 11 cycles A04-A16 00276 001F 0000 00277 nop 0020 0000 00278 nop 0021 0000 00279 nop 00280 0022 301E 00281 movlw 0x1E ; C26 (23) 0023 00A1 00282 movwf repeat ; C27 0024 00283 repeat_loop 0024 1005 00284 bcf PORTA,0 ; D01 00285 00286 ; mult_nop d'26' ; D02-D27 0025 3007 00287 movlw 07h 0026 205A 00288 call qdelay ; 6 + (7 * 3) = 27 ; D02-D27 00289 0027 1405 00290 bsf PORTA,0 ; E01 (27) 00291 00292 ; mult_nop d'23' ; E02-E24 0028 3006 00293 movlw 06h ; 6+(6 * 3) = 22 ; E02-E24 0029 205A 00294 call qdelay 00295 002A 0BA1 00296 decfsz repeat,f ; E25 (24) 002B 2824 00297 goto repeat_loop ; E26/E27 00298 002C 0000 00299 nop ;E27 002D 283C 00300 goto exit_tx 00301 00302 ;-------------------------------------------------------------------------------------- 002E 00303 send_zero ; we are going to release all the CPU time to the main line for display. 00304 ;-------------------------------------------------------------------------------------- 00305 00306 002E 2050 00307 call get_next_tx_bit ; 2 + 11 cycles A04-A16 00308 002F 283C 00309 goto exit_tx ; E25/26 00310 00311 ;-------------------------------------------------------------------------------------- 0030 00312 send_nothing ; need to eat 1/2 of the CPU time to make main line smooth. 00313 ;-------------------------------------------------------------------------------------- MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 7 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00314 0030 2043 00315 call read_ir_in 0031 205E 00316 call get_state_tbl_hi_address 0032 2064 00317 call get_state_tbl_low_address 0033 2072 00318 call go_state_table 0034 2047 00319 call set_max_state 00320 0035 300F 00321 movlw 0x0f ; A26 0036 00A1 00322 movwf repeat ; A27 0037 00323 repeat_loop3 00324 0037 300F 00325 movlw d'15' ; 6+(15 * 3) = 51 ; B01-B27 + C01-C24 0038 205A 00326 call qdelay 00327 0039 0BA1 00328 decfsz repeat,f ; C25 003A 2837 00329 goto repeat_loop3 ; C26/C27 00330 003B 0000 00331 nop ; C27 00332 00333 ;-------------------------------------------------------------------------------------- 003C 00334 exit_tx 00335 ;-------------------------------------------------------------------------------------- 00336 ; clear timer0 interupt 003C 110B 00337 bcf INTCON,T0IF ; E26 003D 1005 00338 bcf PORTA,0 ; F01 00339 00340 ; restore state, return form interupt 00341 003E 00342 exit_int 003E 0E72 00343 swapf status_temp,w ; F02 003F 0083 00344 movwf STATUS ; F03 0040 0EF1 00345 swapf w_temp,f ; F04 0041 0E71 00346 swapf w_temp,w ; F05 0042 0009 00347 retfie ; return from interrupt ; F0 6/F07 00348 00349 ;-------------------------------------------------------------------------------------- 0043 00350 read_ir_in ; 5 cycles 00351 ;-------------------------------------------------------------------------------------- 00352 0043 102D 00353 bcf IR_in,0 ; 1 0044 1985 00354 btfsc PORTA,3 ; 2 0045 142D 00355 bsf IR_in,0 ; 3 00356 00357 ; movf tx_1,w ; loopback for testing HACK!! ;1 00358 ; xorlw 0x01 ; loopback for testing HACK!! ;2 00359 ; movwf IR_in ; loopback for testing HACK!! ;3 0046 0008 00360 return ; 4/5 00361 00362 ;-------------------------------------------------------------------------------------- 0047 00363 set_max_state ; 8 cycles 00364 ;-------------------------------------------------------------------------------------- 0047 0844 00365 movf max_instate,w ; 1 MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 8 LOC OBJECT CODE LINE SOURCE TEXT VALUE 0048 022B 00366 subwf instate,w ; 2 0049 1C03 00367 btfss STATUS,C ; 3 004A 284E 00368 goto smi_l1 ; 4 4/5 004B 082B 00369 movf instate,w ; 5 004C 00C4 00370 movwf max_instate ; 6 004D 0008 00371 return ; 7/8 004E 00372 smi_l1 004E 0000 00373 nop ; 6 004F 0008 00374 return ; 7/8 00375 00376 ;-------------------------------------------------------------------------------------- 0050 00377 get_next_tx_bit ; 11 cycles 00378 ;-------------------------------------------------------------------------------------- 00379 0050 1024 00380 bcf tx_1,0 ;1 0051 03AA 00381 decf scount,f ;2 0052 1003 00382 bcf STATUS, C ; clear carry bit ;3 0053 0CA8 00383 rrf out3,f ;4 0054 0CA7 00384 rrf out2,f ;5 0055 0CA6 00385 rrf out1,f ;6 0056 0CA5 00386 rrf out0,f ;7 0057 1803 00387 btfsc STATUS, C ;8 0058 1424 00388 bsf tx_1,0 ;9 00389 00390 ; movf tx_1,w ; loopback for testing HACK!! 00391 ; xorlw 0x01 ; loopback for testing HACK!! 00392 ; movwf tx_1 ; loopback for testing HACK!! 00393 ; mult_nop d'6' ; for debuging 00394 0059 0008 00395 return ;10/11 00396 00397 ;********************************************************************** 005A 00398 qdelay 00399 ;********************************************************************** 005A 00CC 00400 movwf qcount 005B 00401 delay_loop2 005B 0BCC 00402 decfsz qcount,1 005C 285B 00403 goto delay_loop2 005D 0008 00404 return 00405 00406 ;-------------------------------------------------------------------------------------- 005E 00407 get_state_tbl_hi_address ; 17 cycles 00408 ;-------------------------------------------------------------------------------------- 005E 1003 00409 bcf STATUS,0 ; clear carry flag ; 1 005F 0D2B 00410 rlf instate,w ; entry = table * 2 ; 2 0060 00AC 00411 movwf pindex2 ; 3 0061 206B 00412 call table_lookup2 ; 14 (9+2) 0062 00B2 00413 movwf tbl2_hi ; 15 0063 0008 00414 return ; 16/17 00415 00416 ;-------------------------------------------------------------------------------------- 0064 00417 get_state_tbl_low_address ; 18 cycles 00418 ;-------------------------------------------------------------------------------------- MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 9 LOC OBJECT CODE LINE SOURCE TEXT VALUE 0064 1003 00419 bcf STATUS,0 ; clear carry flag (just in case) ; 1 0065 0D2B 00420 rlf instate,w ; entry = table * 2 + 1 ; 2 0066 3E01 00421 addlw 1 ; 3 0067 00AC 00422 movwf pindex2 ; 4 0068 206B 00423 call table_lookup2 ; 15 (9+2) 0069 00B3 00424 movwf tbl2_low ; 16 006A 0008 00425 return ; 17/18 00426 00427 ;********************************************************************** 006B 00428 table_lookup2 ; 9 cycles 00429 ;********************************************************************** 006B 3000 00430 movlw HIGH state_jump_table ; 1 006C 008A 00431 movwf PCLATH ; 2 006D 082C 00432 movf pindex2,w ; 3 006E 3E76 00433 addlw LOW state_jump_table ; 4 006F 1803 00434 btfsc STATUS,0 ; check carry flag ; 5 0070 0A8A 00435 incf PCLATH,f ; 6 0071 0082 00436 movwf PCL ; 7 + 2 00437 00438 ;********************************************************************** 0072 00439 go_state_table ; 18 cycles 00440 ;********************************************************************** 0072 0832 00441 movf tbl2_hi,w ; 1 0073 008A 00442 movwf PCLATH ; 2 0074 0833 00443 movf tbl2_low,w ; 3 0075 0082 00444 movwf PCL ; 4 00445 00446 ;********************************************************************** 0076 00447 state_jump_table 00448 ;********************************************************************** 00449 make_state_jump_table d'35' 0000 M local i = 0 M while i <= d'35' 0076 3400 M retlw HIGH Lstate0 0077 34BE M retlw LOW Lstate0 00000001 M i += 1 0078 3400 M retlw HIGH Lstate1 0079 34C7 M retlw LOW Lstate1 00000002 M i += 1 007A 3400 M retlw HIGH Lstate2 007B 34CF M retlw LOW Lstate2 00000003 M i += 1 007C 3400 M retlw HIGH Lstate3 007D 34D7 M retlw LOW Lstate3 00000004 M i += 1 007E 3400 M retlw HIGH Lstate4 007F 34DF M retlw LOW Lstate4 00000005 M i += 1 0080 3400 M retlw HIGH Lstate5 0081 34E7 M retlw LOW Lstate5 00000006 M i += 1 0082 3400 M retlw HIGH Lstate6 0083 34EF M retlw LOW Lstate6 MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 10 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00000007 M i += 1 0084 3400 M retlw HIGH Lstate7 0085 34F7 M retlw LOW Lstate7 00000008 M i += 1 0086 3400 M retlw HIGH Lstate8 0087 34FF M retlw LOW Lstate8 00000009 M i += 1 0088 3401 M retlw HIGH Lstate9 0089 3407 M retlw LOW Lstate9 0000000A M i += 1 008A 3401 M retlw HIGH Lstate10 008B 340F M retlw LOW Lstate10 0000000B M i += 1 008C 3401 M retlw HIGH Lstate11 008D 3418 M retlw LOW Lstate11 0000000C M i += 1 008E 3401 M retlw HIGH Lstate12 008F 341C M retlw LOW Lstate12 0000000D M i += 1 0090 3401 M retlw HIGH Lstate13 0091 3428 M retlw LOW Lstate13 0000000E M i += 1 0092 3401 M retlw HIGH Lstate14 0093 342C M retlw LOW Lstate14 0000000F M i += 1 0094 3401 M retlw HIGH Lstate15 0095 3438 M retlw LOW Lstate15 00000010 M i += 1 0096 3401 M retlw HIGH Lstate16 0097 343C M retlw LOW Lstate16 00000011 M i += 1 0098 3401 M retlw HIGH Lstate17 0099 3448 M retlw LOW Lstate17 00000012 M i += 1 009A 3401 M retlw HIGH Lstate18 009B 344C M retlw LOW Lstate18 00000013 M i += 1 009C 3401 M retlw HIGH Lstate19 009D 3458 M retlw LOW Lstate19 00000014 M i += 1 009E 3401 M retlw HIGH Lstate20 009F 345C M retlw LOW Lstate20 00000015 M i += 1 00A0 3401 M retlw HIGH Lstate21 00A1 3468 M retlw LOW Lstate21 00000016 M i += 1 00A2 3401 M retlw HIGH Lstate22 00A3 346C M retlw LOW Lstate22 00000017 M i += 1 00A4 3401 M retlw HIGH Lstate23 00A5 3478 M retlw LOW Lstate23 00000018 M i += 1 00A6 3401 M retlw HIGH Lstate24 MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 11 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00A7 347C M retlw LOW Lstate24 00000019 M i += 1 00A8 3401 M retlw HIGH Lstate25 00A9 3488 M retlw LOW Lstate25 0000001A M i += 1 00AA 3401 M retlw HIGH Lstate26 00AB 348C M retlw LOW Lstate26 0000001B M i += 1 00AC 3401 M retlw HIGH Lstate27 00AD 3498 M retlw LOW Lstate27 0000001C M i += 1 00AE 3401 M retlw HIGH Lstate28 00AF 349C M retlw LOW Lstate28 0000001D M i += 1 00B0 3401 M retlw HIGH Lstate29 00B1 34A8 M retlw LOW Lstate29 0000001E M i += 1 00B2 3401 M retlw HIGH Lstate30 00B3 34AC M retlw LOW Lstate30 0000001F M i += 1 00B4 3401 M retlw HIGH Lstate31 00B5 34B8 M retlw LOW Lstate31 00000020 M i += 1 00B6 3401 M retlw HIGH Lstate32 00B7 34BC M retlw LOW Lstate32 00000021 M i += 1 00B8 3401 M retlw HIGH Lstate33 00B9 34C8 M retlw LOW Lstate33 00000022 M i += 1 00BA 3401 M retlw HIGH Lstate34 00BB 34CC M retlw LOW Lstate34 00000023 M i += 1 00BC 3401 M retlw HIGH Lstate35 00BD 34D8 M retlw LOW Lstate35 00000024 M i += 1 M endw 00450 00451 state_tbl 0, 7, 1, 0 00BE M Lstate0 M if (0 == 0) 00BE 01B4 M clrf button M endif M if (0 == 1) M bsf button,0 M endif M 00BF 182D M btfsc IR_in,0 00C0 28C4 M goto Lstate0a M 00C1 3007 M movlw 7 00C2 00AB M movwf instate M 00C3 29E5 M goto Lcontinue MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 12 LOC OBJECT CODE LINE SOURCE TEXT VALUE M 00C4 M Lstate0a 00C4 3001 M movlw 1 00C5 00AB M movwf instate M 00C6 29E5 M goto Lcontinue 00452 state_tbl 1, 0, 2, -1 00C7 M Lstate1 M if (-1 == 0) M clrf button M endif M if (-1 == 1) M bsf button,0 M endif M 00C7 182D M btfsc IR_in,0 00C8 28CC M goto Lstate1a M 00C9 3000 M movlw 0 00CA 00AB M movwf instate M 00CB 29E5 M goto Lcontinue M 00CC M Lstate1a 00CC 3002 M movlw 2 00CD 00AB M movwf instate M 00CE 29E5 M goto Lcontinue 00453 state_tbl 2, 0, 3, -1 00CF M Lstate2 M if (-1 == 0) M clrf button M endif M if (-1 == 1) M bsf button,0 M endif M 00CF 182D M btfsc IR_in,0 00D0 28D4 M goto Lstate2a M 00D1 3000 M movlw 0 00D2 00AB M movwf instate M 00D3 29E5 M goto Lcontinue M 00D4 M Lstate2a 00D4 3003 M movlw 3 00D5 00AB M movwf instate M 00D6 29E5 M goto Lcontinue 00454 state_tbl 3, 4, 3, -1 00D7 M Lstate3 M if (-1 == 0) MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 13 LOC OBJECT CODE LINE SOURCE TEXT VALUE M clrf button M endif M if (-1 == 1) M bsf button,0 M endif M 00D7 182D M btfsc IR_in,0 00D8 28DC M goto Lstate3a M 00D9 3004 M movlw 4 00DA 00AB M movwf instate M 00DB 29E5 M goto Lcontinue M 00DC M Lstate3a 00DC 3003 M movlw 3 00DD 00AB M movwf instate M 00DE 29E5 M goto Lcontinue 00455 state_tbl 4, 0, 5, -1 00DF M Lstate4 M if (-1 == 0) M clrf button M endif M if (-1 == 1) M bsf button,0 M endif M 00DF 182D M btfsc IR_in,0 00E0 28E4 M goto Lstate4a M 00E1 3000 M movlw 0 00E2 00AB M movwf instate M 00E3 29E5 M goto Lcontinue M 00E4 M Lstate4a 00E4 3005 M movlw 5 00E5 00AB M movwf instate M 00E6 29E5 M goto Lcontinue 00456 state_tbl 5, d'11', 0, -1 00E7 M Lstate5 M if (-1 == 0) M clrf button M endif M if (-1 == 1) M bsf button,0 M endif M 00E7 182D M btfsc IR_in,0 00E8 28EC M goto Lstate5a M MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 14 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00E9 300B M movlw d'11' 00EA 00AB M movwf instate M 00EB 29E5 M goto Lcontinue M 00EC M Lstate5a 00EC 3000 M movlw 0 00ED 00AB M movwf instate M 00EE 29E5 M goto Lcontinue 00457 00458 state_tbl 6, 0, 0, -1 ; junk state 00EF M Lstate6 M if (-1 == 0) M clrf button M endif M if (-1 == 1) M bsf button,0 M endif M 00EF 182D M btfsc IR_in,0 00F0 28F4 M goto Lstate6a M 00F1 3000 M movlw 0 00F2 00AB M movwf instate M 00F3 29E5 M goto Lcontinue M 00F4 M Lstate6a 00F4 3000 M movlw 0 00F5 00AB M movwf instate M 00F6 29E5 M goto Lcontinue 00459 00460 state_tbl 7, 8, 0, -1 00F7 M Lstate7 M if (-1 == 0) M clrf button M endif M if (-1 == 1) M bsf button,0 M endif M 00F7 182D M btfsc IR_in,0 00F8 28FC M goto Lstate7a M 00F9 3008 M movlw 8 00FA 00AB M movwf instate M 00FB 29E5 M goto Lcontinue M 00FC M Lstate7a 00FC 3000 M movlw 0 MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 15 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00FD 00AB M movwf instate M 00FE 29E5 M goto Lcontinue 00461 state_tbl 8, 9, 0, -1 00FF M Lstate8 M if (-1 == 0) M clrf button M endif M if (-1 == 1) M bsf button,0 M endif M 00FF 182D M btfsc IR_in,0 0100 2904 M goto Lstate8a M 0101 3009 M movlw 9 0102 00AB M movwf instate M 0103 29E5 M goto Lcontinue M 0104 M Lstate8a 0104 3000 M movlw 0 0105 00AB M movwf instate M 0106 29E5 M goto Lcontinue 00462 state_tbl 9, d'10', 0, -1 0107 M Lstate9 M if (-1 == 0) M clrf button M endif M if (-1 == 1) M bsf button,0 M endif M 0107 182D M btfsc IR_in,0 0108 290C M goto Lstate9a M 0109 300A M movlw d'10' 010A 00AB M movwf instate M 010B 29E5 M goto Lcontinue M 010C M Lstate9a 010C 3000 M movlw 0 010D 00AB M movwf instate M 010E 29E5 M goto Lcontinue 00463 state_tbl d'10', d'10', 0, 1 010F M Lstate10 M if (1 == 0) M clrf button M endif M if (1 == 1) MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 16 LOC OBJECT CODE LINE SOURCE TEXT VALUE 010F 1434 M bsf button,0 M endif M 0110 182D M btfsc IR_in,0 0111 2915 M goto Lstate10a M 0112 300A M movlw d'10' 0113 00AB M movwf instate M 0114 29E5 M goto Lcontinue M 0115 M Lstate10a 0115 3000 M movlw 0 0116 00AB M movwf instate M 0117 29E5 M goto Lcontinue 00464 00465 state2_tbl d'11', toggle, 0 0118 M Lstate11 M ; save the 1st half of word 0118 082D M movf IR_in,w ; save 1st half 0119 00B1 M movwf IR_lhalf 011A 0AAB M incf instate,f M 011B 29E5 M goto Lcontinue M 011C M Lstate12 M ; save the 2nd half of word M ; check for protocal error should get 01 or 10 011C 0831 M movf IR_lhalf,w 011D 062D M xorwf IR_in,w 011E 1D03 M btfss STATUS, Z 011F 2922 M goto Lstate12a 0120 01AB M clrf instate ; error state = zero M 0121 29E5 M goto Lcontinue M M ; set the correct bit in output vars. 0122 M Lstate12a 0122 182D M btfsc IR_in,0 0123 1030 M bcf toggle, 0 0124 1C2D M btfss IR_in,0 0125 1430 M bsf toggle, 0 M 0126 0AAB M incf instate,f 0127 29E5 M goto Lcontinue 00466 state2_tbl d'13', address, 4 0128 M Lstate13 M ; save the 1st half of word 0128 082D M movf IR_in,w ; save 1st half 0129 00B1 M movwf IR_lhalf 012A 0AAB M incf instate,f M MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 17 LOC OBJECT CODE LINE SOURCE TEXT VALUE 012B 29E5 M goto Lcontinue M 012C M Lstate14 M ; save the 2nd half of word M ; check for protocal error should get 01 or 10 012C 0831 M movf IR_lhalf,w 012D 062D M xorwf IR_in,w 012E 1D03 M btfss STATUS, Z 012F 2932 M goto Lstate14a 0130 01AB M clrf instate ; error state = zero M 0131 29E5 M goto Lcontinue M M ; set the correct bit in output vars. 0132 M Lstate14a 0132 182D M btfsc IR_in,0 0133 122F M bcf address, 4 0134 1C2D M btfss IR_in,0 0135 162F M bsf address, 4 M 0136 0AAB M incf instate,f 0137 29E5 M goto Lcontinue 00467 state2_tbl d'15', address, 3 0138 M Lstate15 M ; save the 1st half of word 0138 082D M movf IR_in,w ; save 1st half 0139 00B1 M movwf IR_lhalf 013A 0AAB M incf instate,f M 013B 29E5 M goto Lcontinue M 013C M Lstate16 M ; save the 2nd half of word M ; check for protocal error should get 01 or 10 013C 0831 M movf IR_lhalf,w 013D 062D M xorwf IR_in,w 013E 1D03 M btfss STATUS, Z 013F 2942 M goto Lstate16a 0140 01AB M clrf instate ; error state = zero M 0141 29E5 M goto Lcontinue M M ; set the correct bit in output vars. 0142 M Lstate16a 0142 182D M btfsc IR_in,0 0143 11AF M bcf address, 3 0144 1C2D M btfss IR_in,0 0145 15AF M bsf address, 3 M 0146 0AAB M incf instate,f 0147 29E5 M goto Lcontinue 00468 state2_tbl d'17', address, 2 0148 M Lstate17 MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 18 LOC OBJECT CODE LINE SOURCE TEXT VALUE M ; save the 1st half of word 0148 082D M movf IR_in,w ; save 1st half 0149 00B1 M movwf IR_lhalf 014A 0AAB M incf instate,f M 014B 29E5 M goto Lcontinue M 014C M Lstate18 M ; save the 2nd half of word M ; check for protocal error should get 01 or 10 014C 0831 M movf IR_lhalf,w 014D 062D M xorwf IR_in,w 014E 1D03 M btfss STATUS, Z 014F 2952 M goto Lstate18a 0150 01AB M clrf instate ; error state = zero M 0151 29E5 M goto Lcontinue M M ; set the correct bit in output vars. 0152 M Lstate18a 0152 182D M btfsc IR_in,0 0153 112F M bcf address, 2 0154 1C2D M btfss IR_in,0 0155 152F M bsf address, 2 M 0156 0AAB M incf instate,f 0157 29E5 M goto Lcontinue 00469 state2_tbl d'19', address, 1 0158 M Lstate19 M ; save the 1st half of word 0158 082D M movf IR_in,w ; save 1st half 0159 00B1 M movwf IR_lhalf 015A 0AAB M incf instate,f M 015B 29E5 M goto Lcontinue M 015C M Lstate20 M ; save the 2nd half of word M ; check for protocal error should get 01 or 10 015C 0831 M movf IR_lhalf,w 015D 062D M xorwf IR_in,w 015E 1D03 M btfss STATUS, Z 015F 2962 M goto Lstate20a 0160 01AB M clrf instate ; error state = zero M 0161 29E5 M goto Lcontinue M M ; set the correct bit in output vars. 0162 M Lstate20a 0162 182D M btfsc IR_in,0 0163 10AF M bcf address, 1 0164 1C2D M btfss IR_in,0 0165 14AF M bsf address, 1 MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 19 LOC OBJECT CODE LINE SOURCE TEXT VALUE M 0166 0AAB M incf instate,f 0167 29E5 M goto Lcontinue 00470 state2_tbl d'21', address, 0 0168 M Lstate21 M ; save the 1st half of word 0168 082D M movf IR_in,w ; save 1st half 0169 00B1 M movwf IR_lhalf 016A 0AAB M incf instate,f M 016B 29E5 M goto Lcontinue M 016C M Lstate22 M ; save the 2nd half of word M ; check for protocal error should get 01 or 10 016C 0831 M movf IR_lhalf,w 016D 062D M xorwf IR_in,w 016E 1D03 M btfss STATUS, Z 016F 2972 M goto Lstate22a 0170 01AB M clrf instate ; error state = zero M 0171 29E5 M goto Lcontinue M M ; set the correct bit in output vars. 0172 M Lstate22a 0172 182D M btfsc IR_in,0 0173 102F M bcf address, 0 0174 1C2D M btfss IR_in,0 0175 142F M bsf address, 0 M 0176 0AAB M incf instate,f 0177 29E5 M goto Lcontinue 00471 state2_tbl d'23', command, 5 0178 M Lstate23 M ; save the 1st half of word 0178 082D M movf IR_in,w ; save 1st half 0179 00B1 M movwf IR_lhalf 017A 0AAB M incf instate,f M 017B 29E5 M goto Lcontinue M 017C M Lstate24 M ; save the 2nd half of word M ; check for protocal error should get 01 or 10 017C 0831 M movf IR_lhalf,w 017D 062D M xorwf IR_in,w 017E 1D03 M btfss STATUS, Z 017F 2982 M goto Lstate24a 0180 01AB M clrf instate ; error state = zero M 0181 29E5 M goto Lcontinue M M ; set the correct bit in output vars. MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 20 LOC OBJECT CODE LINE SOURCE TEXT VALUE 0182 M Lstate24a 0182 182D M btfsc IR_in,0 0183 12AE M bcf command, 5 0184 1C2D M btfss IR_in,0 0185 16AE M bsf command, 5 M 0186 0AAB M incf instate,f 0187 29E5 M goto Lcontinue 00472 state2_tbl d'25', command, 4 0188 M Lstate25 M ; save the 1st half of word 0188 082D M movf IR_in,w ; save 1st half 0189 00B1 M movwf IR_lhalf 018A 0AAB M incf instate,f M 018B 29E5 M goto Lcontinue M 018C M Lstate26 M ; save the 2nd half of word M ; check for protocal error should get 01 or 10 018C 0831 M movf IR_lhalf,w 018D 062D M xorwf IR_in,w 018E 1D03 M btfss STATUS, Z 018F 2992 M goto Lstate26a 0190 01AB M clrf instate ; error state = zero M 0191 29E5 M goto Lcontinue M M ; set the correct bit in output vars. 0192 M Lstate26a 0192 182D M btfsc IR_in,0 0193 122E M bcf command, 4 0194 1C2D M btfss IR_in,0 0195 162E M bsf command, 4 M 0196 0AAB M incf instate,f 0197 29E5 M goto Lcontinue 00473 state2_tbl d'27', command, 3 0198 M Lstate27 M ; save the 1st half of word 0198 082D M movf IR_in,w ; save 1st half 0199 00B1 M movwf IR_lhalf 019A 0AAB M incf instate,f M 019B 29E5 M goto Lcontinue M 019C M Lstate28 M ; save the 2nd half of word M ; check for protocal error should get 01 or 10 019C 0831 M movf IR_lhalf,w 019D 062D M xorwf IR_in,w 019E 1D03 M btfss STATUS, Z 019F 29A2 M goto Lstate28a MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 21 LOC OBJECT CODE LINE SOURCE TEXT VALUE 01A0 01AB M clrf instate ; error state = zero M 01A1 29E5 M goto Lcontinue M M ; set the correct bit in output vars. 01A2 M Lstate28a 01A2 182D M btfsc IR_in,0 01A3 11AE M bcf command, 3 01A4 1C2D M btfss IR_in,0 01A5 15AE M bsf command, 3 M 01A6 0AAB M incf instate,f 01A7 29E5 M goto Lcontinue 00474 state2_tbl d'29', command, 2 01A8 M Lstate29 M ; save the 1st half of word 01A8 082D M movf IR_in,w ; save 1st half 01A9 00B1 M movwf IR_lhalf 01AA 0AAB M incf instate,f M 01AB 29E5 M goto Lcontinue M 01AC M Lstate30 M ; save the 2nd half of word M ; check for protocal error should get 01 or 10 01AC 0831 M movf IR_lhalf,w 01AD 062D M xorwf IR_in,w 01AE 1D03 M btfss STATUS, Z 01AF 29B2 M goto Lstate30a 01B0 01AB M clrf instate ; error state = zero M 01B1 29E5 M goto Lcontinue M M ; set the correct bit in output vars. 01B2 M Lstate30a 01B2 182D M btfsc IR_in,0 01B3 112E M bcf command, 2 01B4 1C2D M btfss IR_in,0 01B5 152E M bsf command, 2 M 01B6 0AAB M incf instate,f 01B7 29E5 M goto Lcontinue 00475 state2_tbl d'31', command, 1 01B8 M Lstate31 M ; save the 1st half of word 01B8 082D M movf IR_in,w ; save 1st half 01B9 00B1 M movwf IR_lhalf 01BA 0AAB M incf instate,f M 01BB 29E5 M goto Lcontinue M 01BC M Lstate32 M ; save the 2nd half of word MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 22 LOC OBJECT CODE LINE SOURCE TEXT VALUE M ; check for protocal error should get 01 or 10 01BC 0831 M movf IR_lhalf,w 01BD 062D M xorwf IR_in,w 01BE 1D03 M btfss STATUS, Z 01BF 29C2 M goto Lstate32a 01C0 01AB M clrf instate ; error state = zero M 01C1 29E5 M goto Lcontinue M M ; set the correct bit in output vars. 01C2 M Lstate32a 01C2 182D M btfsc IR_in,0 01C3 10AE M bcf command, 1 01C4 1C2D M btfss IR_in,0 01C5 14AE M bsf command, 1 M 01C6 0AAB M incf instate,f 01C7 29E5 M goto Lcontinue 00476 state2_tbl d'33', command, 0 01C8 M Lstate33 M ; save the 1st half of word 01C8 082D M movf IR_in,w ; save 1st half 01C9 00B1 M movwf IR_lhalf 01CA 0AAB M incf instate,f M 01CB 29E5 M goto Lcontinue M 01CC M Lstate34 M ; save the 2nd half of word M ; check for protocal error should get 01 or 10 01CC 0831 M movf IR_lhalf,w 01CD 062D M xorwf IR_in,w 01CE 1D03 M btfss STATUS, Z 01CF 29D2 M goto Lstate34a 01D0 01AB M clrf instate ; error state = zero M 01D1 29E5 M goto Lcontinue M M ; set the correct bit in output vars. 01D2 M Lstate34a 01D2 182D M btfsc IR_in,0 01D3 102E M bcf command, 0 01D4 1C2D M btfss IR_in,0 01D5 142E M bsf command, 0 M 01D6 0AAB M incf instate,f 01D7 29E5 M goto Lcontinue 00477 01D8 00478 Lstate35 01D8 01AB 00479 clrf instate 01D9 144D 00480 bsf IR_in_good,0 00481 mult_nop d'11' ; 0000 M local i = 0 MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 23 LOC OBJECT CODE LINE SOURCE TEXT VALUE M while i < d'11' 01DA 0000 M nop 00000001 M i += 1 01DB 0000 M nop 00000002 M i += 1 01DC 0000 M nop 00000003 M i += 1 01DD 0000 M nop 00000004 M i += 1 01DE 0000 M nop 00000005 M i += 1 01DF 0000 M nop 00000006 M i += 1 01E0 0000 M nop 00000007 M i += 1 01E1 0000 M nop 00000008 M i += 1 01E2 0000 M nop 00000009 M i += 1 01E3 0000 M nop 0000000A M i += 1 01E4 0000 M nop 0000000B M i += 1 M endw 00482 01E5 00483 Lcontinue 01E5 0008 00484 return ; 17/18 00485 00486 ;********************************************************************** 01E6 00487 bin2led 00488 ;********************************************************************** 01E6 01BC 00489 clrf b2l_out_hi 01E7 01BD 00490 clrf b2l_out_low 01E8 3008 00491 movlw 0x08 01E9 00BE 00492 movwf b2l_lcount 01EA 00493 b2l_loop 01EA 1003 00494 bcf STATUS, C 01EB 0CC0 00495 rrf b2l_in_green,f 01EC 0DBD 00496 rlf b2l_out_low,f 01ED 0DBC 00497 rlf b2l_out_hi,f 01EE 0CBF 00498 rrf b2l_in_red,f 01EF 0DBD 00499 rlf b2l_out_low,f 01F0 0DBC 00500 rlf b2l_out_hi,f 00501 01F1 0BBE 00502 decfsz b2l_lcount,f 01F2 29EA 00503 goto b2l_loop 01F3 0008 00504 return 00505 00506 ;********************************************************************** 01F4 00507 flipbyte 00508 ;********************************************************************** 01F4 00D6 00509 movwf flip_in 01F5 01D7 00510 clrf flip_out MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 24 LOC OBJECT CODE LINE SOURCE TEXT VALUE 01F6 3008 00511 movlw 0x08 01F7 00BE 00512 movwf b2l_lcount 01F8 00513 fbyte_loop 01F8 1003 00514 bcf STATUS, C 01F9 0CD6 00515 rrf flip_in,f 01FA 0DD7 00516 rlf flip_out,f 00517 01FB 0BBE 00518 decfsz b2l_lcount,f 01FC 29F8 00519 goto fbyte_loop 00520 01FD 0857 00521 movfw flip_out 01FE 0008 00522 return 00523 00524 ;********************************************************************** 01FF 00525 rf_command_out 00526 ;********************************************************************** 00527 01FF 01A6 00528 clrf out1 0200 01A7 00529 clrf out2 0201 01A8 00530 clrf out3 00531 00532 ; start flag 0202 30A0 00533 movlw B'10100000' 0203 00A5 00534 movwf out0 00535 00536 00537 ; toggle bit 0204 09D2 00538 comf out_toggle,f ; toggle the toggle flag 0205 1C52 00539 btfss out_toggle,0 0206 1426 00540 bsf out1,0 0207 1852 00541 btfsc out_toggle,0 0208 14A6 00542 bsf out1,1 00543 00544 ; address bits 0209 1E50 00545 btfss out_address,4 020A 1526 00546 bsf out1,2 020B 1A50 00547 btfsc out_address,4 020C 15A6 00548 bsf out1,3 00549 020D 1DD0 00550 btfss out_address,3 020E 1626 00551 bsf out1,4 020F 19D0 00552 btfsc out_address,3 0210 16A6 00553 bsf out1,5 00554 0211 1D50 00555 btfss out_address,2 0212 1726 00556 bsf out1,6 0213 1950 00557 btfsc out_address,2 0214 17A6 00558 bsf out1,7 00559 0215 1CD0 00560 btfss out_address,1 0216 1427 00561 bsf out2,0 0217 18D0 00562 btfsc out_address,1 0218 14A7 00563 bsf out2,1 MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 25 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00564 0219 1C50 00565 btfss out_address,0 021A 1527 00566 bsf out2,2 021B 1850 00567 btfsc out_address,0 021C 15A7 00568 bsf out2,3 00569 00570 ; command bits 021D 1ED1 00571 btfss out_command,5 021E 1627 00572 bsf out2,4 021F 1AD1 00573 btfsc out_command,5 0220 16A7 00574 bsf out2,5 00575 0221 1E51 00576 btfss out_command,4 0222 1727 00577 bsf out2,6 0223 1A51 00578 btfsc out_command,4 0224 17A7 00579 bsf out2,7 00580 0225 1DD1 00581 btfss out_command,3 0226 1428 00582 bsf out3,0 0227 19D1 00583 btfsc out_command,3 0228 14A8 00584 bsf out3,1 00585 0229 1D51 00586 btfss out_command,2 022A 1528 00587 bsf out3,2 022B 1951 00588 btfsc out_command,2 022C 15A8 00589 bsf out3,3 00590 022D 1CD1 00591 btfss out_command,1 022E 1628 00592 bsf out3,4 022F 18D1 00593 btfsc out_command,1 0230 16A8 00594 bsf out3,5 00595 0231 1C51 00596 btfss out_command,0 0232 1728 00597 bsf out3,6 0233 1851 00598 btfsc out_command,0 0234 17A8 00599 bsf out3,7 00600 0235 3021 00601 movlw 0x21 0236 00AA 00602 movwf scount 00603 0237 0008 00604 return 00605 00606 ;********************************************************************** 0238 00607 delay 00608 ;********************************************************************** 0238 30FF 00609 movlw 0ffh 0239 00C1 00610 movwf count 023A 00611 delay_loop 023A 0000 00612 nop 023B 0BC1 00613 decfsz count,1 023C 2A3A 00614 goto delay_loop 023D 0008 00615 return 00616 MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 26 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00617 ;********************************************************************** 023E 00618 next_pattern 00619 ;********************************************************************** 023E 0AC7 00620 incf pattern,f 023F 0847 00621 movf pattern,w 0240 3C12 00622 sublw NUM_TAB+1 ; max pattern? 0241 1903 00623 btfsc STATUS,2 ; z bit check 0242 01C7 00624 clrf pattern ; reset to zero 0243 0847 00625 movfw pattern 0244 00D3 00626 movwf out_pattern 0245 0008 00627 return 00628 00629 ;********************************************************************** 0246 00630 past_pattern 00631 ;********************************************************************** 0246 03C7 00632 decf pattern,f 0247 0847 00633 movf pattern,w 0248 3E01 00634 addlw 1 ; max pattern? 0249 1D03 00635 btfss STATUS,2 ; z bit check 024A 2A4E 00636 goto past_exit 024B 3011 00637 movlw NUM_TAB 024C 00C7 00638 movwf pattern 024D 00D3 00639 movwf out_pattern 024E 00640 past_exit 024E 0008 00641 return 00642 00643 ;********************************************************************** 024F 00644 set_pattern 00645 ;********************************************************************** 024F 082E 00646 movfw command 0250 00C7 00647 movwf pattern 0251 00D3 00648 movwf out_pattern 0252 00649 set_loop 0252 3EEE 00650 addlw 0xff-NUM_TAB 0253 1C03 00651 btfss STATUS, C 0254 2A59 00652 goto set_exit 00653 0255 3011 00654 movlw NUM_TAB Message[305]: Using default destination of 1 (file). 0256 02C7 00655 subwf pattern 0257 0847 00656 movfw pattern 0258 2A52 00657 goto set_loop 00658 0259 00659 set_exit 0259 0008 00660 return 00661 00662 ;********************************************************************** 025A 00663 strobe_IO 00664 ;********************************************************************** 00665 ; 00666 ; write to hardware 00667 ; 00668 MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 27 LOC OBJECT CODE LINE SOURCE TEXT VALUE 025A 138B 00669 bcf INTCON, GIE ; disable INT 00670 025B 30C8 00671 movlw 0c8h ; clear output the last pattern 025C 0585 00672 andwf PORTA,f 00673 025D 1683 00674 bsf STATUS, RP0 ; switch to bank 1 025E 1303 00675 bcf STATUS, RP1 00676 025F 3037 00677 movlw 37h ; set led outputs to input Message[302]: Register in operand not in bank 0. Ensure that bank bits are correct. 0260 0485 00678 iorwf TRISA,f 00679 0261 0873 00680 movf regA_dir,w ; set portA direction Message[302]: Register in operand not in bank 0. Ensure that bank bits are correct. 0262 0585 00681 andwf TRISA,f 00682 0263 1283 00683 bcf STATUS, RP0 ; switch to bank 0 0264 1303 00684 bcf STATUS, RP1 00685 0265 0835 00686 movf regA_out,w ; set portA output 0266 0485 00687 iorwf PORTA,f 00688 0267 178B 00689 bsf INTCON, GIE ; enable INTs 00690 0268 0008 00691 return 00692 00693 ;********************************************************************** 0269 00694 default_IO 00695 ;********************************************************************** 00696 ; 00697 ; set io vars to default state. 00698 ; 0269 30FF 00699 movlw 0ffh 026A 00F3 00700 movwf regA_dir 00701 026B 3000 00702 movlw 00h 026C 00B5 00703 movwf regA_out 00704 026D 0008 00705 return 00706 00707 ;********************************************************************** 026E 00708 display 00709 ;********************************************************************** 026E 0842 00710 movf speed,w 026F 00BB 00711 movwf dcount 00712 00713 ; ----------------------- 00714 ; Strobe A0 00715 ; ----------------------- 00716 0270 00717 dloop 0270 2269 00718 call default_IO 00719 ; MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 28 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00720 ; Led 13 00721 LedOut in1, 3, regA_dir, 1 0271 19B7 M btfsc in1, 3 0272 10F3 M bcf regA_dir, 1 00722 00723 ; Led 09 00724 LedOut in1, 7, regA_dir, 2 0273 1BB7 M btfsc in1, 7 0274 1173 M bcf regA_dir, 2 00725 00726 ; Led 11 00727 LedOut in1, 5, regA_dir, 4 0275 1AB7 M btfsc in1, 5 0276 1273 M bcf regA_dir, 4 00728 00729 ; IR 00730 ; bsf regA_dir, 5 00731 00732 ; strobe A0 0277 1073 00733 bcf regA_dir, 0 0278 1435 00734 bsf regA_out, 0 00735 00736 ; write to hardware 0279 225A 00737 call strobe_IO 00738 027A 3030 00739 movlw 30h 027B 2238 00740 call delay 00741 00742 ; ----------------------- 00743 ; Strobe A1 00744 ; ----------------------- 027C 2269 00745 call default_IO 00746 ; 00747 ; Led 12 00748 LedOut in1, 4, regA_dir, 0 027D 1A37 M btfsc in1, 4 027E 1073 M bcf regA_dir, 0 00749 00750 ; Led 16 00751 LedOut in1, 0, regA_dir, 2 027F 1837 M btfsc in1, 0 0280 1173 M bcf regA_dir, 2 00752 00753 ; Led 18 00754 LedOut in2, 6, regA_dir, 4 0281 1B38 M btfsc in2, 6 0282 1273 M bcf regA_dir, 4 00755 00756 ; Led 06 00757 LedOut in0, 2, regA_dir, 5 0283 1936 M btfsc in0, 2 0284 12F3 M bcf regA_dir, 5 00758 MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 29 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00759 ; strobe A1 0285 10F3 00760 bcf regA_dir, 1 0286 14B5 00761 bsf regA_out, 1 00762 00763 ; write to hardware 0287 225A 00764 call strobe_IO 00765 0288 3030 00766 movlw 30h 0289 2238 00767 call delay 00768 00769 ; ----------------------- 00770 ; Strob A2 00771 ; ----------------------- 00772 028A 2269 00773 call default_IO 00774 ; 00775 ; Led 08 00776 LedOut in0, 0, regA_dir, 0 028B 1836 M btfsc in0, 0 028C 1073 M bcf regA_dir, 0 00777 00778 ; Led 17 00779 LedOut in2, 7, regA_dir, 1 028D 1BB8 M btfsc in2, 7 028E 10F3 M bcf regA_dir, 1 00780 00781 ; Led 15 00782 LedOut in1, 1, regA_dir, 4 028F 18B7 M btfsc in1, 1 0290 1273 M bcf regA_dir, 4 00783 00784 ; Led 02 00785 LedOut in0, 6, regA_dir, 5 0291 1B36 M btfsc in0, 6 0292 12F3 M bcf regA_dir, 5 00786 00787 ; strob A2 0293 1173 00788 bcf regA_dir, 2 0294 1535 00789 bsf regA_out, 2 00790 00791 ; write to hardware 0295 225A 00792 call strobe_IO 00793 0296 3030 00794 movlw 30h 0297 2238 00795 call delay 00796 00797 ; ----------------------- 00798 ; Strob A4 00799 ; ----------------------- 00800 0298 2269 00801 call default_IO 00802 ; 00803 ; Led 10 MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 30 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00804 LedOut in1, 6, regA_dir, 0 0299 1B37 M btfsc in1, 6 029A 1073 M bcf regA_dir, 0 00805 00806 ; Led 19 00807 LedOut in2, 5, regA_dir, 1 029B 1AB8 M btfsc in2, 5 029C 10F3 M bcf regA_dir, 1 00808 00809 ; Led 14 00810 LedOut in1, 2, regA_dir, 2 029D 1937 M btfsc in1, 2 029E 1173 M bcf regA_dir, 2 00811 00812 ; Led 04 00813 LedOut in0, 4, regA_dir, 5 029F 1A36 M btfsc in0, 4 02A0 12F3 M bcf regA_dir, 5 00814 00815 ; strob A4 02A1 1273 00816 bcf regA_dir, 4 02A2 1635 00817 bsf regA_out, 4 00818 00819 ; write to hardware 02A3 225A 00820 call strobe_IO 00821 02A4 3030 00822 movlw 30h 02A5 2238 00823 call delay 00824 00825 ; ----------------------- 00826 ; Strob A5 00827 ; ----------------------- 00828 02A6 2269 00829 call default_IO 00830 ; 00831 ; Led 01 00832 LedOut in0, 7, regA_dir, 0 02A7 1BB6 M btfsc in0, 7 02A8 1073 M bcf regA_dir, 0 00833 00834 ; Led 6 00835 LedOut in0, 1, regA_dir, 1 02A9 18B6 M btfsc in0, 1 02AA 10F3 M bcf regA_dir, 1 00836 00837 ; Led 4 00838 LedOut in0, 5, regA_dir, 2 02AB 1AB6 M btfsc in0, 5 02AC 1173 M bcf regA_dir, 2 00839 00840 ; Led 11 00841 LedOut in0, 3, regA_dir, 4 02AD 19B6 M btfsc in0, 3 MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 31 LOC OBJECT CODE LINE SOURCE TEXT VALUE 02AE 1273 M bcf regA_dir, 4 00842 00843 ; strob A5 02AF 12F3 00844 bcf regA_dir, 5 02B0 16B5 00845 bsf regA_out, 5 00846 00847 ; write to hardware 02B1 225A 00848 call strobe_IO 00849 02B2 3030 00850 movlw 30h 02B3 2238 00851 call delay 00852 02B4 0BBB 00853 decfsz dcount,1 02B5 2A70 00854 goto dloop 00855 02B6 0008 00856 return 00857 00858 ;********************************************************************** 02B7 00859 display_pattern_id 00860 ;********************************************************************** 02B7 0847 00861 movf pattern,w 02B8 3E01 00862 addlw 1 02B9 21F4 00863 call flipbyte 02BA 00B6 00864 movwf in0 02BB 3000 00865 movlw 0x00 02BC 00B7 00866 movwf in1 02BD 00B8 00867 movwf in2 00868 02BE 30FF 00869 movlw 0xff 02BF 1854 00870 btfsc demo_mode,0 02C0 00B8 00871 movwf in2 00872 02C1 307F 00873 movlw 0x7F 02C2 00C2 00874 movwf speed 02C3 226E 00875 call display 02C4 0008 00876 return 00877 00878 ;********************************************************************** 02C5 00879 setup_pattern_table 00880 ;********************************************************************** 02C5 00881 stop2 02C5 0847 00882 movf pattern,w 02C6 1D03 00883 btfss STATUS,Z 02C7 2AD3 00884 goto slabel1 00885 ; 00886 ; if patten is zero, check eeprom and verify 1st entry is not a 0x00 00887 ; if it is switch to next pattern. 00888 02C8 0103 00889 clrw 02C9 230D 00890 call read_eeprom 02CA 00CA 00891 movwf temp 00892 02CB 01D4 00893 clrf demo_mode MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 32 LOC OBJECT CODE LINE SOURCE TEXT VALUE 02CC 1BCA 00894 btfsc temp,7 02CD 1454 00895 bsf demo_mode,0 00896 02CE 084A 00897 movfw temp 02CF 1D03 00898 btfss STATUS,Z 02D0 2AE8 00899 goto sreturn 00900 02D1 223E 00901 call next_pattern 02D2 2AC5 00902 goto stop2 00903 02D3 00904 slabel1 00905 ; 00906 ; Set the pattern (table) 00907 ; 02D3 3003 00908 movlw HIGH MasterTable 02D4 00C8 00909 movwf tbl_hi 02D5 30DE 00910 movlw LOW MasterTable 02D6 00C9 00911 movwf tbl_low 00912 00913 ; get the high address for the pattern table 02D7 1003 00914 bcf STATUS,0 ; clear carry flag 02D8 0D47 00915 rlf pattern,w ; entry = table * 2 02D9 00F4 00916 movwf pindex 02DA 138B 00917 bcf INTCON, GIE ; disable INTs 02DB 23D7 00918 call table_lookup 02DC 178B 00919 bsf INTCON, GIE ; enable INTs 02DD 00CA 00920 movwf temp ; can't put it in tbl_high yet 00921 00922 ; get the low address for the pattern table 02DE 1003 00923 bcf STATUS,0 ; clear carry flag (just in case) 02DF 0D47 00924 rlf pattern,w ; entry = table * 2 + 1 02E0 3E01 00925 addlw 1 02E1 00F4 00926 movwf pindex 02E2 138B 00927 bcf INTCON, GIE ; disable INTs 02E3 23D7 00928 call table_lookup 02E4 178B 00929 bsf INTCON, GIE ; enable INTs 02E5 00C9 00930 movwf tbl_low 00931 02E6 084A 00932 movf temp,w 02E7 00C8 00933 movwf tbl_hi 00934 02E8 00935 sreturn 02E8 0008 00936 return 00937 00938 ;********************************************************************** 02E9 00939 get_next_pattern_entry 00940 ;********************************************************************** 02E9 0847 00941 movf pattern,w 02EA 1D03 00942 btfss STATUS,Z 02EB 2AEF 00943 goto glabel1 00944 02EC 0874 00945 movf pindex,w 02ED 230D 00946 call read_eeprom MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 33 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00947 02EE 2AF3 00948 goto greturn 02EF 00949 glabel1 02EF 0874 00950 movf pindex,w 02F0 138B 00951 bcf INTCON, GIE ; disable INTs 02F1 23D7 00952 call table_lookup 02F2 178B 00953 bsf INTCON, GIE ; enable INTs 00954 02F3 00955 greturn 02F3 0AF4 00956 incf pindex,f 02F4 0008 00957 return 00958 00959 ;********************************************************************** 02F5 00960 write_eeprom 00961 ;********************************************************************** 00962 02F5 1683 00963 bsf STATUS, RP0 ; bank 1 02F6 1303 00964 bcf STATUS, RP1 00965 Message[302]: Register in operand not in bank 0. Ensure that bank bits are correct. 02F7 151C 00966 bsf EECON1,WREN ; allow writes to eeprom 00967 02F8 138B 00968 bcf INTCON, GIE ; disable INTs 00969 02F9 0874 00970 movf pindex,w Message[302]: Register in operand not in bank 0. Ensure that bank bits are correct. 02FA 009B 00971 movwf EEADR ; load address 00972 02FB 0875 00973 movf input,w Message[302]: Register in operand not in bank 0. Ensure that bank bits are correct. 02FC 009A 00974 movwf EEDAT ; lead data 00975 02FD 3055 00976 movlw 0x55 ; unlock Message[302]: Register in operand not in bank 0. Ensure that bank bits are correct. 02FE 009D 00977 movwf EECON2 02FF 30AA 00978 movlw 0xAA Message[302]: Register in operand not in bank 0. Ensure that bank bits are correct. 0300 009D 00979 movwf EECON2 00980 Message[302]: Register in operand not in bank 0. Ensure that bank bits are correct. 0301 149C 00981 bsf EECON1,WR 0302 178B 00982 bsf INTCON, GIE 00983 0303 1283 00984 bcf STATUS, RP0 ; bank 0 0304 1303 00985 bcf STATUS, RP1 00986 00987 ; need a delay for the write of eeprom before we read it again, a call to the 00988 ; display does the trick. A read before the write is done is bad! 00989 ; 0305 30FF 00990 movlw 0xfF 0306 00B6 00991 movwf in0 0307 00B7 00992 movwf in1 0308 00B8 00993 movwf in2 MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 34 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00994 0309 303F 00995 movlw 0x3f 030A 00C2 00996 movwf speed 030B 226E 00997 call display 00998 030C 0008 00999 return 01000 01001 ;********************************************************************** 030D 01002 read_eeprom 01003 ;********************************************************************** 01004 ; 01005 ; address of eeprom to read passed in x reg 01006 ; value read passed out in x reg 01007 ; 01008 01009 ; movf pindex,w 01010 ; switch bank 1 030D 1683 01011 bsf STATUS, RP0 030E 1303 01012 bcf STATUS, RP1 01013 Message[302]: Register in operand not in bank 0. Ensure that bank bits are correct. 030F 009B 01014 movwf EEADR Message[302]: Register in operand not in bank 0. Ensure that bank bits are correct. 0310 139C 01015 bcf EECON1, 7 ; EEPDG Message[302]: Register in operand not in bank 0. Ensure that bank bits are correct. 0311 141C 01016 bsf EECON1, RD Message[302]: Register in operand not in bank 0. Ensure that bank bits are correct. 0312 081A 01017 movf EEDAT, w 01018 01019 ; switch bank 0 0313 1283 01020 bcf STATUS, RP0 0314 1303 01021 bcf STATUS, RP1 01022 01023 ; movwf input 0315 0008 01024 return 01025 01026 ;********************************************************************** 0316 01027 toggle_demo 01028 ;********************************************************************** 0316 0103 01029 clrw 0317 230D 01030 call read_eeprom 0318 00CA 01031 movwf temp 01032 0319 1FCA 01033 btfss temp,7 ; 031A 2B1E 01034 goto tdemo_on 01035 01036 ; toggle off 031B 13CA 01037 bcf temp,7 031C 01D4 01038 clrf demo_mode 031D 2B20 01039 goto tdemo_cont 01040 031E 01041 tdemo_on 031E 17CA 01042 bsf temp,7 MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 35 LOC OBJECT CODE LINE SOURCE TEXT VALUE 031F 1454 01043 bsf demo_mode,0 01044 0320 01045 tdemo_cont 0320 01F4 01046 clrf pindex 0321 084A 01047 movfw temp 0322 00F5 01048 movwf input 0323 22F5 01049 call write_eeprom 01050 0324 22B7 01051 call display_pattern_id 0325 22B7 01052 call display_pattern_id 01053 0326 0008 01054 return 01055 01056 01057 ;********************************************************************** 0327 01058 pattern_driver 01059 ;********************************************************************** 0327 01060 ptop 01061 01062 0327 22C5 01063 call setup_pattern_table 01064 0328 01F4 01065 clrf pindex 01066 01067 ; load the table type (Currently only 1 type) 0329 22E9 01068 call get_next_pattern_entry 032A 00CB 01069 movwf tbltype 01070 01071 ; load the speed (someday this will be a table type 1 only thing.) 032B 22E9 01072 call get_next_pattern_entry 032C 00C3 01073 movwf pspeed 032D 0AC3 01074 incf pspeed,f ; adjust so 0 is fastest, not treated like speed 256 01075 032E 01076 ploop0 01077 ; 01078 ; Check for IR command in 01079 ; 032E 1C4D 01080 btfss IR_in_good,0 032F 2B4C 01081 goto button_check 01082 0330 01083 blinkie_check 0330 3007 01084 movlw 0x07 ; blinkines use address 0x07 (Experimental) 0331 022F 01085 subwf address,w 0332 1D03 01086 btfss STATUS,Z 0333 2B37 01087 goto remote_check 01088 0334 224F 01089 call set_pattern 0335 01CD 01090 clrf IR_in_good 0336 2B27 01091 goto ptop 01092 0337 01093 remote_check 0337 08AF 01094 movf address,f ; remote giving "0" for address (TV)? 0338 1D03 01095 btfss STATUS,Z MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 36 LOC OBJECT CODE LINE SOURCE TEXT VALUE 0339 2B4C 01096 goto button_check 01097 033A 3020 01098 movlw 0x20 ; remote curser right (pattern ++) 033B 022E 01099 subwf command,w 033C 1903 01100 btfsc STATUS,Z 033D 223E 01101 call next_pattern 01102 033E 3021 01103 movlw 0x21 ; remote curser left (pattern --) 033F 022E 01104 subwf command,w 0340 1903 01105 btfsc STATUS,Z 0341 2246 01106 call past_pattern 01107 0342 3000 01108 movlw 0x00 ; remote "0" key (pattern = 0) 0343 022E 01109 subwf command,w 0344 1903 01110 btfsc STATUS,Z 0345 01C7 01111 clrf pattern 01112 0346 300C 01113 movlw 0x0c ; remote on/off key (togle demo mode!) 0347 022E 01114 subwf command,w 0348 1903 01115 btfsc STATUS,Z 0349 2316 01116 call toggle_demo 01117 034A 01CD 01118 clrf IR_in_good 034B 2B27 01119 goto ptop 01120 034C 01121 button_check 01122 ; ploop1 034C 1C34 01123 btfss button,0 ; if putton pressed show pattern id 034D 2B57 01124 goto ploop2 01125 034E 22B7 01126 call display_pattern_id 034F 22B7 01127 call display_pattern_id 01128 0350 1C34 01129 btfss button,0 ; if putton still pressed inc pattern 0351 2B57 01130 goto ploop2 01131 0352 01132 ploop1a 0352 223E 01133 call next_pattern 0353 22B7 01134 call display_pattern_id 01135 0354 1834 01136 btfsc button,0 0355 2B52 01137 goto ploop1a 0356 2B27 01138 goto ptop 01139 0357 01140 ploop2 01141 0357 22E9 01142 call get_next_pattern_entry 0358 00B6 01143 movwf in0 01144 0359 22E9 01145 call get_next_pattern_entry 035A 00B7 01146 movwf in1 01147 035B 22E9 01148 call get_next_pattern_entry MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 37 LOC OBJECT CODE LINE SOURCE TEXT VALUE 035C 00B8 01149 movwf in2 01150 035D 0843 01151 movf pspeed,w 035E 00C2 01152 movwf speed 035F 226E 01153 call display 01154 01155 ; make sure we are not sending a IR signel 0360 082A 01156 movf scount,w ; F22 0361 3E00 01157 addlw 0 ; F23 0362 1D03 01158 btfss STATUS,Z ; F24 0363 2B70 01159 goto ploop3 01160 01161 ; count down till net IR signel 0364 1C55 01162 btfss nextf,0 0365 2B70 01163 goto ploop3 01164 0366 01D5 01165 clrf nextf 0367 1C54 01166 btfss demo_mode,0 0368 2B6B 01167 goto ploop2a 01168 0369 223E 01169 call next_pattern 036A 2B27 01170 goto ptop 01171 036B 01172 ploop2a 01173 ; send an IR signel 036B 3007 01174 movlw 0x07 ; address 0x07 "Experimental" 036C 00D0 01175 movwf out_address 036D 0853 01176 movfw out_pattern 036E 00D1 01177 movwf out_command ; copy out_pettern 01178 036F 21FF 01179 call rf_command_out 01180 0370 01181 ploop3 01182 ; check for end of pattern 0370 1C38 01183 btfss in2,0 0371 2B2E 01184 goto ploop0 01185 0372 2B27 01186 goto ptop 01187 01188 01189 ;********************************************************************** 01190 ; IR Tester 01191 ;********************************************************************** 0373 01192 IR_Tester 0373 01193 itop 0373 082B 01194 movf instate,w 0374 21F4 01195 call flipbyte 0375 00B6 01196 movwf in0 0376 0844 01197 movf max_instate,w 0377 21F4 01198 call flipbyte 0378 00B7 01199 movwf in1 01200 0379 01B8 01201 clrf in2 MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 38 LOC OBJECT CODE LINE SOURCE TEXT VALUE 01202 037A 3001 01203 movlw 0x01 037B 00C2 01204 movwf speed 037C 226E 01205 call display 01206 01207 ; 01208 ; Check for push button 01209 ; 037D 1C34 01210 btfss button,0 037E 2B89 01211 goto iloop1 037F 01C4 01212 clrf max_instate 0380 01AB 01213 clrf instate 01214 0381 082A 01215 movf scount,w ; F22 0382 3E00 01216 addlw 0 ; F23 0383 1D03 01217 btfss STATUS,Z ; F24 0384 2B89 01218 goto iloop1 01219 01220 01221 ; send an IR signel 0385 01D0 01222 clrf out_address ; address 0x00 "TV remote" 0386 300C 01223 movlw 0x0c 0387 00D1 01224 movwf out_command ; code 0x0c (on/off) 0388 21FF 01225 call rf_command_out 01226 01227 ; 01228 ; Check for IR Command 01229 ; 0389 01230 iloop1 0389 1C4D 01231 btfss IR_in_good,0 038A 2B73 01232 goto itop 038B 01CD 01233 clrf IR_in_good 01234 01235 ; flash all LEDs on 038C 30FF 01236 movlw 0xFF 038D 00B6 01237 movwf in0 038E 00B7 01238 movwf in1 038F 00B8 01239 movwf in2 01240 0390 307F 01241 movlw 0x7f 0391 00C2 01242 movwf speed 0392 226E 01243 call display 01244 01245 ; flash all LEDs off 0393 3000 01246 movlw 0x00 0394 00B6 01247 movwf in0 0395 00B7 01248 movwf in1 0396 00B8 01249 movwf in2 01250 0397 303F 01251 movlw 0x3f 0398 00C2 01252 movwf speed 0399 226E 01253 call display 01254 MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 39 LOC OBJECT CODE LINE SOURCE TEXT VALUE 01255 ; flash all LEDs on 039A 30FF 01256 movlw 0xFF 039B 00B6 01257 movwf in0 039C 00B7 01258 movwf in1 039D 00B8 01259 movwf in2 01260 039E 307F 01261 movlw 0x7f 039F 00C2 01262 movwf speed 03A0 226E 01263 call display 01264 01265 ; display command and address 03A1 082E 01266 movf command,w 03A2 21F4 01267 call flipbyte 03A3 00B6 01268 movwf in0 03A4 082F 01269 movf address,w 03A5 21F4 01270 call flipbyte 03A6 00B7 01271 movwf in1 03A7 01B8 01272 clrf in2 01273 03A8 30FF 01274 movlw 0xff 03A9 00C2 01275 movwf speed 03AA 226E 01276 call display 03AB 226E 01277 call display 03AC 01C4 01278 clrf max_instate 03AD 01AB 01279 clrf instate 01280 03AE 2B73 01281 goto itop 01282 01283 01284 ; 01285 ; M A I N 01286 ; 01287 ;********************************************************************** 03AF 01288 main 01289 ;********************************************************************** 01290 01291 03AF 0185 01292 clrf PORTA 03B0 0181 01293 clrf TMR0 03B1 01A2 01294 clrf IR_40k 03B2 01AA 01295 clrf scount 03B3 01B0 01296 clrf toggle 03B4 01AF 01297 clrf address 03B5 01AE 01298 clrf command 03B6 01B1 01299 clrf IR_lhalf 03B7 01AB 01300 clrf instate 03B8 01C4 01301 clrf max_instate 03B9 01B4 01302 clrf button 03BA 01CD 01303 clrf IR_in_good 03BB 01D5 01304 clrf nextf 01305 01306 ; setting portC to digital 03BC 3007 01307 movlw 07h MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 40 LOC OBJECT CODE LINE SOURCE TEXT VALUE 03BD 0099 01308 movwf CMCON0 01309 03BE 0064 01310 clrwdt ; for safty 01311 01312 ; Bank 1 03BF 1683 01313 bsf STATUS, RP0 03C0 1303 01314 bcf STATUS, RP1 01315 01316 ; setup timer0 & pullups 01317 ; +---------- disable pullups on portA (1) 01318 ; | +-------- source Int clock (o) 01319 ; | | +------ prescaler on timer0 (0) 01320 ; | | |+++--- prescaler set to 8X (010) 01321 ; | | |||| 03C1 3082 01322 movlw b'10000010' Message[302]: Register in operand not in bank 0. Ensure that bank bits are correct. 03C2 0081 01323 movwf OPTION_REG 01324 01325 ; switch to 8mH clock Message[302]: Register in operand not in bank 0. Ensure that bank bits are correct. 03C3 160F 01326 bsf OSCCON, IRCF0 Message[302]: Register in operand not in bank 0. Ensure that bank bits are correct. 03C4 168F 01327 bsf OSCCON, IRCF1 Message[302]: Register in operand not in bank 0. Ensure that bank bits are correct. 03C5 170F 01328 bsf OSCCON, IRCF2 01329 01330 ; setting portC to digital Message[302]: Register in operand not in bank 0. Ensure that bank bits are correct. 03C6 019F 01331 clrf ANSEL 01332 01333 ; IR tx output on A4 Message[302]: Register in operand not in bank 0. Ensure that bank bits are correct. 03C7 1205 01334 bcf TRISA,4 01335 01336 ; Bank 0 03C8 1283 01337 bcf STATUS, RP0 03C9 1303 01338 bcf STATUS, RP1 01339 01340 ; enable timer0 interupt 03CA 168B 01341 bsf INTCON,T0IE 03CB 178B 01342 bsf INTCON,GIE 01343 01344 ; start with pattern 0 03CC 01C7 01345 clrf pattern 01346 01347 ; flash all LEDs on This kills some time, allowing us to sample the button and IR-Rx 03CD 30FF 01348 movlw 0xFF 03CE 00B6 01349 movwf in0 03CF 00B7 01350 movwf in1 03D0 00B8 01351 movwf in2 01352 03D1 307F 01353 movlw 0x7f 03D2 00C2 01354 movwf speed MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 41 LOC OBJECT CODE LINE SOURCE TEXT VALUE 03D3 226E 01355 call display 01356 01357 ; if button pressed durring powerup run IR_Tester 01358 ; else run pattern driver 01359 ; 03D4 1C34 01360 btfss button,0 03D5 2B27 01361 goto pattern_driver 03D6 2B73 01362 goto IR_Tester 01363 01364 01365 01366 ;********************************************************************** 03D7 01367 table_lookup 01368 ;********************************************************************** 03D7 0848 01369 movf tbl_hi,w 03D8 008A 01370 movwf PCLATH 03D9 0874 01371 movf pindex,w 03DA 0749 01372 addwf tbl_low,w 03DB 1803 01373 btfsc STATUS,0 ; check carry flag 03DC 0A8A 01374 incf PCLATH,f 03DD 0082 01375 movwf PCL 01376 01377 ;********************************************************************** 03DE 01378 MasterTable 01379 ;********************************************************************** 01380 make_mtab 0000 M local i = 0 M while i <= NUM_TAB 03DE 3404 M retlw HIGH table0 03DF 3402 M retlw LOW table0 00000001 M i += 1 03E0 3404 M retlw HIGH table1 03E1 3402 M retlw LOW table1 00000002 M i += 1 03E2 3404 M retlw HIGH table2 03E3 3440 M retlw LOW table2 00000003 M i += 1 03E4 3404 M retlw HIGH table3 03E5 347E M retlw LOW table3 00000004 M i += 1 03E6 3404 M retlw HIGH table4 03E7 34EC M retlw LOW table4 00000005 M i += 1 03E8 3404 M retlw HIGH table5 03E9 34F4 M retlw LOW table5 00000006 M i += 1 03EA 3405 M retlw HIGH table6 03EB 3432 M retlw LOW table6 00000007 M i += 1 03EC 3405 M retlw HIGH table7 03ED 3452 M retlw LOW table7 00000008 M i += 1 03EE 3405 M retlw HIGH table8 MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 42 LOC OBJECT CODE LINE SOURCE TEXT VALUE 03EF 3499 M retlw LOW table8 00000009 M i += 1 03F0 3405 M retlw HIGH table9 03F1 34A7 M retlw LOW table9 0000000A M i += 1 03F2 3405 M retlw HIGH table10 03F3 34EB M retlw LOW table10 0000000B M i += 1 03F4 3406 M retlw HIGH table11 03F5 3423 M retlw LOW table11 0000000C M i += 1 03F6 3406 M retlw HIGH table12 03F7 3467 M retlw LOW table12 0000000D M i += 1 03F8 3406 M retlw HIGH table13 03F9 34DB M retlw LOW table13 0000000E M i += 1 03FA 3406 M retlw HIGH table14 03FB 34E6 M retlw LOW table14 0000000F M i += 1 03FC 3406 M retlw HIGH table15 03FD 34F1 M retlw LOW table15 00000010 M i += 1 03FE 3407 M retlw HIGH table16 03FF 3432 M retlw LOW table16 00000011 M i += 1 0400 3407 M retlw HIGH table17 0401 346D M retlw LOW table17 00000012 M i += 1 M endw 01381 01382 ;********************************************************************** 0402 01383 table0 ; dump entry, table 0 is in eeprom 01384 ;********************************************************************** 01385 01386 ;********************************************************************** 0402 01387 table1 ; DF1 - retro 01388 ;********************************************************************** 01389 01390 tbltype1 0x10 0402 3401 M retlw 0x01 0403 3410 M retlw 0x10 01391 entry 0x00, 0x00, 0x20 ; L19 0404 3400 M retlw 0x00 0405 3400 M retlw 0x00 0406 3420 M retlw 0x20 01392 entry 0x00, 0x00, 0x40 ; L18 0407 3400 M retlw 0x00 0408 3400 M retlw 0x00 0409 3440 M retlw 0x40 01393 entry 0x00, 0x00, 0x80 ; L17 040A 3400 M retlw 0x00 040B 3400 M retlw 0x00 MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 43 LOC OBJECT CODE LINE SOURCE TEXT VALUE 040C 3480 M retlw 0x80 01394 entry 0x00, 0x01, 0x00 ; L16 040D 3400 M retlw 0x00 040E 3401 M retlw 0x01 040F 3400 M retlw 0x00 01395 entry 0x00, 0x02, 0x00 ; L15 0410 3400 M retlw 0x00 0411 3402 M retlw 0x02 0412 3400 M retlw 0x00 01396 entry 0x00, 0x04, 0x00 ; L14 0413 3400 M retlw 0x00 0414 3404 M retlw 0x04 0415 3400 M retlw 0x00 01397 entry 0x00, 0x08, 0x00 ; L13 0416 3400 M retlw 0x00 0417 3408 M retlw 0x08 0418 3400 M retlw 0x00 01398 entry 0x00, 0x10, 0x00 ; L12 0419 3400 M retlw 0x00 041A 3410 M retlw 0x10 041B 3400 M retlw 0x00 01399 entry 0x00, 0x20, 0x00 ; L11 041C 3400 M retlw 0x00 041D 3420 M retlw 0x20 041E 3400 M retlw 0x00 01400 entry 0x00, 0x40, 0x00 ; L10 041F 3400 M retlw 0x00 0420 3440 M retlw 0x40 0421 3400 M retlw 0x00 01401 entry 0x00, 0x80, 0x00 ; L9 0422 3400 M retlw 0x00 0423 3480 M retlw 0x80 0424 3400 M retlw 0x00 01402 entry 0x01, 0x00, 0x00 ; L8 0425 3401 M retlw 0x01 0426 3400 M retlw 0x00 0427 3400 M retlw 0x00 01403 entry 0x02, 0x00, 0x00 ; L7 0428 3402 M retlw 0x02 0429 3400 M retlw 0x00 042A 3400 M retlw 0x00 01404 entry 0x04, 0x00, 0x00 ; L6 042B 3404 M retlw 0x04 042C 3400 M retlw 0x00 042D 3400 M retlw 0x00 01405 entry 0x08, 0x00, 0x00 ; L5 042E 3408 M retlw 0x08 042F 3400 M retlw 0x00 0430 3400 M retlw 0x00 01406 entry 0x10, 0x00, 0x00 ; L4 0431 3410 M retlw 0x10 0432 3400 M retlw 0x00 0433 3400 M retlw 0x00 MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 44 LOC OBJECT CODE LINE SOURCE TEXT VALUE 01407 entry 0x20, 0x00, 0x00 ; L3 0434 3420 M retlw 0x20 0435 3400 M retlw 0x00 0436 3400 M retlw 0x00 01408 entry 0x40, 0x00, 0x00 ; L2 0437 3440 M retlw 0x40 0438 3400 M retlw 0x00 0439 3400 M retlw 0x00 01409 entry 0x80, 0x00, 0x00 ; L1 043A 3480 M retlw 0x80 043B 3400 M retlw 0x00 043C 3400 M retlw 0x00 01410 entry 0x00, 0x00, 0x01 ; Blank 043D 3400 M retlw 0x00 043E 3400 M retlw 0x00 043F 3401 M retlw 0x01 01411 01412 ;********************************************************************** 0440 01413 table2 ; DF2 - xmas 01414 ;********************************************************************** 01415 01416 tbltype1 0x20 0440 3401 M retlw 0x01 0441 3420 M retlw 0x20 01417 entry 0x00, 0x00, 0x20 ; L19 0442 3400 M retlw 0x00 0443 3400 M retlw 0x00 0444 3420 M retlw 0x20 01418 entry 0x00, 0x00, 0x60 ; L18 0445 3400 M retlw 0x00 0446 3400 M retlw 0x00 0447 3460 M retlw 0x60 01419 entry 0x00, 0x00, 0xE0 ; L17 0448 3400 M retlw 0x00 0449 3400 M retlw 0x00 044A 34E0 M retlw 0xE0 01420 entry 0x00, 0x01, 0xE0 ; L16 044B 3400 M retlw 0x00 044C 3401 M retlw 0x01 044D 34E0 M retlw 0xE0 01421 entry 0x00, 0x03, 0xE0 ; L15 044E 3400 M retlw 0x00 044F 3403 M retlw 0x03 0450 34E0 M retlw 0xE0 01422 entry 0x00, 0x07, 0xE0 ; L14 0451 3400 M retlw 0x00 0452 3407 M retlw 0x07 0453 34E0 M retlw 0xE0 01423 entry 0x00, 0x0F, 0xE0 ; L13 0454 3400 M retlw 0x00 0455 340F M retlw 0x0F 0456 34E0 M retlw 0xE0 01424 entry 0x00, 0x1F, 0xE0 ; L12 MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 45 LOC OBJECT CODE LINE SOURCE TEXT VALUE 0457 3400 M retlw 0x00 0458 341F M retlw 0x1F 0459 34E0 M retlw 0xE0 01425 entry 0x00, 0x3F, 0xE0 ; L11 045A 3400 M retlw 0x00 045B 343F M retlw 0x3F 045C 34E0 M retlw 0xE0 01426 entry 0x00, 0x7F, 0xE0 ; L10 045D 3400 M retlw 0x00 045E 347F M retlw 0x7F 045F 34E0 M retlw 0xE0 01427 entry 0x00, 0xFF, 0xE0 ; L9 0460 3400 M retlw 0x00 0461 34FF M retlw 0xFF 0462 34E0 M retlw 0xE0 01428 entry 0x01, 0xFF, 0xE0 ; L8 0463 3401 M retlw 0x01 0464 34FF M retlw 0xFF 0465 34E0 M retlw 0xE0 01429 entry 0x03, 0xFF, 0xE0 ; L7 0466 3403 M retlw 0x03 0467 34FF M retlw 0xFF 0468 34E0 M retlw 0xE0 01430 entry 0x07, 0xFF, 0xE0 ; L6 0469 3407 M retlw 0x07 046A 34FF M retlw 0xFF 046B 34E0 M retlw 0xE0 01431 entry 0x0F, 0xFF, 0xE0 ; L5 046C 340F M retlw 0x0F 046D 34FF M retlw 0xFF 046E 34E0 M retlw 0xE0 01432 entry 0x1F, 0xFF, 0xE0 ; L4 046F 341F M retlw 0x1F 0470 34FF M retlw 0xFF 0471 34E0 M retlw 0xE0 01433 entry 0x3F, 0xFF, 0xE0 ; L3 0472 343F M retlw 0x3F 0473 34FF M retlw 0xFF 0474 34E0 M retlw 0xE0 01434 entry 0x7F, 0xFF, 0xE0 ; L2 0475 347F M retlw 0x7F 0476 34FF M retlw 0xFF 0477 34E0 M retlw 0xE0 01435 entry 0xFF, 0xFF, 0xE0 ; L1 0478 34FF M retlw 0xFF 0479 34FF M retlw 0xFF 047A 34E0 M retlw 0xE0 01436 entry 0x00, 0x00, 0x01 ; Blank 047B 3400 M retlw 0x00 047C 3400 M retlw 0x00 047D 3401 M retlw 0x01 01437 01438 ;********************************************************************** MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 46 LOC OBJECT CODE LINE SOURCE TEXT VALUE 047E 01439 table3 ; DF3 - train 01440 ;********************************************************************** 01441 01442 tbltype1 0x10 047E 3401 M retlw 0x01 047F 3410 M retlw 0x10 01443 entry 0x00, 0x00, 0x20 ; L19 0480 3400 M retlw 0x00 0481 3400 M retlw 0x00 0482 3420 M retlw 0x20 01444 entry 0x00, 0x00, 0x40 ; L18 0483 3400 M retlw 0x00 0484 3400 M retlw 0x00 0485 3440 M retlw 0x40 01445 entry 0x00, 0x00, 0x80 ; L17 0486 3400 M retlw 0x00 0487 3400 M retlw 0x00 0488 3480 M retlw 0x80 01446 entry 0x00, 0x01, 0x00 ; L16 0489 3400 M retlw 0x00 048A 3401 M retlw 0x01 048B 3400 M retlw 0x00 01447 entry 0x00, 0x02, 0x00 ; L15 048C 3400 M retlw 0x00 048D 3402 M retlw 0x02 048E 3400 M retlw 0x00 01448 entry 0x00, 0x04, 0x00 ; L14 048F 3400 M retlw 0x00 0490 3404 M retlw 0x04 0491 3400 M retlw 0x00 01449 entry 0x00, 0x08, 0x00 ; L13 0492 3400 M retlw 0x00 0493 3408 M retlw 0x08 0494 3400 M retlw 0x00 01450 entry 0x00, 0x10, 0x00 ; L12 0495 3400 M retlw 0x00 0496 3410 M retlw 0x10 0497 3400 M retlw 0x00 01451 entry 0x00, 0x20, 0x00 ; L11 0498 3400 M retlw 0x00 0499 3420 M retlw 0x20 049A 3400 M retlw 0x00 01452 entry 0x00, 0x40, 0x00 ; L10 049B 3400 M retlw 0x00 049C 3440 M retlw 0x40 049D 3400 M retlw 0x00 01453 entry 0x00, 0x80, 0x00 ; L9 049E 3400 M retlw 0x00 049F 3480 M retlw 0x80 04A0 3400 M retlw 0x00 01454 entry 0x01, 0x00, 0x00 ; L8 04A1 3401 M retlw 0x01 04A2 3400 M retlw 0x00 MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 47 LOC OBJECT CODE LINE SOURCE TEXT VALUE 04A3 3400 M retlw 0x00 01455 entry 0x02, 0x00, 0x00 ; L7 04A4 3402 M retlw 0x02 04A5 3400 M retlw 0x00 04A6 3400 M retlw 0x00 01456 entry 0x04, 0x00, 0x00 ; L6 04A7 3404 M retlw 0x04 04A8 3400 M retlw 0x00 04A9 3400 M retlw 0x00 01457 entry 0x08, 0x00, 0x00 ; L5 04AA 3408 M retlw 0x08 04AB 3400 M retlw 0x00 04AC 3400 M retlw 0x00 01458 entry 0x10, 0x00, 0x00 ; L4 04AD 3410 M retlw 0x10 04AE 3400 M retlw 0x00 04AF 3400 M retlw 0x00 01459 entry 0x20, 0x00, 0x00 ; L3 04B0 3420 M retlw 0x20 04B1 3400 M retlw 0x00 04B2 3400 M retlw 0x00 01460 entry 0x40, 0x00, 0x00 ; L2 04B3 3440 M retlw 0x40 04B4 3400 M retlw 0x00 04B5 3400 M retlw 0x00 01461 entry 0x80, 0x00, 0x00 ; L1 04B6 3480 M retlw 0x80 04B7 3400 M retlw 0x00 04B8 3400 M retlw 0x00 01462 entry 0x40, 0x00, 0x00 ; L2 04B9 3440 M retlw 0x40 04BA 3400 M retlw 0x00 04BB 3400 M retlw 0x00 01463 entry 0x20, 0x00, 0x00 ; L3 04BC 3420 M retlw 0x20 04BD 3400 M retlw 0x00 04BE 3400 M retlw 0x00 01464 entry 0x10, 0x00, 0x00 ; L4 04BF 3410 M retlw 0x10 04C0 3400 M retlw 0x00 04C1 3400 M retlw 0x00 01465 entry 0x08, 0x00, 0x00 ; L5 04C2 3408 M retlw 0x08 04C3 3400 M retlw 0x00 04C4 3400 M retlw 0x00 01466 entry 0x04, 0x00, 0x00 ; L6 04C5 3404 M retlw 0x04 04C6 3400 M retlw 0x00 04C7 3400 M retlw 0x00 01467 entry 0x02, 0x00, 0x00 ; L7 04C8 3402 M retlw 0x02 04C9 3400 M retlw 0x00 04CA 3400 M retlw 0x00 MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 48 LOC OBJECT CODE LINE SOURCE TEXT VALUE 01468 entry 0x01, 0x00, 0x00 ; L8 04CB 3401 M retlw 0x01 04CC 3400 M retlw 0x00 04CD 3400 M retlw 0x00 01469 entry 0x00, 0x80, 0x00 ; L9 04CE 3400 M retlw 0x00 04CF 3480 M retlw 0x80 04D0 3400 M retlw 0x00 01470 entry 0x00, 0x40, 0x00 ; L10 04D1 3400 M retlw 0x00 04D2 3440 M retlw 0x40 04D3 3400 M retlw 0x00 01471 entry 0x00, 0x20, 0x00 ; L11 04D4 3400 M retlw 0x00 04D5 3420 M retlw 0x20 04D6 3400 M retlw 0x00 01472 entry 0x00, 0x10, 0x00 ; L12 04D7 3400 M retlw 0x00 04D8 3410 M retlw 0x10 04D9 3400 M retlw 0x00 01473 entry 0x00, 0x08, 0x00 ; L13 04DA 3400 M retlw 0x00 04DB 3408 M retlw 0x08 04DC 3400 M retlw 0x00 01474 entry 0x00, 0x04, 0x00 ; L14 04DD 3400 M retlw 0x00 04DE 3404 M retlw 0x04 04DF 3400 M retlw 0x00 01475 entry 0x00, 0x02, 0x00 ; L15 04E0 3400 M retlw 0x00 04E1 3402 M retlw 0x02 04E2 3400 M retlw 0x00 01476 entry 0x00, 0x01, 0x00 ; L16 04E3 3400 M retlw 0x00 04E4 3401 M retlw 0x01 04E5 3400 M retlw 0x00 01477 entry 0x00, 0x00, 0x80 ; L17 04E6 3400 M retlw 0x00 04E7 3400 M retlw 0x00 04E8 3480 M retlw 0x80 01478 entry 0x00, 0x00, 0x41 ; L18 04E9 3400 M retlw 0x00 04EA 3400 M retlw 0x00 04EB 3441 M retlw 0x41 01479 01480 01481 ;********************************************************************** 04EC 01482 table4 ; DF4 - on off 01483 ;********************************************************************** 01484 01485 tbltype1 0x30 04EC 3401 M retlw 0x01 04ED 3430 M retlw 0x30 MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 49 LOC OBJECT CODE LINE SOURCE TEXT VALUE 01486 entry 0x55, 0x55, 0x50 ; 1 04EE 3455 M retlw 0x55 04EF 3455 M retlw 0x55 04F0 3450 M retlw 0x50 01487 entry 0xAA, 0xAA, 0xA1 ; 2 04F1 34AA M retlw 0xAA 04F2 34AA M retlw 0xAA 04F3 34A1 M retlw 0xA1 01488 01489 01490 ;********************************************************************** 04F4 01491 table5 ; DF5 - fast 01492 ;********************************************************************** 01493 01494 tbltype1 0x00 04F4 3401 M retlw 0x01 04F5 3400 M retlw 0x00 01495 entry 0x00, 0x00, 0x20 ; L19 04F6 3400 M retlw 0x00 04F7 3400 M retlw 0x00 04F8 3420 M retlw 0x20 01496 entry 0x00, 0x00, 0x40 ; L18 04F9 3400 M retlw 0x00 04FA 3400 M retlw 0x00 04FB 3440 M retlw 0x40 01497 entry 0x00, 0x00, 0x80 ; L17 04FC 3400 M retlw 0x00 04FD 3400 M retlw 0x00 04FE 3480 M retlw 0x80 01498 entry 0x00, 0x01, 0x00 ; L16 04FF 3400 M retlw 0x00 0500 3401 M retlw 0x01 0501 3400 M retlw 0x00 01499 entry 0x00, 0x02, 0x00 ; L15 0502 3400 M retlw 0x00 0503 3402 M retlw 0x02 0504 3400 M retlw 0x00 01500 entry 0x00, 0x04, 0x00 ; L14 0505 3400 M retlw 0x00 0506 3404 M retlw 0x04 0507 3400 M retlw 0x00 01501 entry 0x00, 0x08, 0x00 ; L13 0508 3400 M retlw 0x00 0509 3408 M retlw 0x08 050A 3400 M retlw 0x00 01502 entry 0x00, 0x10, 0x00 ; L12 050B 3400 M retlw 0x00 050C 3410 M retlw 0x10 050D 3400 M retlw 0x00 01503 entry 0x00, 0x20, 0x00 ; L11 050E 3400 M retlw 0x00 050F 3420 M retlw 0x20 0510 3400 M retlw 0x00 MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 50 LOC OBJECT CODE LINE SOURCE TEXT VALUE 01504 entry 0x00, 0x40, 0x00 ; L10 0511 3400 M retlw 0x00 0512 3440 M retlw 0x40 0513 3400 M retlw 0x00 01505 entry 0x00, 0x80, 0x00 ; L9 0514 3400 M retlw 0x00 0515 3480 M retlw 0x80 0516 3400 M retlw 0x00 01506 entry 0x01, 0x00, 0x00 ; L8 0517 3401 M retlw 0x01 0518 3400 M retlw 0x00 0519 3400 M retlw 0x00 01507 entry 0x02, 0x00, 0x00 ; L7 051A 3402 M retlw 0x02 051B 3400 M retlw 0x00 051C 3400 M retlw 0x00 01508 entry 0x04, 0x00, 0x00 ; L6 051D 3404 M retlw 0x04 051E 3400 M retlw 0x00 051F 3400 M retlw 0x00 01509 entry 0x08, 0x00, 0x00 ; L5 0520 3408 M retlw 0x08 0521 3400 M retlw 0x00 0522 3400 M retlw 0x00 01510 entry 0x10, 0x00, 0x00 ; L4 0523 3410 M retlw 0x10 0524 3400 M retlw 0x00 0525 3400 M retlw 0x00 01511 entry 0x20, 0x00, 0x00 ; L3 0526 3420 M retlw 0x20 0527 3400 M retlw 0x00 0528 3400 M retlw 0x00 01512 entry 0x40, 0x00, 0x00 ; L2 0529 3440 M retlw 0x40 052A 3400 M retlw 0x00 052B 3400 M retlw 0x00 01513 entry 0x80, 0x00, 0x00 ; L1 052C 3480 M retlw 0x80 052D 3400 M retlw 0x00 052E 3400 M retlw 0x00 01514 entry 0x00, 0x00, 0x01 ; Blank 052F 3400 M retlw 0x00 0530 3400 M retlw 0x00 0531 3401 M retlw 0x01 01515 01516 ;********************************************************************** 0532 01517 table6 ; DF6 - center 01518 ;********************************************************************** 01519 01520 tbltype1 0x30 0532 3401 M retlw 0x01 0533 3430 M retlw 0x30 01521 entry 0x80, 0x00, 0x20 ; L19 MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 51 LOC OBJECT CODE LINE SOURCE TEXT VALUE 0534 3480 M retlw 0x80 0535 3400 M retlw 0x00 0536 3420 M retlw 0x20 01522 entry 0x40, 0x00, 0x40 ; L18 0537 3440 M retlw 0x40 0538 3400 M retlw 0x00 0539 3440 M retlw 0x40 01523 entry 0x20, 0x00, 0x80 ; L17 053A 3420 M retlw 0x20 053B 3400 M retlw 0x00 053C 3480 M retlw 0x80 01524 entry 0x10, 0x01, 0x00 ; L16 053D 3410 M retlw 0x10 053E 3401 M retlw 0x01 053F 3400 M retlw 0x00 01525 entry 0x08, 0x02, 0x00 ; L15 0540 3408 M retlw 0x08 0541 3402 M retlw 0x02 0542 3400 M retlw 0x00 01526 entry 0x04, 0x04, 0x00 ; L14 0543 3404 M retlw 0x04 0544 3404 M retlw 0x04 0545 3400 M retlw 0x00 01527 entry 0x02, 0x08, 0x00 ; L13 0546 3402 M retlw 0x02 0547 3408 M retlw 0x08 0548 3400 M retlw 0x00 01528 entry 0x01, 0x10, 0x00 ; L12 0549 3401 M retlw 0x01 054A 3410 M retlw 0x10 054B 3400 M retlw 0x00 01529 entry 0x00, 0xA0, 0x00 ; L11 054C 3400 M retlw 0x00 054D 34A0 M retlw 0xA0 054E 3400 M retlw 0x00 01530 entry 0x00, 0x40, 0x01 ; L10 054F 3400 M retlw 0x00 0550 3440 M retlw 0x40 0551 3401 M retlw 0x01 01531 01532 ;********************************************************************** 0552 01533 table7 ; DF7 - right 01534 ;********************************************************************** 01535 01536 tbltype1 0x10 0552 3401 M retlw 0x01 0553 3410 M retlw 0x10 01537 entry 0x00, 0x00, 0x20 ; L19 0554 3400 M retlw 0x00 0555 3400 M retlw 0x00 0556 3420 M retlw 0x20 01538 entry 0x00, 0x00, 0x40 ; L18 0557 3400 M retlw 0x00 MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 52 LOC OBJECT CODE LINE SOURCE TEXT VALUE 0558 3400 M retlw 0x00 0559 3440 M retlw 0x40 01539 entry 0x00, 0x00, 0x80 ; L17 055A 3400 M retlw 0x00 055B 3400 M retlw 0x00 055C 3480 M retlw 0x80 01540 entry 0x00, 0x01, 0x10 ; L16 055D 3400 M retlw 0x00 055E 3401 M retlw 0x01 055F 3410 M retlw 0x10 01541 entry 0x00, 0x02, 0x20 ; L15 0560 3400 M retlw 0x00 0561 3402 M retlw 0x02 0562 3420 M retlw 0x20 01542 entry 0x00, 0x04, 0x40 ; L14 0563 3400 M retlw 0x00 0564 3404 M retlw 0x04 0565 3440 M retlw 0x40 01543 entry 0x00, 0x08, 0x80 ; L13 0566 3400 M retlw 0x00 0567 3408 M retlw 0x08 0568 3480 M retlw 0x80 01544 entry 0x00, 0x11, 0x00 ; L12 0569 3400 M retlw 0x00 056A 3411 M retlw 0x11 056B 3400 M retlw 0x00 01545 entry 0x00, 0x22, 0x00 ; L11 056C 3400 M retlw 0x00 056D 3422 M retlw 0x22 056E 3400 M retlw 0x00 01546 entry 0x00, 0x44, 0x00 ; L10 056F 3400 M retlw 0x00 0570 3444 M retlw 0x44 0571 3400 M retlw 0x00 01547 entry 0x00, 0x88, 0x00 ; L9 0572 3400 M retlw 0x00 0573 3488 M retlw 0x88 0574 3400 M retlw 0x00 01548 entry 0x01, 0x10, 0x00 ; L8 0575 3401 M retlw 0x01 0576 3410 M retlw 0x10 0577 3400 M retlw 0x00 01549 entry 0x02, 0x20, 0x00 ; L7 0578 3402 M retlw 0x02 0579 3420 M retlw 0x20 057A 3400 M retlw 0x00 01550 entry 0x04, 0x40, 0x00 ; L6 057B 3404 M retlw 0x04 057C 3440 M retlw 0x40 057D 3400 M retlw 0x00 01551 entry 0x08, 0x80, 0x00 ; L5 057E 3408 M retlw 0x08 057F 3480 M retlw 0x80 MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 53 LOC OBJECT CODE LINE SOURCE TEXT VALUE 0580 3400 M retlw 0x00 01552 entry 0x11, 0x00, 0x00 ; L4 0581 3411 M retlw 0x11 0582 3400 M retlw 0x00 0583 3400 M retlw 0x00 01553 entry 0x22, 0x00, 0x00 ; L3 0584 3422 M retlw 0x22 0585 3400 M retlw 0x00 0586 3400 M retlw 0x00 01554 entry 0x44, 0x00, 0x00 ; L2 0587 3444 M retlw 0x44 0588 3400 M retlw 0x00 0589 3400 M retlw 0x00 01555 entry 0x88, 0x00, 0x00 ; L1 058A 3488 M retlw 0x88 058B 3400 M retlw 0x00 058C 3400 M retlw 0x00 01556 entry 0x10, 0x00, 0x00 ; L4 058D 3410 M retlw 0x10 058E 3400 M retlw 0x00 058F 3400 M retlw 0x00 01557 entry 0x20, 0x00, 0x00 ; L3 0590 3420 M retlw 0x20 0591 3400 M retlw 0x00 0592 3400 M retlw 0x00 01558 entry 0x40, 0x00, 0x00 ; L2 0593 3440 M retlw 0x40 0594 3400 M retlw 0x00 0595 3400 M retlw 0x00 01559 entry 0x80, 0x00, 0x01 ; L1 0596 3480 M retlw 0x80 0597 3400 M retlw 0x00 0598 3401 M retlw 0x01 01560 01561 01562 ;********************************************************************** 0599 01563 table8 ; DF8 - chaser 01564 ;********************************************************************** 01565 01566 tbltype1 0x10 0599 3401 M retlw 0x01 059A 3410 M retlw 0x10 01567 entry 0x11, 0x11, 0x10 ; L18 059B 3411 M retlw 0x11 059C 3411 M retlw 0x11 059D 3410 M retlw 0x10 01568 entry 0x22, 0x22, 0x20 ; L17 059E 3422 M retlw 0x22 059F 3422 M retlw 0x22 05A0 3420 M retlw 0x20 01569 entry 0x44, 0x44, 0x40 ; L16 05A1 3444 M retlw 0x44 05A2 3444 M retlw 0x44 MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 54 LOC OBJECT CODE LINE SOURCE TEXT VALUE 05A3 3440 M retlw 0x40 01570 entry 0x88, 0x88, 0x81 ; L15 05A4 3488 M retlw 0x88 05A5 3488 M retlw 0x88 05A6 3481 M retlw 0x81 01571 01572 ;********************************************************************** 05A7 01573 table9 ; DF8 - forward/backward chaser 01574 ;********************************************************************** 01575 01576 tbltype1 0x07 05A7 3401 M retlw 0x01 05A8 3407 M retlw 0x07 01577 entry 0x11, 0x11, 0x10 ; L18 05A9 3411 M retlw 0x11 05AA 3411 M retlw 0x11 05AB 3410 M retlw 0x10 01578 entry 0x22, 0x22, 0x20 ; L17 05AC 3422 M retlw 0x22 05AD 3422 M retlw 0x22 05AE 3420 M retlw 0x20 01579 entry 0x44, 0x44, 0x40 ; L16 05AF 3444 M retlw 0x44 05B0 3444 M retlw 0x44 05B1 3440 M retlw 0x40 01580 entry 0x88, 0x88, 0x80 ; L15 05B2 3488 M retlw 0x88 05B3 3488 M retlw 0x88 05B4 3480 M retlw 0x80 01581 entry 0x11, 0x11, 0x10 ; L18 05B5 3411 M retlw 0x11 05B6 3411 M retlw 0x11 05B7 3410 M retlw 0x10 01582 entry 0x22, 0x22, 0x20 ; L17 05B8 3422 M retlw 0x22 05B9 3422 M retlw 0x22 05BA 3420 M retlw 0x20 01583 entry 0x44, 0x44, 0x40 ; L16 05BB 3444 M retlw 0x44 05BC 3444 M retlw 0x44 05BD 3440 M retlw 0x40 01584 entry 0x88, 0x88, 0x80 ; L15 05BE 3488 M retlw 0x88 05BF 3488 M retlw 0x88 05C0 3480 M retlw 0x80 01585 entry 0x11, 0x11, 0x10 ; L18 05C1 3411 M retlw 0x11 05C2 3411 M retlw 0x11 05C3 3410 M retlw 0x10 01586 entry 0x22, 0x22, 0x20 ; L17 05C4 3422 M retlw 0x22 05C5 3422 M retlw 0x22 05C6 3420 M retlw 0x20 MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 55 LOC OBJECT CODE LINE SOURCE TEXT VALUE 01587 entry 0x44, 0x44, 0x40 ; L16 05C7 3444 M retlw 0x44 05C8 3444 M retlw 0x44 05C9 3440 M retlw 0x40 01588 entry 0x88, 0x88, 0x80 ; L15 05CA 3488 M retlw 0x88 05CB 3488 M retlw 0x88 05CC 3480 M retlw 0x80 01589 entry 0x44, 0x44, 0x40 ; L16 05CD 3444 M retlw 0x44 05CE 3444 M retlw 0x44 05CF 3440 M retlw 0x40 01590 entry 0x22, 0x22, 0x20 ; L17 05D0 3422 M retlw 0x22 05D1 3422 M retlw 0x22 05D2 3420 M retlw 0x20 01591 entry 0x11, 0x11, 0x10 ; 05D3 3411 M retlw 0x11 05D4 3411 M retlw 0x11 05D5 3410 M retlw 0x10 01592 entry 0x88, 0x88, 0x80 ; L15 05D6 3488 M retlw 0x88 05D7 3488 M retlw 0x88 05D8 3480 M retlw 0x80 01593 entry 0x44, 0x44, 0x40 ; L16 05D9 3444 M retlw 0x44 05DA 3444 M retlw 0x44 05DB 3440 M retlw 0x40 01594 entry 0x22, 0x22, 0x20 ; L17 05DC 3422 M retlw 0x22 05DD 3422 M retlw 0x22 05DE 3420 M retlw 0x20 01595 entry 0x11, 0x11, 0x10 ; 05DF 3411 M retlw 0x11 05E0 3411 M retlw 0x11 05E1 3410 M retlw 0x10 01596 entry 0x88, 0x88, 0x80 ; L15 05E2 3488 M retlw 0x88 05E3 3488 M retlw 0x88 05E4 3480 M retlw 0x80 01597 entry 0x44, 0x44, 0x40 ; L16 05E5 3444 M retlw 0x44 05E6 3444 M retlw 0x44 05E7 3440 M retlw 0x40 01598 entry 0x22, 0x22, 0x21 ; L17 05E8 3422 M retlw 0x22 05E9 3422 M retlw 0x22 05EA 3421 M retlw 0x21 01599 ;********************************************************************** 05EB 01600 table10 ; DF8 - shift 01601 ;********************************************************************** 01602 01603 tbltype1 0x20 MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 56 LOC OBJECT CODE LINE SOURCE TEXT VALUE 05EB 3401 M retlw 0x01 05EC 3420 M retlw 0x20 01604 entry 0x2A, 0xAA, 0xA0 ; 1 05ED 342A M retlw 0x2A 05EE 34AA M retlw 0xAA 05EF 34A0 M retlw 0xA0 01605 entry 0x4A, 0xAA, 0xA0 ; 2 05F0 344A M retlw 0x4A 05F1 34AA M retlw 0xAA 05F2 34A0 M retlw 0xA0 01606 entry 0x52, 0xAA, 0xA0 ; 3 05F3 3452 M retlw 0x52 05F4 34AA M retlw 0xAA 05F5 34A0 M retlw 0xA0 01607 entry 0x54, 0xAA, 0xA0 ; 4 05F6 3454 M retlw 0x54 05F7 34AA M retlw 0xAA 05F8 34A0 M retlw 0xA0 01608 entry 0x55, 0x2A, 0xA0 ; 5 05F9 3455 M retlw 0x55 05FA 342A M retlw 0x2A 05FB 34A0 M retlw 0xA0 01609 entry 0x55, 0x4A, 0xA0 ; 6 05FC 3455 M retlw 0x55 05FD 344A M retlw 0x4A 05FE 34A0 M retlw 0xA0 01610 entry 0x55, 0x52, 0xA0 ; 7 05FF 3455 M retlw 0x55 0600 3452 M retlw 0x52 0601 34A0 M retlw 0xA0 01611 entry 0x55, 0x54, 0xA0 ; 8 0602 3455 M retlw 0x55 0603 3454 M retlw 0x54 0604 34A0 M retlw 0xA0 01612 entry 0x55, 0x55, 0x20 ; 9 0605 3455 M retlw 0x55 0606 3455 M retlw 0x55 0607 3420 M retlw 0x20 01613 entry 0x55, 0x55, 0x40 ; 10 0608 3455 M retlw 0x55 0609 3455 M retlw 0x55 060A 3440 M retlw 0x40 01614 entry 0xA5, 0x55, 0x40 ; 11 060B 34A5 M retlw 0xA5 060C 3455 M retlw 0x55 060D 3440 M retlw 0x40 01615 entry 0xA9, 0x55, 0x40 ; 12 060E 34A9 M retlw 0xA9 060F 3455 M retlw 0x55 0610 3440 M retlw 0x40 01616 entry 0xAA, 0x55, 0x40 ; 13 0611 34AA M retlw 0xAA 0612 3455 M retlw 0x55 MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 57 LOC OBJECT CODE LINE SOURCE TEXT VALUE 0613 3440 M retlw 0x40 01617 entry 0xAA, 0x95, 0x40 ; 14 0614 34AA M retlw 0xAA 0615 3495 M retlw 0x95 0616 3440 M retlw 0x40 01618 entry 0xAA, 0xA5, 0x40 ; 15 0617 34AA M retlw 0xAA 0618 34A5 M retlw 0xA5 0619 3440 M retlw 0x40 01619 entry 0xAA, 0xA9, 0x40 ; 16 061A 34AA M retlw 0xAA 061B 34A9 M retlw 0xA9 061C 3440 M retlw 0x40 01620 entry 0xAA, 0xAA, 0x80 ; 17 061D 34AA M retlw 0xAA 061E 34AA M retlw 0xAA 061F 3480 M retlw 0x80 01621 entry 0xAA, 0xAA, 0xA1 ; 18 0620 34AA M retlw 0xAA 0621 34AA M retlw 0xAA 0622 34A1 M retlw 0xA1 01622 01623 ;********************************************************************** 0623 01624 table11 ; DF8 - four running 01625 ;********************************************************************** 01626 01627 tbltype1 0x20 0623 3401 M retlw 0x01 0624 3420 M retlw 0x20 01628 entry 0x80, 0x00, 0x00 ; 1 0625 3480 M retlw 0x80 0626 3400 M retlw 0x00 0627 3400 M retlw 0x00 01629 entry 0xC0, 0x00, 0x00 ; 2 0628 34C0 M retlw 0xC0 0629 3400 M retlw 0x00 062A 3400 M retlw 0x00 01630 entry 0xE0, 0x00, 0x00 ; 3 062B 34E0 M retlw 0xE0 062C 3400 M retlw 0x00 062D 3400 M retlw 0x00 01631 entry 0xF0, 0x00, 0x00 ; 2 062E 34F0 M retlw 0xF0 062F 3400 M retlw 0x00 0630 3400 M retlw 0x00 01632 entry 0x78, 0x00, 0x00 ; 4 0631 3478 M retlw 0x78 0632 3400 M retlw 0x00 0633 3400 M retlw 0x00 01633 entry 0x3C, 0x00, 0x00 ; 5 0634 343C M retlw 0x3C 0635 3400 M retlw 0x00 0636 3400 M retlw 0x00 MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 58 LOC OBJECT CODE LINE SOURCE TEXT VALUE 01634 entry 0x1E, 0x00, 0x00 ; 6 0637 341E M retlw 0x1E 0638 3400 M retlw 0x00 0639 3400 M retlw 0x00 01635 entry 0x0F, 0x00, 0x00 ; 2 063A 340F M retlw 0x0F 063B 3400 M retlw 0x00 063C 3400 M retlw 0x00 01636 entry 0x07, 0x80, 0x00 ; 7 063D 3407 M retlw 0x07 063E 3480 M retlw 0x80 063F 3400 M retlw 0x00 01637 entry 0x03, 0xC0, 0x00 ; 8 0640 3403 M retlw 0x03 0641 34C0 M retlw 0xC0 0642 3400 M retlw 0x00 01638 entry 0x01, 0xE0, 0x00 ; 9 0643 3401 M retlw 0x01 0644 34E0 M retlw 0xE0 0645 3400 M retlw 0x00 01639 entry 0x00, 0xF0, 0x00 ; 2 0646 3400 M retlw 0x00 0647 34F0 M retlw 0xF0 0648 3400 M retlw 0x00 01640 entry 0x00, 0x78, 0x00 ; 2 0649 3400 M retlw 0x00 064A 3478 M retlw 0x78 064B 3400 M retlw 0x00 01641 entry 0x00, 0x3C, 0x00 ; 2 064C 3400 M retlw 0x00 064D 343C M retlw 0x3C 064E 3400 M retlw 0x00 01642 entry 0x00, 0x1E, 0x00 ; 2 064F 3400 M retlw 0x00 0650 341E M retlw 0x1E 0651 3400 M retlw 0x00 01643 entry 0x00, 0x0F, 0x00 ; 2 0652 3400 M retlw 0x00 0653 340F M retlw 0x0F 0654 3400 M retlw 0x00 01644 entry 0x00, 0x07, 0x80 ; 2 0655 3400 M retlw 0x00 0656 3407 M retlw 0x07 0657 3480 M retlw 0x80 01645 entry 0x00, 0x03, 0xC0 ; 2 0658 3400 M retlw 0x00 0659 3403 M retlw 0x03 065A 34C0 M retlw 0xC0 01646 entry 0x00, 0x01, 0xE0 ; 2 065B 3400 M retlw 0x00 065C 3401 M retlw 0x01 065D 34E0 M retlw 0xE0 01647 entry 0x00, 0x00, 0x60 ; 2 MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 59 LOC OBJECT CODE LINE SOURCE TEXT VALUE 065E 3400 M retlw 0x00 065F 3400 M retlw 0x00 0660 3460 M retlw 0x60 01648 entry 0x00, 0x00, 0x20 ; 2 0661 3400 M retlw 0x00 0662 3400 M retlw 0x00 0663 3420 M retlw 0x20 01649 entry 0x00, 0x00, 0x01 ; blank 0664 3400 M retlw 0x00 0665 3400 M retlw 0x00 0666 3401 M retlw 0x01 01650 01651 ;********************************************************************** 0667 01652 table12 ; DF8 - down 01653 ;********************************************************************** 01654 tbltype1 0x03 0667 3401 M retlw 0x01 0668 3403 M retlw 0x03 01655 entry 0x00, 0x00, 0x20 ; L19 0669 3400 M retlw 0x00 066A 3400 M retlw 0x00 066B 3420 M retlw 0x20 01656 entry 0x00, 0x00, 0x60 ; L18 066C 3400 M retlw 0x00 066D 3400 M retlw 0x00 066E 3460 M retlw 0x60 01657 entry 0x00, 0x00, 0xE0 ; L17 066F 3400 M retlw 0x00 0670 3400 M retlw 0x00 0671 34E0 M retlw 0xE0 01658 entry 0x00, 0x01, 0xE0 ; L16 0672 3400 M retlw 0x00 0673 3401 M retlw 0x01 0674 34E0 M retlw 0xE0 01659 entry 0x00, 0x03, 0xE0 ; L15 0675 3400 M retlw 0x00 0676 3403 M retlw 0x03 0677 34E0 M retlw 0xE0 01660 entry 0x00, 0x07, 0xE0 ; L14 0678 3400 M retlw 0x00 0679 3407 M retlw 0x07 067A 34E0 M retlw 0xE0 01661 entry 0x00, 0x0F, 0xE0 ; L13 067B 3400 M retlw 0x00 067C 340F M retlw 0x0F 067D 34E0 M retlw 0xE0 01662 entry 0x00, 0x1F, 0xE0 ; L12 067E 3400 M retlw 0x00 067F 341F M retlw 0x1F 0680 34E0 M retlw 0xE0 01663 entry 0x00, 0x3F, 0xE0 ; L11 0681 3400 M retlw 0x00 0682 343F M retlw 0x3F MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 60 LOC OBJECT CODE LINE SOURCE TEXT VALUE 0683 34E0 M retlw 0xE0 01664 entry 0x00, 0x7F, 0xE0 ; L10 0684 3400 M retlw 0x00 0685 347F M retlw 0x7F 0686 34E0 M retlw 0xE0 01665 entry 0x00, 0xFF, 0xE0 ; L9 0687 3400 M retlw 0x00 0688 34FF M retlw 0xFF 0689 34E0 M retlw 0xE0 01666 entry 0x01, 0xFF, 0xE0 ; L8 068A 3401 M retlw 0x01 068B 34FF M retlw 0xFF 068C 34E0 M retlw 0xE0 01667 entry 0x03, 0xFF, 0xE0 ; L7 068D 3403 M retlw 0x03 068E 34FF M retlw 0xFF 068F 34E0 M retlw 0xE0 01668 entry 0x07, 0xFF, 0xE0 ; L6 0690 3407 M retlw 0x07 0691 34FF M retlw 0xFF 0692 34E0 M retlw 0xE0 01669 entry 0x0F, 0xFF, 0xE0 ; L5 0693 340F M retlw 0x0F 0694 34FF M retlw 0xFF 0695 34E0 M retlw 0xE0 01670 entry 0x1F, 0xFF, 0xE0 ; L4 0696 341F M retlw 0x1F 0697 34FF M retlw 0xFF 0698 34E0 M retlw 0xE0 01671 entry 0x3F, 0xFF, 0xE0 ; L3 0699 343F M retlw 0x3F 069A 34FF M retlw 0xFF 069B 34E0 M retlw 0xE0 01672 entry 0x7F, 0xFF, 0xE0 ; L2 069C 347F M retlw 0x7F 069D 34FF M retlw 0xFF 069E 34E0 M retlw 0xE0 01673 entry 0xFF, 0xFF, 0xE0 ; L1 069F 34FF M retlw 0xFF 06A0 34FF M retlw 0xFF 06A1 34E0 M retlw 0xE0 01674 entry 0xFF, 0xFF, 0xC0 ; 06A2 34FF M retlw 0xFF 06A3 34FF M retlw 0xFF 06A4 34C0 M retlw 0xC0 01675 entry 0xFF, 0xFF, 0x80 ; 06A5 34FF M retlw 0xFF 06A6 34FF M retlw 0xFF 06A7 3480 M retlw 0x80 01676 entry 0xFF, 0xFF, 0x00 ; 06A8 34FF M retlw 0xFF 06A9 34FF M retlw 0xFF 06AA 3400 M retlw 0x00 MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 61 LOC OBJECT CODE LINE SOURCE TEXT VALUE 01677 entry 0xFF, 0xFE, 0x00 ; 06AB 34FF M retlw 0xFF 06AC 34FE M retlw 0xFE 06AD 3400 M retlw 0x00 01678 entry 0xFF, 0xFC, 0x00 ; 06AE 34FF M retlw 0xFF 06AF 34FC M retlw 0xFC 06B0 3400 M retlw 0x00 01679 entry 0xFF, 0xF8, 0x00 ; 06B1 34FF M retlw 0xFF 06B2 34F8 M retlw 0xF8 06B3 3400 M retlw 0x00 01680 entry 0xFF, 0xF0, 0x00 ; 06B4 34FF M retlw 0xFF 06B5 34F0 M retlw 0xF0 06B6 3400 M retlw 0x00 01681 entry 0xFF, 0xE0, 0x00 ; 06B7 34FF M retlw 0xFF 06B8 34E0 M retlw 0xE0 06B9 3400 M retlw 0x00 01682 entry 0xFF, 0xC0, 0x00 ; 06BA 34FF M retlw 0xFF 06BB 34C0 M retlw 0xC0 06BC 3400 M retlw 0x00 01683 entry 0xFF, 0x80, 0x00 ; 06BD 34FF M retlw 0xFF 06BE 3480 M retlw 0x80 06BF 3400 M retlw 0x00 01684 entry 0xFF, 0x00, 0x00 ; 06C0 34FF M retlw 0xFF 06C1 3400 M retlw 0x00 06C2 3400 M retlw 0x00 01685 entry 0xFE, 0x00, 0x00 ; 06C3 34FE M retlw 0xFE 06C4 3400 M retlw 0x00 06C5 3400 M retlw 0x00 01686 entry 0xFC, 0x00, 0x00 ; 06C6 34FC M retlw 0xFC 06C7 3400 M retlw 0x00 06C8 3400 M retlw 0x00 01687 entry 0xF8, 0x00, 0x00 ; 06C9 34F8 M retlw 0xF8 06CA 3400 M retlw 0x00 06CB 3400 M retlw 0x00 01688 entry 0xF0, 0x00, 0x00 ; 06CC 34F0 M retlw 0xF0 06CD 3400 M retlw 0x00 06CE 3400 M retlw 0x00 01689 entry 0xE0, 0x00, 0x00 ; 06CF 34E0 M retlw 0xE0 06D0 3400 M retlw 0x00 06D1 3400 M retlw 0x00 01690 entry 0xC0, 0x00, 0x00 ; MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 62 LOC OBJECT CODE LINE SOURCE TEXT VALUE 06D2 34C0 M retlw 0xC0 06D3 3400 M retlw 0x00 06D4 3400 M retlw 0x00 01691 entry 0x80, 0x00, 0x00 ; 06D5 3480 M retlw 0x80 06D6 3400 M retlw 0x00 06D7 3400 M retlw 0x00 01692 entry 0x00, 0x00, 0x01 ; 06D8 3400 M retlw 0x00 06D9 3400 M retlw 0x00 06DA 3401 M retlw 0x01 01693 01694 ;********************************************************************** 06DB 01695 table13 ; DF8 - down 01696 ;********************************************************************** 01697 01698 tbltype1 0x10 06DB 3401 M retlw 0x01 06DC 3410 M retlw 0x10 01699 entry 0x92, 0x49, 0x20 ; Red 06DD 3492 M retlw 0x92 06DE 3449 M retlw 0x49 06DF 3420 M retlw 0x20 01700 entry 0x24, 0x92, 0x40 ; Red 06E0 3424 M retlw 0x24 06E1 3492 M retlw 0x92 06E2 3440 M retlw 0x40 01701 entry 0x49, 0x24, 0x81 ; Red 06E3 3449 M retlw 0x49 06E4 3424 M retlw 0x24 06E5 3481 M retlw 0x81 01702 01703 ;********************************************************************** 06E6 01704 table14 ; DF8 - down 01705 ;********************************************************************** 01706 01707 tbltype1 0x10 06E6 3401 M retlw 0x01 06E7 3410 M retlw 0x10 01708 entry 0x92, 0x49, 0x20 ; Red 06E8 3492 M retlw 0x92 06E9 3449 M retlw 0x49 06EA 3420 M retlw 0x20 01709 entry 0x49, 0x24, 0x80 ; Red 06EB 3449 M retlw 0x49 06EC 3424 M retlw 0x24 06ED 3480 M retlw 0x80 01710 entry 0x24, 0x92, 0x41 ; Red 06EE 3424 M retlw 0x24 06EF 3492 M retlw 0x92 06F0 3441 M retlw 0x41 01711 01712 ;********************************************************************** MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 63 LOC OBJECT CODE LINE SOURCE TEXT VALUE 06F1 01713 table15 ; DF8 - down 01714 ;********************************************************************** 01715 01716 tbltype1 0x05 06F1 3401 M retlw 0x01 06F2 3405 M retlw 0x05 01717 entry 0x00, 0x00, 0x20 ; L19 06F3 3400 M retlw 0x00 06F4 3400 M retlw 0x00 06F5 3420 M retlw 0x20 01718 entry 0x00, 0x00, 0x80 ; L17 06F6 3400 M retlw 0x00 06F7 3400 M retlw 0x00 06F8 3480 M retlw 0x80 01719 entry 0x00, 0x02, 0x00 ; L15 06F9 3400 M retlw 0x00 06FA 3402 M retlw 0x02 06FB 3400 M retlw 0x00 01720 entry 0x00, 0x08, 0x00 ; L13 06FC 3400 M retlw 0x00 06FD 3408 M retlw 0x08 06FE 3400 M retlw 0x00 01721 entry 0x00, 0x20, 0x00 ; L11 06FF 3400 M retlw 0x00 0700 3420 M retlw 0x20 0701 3400 M retlw 0x00 01722 entry 0x00, 0x80, 0x00 ; L9 0702 3400 M retlw 0x00 0703 3480 M retlw 0x80 0704 3400 M retlw 0x00 01723 entry 0x02, 0x00, 0x00 ; L7 0705 3402 M retlw 0x02 0706 3400 M retlw 0x00 0707 3400 M retlw 0x00 01724 entry 0x08, 0x00, 0x00 ; L5 0708 3408 M retlw 0x08 0709 3400 M retlw 0x00 070A 3400 M retlw 0x00 01725 entry 0x20, 0x00, 0x00 ; L3 070B 3420 M retlw 0x20 070C 3400 M retlw 0x00 070D 3400 M retlw 0x00 01726 entry 0x80, 0x00, 0x00 ; L1 070E 3480 M retlw 0x80 070F 3400 M retlw 0x00 0710 3400 M retlw 0x00 01727 entry 0x00, 0x00, 0x00 ; Blank 0711 3400 M retlw 0x00 0712 3400 M retlw 0x00 0713 3400 M retlw 0x00 01728 entry 0x00, 0x00, 0x40 ; L18 0714 3400 M retlw 0x00 0715 3400 M retlw 0x00 MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 64 LOC OBJECT CODE LINE SOURCE TEXT VALUE 0716 3440 M retlw 0x40 01729 entry 0x00, 0x01, 0x00 ; L16 0717 3400 M retlw 0x00 0718 3401 M retlw 0x01 0719 3400 M retlw 0x00 01730 entry 0x00, 0x04, 0x00 ; L14 071A 3400 M retlw 0x00 071B 3404 M retlw 0x04 071C 3400 M retlw 0x00 01731 entry 0x00, 0x10, 0x00 ; L12 071D 3400 M retlw 0x00 071E 3410 M retlw 0x10 071F 3400 M retlw 0x00 01732 entry 0x00, 0x40, 0x00 ; L10 0720 3400 M retlw 0x00 0721 3440 M retlw 0x40 0722 3400 M retlw 0x00 01733 entry 0x01, 0x00, 0x00 ; L8 0723 3401 M retlw 0x01 0724 3400 M retlw 0x00 0725 3400 M retlw 0x00 01734 entry 0x04, 0x00, 0x00 ; L6 0726 3404 M retlw 0x04 0727 3400 M retlw 0x00 0728 3400 M retlw 0x00 01735 entry 0x10, 0x00, 0x00 ; L4 0729 3410 M retlw 0x10 072A 3400 M retlw 0x00 072B 3400 M retlw 0x00 01736 entry 0x40, 0x00, 0x00 ; L2 072C 3440 M retlw 0x40 072D 3400 M retlw 0x00 072E 3400 M retlw 0x00 01737 entry 0x00, 0x00, 0x01 ; Blank 072F 3400 M retlw 0x00 0730 3400 M retlw 0x00 0731 3401 M retlw 0x01 01738 01739 ;********************************************************************** 0732 01740 table16 ; DF8 - round 01741 ;********************************************************************** 01742 01743 tbltype1 0x05 0732 3401 M retlw 0x01 0733 3405 M retlw 0x05 01744 entry 0x00, 0x00, 0x20 ; L19 0734 3400 M retlw 0x00 0735 3400 M retlw 0x00 0736 3420 M retlw 0x20 01745 entry 0x00, 0x00, 0x80 ; L17 0737 3400 M retlw 0x00 0738 3400 M retlw 0x00 0739 3480 M retlw 0x80 MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 65 LOC OBJECT CODE LINE SOURCE TEXT VALUE 01746 entry 0x00, 0x02, 0x00 ; L15 073A 3400 M retlw 0x00 073B 3402 M retlw 0x02 073C 3400 M retlw 0x00 01747 entry 0x00, 0x08, 0x00 ; L13 073D 3400 M retlw 0x00 073E 3408 M retlw 0x08 073F 3400 M retlw 0x00 01748 entry 0x00, 0x20, 0x00 ; L11 0740 3400 M retlw 0x00 0741 3420 M retlw 0x20 0742 3400 M retlw 0x00 01749 entry 0x00, 0x80, 0x00 ; L9 0743 3400 M retlw 0x00 0744 3480 M retlw 0x80 0745 3400 M retlw 0x00 01750 entry 0x02, 0x00, 0x00 ; L7 0746 3402 M retlw 0x02 0747 3400 M retlw 0x00 0748 3400 M retlw 0x00 01751 entry 0x08, 0x00, 0x00 ; L5 0749 3408 M retlw 0x08 074A 3400 M retlw 0x00 074B 3400 M retlw 0x00 01752 entry 0x20, 0x00, 0x00 ; L3 074C 3420 M retlw 0x20 074D 3400 M retlw 0x00 074E 3400 M retlw 0x00 01753 entry 0x80, 0x00, 0x00 ; L1 074F 3480 M retlw 0x80 0750 3400 M retlw 0x00 0751 3400 M retlw 0x00 01754 entry 0x40, 0x00, 0x00 ; L2 0752 3440 M retlw 0x40 0753 3400 M retlw 0x00 0754 3400 M retlw 0x00 01755 entry 0x10, 0x00, 0x00 ; L4 0755 3410 M retlw 0x10 0756 3400 M retlw 0x00 0757 3400 M retlw 0x00 01756 entry 0x04, 0x00, 0x00 ; L6 0758 3404 M retlw 0x04 0759 3400 M retlw 0x00 075A 3400 M retlw 0x00 01757 entry 0x01, 0x00, 0x00 ; L8 075B 3401 M retlw 0x01 075C 3400 M retlw 0x00 075D 3400 M retlw 0x00 01758 entry 0x00, 0x40, 0x00 ; L10 075E 3400 M retlw 0x00 075F 3440 M retlw 0x40 0760 3400 M retlw 0x00 01759 entry 0x00, 0x10, 0x00 ; L12 MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 66 LOC OBJECT CODE LINE SOURCE TEXT VALUE 0761 3400 M retlw 0x00 0762 3410 M retlw 0x10 0763 3400 M retlw 0x00 01760 entry 0x00, 0x04, 0x00 ; L14 0764 3400 M retlw 0x00 0765 3404 M retlw 0x04 0766 3400 M retlw 0x00 01761 entry 0x00, 0x01, 0x00 ; L16 0767 3400 M retlw 0x00 0768 3401 M retlw 0x01 0769 3400 M retlw 0x00 01762 entry 0x00, 0x00, 0x41 ; L18 076A 3400 M retlw 0x00 076B 3400 M retlw 0x00 076C 3441 M retlw 0x41 01763 01764 ;********************************************************************** 076D 01765 table17 ; DF1 - retro 01766 ;********************************************************************** 01767 01768 tbltype1 0x10 076D 3401 M retlw 0x01 076E 3410 M retlw 0x10 01769 entry 0x00, 0x00, 0x60 ; L19, L18 076F 3400 M retlw 0x00 0770 3400 M retlw 0x00 0771 3460 M retlw 0x60 01770 entry 0x00, 0x01, 0x80 ; L17, L16 0772 3400 M retlw 0x00 0773 3401 M retlw 0x01 0774 3480 M retlw 0x80 01771 entry 0x00, 0x06, 0x00 ; L15, L14 0775 3400 M retlw 0x00 0776 3406 M retlw 0x06 0777 3400 M retlw 0x00 01772 entry 0x00, 0x18, 0x00 ; L13, L12 0778 3400 M retlw 0x00 0779 3418 M retlw 0x18 077A 3400 M retlw 0x00 01773 entry 0x00, 0x60, 0x00 ; L11, L10 077B 3400 M retlw 0x00 077C 3460 M retlw 0x60 077D 3400 M retlw 0x00 01774 entry 0x01, 0x80, 0x00 ; L9, L8 077E 3401 M retlw 0x01 077F 3480 M retlw 0x80 0780 3400 M retlw 0x00 01775 entry 0x06, 0x00, 0x00 ; L7, l6 0781 3406 M retlw 0x06 0782 3400 M retlw 0x00 0783 3400 M retlw 0x00 01776 entry 0x18, 0x00, 0x00 ; L5, L4 0784 3418 M retlw 0x18 MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 67 LOC OBJECT CODE LINE SOURCE TEXT VALUE 0785 3400 M retlw 0x00 0786 3400 M retlw 0x00 01777 entry 0x60, 0x00, 0x00 ; L3, L2 0787 3460 M retlw 0x60 0788 3400 M retlw 0x00 0789 3400 M retlw 0x00 01778 entry 0x00, 0x00, 0x01 ; Blank 078A 3400 M retlw 0x00 078B 3400 M retlw 0x00 078C 3401 M retlw 0x01 01779 01780 ;********************************************************************** 01781 ; eeprom 01782 ;********************************************************************** 01783 2100 01784 ORG 0x2100 ; data EEPROM location 2100 0001 0032 01785 DE 0x01,0x32 01786 2102 0080 0000 0000 01787 DE 0x80, 0x00, 0x00 ; L1 2105 0040 0000 0000 01788 DE 0x40, 0x00, 0x00 ; L2 2108 0020 0000 0000 01789 DE 0x20, 0x00, 0x00 ; L3 210B 0010 0000 0000 01790 DE 0x10, 0x00, 0x00 ; L4 210E 0008 0000 0000 01791 DE 0x08, 0x00, 0x00 ; L5 2111 0004 0000 0000 01792 DE 0x04, 0x00, 0x00 ; L6 2114 0002 0000 0000 01793 DE 0x02, 0x00, 0x00 ; L7 2117 0001 0000 0000 01794 DE 0x01, 0x00, 0x00 ; L8 211A 0000 0080 0000 01795 DE 0x00, 0x80, 0x00 ; L9 211D 0000 0040 0000 01796 DE 0x00, 0x40, 0x00 ; L10 2120 0000 0020 0000 01797 DE 0x00, 0x20, 0x00 ; L11 2123 0000 0010 0000 01798 DE 0x00, 0x10, 0x00 ; L12 2126 0000 0008 0000 01799 DE 0x00, 0x08, 0x00 ; L13 2129 0000 0004 0000 01800 DE 0x00, 0x04, 0x00 ; L14 212C 0000 0002 0000 01801 DE 0x00, 0x02, 0x00 ; L15 212F 0000 0001 0000 01802 DE 0x00, 0x01, 0x00 ; L16 2132 0000 0000 0080 01803 DE 0x00, 0x00, 0x80 ; L17 2135 0000 0000 0040 01804 DE 0x00, 0x00, 0x40 ; L18 2138 0000 0000 0020 01805 DE 0x00, 0x00, 0x20 ; L19 213B 0000 0000 0001 01806 DE 0x00, 0x00, 0x01 ; BLank 01807 END ; directive 'end of program' MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 68 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 CCP1CON 00000015 CCP1IE 00000005 CCP1IF 00000005 CCP1M0 00000000 CCP1M1 00000001 CCP1M2 00000002 CCP1M3 00000003 CCPR1H 00000014 CCPR1L 00000013 CHS0 00000002 CHS1 00000003 CHS2 00000004 CINV 00000004 CIS 00000003 CM0 00000000 CM1 00000001 CM2 00000002 CMCON0 00000019 CMCON1 0000001A CMIE 00000003 CMIF 00000003 CMSYNC 00000000 COUT 00000006 DC 00000001 DC1B0 00000004 DC1B1 00000005 EEADR 0000009B EECON1 0000009C EECON2 0000009D EEDAT 0000009A EEDATA 0000009A EEIE 00000007 EEIF 00000007 F 00000001 FSR 00000004 GIE 00000007 GO 00000001 MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 69 SYMBOL TABLE LABEL VALUE GO_DONE 00000001 GPIE 00000003 GPIF 00000000 GPIO 00000005 HTS 00000002 INDF 00000000 INTCON 0000000B INTE 00000004 INTEDG 00000006 INTF 00000001 IOC 00000096 IOC0 00000000 IOC1 00000001 IOC2 00000002 IOC3 00000003 IOC4 00000004 IOC5 00000005 IOCA 00000096 IOCA0 00000000 IOCA1 00000001 IOCA2 00000002 IOCA3 00000003 IOCA4 00000004 IOCA5 00000005 IRCF0 00000004 IRCF1 00000005 IRCF2 00000006 IRP 00000007 IR_40k 00000022 IR_Tester 00000373 IR_in 0000002D IR_in_good 0000004D IR_lhalf 00000031 LTS 00000001 Lcontinue 000001E5 LedOut Lstate0 000000BE Lstate0a 000000C4 Lstate1 000000C7 Lstate10 0000010F Lstate10a 00000115 Lstate11 00000118 Lstate12 0000011C Lstate12a 00000122 Lstate13 00000128 Lstate14 0000012C Lstate14a 00000132 Lstate15 00000138 Lstate16 0000013C Lstate16a 00000142 Lstate17 00000148 Lstate18 0000014C Lstate18a 00000152 MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 70 SYMBOL TABLE LABEL VALUE Lstate19 00000158 Lstate1a 000000CC Lstate2 000000CF Lstate20 0000015C Lstate20a 00000162 Lstate21 00000168 Lstate22 0000016C Lstate22a 00000172 Lstate23 00000178 Lstate24 0000017C Lstate24a 00000182 Lstate25 00000188 Lstate26 0000018C Lstate26a 00000192 Lstate27 00000198 Lstate28 0000019C Lstate28a 000001A2 Lstate29 000001A8 Lstate2a 000000D4 Lstate3 000000D7 Lstate30 000001AC Lstate30a 000001B2 Lstate31 000001B8 Lstate32 000001BC Lstate32a 000001C2 Lstate33 000001C8 Lstate34 000001CC Lstate34a 000001D2 Lstate35 000001D8 Lstate3a 000000DC Lstate4 000000DF Lstate4a 000000E4 Lstate5 000000E7 Lstate5a 000000EC Lstate6 000000EF Lstate6a 000000F4 Lstate7 000000F7 Lstate7a 000000FC Lstate8 000000FF Lstate8a 00000104 Lstate9 00000107 Lstate9a 0000010C MasterTable 000003DE NOT_BOD 00000000 NOT_DONE 00000001 NOT_GPPU 00000007 NOT_PD 00000003 NOT_POR 00000001 NOT_RAPU 00000007 NOT_T1SYNC 00000002 NOT_TO 00000004 NUM_TAB 00000011 OPTION_REG 00000081 MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 71 SYMBOL TABLE LABEL VALUE OSCCON 0000008F OSCTUNE 00000090 OSFIE 00000002 OSFIF 00000002 OSTS 00000003 PCL 00000002 PCLATH 0000000A PCON 0000008E PEIE 00000006 PIE1 0000008C PIR1 0000000C PORTA 00000005 PR2 00000092 PS0 00000000 PS1 00000001 PS2 00000002 PSA 00000003 RD 00000000 RP0 00000005 RP1 00000006 SBODEN 00000004 SCS 00000000 STATUS 00000003 SWDTEN 00000000 T0CS 00000005 T0IE 00000005 T0IF 00000002 T0SE 00000004 T1CKPS0 00000004 T1CKPS1 00000005 T1CON 00000010 T1GE 00000006 T1GINV 00000007 T1GSS 00000001 T1IE 00000000 T1IF 00000000 T1OSCEN 00000003 T2CKPS0 00000000 T2CKPS1 00000001 T2CON 00000012 T2IE 00000001 T2IF 00000001 TMR0 00000001 TMR1CS 00000001 TMR1H 0000000F TMR1IE 00000000 TMR1IF 00000000 TMR1L 0000000E TMR1ON 00000000 TMR2 00000011 TMR2IE 00000001 TMR2IF 00000001 TMR2ON 00000002 MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 72 SYMBOL TABLE LABEL VALUE TOUTPS0 00000003 TOUTPS1 00000004 TOUTPS2 00000005 TOUTPS3 00000006 TRISA 00000085 TRISIO 00000085 TUN0 00000000 TUN1 00000001 TUN2 00000002 TUN3 00000003 TUN4 00000004 ULPWUE 00000005 VCFG 00000006 VR0 00000000 VR1 00000001 VR2 00000002 VR3 00000003 VRCON 00000099 VREN 00000007 VRR 00000005 W 00000000 WDTCON 00000018 WDTPS0 00000001 WDTPS1 00000002 WDTPS2 00000003 WDTPS3 00000004 WPU 00000095 WPUA 00000095 WR 00000001 WREN 00000002 WRERR 00000003 Z 00000002 _BOD_NSLEEP 00003EFF _BOD_OFF 00003CFF _BOD_ON 00003FFF _BOD_SBODEN 00003DFF _CPD_OFF 00003FFF _CPD_ON 00003F7F _CP_OFF 00003FFF _CP_ON 00003FBF _EC_OSC 00003FFB _EXTRC 00003FFE _EXTRCIO 00003FFF _EXTRC_OSC_CLKOUT 00003FFF _EXTRC_OSC_NOCLKOUT 00003FFE _FCMEN_OFF 000037FF _FCMEN_ON 00003FFF _HS_OSC 00003FFA _IESO_OFF 00003BFF _IESO_ON 00003FFF _INTOSC 00003FFC _INTOSCIO 00003FFD _INTRC_OSC_CLKOUT 00003FFD MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 73 SYMBOL TABLE LABEL VALUE _INTRC_OSC_NOCLKOUT 00003FFC _LP_OSC 00003FF8 _MCLRE_OFF 00003FDF _MCLRE_ON 00003FFF _PWRTE_OFF 00003FFF _PWRTE_ON 00003FEF _WDT_OFF 00003FF7 _WDT_ON 00003FFF _XT_OSC 00003FF9 __12F683 00000001 address 0000002F b2l_in_green 00000040 b2l_in_red 0000003F b2l_lcount 0000003E b2l_loop 000001EA b2l_out_hi 0000003C b2l_out_low 0000003D bin2led 000001E6 blinkie_check 00000330 button 00000034 button_check 0000034C command 0000002E count 00000041 count1 00000045 count2 00000046 dcount 0000003B default_IO 00000269 delay 00000238 delay_loop 0000023A delay_loop2 0000005B demo_mode 00000054 dirty 0000004E display 0000026E display_pattern_id 000002B7 dloop 00000270 entry exit_int 0000003E exit_tx 0000003C fbyte_loop 000001F8 flip_in 00000056 flip_out 00000057 flipbyte 000001F4 get_next_pattern_entry 000002E9 get_next_tx_bit 00000050 get_state_tbl_hi_address 0000005E get_state_tbl_low_address 00000064 glabel1 000002EF go_state_table 00000072 greturn 000002F3 iloop1 00000389 in0 00000036 in1 00000037 in2 00000038 MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 74 SYMBOL TABLE LABEL VALUE in3 00000039 in4 0000003A input 00000075 instate 0000002B itop 00000373 main 000003AF make_mtab make_state_jump_table max_instate 00000044 mult_nop next_pattern 0000023E nextf 00000055 out0 00000025 out1 00000026 out2 00000027 out3 00000028 out4 00000029 out_address 00000050 out_command 00000051 out_pattern 00000053 out_toggle 00000052 past_exit 0000024E past_pattern 00000246 pattern 00000047 pattern_driver 00000327 pindex 00000074 pindex2 0000002C ploop 0000004F ploop0 0000032E ploop1a 00000352 ploop2 00000357 ploop2a 0000036B ploop3 00000370 pspeed 00000043 ptop 00000327 qcount 0000004C qdelay 0000005A read_eeprom 0000030D read_ir_in 00000043 regA_dir 00000073 regA_out 00000035 remote_check 00000337 repeat 00000021 repeat_loop 00000024 repeat_loop3 00000037 rf_command_out 000001FF scount 0000002A send_nothing 00000030 send_one 00000016 send_zero 0000002E set_exit 00000259 set_loop 00000252 set_max_state 00000047 MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 75 SYMBOL TABLE LABEL VALUE set_pattern 0000024F setup_pattern_table 000002C5 skipf 0000000E slabel1 000002D3 smi_l1 0000004E speed 00000042 sreturn 000002E8 state2_tbl state_jump_table 00000076 state_tbl status_temp 00000072 stop2 000002C5 strobe_IO 0000025A table0 00000402 table1 00000402 table10 000005EB table11 00000623 table12 00000667 table13 000006DB table14 000006E6 table15 000006F1 table16 00000732 table17 0000076D table2 00000440 table3 0000047E table4 000004EC table5 000004F4 table6 00000532 table7 00000552 table8 00000599 table9 000005A7 table_lookup 000003D7 table_lookup2 0000006B tbl2_hi 00000032 tbl2_low 00000033 tbl_hi 00000048 tbl_low 00000049 tbltype 0000004B tbltype1 tdemo_cont 00000320 tdemo_on 0000031E temp 0000004A toggle 00000030 toggle_demo 00000316 tx_1 00000024 tx_on 00000023 w_temp 00000071 write_eeprom 000002F5 MPASM 03.80.04 Internal 19LED_STICK_T1.ASM 6-3-2006 8:31:56 PAGE 76 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 XXXXXXXXXXXXXXXX 0400 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX 0440 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX 0480 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX 04C0 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX 0500 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX 0540 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX 0580 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX 05C0 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX 0600 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX 0640 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX 0680 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX 06C0 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX 0700 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX 0740 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX 0780 : XXXXXXXXXXXXX--- ---------------- ---------------- ---------------- 2000 : -------X-------- ---------------- ---------------- ---------------- 2100 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXX-- All other memory blocks unused. Program Memory Words Used: 1930 Program Memory Words Free: 118 Errors : 0 Warnings : 0 reported, 0 suppressed Messages : 20 reported, 0 suppressed