-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.lst
714 lines (668 loc) · 28.6 KB
/
main.lst
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
MPASM 5.40 MAIN.ASM 6-11-2017 16:00:38 PAGE 1
LOC OBJECT CODE LINE SOURCE TEXT
VALUE
00001 ; PROPELLER CLOCK PROJECT
00002 ; KEVIN/SAHAR/PARTH/ADRIAN
00003 ; 5/28/2017
00004
00005 #include <p16f887.inc>
00001 LIST
00002
00003 ;==========================================================================
00004 ; MPASM PIC16F887 processor include
00005 ;
00006 ; (c) Copyright 1999-2011 Microchip Technology, All rights reserved
00007 ;==========================================================================
00008
00789 LIST
00006
00000020 00007 count EQU 0x20
00000021 00008 del1 EQU 0x21
00000022 00009 del2 EQU 0x22
00000023 00010 count10 EQU 0x23
00011
0000 00012 ORG 0
0000 2805 00013 GOTO main
0004 00014 ORG 4
0004 283E 00015 GOTO isr
00016
0005 00017 main:
0005 1683 1703 00018 BANKSEL ANSELH
Message[302]: Register in operand not in bank 0. Ensure that bank bits are correct.
0007 0189 00019 CLRF ANSELH
0008 1683 1303 00020 BANKSEL TRISB
Message[302]: Register in operand not in bank 0. Ensure that bank bits are correct.
000A 0186 00021 CLRF TRISB
000B 1283 1303 00022 BANKSEL PORTB
000D 30FF 00023 MOVLW 0xFF
000E 0086 00024 MOVWF PORTB
000F 3000 00025 MOVLW 0x00
0010 00A0 00026 MOVWF count
0011 300A 00027 MOVLW .10
0012 00A3 00028 MOVWF count10
0013 0103 00029 CLRW
00030
00031
00032
0014 00033 loop:
0014 201F 00034 CALL display
0015 3AFF 00035 XORLW 0xFF
0016 0086 00036 MOVWF PORTB
0017 202C 00037 CALL delay
0018 0AA0 00038 INCF count, 1
0019 0820 00039 MOVF count, 0
001A 3A0C 00040 XORLW 0x0C
001B 1903 00041 BTFSC STATUS, 2
001C 2836 00042 GOTO endword
MPASM 5.40 MAIN.ASM 6-11-2017 16:00:38 PAGE 2
LOC OBJECT CODE LINE SOURCE TEXT
VALUE
001D 0820 00043 MOVF count, 0
001E 2814 00044 GOTO loop
00045
001F 00046 display:
001F 0782 00047 ADDWF PCL, 1
0020 34FF 00048 RETLW B'11111111' ;1
0021 3400 00049 RETLW B'00000000' ;space
0022 347E 00050 RETLW B'01111110'
0023 3481 00051 RETLW B'10000001'
0024 3481 00052 RETLW B'10000001'
0025 347E 00053 RETLW B'01111110' ;0
0026 3400 00054 RETLW B'00000000' ;space
0027 347E 00055 RETLW B'01111110'
0028 3481 00056 RETLW B'10000001'
0029 3481 00057 RETLW B'10000001'
002A 347E 00058 RETLW B'01111110' ;0
002B 3400 00059 RETLW B'00000000' ;space
00060
002C 00061 delay:
002C 30FA 00062 MOVLW .250
002D 00A1 00063 MOVWF del1
002E 00064 loop1:
002E 3005 00065 MOVLW .5
002F 00A2 00066 MOVWF del2
0030 00067 loop2:
0030 0000 00068 NOP
Message[305]: Using default destination of 1 (file).
0031 0BA2 00069 DECFSZ del2
0032 2830 00070 GOTO loop2
00071
Message[305]: Using default destination of 1 (file).
0033 0BA1 00072 DECFSZ del1
0034 282E 00073 GOTO loop1
0035 0008 00074 RETURN
00075
0036 00076 endword:
0036 0103 00077 CLRW
0037 01A0 00078 CLRF count
0038 300A 00079 MOVLW .10
0039 00A3 00080 MOVWF count10
003A 00081 delay50ms:
003A 202C 00082 CALL delay
Message[305]: Using default destination of 1 (file).
003B 0BA3 00083 DECFSZ count10
003C 283A 00084 GOTO delay50ms
003D 2814 00085 GOTO loop
00086
003E 00087 isr:
003E 0000 00088 NOP
003F 0009 00089 RETFIE
00090
00091 END
MPASM 5.40 MAIN.ASM 6-11-2017 16:00:38 PAGE 3
SYMBOL TABLE
LABEL VALUE
ABDEN 00000000
ABDOVF 00000007
ACKDT 00000005
ACKEN 00000004
ACKSTAT 00000006
ADCON0 0000001F
ADCON1 0000009F
ADCS0 00000006
ADCS1 00000007
ADDEN 00000003
ADFM 00000007
ADIE 00000006
ADIF 00000006
ADON 00000000
ADRESH 0000001E
ADRESL 0000009E
ANS0 00000000
ANS1 00000001
ANS10 00000002
ANS11 00000003
ANS12 00000004
ANS13 00000005
ANS2 00000002
ANS3 00000003
ANS4 00000004
ANS5 00000005
ANS6 00000006
ANS7 00000007
ANS8 00000000
ANS9 00000001
ANSEL 00000188
ANSELH 00000189
BAUDCTL 00000187
BCLIE 00000003
BCLIF 00000003
BF 00000000
BRG0 00000000
BRG1 00000001
BRG10 00000002
BRG11 00000003
BRG12 00000004
BRG13 00000005
BRG14 00000006
BRG15 00000007
BRG16 00000003
BRG2 00000002
BRG3 00000003
BRG4 00000004
BRG5 00000005
BRG6 00000006
BRG7 00000007
BRG8 00000000
BRG9 00000001
MPASM 5.40 MAIN.ASM 6-11-2017 16:00:38 PAGE 4
SYMBOL TABLE
LABEL VALUE
BRGH 00000002
C 00000000
C1CH0 00000000
C1CH1 00000001
C1IE 00000005
C1IF 00000005
C1OE 00000005
C1ON 00000007
C1OUT 00000006
C1POL 00000004
C1R 00000002
C1RSEL 00000005
C1SEN 00000005
C2CH0 00000000
C2CH1 00000001
C2IE 00000006
C2IF 00000006
C2OE 00000005
C2ON 00000007
C2OUT 00000006
C2POL 00000004
C2R 00000002
C2REN 00000004
C2RSEL 00000004
C2SYNC 00000000
CCP1CON 00000017
CCP1IE 00000002
CCP1IF 00000002
CCP1M0 00000000
CCP1M1 00000001
CCP1M2 00000002
CCP1M3 00000003
CCP1X 00000005
CCP1Y 00000004
CCP2CON 0000001D
CCP2IE 00000000
CCP2IF 00000000
CCP2M0 00000000
CCP2M1 00000001
CCP2M2 00000002
CCP2M3 00000003
CCP2X 00000005
CCP2Y 00000004
CCPR1H 00000016
CCPR1L 00000015
CCPR2H 0000001C
CCPR2L 0000001B
CHS0 00000002
CHS1 00000003
CHS2 00000004
CHS3 00000005
CKE 00000006
CKP 00000004
MPASM 5.40 MAIN.ASM 6-11-2017 16:00:38 PAGE 5
SYMBOL TABLE
LABEL VALUE
CM1CON0 00000107
CM2CON0 00000108
CM2CON1 00000109
CREN 00000004
CSRC 00000007
D 00000005
DATA_ADDRESS 00000005
DC 00000001
DC1B0 00000004
DC1B1 00000005
DC2B0 00000004
DC2B1 00000005
D_A 00000005
D_NOT_A 00000005
ECCPAS 0000009C
ECCPAS0 00000004
ECCPAS1 00000005
ECCPAS2 00000006
ECCPASE 00000007
EEADR 0000010D
EEADRH 0000010F
EECON1 0000018C
EECON2 0000018D
EEDAT 0000010C
EEDATA 0000010C
EEDATH 0000010E
EEIE 00000004
EEIF 00000004
EEPGD 00000007
F 00000001
FERR 00000002
FSR 00000004
FVREN 00000000
GCEN 00000007
GIE 00000007
GO 00000001
GO_DONE 00000001
GO_NOT_DONE 00000001
HTS 00000002
I2C_DATA 00000005
I2C_READ 00000002
I2C_START 00000003
I2C_STOP 00000004
INDF 00000000
INTCON 0000000B
INTE 00000004
INTEDG 00000006
INTF 00000001
IOCB 00000096
IOCB0 00000000
IOCB1 00000001
IOCB2 00000002
IOCB3 00000003
MPASM 5.40 MAIN.ASM 6-11-2017 16:00:38 PAGE 6
SYMBOL TABLE
LABEL VALUE
IOCB4 00000004
IOCB5 00000005
IOCB6 00000006
IOCB7 00000007
IRCF0 00000004
IRCF1 00000005
IRCF2 00000006
IRP 00000007
LTS 00000001
MC1OUT 00000007
MC2OUT 00000006
MSK 00000093
MSK0 00000000
MSK1 00000001
MSK2 00000002
MSK3 00000003
MSK4 00000004
MSK5 00000005
MSK6 00000006
MSK7 00000007
NOT_A 00000005
NOT_ADDRESS 00000005
NOT_BO 00000000
NOT_BOR 00000000
NOT_DONE 00000001
NOT_PD 00000003
NOT_POR 00000001
NOT_RBPU 00000007
NOT_RC8 00000006
NOT_T1SYNC 00000002
NOT_TO 00000004
NOT_TX8 00000006
NOT_W 00000002
NOT_WRITE 00000002
OERR 00000001
OPTION_REG 00000081
OSCCON 0000008F
OSCTUNE 00000090
OSFIE 00000007
OSFIF 00000007
OSTS 00000003
P 00000004
P1M0 00000006
P1M1 00000007
PCL 00000002
PCLATH 0000000A
PCON 0000008E
PDC0 00000000
PDC1 00000001
PDC2 00000002
PDC3 00000003
PDC4 00000004
PDC5 00000005
MPASM 5.40 MAIN.ASM 6-11-2017 16:00:38 PAGE 7
SYMBOL TABLE
LABEL VALUE
PDC6 00000006
PEIE 00000006
PEN 00000002
PIE1 0000008C
PIE2 0000008D
PIR1 0000000C
PIR2 0000000D
PORTA 00000005
PORTB 00000006
PORTC 00000007
PORTD 00000008
PORTE 00000009
PR2 00000092
PRSEN 00000007
PS0 00000000
PS1 00000001
PS2 00000002
PSA 00000003
PSSAC0 00000002
PSSAC1 00000003
PSSBD0 00000000
PSSBD1 00000001
PSTRCON 0000009D
PULSR 00000002
PULSS 00000003
PWM1CON 0000009B
R 00000002
RA0 00000000
RA1 00000001
RA2 00000002
RA3 00000003
RA4 00000004
RA5 00000005
RA6 00000006
RA7 00000007
RB0 00000000
RB1 00000001
RB2 00000002
RB3 00000003
RB4 00000004
RB5 00000005
RB6 00000006
RB7 00000007
RBIE 00000003
RBIF 00000000
RC0 00000000
RC1 00000001
RC2 00000002
RC3 00000003
RC4 00000004
RC5 00000005
RC6 00000006
RC7 00000007
MPASM 5.40 MAIN.ASM 6-11-2017 16:00:38 PAGE 8
SYMBOL TABLE
LABEL VALUE
RC8_9 00000006
RC9 00000006
RCD8 00000000
RCEN 00000003
RCIDL 00000006
RCIE 00000005
RCIF 00000005
RCREG 0000001A
RCSTA 00000018
RD 00000000
RD0 00000000
RD1 00000001
RD2 00000002
RD3 00000003
RD4 00000004
RD5 00000005
RD6 00000006
RD7 00000007
RE0 00000000
RE1 00000001
RE2 00000002
RE3 00000003
READ_WRITE 00000002
RP0 00000005
RP1 00000006
RSEN 00000001
RX9 00000006
RX9D 00000000
R_NOT_W 00000002
R_W 00000002
S 00000003
SBOREN 00000004
SCKP 00000004
SCS 00000000
SEN 00000000
SENDB 00000003
SMP 00000007
SPBRG 00000099
SPBRGH 0000009A
SPEN 00000007
SR0 00000006
SR1 00000007
SRCON 00000185
SREN 00000005
SSPADD 00000093
SSPBUF 00000013
SSPCON 00000014
SSPCON2 00000091
SSPEN 00000005
SSPIE 00000003
SSPIF 00000003
SSPM0 00000000
SSPM1 00000001
MPASM 5.40 MAIN.ASM 6-11-2017 16:00:38 PAGE 9
SYMBOL TABLE
LABEL VALUE
SSPM2 00000002
SSPM3 00000003
SSPMSK 00000093
SSPOV 00000006
SSPSTAT 00000094
STATUS 00000003
STRA 00000000
STRB 00000001
STRC 00000002
STRD 00000003
STRSYNC 00000004
SWDTEN 00000000
SYNC 00000004
T0CS 00000005
T0IE 00000005
T0IF 00000002
T0SE 00000004
T1CKPS0 00000004
T1CKPS1 00000005
T1CON 00000010
T1GINV 00000007
T1GIV 00000007
T1GSS 00000001
T1INSYNC 00000002
T1OSCEN 00000003
T1SYNC 00000002
T2CKPS0 00000000
T2CKPS1 00000001
T2CON 00000012
TMR0 00000001
TMR0IE 00000005
TMR0IF 00000002
TMR1CS 00000001
TMR1GE 00000006
TMR1H 0000000F
TMR1IE 00000000
TMR1IF 00000000
TMR1L 0000000E
TMR1ON 00000000
TMR2 00000011
TMR2IE 00000001
TMR2IF 00000001
TMR2ON 00000002
TOUTPS0 00000003
TOUTPS1 00000004
TOUTPS2 00000005
TOUTPS3 00000006
TRISA 00000085
TRISA0 00000000
TRISA1 00000001
TRISA2 00000002
TRISA3 00000003
TRISA4 00000004
MPASM 5.40 MAIN.ASM 6-11-2017 16:00:38 PAGE 10
SYMBOL TABLE
LABEL VALUE
TRISA5 00000005
TRISA6 00000006
TRISA7 00000007
TRISB 00000086
TRISB0 00000000
TRISB1 00000001
TRISB2 00000002
TRISB3 00000003
TRISB4 00000004
TRISB5 00000005
TRISB6 00000006
TRISB7 00000007
TRISC 00000087
TRISC0 00000000
TRISC1 00000001
TRISC2 00000002
TRISC3 00000003
TRISC4 00000004
TRISC5 00000005
TRISC6 00000006
TRISC7 00000007
TRISD 00000088
TRISD0 00000000
TRISD1 00000001
TRISD2 00000002
TRISD3 00000003
TRISD4 00000004
TRISD5 00000005
TRISD6 00000006
TRISD7 00000007
TRISE 00000089
TRISE0 00000000
TRISE1 00000001
TRISE2 00000002
TRISE3 00000003
TRMT 00000001
TUN0 00000000
TUN1 00000001
TUN2 00000002
TUN3 00000003
TUN4 00000004
TX8_9 00000006
TX9 00000006
TX9D 00000000
TXD8 00000000
TXEN 00000005
TXIE 00000004
TXIF 00000004
TXREG 00000019
TXSTA 00000098
UA 00000001
ULPWUE 00000005
ULPWUIE 00000002
MPASM 5.40 MAIN.ASM 6-11-2017 16:00:38 PAGE 11
SYMBOL TABLE
LABEL VALUE
ULPWUIF 00000002
VCFG0 00000004
VCFG1 00000005
VR0 00000000
VR1 00000001
VR2 00000002
VR3 00000003
VRCON 00000097
VREN 00000007
VROE 00000006
VRR 00000005
VRSS 00000004
W 00000000
WCOL 00000007
WDTCON 00000105
WDTPS0 00000001
WDTPS1 00000002
WDTPS2 00000003
WDTPS3 00000004
WPUB 00000095
WPUB0 00000000
WPUB1 00000001
WPUB2 00000002
WPUB3 00000003
WPUB4 00000004
WPUB5 00000005
WPUB6 00000006
WPUB7 00000007
WR 00000001
WREN 00000002
WRERR 00000003
WUE 00000001
Z 00000002
_BOR21V 00003EFF
_BOR40V 00003FFF
_BOR_NSLEEP 00003EFF
_BOR_OFF 00003CFF
_BOR_ON 00003FFF
_BOR_SBODEN 00003DFF
_CONFIG1 00002007
_CONFIG2 00002008
_CPD_OFF 00003FFF
_CPD_ON 00003F7F
_CP_OFF 00003FFF
_CP_ON 00003FBF
_DEBUG_OFF 00003FFF
_DEBUG_ON 00001FFF
_DEVID1 00002006
_EC_OSC 00003FFB
_EXTRC 00003FFF
_EXTRCIO 00003FFE
_EXTRC_OSC_CLKOUT 00003FFF
_EXTRC_OSC_NOCLKOUT 00003FFE
MPASM 5.40 MAIN.ASM 6-11-2017 16:00:38 PAGE 12
SYMBOL TABLE
LABEL VALUE
_FCMEN_OFF 000037FF
_FCMEN_ON 00003FFF
_HS_OSC 00003FFA
_IDLOC0 00002000
_IDLOC1 00002001
_IDLOC2 00002002
_IDLOC3 00002003
_IESO_OFF 00003BFF
_IESO_ON 00003FFF
_INTOSC 00003FFD
_INTOSCIO 00003FFC
_INTRC_OSC_CLKOUT 00003FFD
_INTRC_OSC_NOCLKOUT 00003FFC
_LP_OSC 00003FF8
_LVP_OFF 00002FFF
_LVP_ON 00003FFF
_MCLRE_OFF 00003FDF
_MCLRE_ON 00003FFF
_PWRTE_OFF 00003FFF
_PWRTE_ON 00003FEF
_WDT_OFF 00003FF7
_WDT_ON 00003FFF
_WRT_1FOURTH 00003BFF
_WRT_256 00003DFF
_WRT_HALF 000039FF
_WRT_OFF 00003FFF
_XT_OSC 00003FF9
__16F887 00000001
count 00000020
count10 00000023
del1 00000021
del2 00000022
delay 0000002C
delay50ms 0000003A
display 0000001F
endword 00000036
isr 0000003E
loop 00000014
loop1 0000002E
loop2 00000030
main 00000005
MPASM 5.40 MAIN.ASM 6-11-2017 16:00:38 PAGE 13
MEMORY USAGE MAP ('X' = Used, '-' = Unused)
0000 : X---XXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
All other memory blocks unused.
Program Memory Words Used: 61
Program Memory Words Free: 8131
Errors : 0
Warnings : 0 reported, 0 suppressed
Messages : 5 reported, 0 suppressed