This repository has been archived by the owner on Mar 9, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mag_phase_EFM8.lst
3288 lines (3288 loc) · 189 KB
/
mag_phase_EFM8.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
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
0000 1 ;--------------------------------------------------------
0000 2 ; File Created by C51
0000 3 ; Version 1.0.0 #1069 (Apr 23 2015) (MSVC)
0000 4 ; This file was generated Thu Mar 08 14:42:59 2018
0000 5 ;--------------------------------------------------------
5 $name mag_phase_EFM8
6 $optc51 --model-small
7 $printf_float
0000 9 R_DSEG segment data
0000 10 R_CSEG segment code
0000 11 R_BSEG segment bit
0000 12 R_XSEG segment xdata
0000 13 R_PSEG segment xdata
0000 14 R_ISEG segment idata
0000 15 R_OSEG segment data overlay
0000 16 BIT_BANK segment data overlay
0000 17 R_HOME segment code
0000 18 R_GSINIT segment code
0000 19 R_IXSEG segment xdata
0000 20 R_CONST segment code
0000 21 R_XINIT segment code
0000 22 R_DINIT segment code
0000 23
0000 24 ;--------------------------------------------------------
0000 25 ; Public variables in this module
0000 26 ;--------------------------------------------------------
0000 27 public _InitPinADC_PARM_2
0000 28 public _main
0000 29 public _get_max
0000 30 public _TIMER0_Init
0000 31 public _Get_Phase_diff
0000 32 public _Get_test_peak
0000 33 public _Get_ref_peak
0000 34 public _Get_Period_test
0000 35 public _Get_Period_ref
0000 36 public _InitADC
0000 37 public _Volts_at_Pin
0000 38 public _ADC_at_Pin
0000 39 public _InitPinADC
0000 40 public _getsn
0000 41 public _LCDprint_inv
0000 42 public _LCDprint
0000 43 public _LCD_4BIT
0000 44 public _WriteCommand
0000 45 public _WriteData
0000 46 public _LCD_byte
0000 47 public _LCD_pulse
0000 48 public _waitms
0000 49 public _Timer3us
0000 50 public __c51_external_startup
0000 51 public _LCDprint_inv_PARM_3
0000 52 public _LCDprint_PARM_3
0000 53 public _get_max_PARM_2
0000 54 public _getsn_PARM_2
0000 55 public _LCDprint_inv_PARM_2
0000 56 public _LCDprint_PARM_2
0000 57 public _overflow_count
0000 58 ;--------------------------------------------------------
0000 59 ; Special Function Registers
0000 60 ;--------------------------------------------------------
0000 61 _ACC DATA 0xe0
0000 62 _ADC0ASAH DATA 0xb6
0000 63 _ADC0ASAL DATA 0xb5
0000 64 _ADC0ASCF DATA 0xa1
0000 65 _ADC0ASCT DATA 0xc7
0000 66 _ADC0CF0 DATA 0xbc
0000 67 _ADC0CF1 DATA 0xb9
0000 68 _ADC0CF2 DATA 0xdf
0000 69 _ADC0CN0 DATA 0xe8
0000 70 _ADC0CN1 DATA 0xb2
0000 71 _ADC0CN2 DATA 0xb3
0000 72 _ADC0GTH DATA 0xc4
0000 73 _ADC0GTL DATA 0xc3
0000 74 _ADC0H DATA 0xbe
0000 75 _ADC0L DATA 0xbd
0000 76 _ADC0LTH DATA 0xc6
0000 77 _ADC0LTL DATA 0xc5
0000 78 _ADC0MX DATA 0xbb
0000 79 _B DATA 0xf0
0000 80 _CKCON0 DATA 0x8e
0000 81 _CKCON1 DATA 0xa6
0000 82 _CLEN0 DATA 0xc6
0000 83 _CLIE0 DATA 0xc7
0000 84 _CLIF0 DATA 0xe8
0000 85 _CLKSEL DATA 0xa9
0000 86 _CLOUT0 DATA 0xd1
0000 87 _CLU0CF DATA 0xb1
0000 88 _CLU0FN DATA 0xaf
0000 89 _CLU0MX DATA 0x84
0000 90 _CLU1CF DATA 0xb3
0000 91 _CLU1FN DATA 0xb2
0000 92 _CLU1MX DATA 0x85
0000 93 _CLU2CF DATA 0xb6
0000 94 _CLU2FN DATA 0xb5
0000 95 _CLU2MX DATA 0x91
0000 96 _CLU3CF DATA 0xbf
0000 97 _CLU3FN DATA 0xbe
0000 98 _CLU3MX DATA 0xae
0000 99 _CMP0CN0 DATA 0x9b
0000 100 _CMP0CN1 DATA 0x99
0000 101 _CMP0MD DATA 0x9d
0000 102 _CMP0MX DATA 0x9f
0000 103 _CMP1CN0 DATA 0xbf
0000 104 _CMP1CN1 DATA 0xac
0000 105 _CMP1MD DATA 0xab
0000 106 _CMP1MX DATA 0xaa
0000 107 _CRC0CN0 DATA 0xce
0000 108 _CRC0CN1 DATA 0x86
0000 109 _CRC0CNT DATA 0xd3
0000 110 _CRC0DAT DATA 0xcb
0000 111 _CRC0FLIP DATA 0xcf
0000 112 _CRC0IN DATA 0xca
0000 113 _CRC0ST DATA 0xd2
0000 114 _DAC0CF0 DATA 0x91
0000 115 _DAC0CF1 DATA 0x92
0000 116 _DAC0H DATA 0x85
0000 117 _DAC0L DATA 0x84
0000 118 _DAC1CF0 DATA 0x93
0000 119 _DAC1CF1 DATA 0x94
0000 120 _DAC1H DATA 0x8a
0000 121 _DAC1L DATA 0x89
0000 122 _DAC2CF0 DATA 0x95
0000 123 _DAC2CF1 DATA 0x96
0000 124 _DAC2H DATA 0x8c
0000 125 _DAC2L DATA 0x8b
0000 126 _DAC3CF0 DATA 0x9a
0000 127 _DAC3CF1 DATA 0x9c
0000 128 _DAC3H DATA 0x8e
0000 129 _DAC3L DATA 0x8d
0000 130 _DACGCF0 DATA 0x88
0000 131 _DACGCF1 DATA 0x98
0000 132 _DACGCF2 DATA 0xa2
0000 133 _DERIVID DATA 0xad
0000 134 _DEVICEID DATA 0xb5
0000 135 _DPH DATA 0x83
0000 136 _DPL DATA 0x82
0000 137 _EIE1 DATA 0xe6
0000 138 _EIE2 DATA 0xf3
0000 139 _EIP1 DATA 0xbb
0000 140 _EIP1H DATA 0xee
0000 141 _EIP2 DATA 0xed
0000 142 _EIP2H DATA 0xf6
0000 143 _EMI0CN DATA 0xe7
0000 144 _FLKEY DATA 0xb7
0000 145 _HFO0CAL DATA 0xc7
0000 146 _HFO1CAL DATA 0xd6
0000 147 _HFOCN DATA 0xef
0000 148 _I2C0ADM DATA 0xff
0000 149 _I2C0CN0 DATA 0xba
0000 150 _I2C0DIN DATA 0xbc
0000 151 _I2C0DOUT DATA 0xbb
0000 152 _I2C0FCN0 DATA 0xad
0000 153 _I2C0FCN1 DATA 0xab
0000 154 _I2C0FCT DATA 0xf5
0000 155 _I2C0SLAD DATA 0xbd
0000 156 _I2C0STAT DATA 0xb9
0000 157 _IE DATA 0xa8
0000 158 _IP DATA 0xb8
0000 159 _IPH DATA 0xf2
0000 160 _IT01CF DATA 0xe4
0000 161 _LFO0CN DATA 0xb1
0000 162 _P0 DATA 0x80
0000 163 _P0MASK DATA 0xfe
0000 164 _P0MAT DATA 0xfd
0000 165 _P0MDIN DATA 0xf1
0000 166 _P0MDOUT DATA 0xa4
0000 167 _P0SKIP DATA 0xd4
0000 168 _P1 DATA 0x90
0000 169 _P1MASK DATA 0xee
0000 170 _P1MAT DATA 0xed
0000 171 _P1MDIN DATA 0xf2
0000 172 _P1MDOUT DATA 0xa5
0000 173 _P1SKIP DATA 0xd5
0000 174 _P2 DATA 0xa0
0000 175 _P2MASK DATA 0xfc
0000 176 _P2MAT DATA 0xfb
0000 177 _P2MDIN DATA 0xf3
0000 178 _P2MDOUT DATA 0xa6
0000 179 _P2SKIP DATA 0xcc
0000 180 _P3 DATA 0xb0
0000 181 _P3MDIN DATA 0xf4
0000 182 _P3MDOUT DATA 0x9c
0000 183 _PCA0CENT DATA 0x9e
0000 184 _PCA0CLR DATA 0x9c
0000 185 _PCA0CN0 DATA 0xd8
0000 186 _PCA0CPH0 DATA 0xfc
0000 187 _PCA0CPH1 DATA 0xea
0000 188 _PCA0CPH2 DATA 0xec
0000 189 _PCA0CPH3 DATA 0xf5
0000 190 _PCA0CPH4 DATA 0x85
0000 191 _PCA0CPH5 DATA 0xde
0000 192 _PCA0CPL0 DATA 0xfb
0000 193 _PCA0CPL1 DATA 0xe9
0000 194 _PCA0CPL2 DATA 0xeb
0000 195 _PCA0CPL3 DATA 0xf4
0000 196 _PCA0CPL4 DATA 0x84
0000 197 _PCA0CPL5 DATA 0xdd
0000 198 _PCA0CPM0 DATA 0xda
0000 199 _PCA0CPM1 DATA 0xdb
0000 200 _PCA0CPM2 DATA 0xdc
0000 201 _PCA0CPM3 DATA 0xae
0000 202 _PCA0CPM4 DATA 0xaf
0000 203 _PCA0CPM5 DATA 0xcc
0000 204 _PCA0H DATA 0xfa
0000 205 _PCA0L DATA 0xf9
0000 206 _PCA0MD DATA 0xd9
0000 207 _PCA0POL DATA 0x96
0000 208 _PCA0PWM DATA 0xf7
0000 209 _PCON0 DATA 0x87
0000 210 _PCON1 DATA 0xcd
0000 211 _PFE0CN DATA 0xc1
0000 212 _PRTDRV DATA 0xf6
0000 213 _PSCTL DATA 0x8f
0000 214 _PSTAT0 DATA 0xaa
0000 215 _PSW DATA 0xd0
0000 216 _REF0CN DATA 0xd1
0000 217 _REG0CN DATA 0xc9
0000 218 _REVID DATA 0xb6
0000 219 _RSTSRC DATA 0xef
0000 220 _SBCON1 DATA 0x94
0000 221 _SBRLH1 DATA 0x96
0000 222 _SBRLL1 DATA 0x95
0000 223 _SBUF DATA 0x99
0000 224 _SBUF0 DATA 0x99
0000 225 _SBUF1 DATA 0x92
0000 226 _SCON DATA 0x98
0000 227 _SCON0 DATA 0x98
0000 228 _SCON1 DATA 0xc8
0000 229 _SFRPAGE DATA 0xa7
0000 230 _SFRPGCN DATA 0xbc
0000 231 _SFRSTACK DATA 0xd7
0000 232 _SMB0ADM DATA 0xd6
0000 233 _SMB0ADR DATA 0xd7
0000 234 _SMB0CF DATA 0xc1
0000 235 _SMB0CN0 DATA 0xc0
0000 236 _SMB0DAT DATA 0xc2
0000 237 _SMB0FCN0 DATA 0xc3
0000 238 _SMB0FCN1 DATA 0xc4
0000 239 _SMB0FCT DATA 0xef
0000 240 _SMB0RXLN DATA 0xc5
0000 241 _SMB0TC DATA 0xac
0000 242 _SMOD1 DATA 0x93
0000 243 _SP DATA 0x81
0000 244 _SPI0CFG DATA 0xa1
0000 245 _SPI0CKR DATA 0xa2
0000 246 _SPI0CN0 DATA 0xf8
0000 247 _SPI0DAT DATA 0xa3
0000 248 _SPI0FCN0 DATA 0x9a
0000 249 _SPI0FCN1 DATA 0x9b
0000 250 _SPI0FCT DATA 0xf7
0000 251 _SPI0PCF DATA 0xdf
0000 252 _TCON DATA 0x88
0000 253 _TH0 DATA 0x8c
0000 254 _TH1 DATA 0x8d
0000 255 _TL0 DATA 0x8a
0000 256 _TL1 DATA 0x8b
0000 257 _TMOD DATA 0x89
0000 258 _TMR2CN0 DATA 0xc8
0000 259 _TMR2CN1 DATA 0xfd
0000 260 _TMR2H DATA 0xcf
0000 261 _TMR2L DATA 0xce
0000 262 _TMR2RLH DATA 0xcb
0000 263 _TMR2RLL DATA 0xca
0000 264 _TMR3CN0 DATA 0x91
0000 265 _TMR3CN1 DATA 0xfe
0000 266 _TMR3H DATA 0x95
0000 267 _TMR3L DATA 0x94
0000 268 _TMR3RLH DATA 0x93
0000 269 _TMR3RLL DATA 0x92
0000 270 _TMR4CN0 DATA 0x98
0000 271 _TMR4CN1 DATA 0xff
0000 272 _TMR4H DATA 0xa5
0000 273 _TMR4L DATA 0xa4
0000 274 _TMR4RLH DATA 0xa3
0000 275 _TMR4RLL DATA 0xa2
0000 276 _TMR5CN0 DATA 0xc0
0000 277 _TMR5CN1 DATA 0xf1
0000 278 _TMR5H DATA 0xd5
0000 279 _TMR5L DATA 0xd4
0000 280 _TMR5RLH DATA 0xd3
0000 281 _TMR5RLL DATA 0xd2
0000 282 _UART0PCF DATA 0xd9
0000 283 _UART1FCN0 DATA 0x9d
0000 284 _UART1FCN1 DATA 0xd8
0000 285 _UART1FCT DATA 0xfa
0000 286 _UART1LIN DATA 0x9e
0000 287 _UART1PCF DATA 0xda
0000 288 _VDM0CN DATA 0xff
0000 289 _WDTCN DATA 0x97
0000 290 _XBR0 DATA 0xe1
0000 291 _XBR1 DATA 0xe2
0000 292 _XBR2 DATA 0xe3
0000 293 _XOSC0CN DATA 0x86
0000 294 _DPTR DATA 0x8382
0000 295 _TMR2RL DATA 0xcbca
0000 296 _TMR3RL DATA 0x9392
0000 297 _TMR4RL DATA 0xa3a2
0000 298 _TMR5RL DATA 0xd3d2
0000 299 _TMR0 DATA 0x8c8a
0000 300 _TMR1 DATA 0x8d8b
0000 301 _TMR2 DATA 0xcfce
0000 302 _TMR3 DATA 0x9594
0000 303 _TMR4 DATA 0xa5a4
0000 304 _TMR5 DATA 0xd5d4
0000 305 _SBRL1 DATA 0x9695
0000 306 _PCA0 DATA 0xfaf9
0000 307 _PCA0CP0 DATA 0xfcfb
0000 308 _PCA0CP1 DATA 0xeae9
0000 309 _PCA0CP2 DATA 0xeceb
0000 310 _PCA0CP3 DATA 0xf5f4
0000 311 _PCA0CP4 DATA 0x8584
0000 312 _PCA0CP5 DATA 0xdedd
0000 313 _ADC0ASA DATA 0xb6b5
0000 314 _ADC0GT DATA 0xc4c3
0000 315 _ADC0 DATA 0xbebd
0000 316 _ADC0LT DATA 0xc6c5
0000 317 _DAC0 DATA 0x8584
0000 318 _DAC1 DATA 0x8a89
0000 319 _DAC2 DATA 0x8c8b
0000 320 _DAC3 DATA 0x8e8d
0000 321 ;--------------------------------------------------------
0000 322 ; special function bits
0000 323 ;--------------------------------------------------------
0000 324 _ACC_0 BIT 0xe0
0000 325 _ACC_1 BIT 0xe1
0000 326 _ACC_2 BIT 0xe2
0000 327 _ACC_3 BIT 0xe3
0000 328 _ACC_4 BIT 0xe4
0000 329 _ACC_5 BIT 0xe5
0000 330 _ACC_6 BIT 0xe6
0000 331 _ACC_7 BIT 0xe7
0000 332 _TEMPE BIT 0xe8
0000 333 _ADGN0 BIT 0xe9
0000 334 _ADGN1 BIT 0xea
0000 335 _ADWINT BIT 0xeb
0000 336 _ADBUSY BIT 0xec
0000 337 _ADINT BIT 0xed
0000 338 _IPOEN BIT 0xee
0000 339 _ADEN BIT 0xef
0000 340 _B_0 BIT 0xf0
0000 341 _B_1 BIT 0xf1
0000 342 _B_2 BIT 0xf2
0000 343 _B_3 BIT 0xf3
0000 344 _B_4 BIT 0xf4
0000 345 _B_5 BIT 0xf5
0000 346 _B_6 BIT 0xf6
0000 347 _B_7 BIT 0xf7
0000 348 _C0FIF BIT 0xe8
0000 349 _C0RIF BIT 0xe9
0000 350 _C1FIF BIT 0xea
0000 351 _C1RIF BIT 0xeb
0000 352 _C2FIF BIT 0xec
0000 353 _C2RIF BIT 0xed
0000 354 _C3FIF BIT 0xee
0000 355 _C3RIF BIT 0xef
0000 356 _D1SRC0 BIT 0x88
0000 357 _D1SRC1 BIT 0x89
0000 358 _D1AMEN BIT 0x8a
0000 359 _D01REFSL BIT 0x8b
0000 360 _D3SRC0 BIT 0x8c
0000 361 _D3SRC1 BIT 0x8d
0000 362 _D3AMEN BIT 0x8e
0000 363 _D23REFSL BIT 0x8f
0000 364 _D0UDIS BIT 0x98
0000 365 _D1UDIS BIT 0x99
0000 366 _D2UDIS BIT 0x9a
0000 367 _D3UDIS BIT 0x9b
0000 368 _EX0 BIT 0xa8
0000 369 _ET0 BIT 0xa9
0000 370 _EX1 BIT 0xaa
0000 371 _ET1 BIT 0xab
0000 372 _ES0 BIT 0xac
0000 373 _ET2 BIT 0xad
0000 374 _ESPI0 BIT 0xae
0000 375 _EA BIT 0xaf
0000 376 _PX0 BIT 0xb8
0000 377 _PT0 BIT 0xb9
0000 378 _PX1 BIT 0xba
0000 379 _PT1 BIT 0xbb
0000 380 _PS0 BIT 0xbc
0000 381 _PT2 BIT 0xbd
0000 382 _PSPI0 BIT 0xbe
0000 383 _P0_0 BIT 0x80
0000 384 _P0_1 BIT 0x81
0000 385 _P0_2 BIT 0x82
0000 386 _P0_3 BIT 0x83
0000 387 _P0_4 BIT 0x84
0000 388 _P0_5 BIT 0x85
0000 389 _P0_6 BIT 0x86
0000 390 _P0_7 BIT 0x87
0000 391 _P1_0 BIT 0x90
0000 392 _P1_1 BIT 0x91
0000 393 _P1_2 BIT 0x92
0000 394 _P1_3 BIT 0x93
0000 395 _P1_4 BIT 0x94
0000 396 _P1_5 BIT 0x95
0000 397 _P1_6 BIT 0x96
0000 398 _P1_7 BIT 0x97
0000 399 _P2_0 BIT 0xa0
0000 400 _P2_1 BIT 0xa1
0000 401 _P2_2 BIT 0xa2
0000 402 _P2_3 BIT 0xa3
0000 403 _P2_4 BIT 0xa4
0000 404 _P2_5 BIT 0xa5
0000 405 _P2_6 BIT 0xa6
0000 406 _P3_0 BIT 0xb0
0000 407 _P3_1 BIT 0xb1
0000 408 _P3_2 BIT 0xb2
0000 409 _P3_3 BIT 0xb3
0000 410 _P3_4 BIT 0xb4
0000 411 _P3_7 BIT 0xb7
0000 412 _CCF0 BIT 0xd8
0000 413 _CCF1 BIT 0xd9
0000 414 _CCF2 BIT 0xda
0000 415 _CCF3 BIT 0xdb
0000 416 _CCF4 BIT 0xdc
0000 417 _CCF5 BIT 0xdd
0000 418 _CR BIT 0xde
0000 419 _CF BIT 0xdf
0000 420 _PARITY BIT 0xd0
0000 421 _F1 BIT 0xd1
0000 422 _OV BIT 0xd2
0000 423 _RS0 BIT 0xd3
0000 424 _RS1 BIT 0xd4
0000 425 _F0 BIT 0xd5
0000 426 _AC BIT 0xd6
0000 427 _CY BIT 0xd7
0000 428 _RI BIT 0x98
0000 429 _TI BIT 0x99
0000 430 _RB8 BIT 0x9a
0000 431 _TB8 BIT 0x9b
0000 432 _REN BIT 0x9c
0000 433 _CE BIT 0x9d
0000 434 _SMODE BIT 0x9e
0000 435 _RI1 BIT 0xc8
0000 436 _TI1 BIT 0xc9
0000 437 _RBX1 BIT 0xca
0000 438 _TBX1 BIT 0xcb
0000 439 _REN1 BIT 0xcc
0000 440 _PERR1 BIT 0xcd
0000 441 _OVR1 BIT 0xce
0000 442 _SI BIT 0xc0
0000 443 _ACK BIT 0xc1
0000 444 _ARBLOST BIT 0xc2
0000 445 _ACKRQ BIT 0xc3
0000 446 _STO BIT 0xc4
0000 447 _STA BIT 0xc5
0000 448 _TXMODE BIT 0xc6
0000 449 _MASTER BIT 0xc7
0000 450 _SPIEN BIT 0xf8
0000 451 _TXNF BIT 0xf9
0000 452 _NSSMD0 BIT 0xfa
0000 453 _NSSMD1 BIT 0xfb
0000 454 _RXOVRN BIT 0xfc
0000 455 _MODF BIT 0xfd
0000 456 _WCOL BIT 0xfe
0000 457 _SPIF BIT 0xff
0000 458 _IT0 BIT 0x88
0000 459 _IE0 BIT 0x89
0000 460 _IT1 BIT 0x8a
0000 461 _IE1 BIT 0x8b
0000 462 _TR0 BIT 0x8c
0000 463 _TF0 BIT 0x8d
0000 464 _TR1 BIT 0x8e
0000 465 _TF1 BIT 0x8f
0000 466 _T2XCLK0 BIT 0xc8
0000 467 _T2XCLK1 BIT 0xc9
0000 468 _TR2 BIT 0xca
0000 469 _T2SPLIT BIT 0xcb
0000 470 _TF2CEN BIT 0xcc
0000 471 _TF2LEN BIT 0xcd
0000 472 _TF2L BIT 0xce
0000 473 _TF2H BIT 0xcf
0000 474 _T4XCLK0 BIT 0x98
0000 475 _T4XCLK1 BIT 0x99
0000 476 _TR4 BIT 0x9a
0000 477 _T4SPLIT BIT 0x9b
0000 478 _TF4CEN BIT 0x9c
0000 479 _TF4LEN BIT 0x9d
0000 480 _TF4L BIT 0x9e
0000 481 _TF4H BIT 0x9f
0000 482 _T5XCLK0 BIT 0xc0
0000 483 _T5XCLK1 BIT 0xc1
0000 484 _TR5 BIT 0xc2
0000 485 _T5SPLIT BIT 0xc3
0000 486 _TF5CEN BIT 0xc4
0000 487 _TF5LEN BIT 0xc5
0000 488 _TF5L BIT 0xc6
0000 489 _TF5H BIT 0xc7
0000 490 _RIE BIT 0xd8
0000 491 _RXTO0 BIT 0xd9
0000 492 _RXTO1 BIT 0xda
0000 493 _RFRQ BIT 0xdb
0000 494 _TIE BIT 0xdc
0000 495 _TXHOLD BIT 0xdd
0000 496 _TXNF1 BIT 0xde
0000 497 _TFRQ BIT 0xdf
0000 498 ;--------------------------------------------------------
0000 499 ; overlayable register banks
0000 500 ;--------------------------------------------------------
0000 501 rbank0 segment data overlay
0000 502 ;--------------------------------------------------------
0000 503 ; internal ram data
0000 504 ;--------------------------------------------------------
0000 505 rseg R_DSEG
0000 506 _overflow_count:
0000 507 ds 4
0004 508 _LCDprint_PARM_2:
0004 509 ds 1
0005 510 _LCDprint_inv_PARM_2:
0005 511 ds 1
0006 512 _LCDprint_inv_length_1_43:
0006 513 ds 2
0008 514 _getsn_PARM_2:
0008 515 ds 2
000A 516 _getsn_buff_1_44:
000A 517 ds 3
000D 518 _getsn_sloc0_1_0:
000D 519 ds 2
000F 520 _Get_Phase_diff_period_1_76:
000F 521 ds 4
0013 522 _Get_Phase_diff_flag_1_77:
0013 523 ds 2
0015 524 _get_max_PARM_2:
0015 525 ds 2
0017 526 _get_max_array_1_90:
0017 527 ds 3
001A 528 _get_max_max_1_91:
001A 529 ds 4
001E 530 _main_Vrms_ref_1_95:
001E 531 ds 4
0022 532 _main_Vrms_test_1_95:
0022 533 ds 4
0026 534 _main_Period_ref_1_95:
0026 535 ds 4
002A 536 _main_Period_test_1_95:
002A 537 ds 4
002E 538 _main_phase_diff_int_1_95:
002E 539 ds 2
0030 540 _main_phase_string_1_95:
0030 541 ds 3
0033 542 _main_Vrms_test_int_1_95:
0033 543 ds 2
0035 544 _main_Vrms_ref_int_1_95:
0035 545 ds 2
0037 546 _main_sloc0_1_0:
0037 547 ds 3
003A 548 ;--------------------------------------------------------
003A 549 ; overlayable items in internal ram
003A 550 ;--------------------------------------------------------
0000 551 rseg R_OSEG
0000 552 rseg R_OSEG
0000 553 _InitPinADC_PARM_2:
0000 554 ds 1
0001 555 rseg R_OSEG
0001 556 ;--------------------------------------------------------
0001 557 ; indirectly addressable internal ram data
0001 558 ;--------------------------------------------------------
0000 559 rseg R_ISEG
0000 560 ;--------------------------------------------------------
0000 561 ; absolute internal ram data
0000 562 ;--------------------------------------------------------
0000 563 DSEG
0000 564 ;--------------------------------------------------------
0000 565 ; bit data
0000 566 ;--------------------------------------------------------
0000 567 rseg R_BSEG
0000 568 _LCDprint_PARM_3:
0000 569 DBIT 1
0001 570 _LCDprint_inv_PARM_3:
0001 571 DBIT 1
0002 572 ;--------------------------------------------------------
0002 573 ; paged external ram data
0002 574 ;--------------------------------------------------------
0000 575 rseg R_PSEG
0000 576 ;--------------------------------------------------------
0000 577 ; external ram data
0000 578 ;--------------------------------------------------------
0000 579 rseg R_XSEG
0000 580 ;--------------------------------------------------------
0000 581 ; absolute external ram data
0000 582 ;--------------------------------------------------------
0000 583 XSEG
0000 584 ;--------------------------------------------------------
0000 585 ; external initialized ram data
0000 586 ;--------------------------------------------------------
0000 587 rseg R_IXSEG
0000 588 rseg R_HOME
0000 589 rseg R_GSINIT
0000 590 rseg R_CSEG
0000 591 ;--------------------------------------------------------
0000 592 ; Reset entry point and interrupt vectors
0000 593 ;--------------------------------------------------------
0000 594 CSEG at 0x0000
0000 020100 595 ljmp _crt0
0003 596 ;--------------------------------------------------------
0003 597 ; global & static initialisations
0003 598 ;--------------------------------------------------------
0000 599 rseg R_HOME
0000 600 rseg R_GSINIT
0000 601 rseg R_GSINIT
0000 602 ;--------------------------------------------------------
0000 603 ; data variables initialization
0000 604 ;--------------------------------------------------------
0000 605 rseg R_DINIT
0000 606 ; The linker places a 'ret' at the end of segment R_DINIT.
0000 607 ;--------------------------------------------------------
0000 608 ; code
0000 609 ;--------------------------------------------------------
0000 610 rseg R_CSEG
0000 611 ;------------------------------------------------------------
0000 612 ;Allocation info for local variables in function '_c51_external_startup'
0000 613 ;------------------------------------------------------------
0000 614 ;------------------------------------------------------------
0000 615 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:36: char _c51_external_startup (void)
0000 616 ; -----------------------------------------
0000 617 ; function _c51_external_startup
0000 618 ; -----------------------------------------
0000 619 __c51_external_startup:
0000 620 using 0
0000 621 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:39: SFRPAGE = 0x00;
0000 75A700 622 mov _SFRPAGE,#0x00
0003 623 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:40: WDTCN = 0xDE; //First key
0003 7597DE 624 mov _WDTCN,#0xDE
0006 625 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:41: WDTCN = 0xAD; //Second key
0006 7597AD 626 mov _WDTCN,#0xAD
0009 627 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:43: VDM0CN |= 0x80;
0009 43FF80 628 orl _VDM0CN,#0x80
000C 629 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:44: RSTSRC = 0x02;
000C 75EF02 630 mov _RSTSRC,#0x02
000F 631 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:51: SFRPAGE = 0x10;
000F 75A710 632 mov _SFRPAGE,#0x10
0012 633 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:52: PFE0CN = 0x20; // SYSCLK < 75 MHz.
0012 75C120 634 mov _PFE0CN,#0x20
0015 635 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:53: SFRPAGE = 0x00;
0015 75A700 636 mov _SFRPAGE,#0x00
0018 637 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:74: CLKSEL = 0x00;
0018 75A900 638 mov _CLKSEL,#0x00
001B 639 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:75: CLKSEL = 0x00;
001B 75A900 640 mov _CLKSEL,#0x00
001E 641 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:76: while ((CLKSEL & 0x80) == 0);
001E 642 L002001?:
001E E5A9 643 mov a,_CLKSEL
0020 30E7A0 644 jnb acc.7,L002001?
0023 645 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:77: CLKSEL = 0x03;
0023 75A903 646 mov _CLKSEL,#0x03
0026 647 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:78: CLKSEL = 0x03;
0026 75A903 648 mov _CLKSEL,#0x03
0029 649 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:79: while ((CLKSEL & 0x80) == 0);
0029 650 L002004?:
0029 E5A9 651 mov a,_CLKSEL
002B 30E720 652 jnb acc.7,L002004?
002E 653 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:84: P0MDOUT |= 0x10; // Enable UART0 TX as push-pull output
002E 43A410 654 orl _P0MDOUT,#0x10
0031 655 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:85: XBR0 = 0x01; // Enable UART0 on P0.4(TX) and P0.5(RX)
0031 75E101 656 mov _XBR0,#0x01
0034 657 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:86: XBR1 = 0X00;
0034 75E200 658 mov _XBR1,#0x00
0037 659 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:87: XBR2 = 0x40; // Enable crossbar and weak pull-ups
0037 75E340 660 mov _XBR2,#0x40
003A 661 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:93: SCON0 = 0x10;
003A 759810 662 mov _SCON0,#0x10
003D 663 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:94: CKCON0 |= 0b_0000_0000 ; // Timer 1 uses the system clock divided by 12.
003D 858E8E 664 mov _CKCON0,_CKCON0
0040 665 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:95: TH1 = 0x100-((SYSCLK/BAUDRATE)/(2L*12L));
0040 758DE6 666 mov _TH1,#0xE6
0043 667 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:96: TL1 = TH1; // Init Timer1
0043 858D8B 668 mov _TL1,_TH1
0046 669 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:97: TMOD &= ~0xf0; // TMOD: timer 1 in 8-bit auto-reload
0046 53890F 670 anl _TMOD,#0x0F
0049 671 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:98: TMOD |= 0x20;
0049 438920 672 orl _TMOD,#0x20
004C 673 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:99: TR1 = 1; // START Timer1
004C D28E 674 setb _TR1
004E 675 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:100: TI = 1; // Indicate TX0 ready
004E D299 676 setb _TI
0050 677 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:102: return 0;
0050 758200 678 mov dpl,#0x00
0053 22 679 ret
0054 680 ;------------------------------------------------------------
0054 681 ;Allocation info for local variables in function 'Timer3us'
0054 682 ;------------------------------------------------------------
0054 683 ;us Allocated to registers r2
0054 684 ;i Allocated to registers r3
0054 685 ;------------------------------------------------------------
0054 686 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:108: void Timer3us(unsigned char us)
0054 687 ; -----------------------------------------
0054 688 ; function Timer3us
0054 689 ; -----------------------------------------
0054 690 _Timer3us:
0054 AA82 691 mov r2,dpl
0056 692 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:113: CKCON0|=0b_0100_0000;
0056 438E40 693 orl _CKCON0,#0x40
0059 694 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:115: TMR3RL = (-(SYSCLK)/1000000L); // Set Timer3 to overflow in 1us.
0059 7592B8 695 mov _TMR3RL,#0xB8
005C 7593FF 696 mov (_TMR3RL >> 8),#0xFF
005F 697 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:116: TMR3 = TMR3RL; // Initialize Timer3 for first overflow
005F 859294 698 mov _TMR3,_TMR3RL
0062 859395 699 mov (_TMR3 >> 8),(_TMR3RL >> 8)
0065 700 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:118: TMR3CN0 = 0x04; // Sart Timer3 and clear overflow flag
0065 759104 701 mov _TMR3CN0,#0x04
0068 702 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:119: for (i = 0; i < us; i++) // Count <us> overflows
0068 7B00 703 mov r3,#0x00
006A 704 L003004?:
006A C3 705 clr c
006B EB 706 mov a,r3
006C 9A 707 subb a,r2
006D 5001 708 jnc L003007?
006F 709 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:121: while (!(TMR3CN0 & 0x80)); // Wait for overflow
006F 710 L003001?:
006F E591 711 mov a,_TMR3CN0
0071 30E720 712 jnb acc.7,L003001?
0074 713 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:122: TMR3CN0 &= ~(0x80); // Clear overflow indicator
0074 53917F 714 anl _TMR3CN0,#0x7F
0077 715 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:119: for (i = 0; i < us; i++) // Count <us> overflows
0077 0B 716 inc r3
0078 8001 717 sjmp L003004?
007A 718 L003007?:
007A 719 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:124: TMR3CN0 = 0 ; // Stop Timer3 and clear overflow flag
007A 759100 720 mov _TMR3CN0,#0x00
007D 22 721 ret
007E 722 ;------------------------------------------------------------
007E 723 ;Allocation info for local variables in function 'waitms'
007E 724 ;------------------------------------------------------------
007E 725 ;ms Allocated to registers r2 r3
007E 726 ;j Allocated to registers r4 r5
007E 727 ;k Allocated to registers r6
007E 728 ;------------------------------------------------------------
007E 729 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:127: void waitms (unsigned int ms)
007E 730 ; -----------------------------------------
007E 731 ; function waitms
007E 732 ; -----------------------------------------
007E 733 _waitms:
007E AA82 734 mov r2,dpl
0080 AB83 735 mov r3,dph
0082 736 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:131: for(j=0; j<ms; j++)
0082 7C00 737 mov r4,#0x00
0084 7D00 738 mov r5,#0x00
0086 739 L004005?:
0086 C3 740 clr c
0087 EC 741 mov a,r4
0088 9A 742 subb a,r2
0089 ED 743 mov a,r5
008A 9B 744 subb a,r3
008B 5001 745 jnc L004009?
008D 746 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:132: for (k=0; k<4; k++) Timer3us(250);
008D 7E00 747 mov r6,#0x00
008F 748 L004001?:
008F BE0468 749 cjne r6,#0x04,L004018?
0092 750 L004018?:
0092 5001 751 jnc L004007?
0094 7582FA 752 mov dpl,#0xFA
0097 C002 753 push ar2
0099 C003 754 push ar3
009B C004 755 push ar4
009D C005 756 push ar5
009F C006 757 push ar6
00A1 120100 758 lcall _Timer3us
00A4 D006 759 pop ar6
00A6 D005 760 pop ar5
00A8 D004 761 pop ar4
00AA D003 762 pop ar3
00AC D002 763 pop ar2
00AE 0E 764 inc r6
00AF 8001 765 sjmp L004001?
00B1 766 L004007?:
00B1 767 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:131: for(j=0; j<ms; j++)
00B1 0C 768 inc r4
00B2 BC00A0 769 cjne r4,#0x00,L004005?
00B5 0D 770 inc r5
00B6 8001 771 sjmp L004005?
00B8 772 L004009?:
00B8 22 773 ret
00B9 774 ;------------------------------------------------------------
00B9 775 ;Allocation info for local variables in function 'LCD_pulse'
00B9 776 ;------------------------------------------------------------
00B9 777 ;------------------------------------------------------------
00B9 778 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:135: void LCD_pulse (void)
00B9 779 ; -----------------------------------------
00B9 780 ; function LCD_pulse
00B9 781 ; -----------------------------------------
00B9 782 _LCD_pulse:
00B9 783 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:137: LCD_E=1;
00B9 D2A5 784 setb _P2_5
00BB 785 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:138: Timer3us(40);
00BB 758228 786 mov dpl,#0x28
00BE 120100 787 lcall _Timer3us
00C1 788 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:139: LCD_E=0;
00C1 C2A5 789 clr _P2_5
00C3 22 790 ret
00C4 791 ;------------------------------------------------------------
00C4 792 ;Allocation info for local variables in function 'LCD_byte'
00C4 793 ;------------------------------------------------------------
00C4 794 ;x Allocated to registers r2
00C4 795 ;------------------------------------------------------------
00C4 796 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:142: void LCD_byte (unsigned char x)
00C4 797 ; -----------------------------------------
00C4 798 ; function LCD_byte
00C4 799 ; -----------------------------------------
00C4 800 _LCD_byte:
00C4 AA82 801 mov r2,dpl
00C6 802 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:145: ACC=x; //Send high nible
00C6 8AE0 803 mov _ACC,r2
00C8 804 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:146: LCD_D7=ACC_7;
00C8 A2E7 805 mov c,_ACC_7
00CA 92A1 806 mov _P2_1,c
00CC 807 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:147: LCD_D6=ACC_6;
00CC A2E6 808 mov c,_ACC_6
00CE 92A2 809 mov _P2_2,c
00D0 810 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:148: LCD_D5=ACC_5;
00D0 A2E5 811 mov c,_ACC_5
00D2 92A3 812 mov _P2_3,c
00D4 813 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:149: LCD_D4=ACC_4;
00D4 A2E4 814 mov c,_ACC_4
00D6 92A4 815 mov _P2_4,c
00D8 816 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:150: LCD_pulse();
00D8 C002 817 push ar2
00DA 120100 818 lcall _LCD_pulse
00DD 819 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:151: Timer3us(40);
00DD 758228 820 mov dpl,#0x28
00E0 120100 821 lcall _Timer3us
00E3 D002 822 pop ar2
00E5 823 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:152: ACC=x; //Send low nible
00E5 8AE0 824 mov _ACC,r2
00E7 825 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:153: LCD_D7=ACC_3;
00E7 A2E3 826 mov c,_ACC_3
00E9 92A1 827 mov _P2_1,c
00EB 828 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:154: LCD_D6=ACC_2;
00EB A2E2 829 mov c,_ACC_2
00ED 92A2 830 mov _P2_2,c
00EF 831 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:155: LCD_D5=ACC_1;
00EF A2E1 832 mov c,_ACC_1
00F1 92A3 833 mov _P2_3,c
00F3 834 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:156: LCD_D4=ACC_0;
00F3 A2E0 835 mov c,_ACC_0
00F5 92A4 836 mov _P2_4,c
00F7 837 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:157: LCD_pulse();
00F7 020100 838 ljmp _LCD_pulse
00FA 839 ;------------------------------------------------------------
00FA 840 ;Allocation info for local variables in function 'WriteData'
00FA 841 ;------------------------------------------------------------
00FA 842 ;x Allocated to registers r2
00FA 843 ;------------------------------------------------------------
00FA 844 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:160: void WriteData (unsigned char x)
00FA 845 ; -----------------------------------------
00FA 846 ; function WriteData
00FA 847 ; -----------------------------------------
00FA 848 _WriteData:
00FA AA82 849 mov r2,dpl
00FC 850 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:162: LCD_RS=1;
00FC D2A6 851 setb _P2_6
00FE 852 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:163: LCD_byte(x);
00FE 8A82 853 mov dpl,r2
0100 120100 854 lcall _LCD_byte
0103 855 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:164: waitms(2);
0103 900002 856 mov dptr,#0x0002
0106 020100 857 ljmp _waitms
0109 858 ;------------------------------------------------------------
0109 859 ;Allocation info for local variables in function 'WriteCommand'
0109 860 ;------------------------------------------------------------
0109 861 ;x Allocated to registers r2
0109 862 ;------------------------------------------------------------
0109 863 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:167: void WriteCommand (unsigned char x)
0109 864 ; -----------------------------------------
0109 865 ; function WriteCommand
0109 866 ; -----------------------------------------
0109 867 _WriteCommand:
0109 AA82 868 mov r2,dpl
010B 869 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:169: LCD_RS=0;
010B C2A6 870 clr _P2_6
010D 871 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:170: LCD_byte(x);
010D 8A82 872 mov dpl,r2
010F 120100 873 lcall _LCD_byte
0112 874 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:171: waitms(5);
0112 900005 875 mov dptr,#0x0005
0115 020100 876 ljmp _waitms
0118 877 ;------------------------------------------------------------
0118 878 ;Allocation info for local variables in function 'LCD_4BIT'
0118 879 ;------------------------------------------------------------
0118 880 ;------------------------------------------------------------
0118 881 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:174: void LCD_4BIT (void)
0118 882 ; -----------------------------------------
0118 883 ; function LCD_4BIT
0118 884 ; -----------------------------------------
0118 885 _LCD_4BIT:
0118 886 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:176: LCD_E=0; // Resting state of LCD's enable is zero
0118 C2A5 887 clr _P2_5
011A 888 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:178: waitms(20);
011A 900014 889 mov dptr,#0x0014
011D 120100 890 lcall _waitms
0120 891 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:180: WriteCommand(0x33);
0120 758233 892 mov dpl,#0x33
0123 120100 893 lcall _WriteCommand
0126 894 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:181: WriteCommand(0x33);
0126 758233 895 mov dpl,#0x33
0129 120100 896 lcall _WriteCommand
012C 897 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:182: WriteCommand(0x32); // Change to 4-bit mode
012C 758232 898 mov dpl,#0x32
012F 120100 899 lcall _WriteCommand
0132 900 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:185: WriteCommand(0x28);
0132 758228 901 mov dpl,#0x28
0135 120100 902 lcall _WriteCommand
0138 903 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:186: WriteCommand(0x0c);
0138 75820C 904 mov dpl,#0x0C
013B 120100 905 lcall _WriteCommand
013E 906 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:187: WriteCommand(0x01); // Clear screen command (takes some time)
013E 758201 907 mov dpl,#0x01
0141 120100 908 lcall _WriteCommand
0144 909 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:188: waitms(20); // Wait for clear screen command to finsih.
0144 900014 910 mov dptr,#0x0014
0147 020100 911 ljmp _waitms
014A 912 ;------------------------------------------------------------
014A 913 ;Allocation info for local variables in function 'LCDprint'
014A 914 ;------------------------------------------------------------
014A 915 ;line Allocated with name '_LCDprint_PARM_2'
014A 916 ;string Allocated to registers r2 r3 r4
014A 917 ;j Allocated to registers r5 r6
014A 918 ;------------------------------------------------------------
014A 919 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:191: void LCDprint(char * string, unsigned char line, bit clear)
014A 920 ; -----------------------------------------
014A 921 ; function LCDprint
014A 922 ; -----------------------------------------
014A 923 _LCDprint:
014A AA82 924 mov r2,dpl
014C AB83 925 mov r3,dph
014E ACF0 926 mov r4,b
0150 927 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:195: WriteCommand(line==2?0xc0:0x80);
0150 7402 928 mov a,#0x02
0152 B5F028 929 cjne a,_LCDprint_PARM_2,L010013?
0155 7DC0 930 mov r5,#0xC0
0157 8001 931 sjmp L010014?
0159 932 L010013?:
0159 7D80 933 mov r5,#0x80
015B 934 L010014?:
015B 8D82 935 mov dpl,r5
015D C002 936 push ar2
015F C003 937 push ar3
0161 C004 938 push ar4
0163 120100 939 lcall _WriteCommand
0166 940 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:196: waitms(5);
0166 900005 941 mov dptr,#0x0005
0169 120100 942 lcall _waitms
016C D004 943 pop ar4
016E D003 944 pop ar3
0170 D002 945 pop ar2
0172 946 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:197: for(j=0; string[j]!=0; j++) WriteData(string[j]);// Write the message
0172 7D00 947 mov r5,#0x00
0174 7E00 948 mov r6,#0x00
0176 949 L010003?:
0176 ED 950 mov a,r5
0177 2A 951 add a,r2
0178 FF 952 mov r7,a
0179 EE 953 mov a,r6
017A 3B 954 addc a,r3
017B F8 955 mov r0,a
017C 8C01 956 mov ar1,r4
017E 8F82 957 mov dpl,r7
0180 8883 958 mov dph,r0
0182 89F0 959 mov b,r1
0184 120100 960 lcall __gptrget
0187 FF 961 mov r7,a
0188 6001 962 jz L010006?
018A 8F82 963 mov dpl,r7
018C C002 964 push ar2
018E C003 965 push ar3
0190 C004 966 push ar4
0192 C005 967 push ar5
0194 C006 968 push ar6
0196 120100 969 lcall _WriteData
0199 D006 970 pop ar6
019B D005 971 pop ar5
019D D004 972 pop ar4
019F D003 973 pop ar3
01A1 D002 974 pop ar2
01A3 0D 975 inc r5
01A4 BD00A8 976 cjne r5,#0x00,L010003?
01A7 0E 977 inc r6
01A8 8001 978 sjmp L010003?
01AA 979 L010006?:
01AA 980 ; C:\Users\carso\Documents\1. School\0. Spring 2018\Elec 292\lab5\mag_phase_EFM8.c:198: if(clear) for(; j<CHARS_PER_LINE; j++) WriteData(' '); // Clear the rest of the line
01AA 30D068 981 jnb _LCDprint_PARM_3,L010011?
01AD 8D02 982 mov ar2,r5
01AF 8E03 983 mov ar3,r6
01B1 984 L010007?:
01B1 C3 985 clr c
01B2 EA 986 mov a,r2
01B3 9410 987 subb a,#0x10
01B5 EB 988 mov a,r3
01B6 6480 989 xrl a,#0x80
01B8 9480 990 subb a,#0x80
01BA 5001 991 jnc L010011?
01BC 758220 992 mov dpl,#0x20
01BF C002 993 push ar2
01C1 C003 994 push ar3
01C3 120100 995 lcall _WriteData
01C6 D003 996 pop ar3
01C8 D002 997 pop ar2
01CA 0A 998 inc r2
01CB BA00A8 999 cjne r2,#0x00,L010007?
01CE 0B 1000 inc r3