-
Notifications
You must be signed in to change notification settings - Fork 5
/
12f675 MPPT.lst
993 lines (992 loc) · 36.1 KB
/
12f675 MPPT.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
; LST file generated by mikroListExporter - v.2.0
; Date/Time: 2022-01-14 ¿ÀÈÄ 9:44:36
;----------------------------------------------
;Address Opcode ASM
0x0000 0x28CA GOTO 202
_Interrupt:
0x0004 0x00DF MOVWF R15
0x0005 0x0E03 SWAPF STATUS, 0
0x0006 0x0183 CLRF STATUS
0x0007 0x00C2 MOVWF ___saveSTATUS
0x0008 0x080A MOVF PCLATH, 0
0x0009 0x00C1 MOVWF ___savePCLATH
0x000A 0x018A CLRF PCLATH
;12f675 MPPT.mpas,62 :: begin
;12f675 MPPT.mpas,63 :: if T0IF_bit=1 then begin
0x000B 0x1D0B BTFSS T0IF_bit, BitPos(T0IF_bit+0)
0x000C 0x281E GOTO L__Interrupt3
;12f675 MPPT.mpas,64 :: PWM_SIG:=not PWM_SIG;
0x000D 0x1283 BCF STATUS, 5
0x000E 0x3004 MOVLW 4
0x000F 0x0685 XORWF GP2_bit, 1
;12f675 MPPT.mpas,65 :: if PWM_SIG=0 then begin
0x0010 0x1905 BTFSC GP2_bit, BitPos(GP2_bit+0)
0x0011 0x281A GOTO L__Interrupt6
;12f675 MPPT.mpas,66 :: doADCRead:=1;
0x0012 0x3001 MOVLW 1
0x0013 0x00A7 MOVWF _doADCRead
;12f675 MPPT.mpas,68 :: ON_PWM:=VOLPWM;
0x0014 0x083B MOVF _VOLPWM, 0
0x0015 0x00BC MOVWF _ON_PWM
;12f675 MPPT.mpas,69 :: TMR0:=255-ON_PWM;
0x0016 0x083B MOVF _VOLPWM, 0
0x0017 0x3CFF SUBLW 255
0x0018 0x0081 MOVWF TMR0
;12f675 MPPT.mpas,70 :: end else begin
0x0019 0x281D GOTO L__Interrupt7
L__Interrupt6:
;12f675 MPPT.mpas,72 :: TMR0:=255-PWM_MAX+ON_PWM;
0x001A 0x083C MOVF _ON_PWM, 0
0x001B 0x3E05 ADDLW 5
0x001C 0x0081 MOVWF TMR0
;12f675 MPPT.mpas,73 :: end;
L__Interrupt7:
;12f675 MPPT.mpas,74 :: T0IF_bit:=0;
0x001D 0x110B BCF T0IF_bit, BitPos(T0IF_bit+0)
;12f675 MPPT.mpas,75 :: end;
L__Interrupt3:
0x001E 0x1283 BCF STATUS, 5
;12f675 MPPT.mpas,76 :: if T1IF_bit=1 then begin
0x001F 0x1C0C BTFSS T1IF_bit, BitPos(T1IF_bit+0)
0x0020 0x2829 GOTO L__Interrupt9
;12f675 MPPT.mpas,77 :: TMR1H:=TMR1H_LOAD;
0x0021 0x30F8 MOVLW 248
0x0022 0x008F MOVWF TMR1H
;12f675 MPPT.mpas,78 :: TMR1L:=TMR1L_LOAD;
0x0023 0x3030 MOVLW 48
0x0024 0x008E MOVWF TMR1L
;12f675 MPPT.mpas,79 :: T1IF_bit:=0;
0x0025 0x100C BCF T1IF_bit, BitPos(T1IF_bit+0)
;12f675 MPPT.mpas,80 :: Inc(TICK_1000);
0x0026 0x0ABE INCF _TICK_1000, 1
0x0027 0x1903 BTFSC STATUS, 2
0x0028 0x0ABF INCF _TICK_1000+1, 1
;12f675 MPPT.mpas,81 :: end;
L__Interrupt9:
;12f675 MPPT.mpas,82 :: end;
L_end_Interrupt:
L__Interrupt64:
0x0029 0x0841 MOVF ___savePCLATH, 0
0x002A 0x008A MOVWF PCLATH
0x002B 0x0E42 SWAPF ___saveSTATUS, 0
0x002C 0x0083 MOVWF STATUS
0x002D 0x0EDF SWAPF R15, 1
0x002E 0x0E5F SWAPF R15, 0
0x002F 0x0009 RETFIE
; end of _Interrupt
_Delay_22us:
;__Lib_Delays.mpas,39 :: begin
;__Lib_Delays.mpas,40 :: Delay_us(22);
0x0030 0x3007 MOVLW 7
0x0031 0x1283 BCF STATUS, 5
0x0032 0x00DD MOVWF R13
L__Delay_22us5:
0x0033 0x0BDD DECFSZ R13, 1
0x0034 0x2833 GOTO L__Delay_22us5
;__Lib_Delays.mpas,41 :: end;
L_end_Delay_22us:
0x0035 0x0008 RETURN
; end of _Delay_22us
_Delay_100ms:
;__Lib_Delays.mpas,79 :: begin
;__Lib_Delays.mpas,80 :: Delay_ms(100);
0x0036 0x3082 MOVLW 130
0x0037 0x1283 BCF STATUS, 5
0x0038 0x00DC MOVWF R12
0x0039 0x30DD MOVLW 221
0x003A 0x00DD MOVWF R13
L__Delay_100ms21:
0x003B 0x0BDD DECFSZ R13, 1
0x003C 0x283B GOTO L__Delay_100ms21
0x003D 0x0BDC DECFSZ R12, 1
0x003E 0x283B GOTO L__Delay_100ms21
0x003F 0x0000 NOP
0x0040 0x0000 NOP
;__Lib_Delays.mpas,81 :: end;
L_end_Delay_100ms:
0x0041 0x0008 RETURN
; end of _Delay_100ms
_ADC_Read:
;__Lib_ADC_A_E.mpas,84 ::
;__Lib_ADC_A_E.mpas,85 ::
0x0042 0x30C3 MOVLW 195
0x0043 0x1283 BCF STATUS, 5
0x0044 0x059F ANDWF ADCON0, 1
;__Lib_ADC_A_E.mpas,90 ::
0x0045 0x30F0 MOVLW 240
0x0046 0x059F ANDWF ADCON0, 1
;__Lib_ADC_A_E.mpas,91 ::
0x0047 0x30BF MOVLW 191
0x0048 0x059F ANDWF ADCON0, 1
;__Lib_ADC_A_E.mpas,92 ::
0x0049 0x30F0 MOVLW 240
0x004A 0x1683 BSF STATUS, 5
0x004B 0x049F IORWF ANSEL, 1
;__Lib_ADC_A_E.mpas,93 ::
0x004C 0x1283 BCF STATUS, 5
0x004D 0x179F BSF ADCON0, 7
;__Lib_ADC_A_E.mpas,94 ::
0x004E 0x0845 MOVF FARG_ADC_Read_channel, 0
0x004F 0x00D0 MOVWF R0
0x0050 0x0DD0 RLF R0, 1
0x0051 0x1050 BCF R0, 0
0x0052 0x0DD0 RLF R0, 1
0x0053 0x1050 BCF R0, 0
0x0054 0x0850 MOVF R0, 0
0x0055 0x049F IORWF ADCON0, 1
;__Lib_ADC_A_E.mpas,97 ::
0x0056 0x141F BSF ADCON0, 0
;__Lib_ADC_A_E.mpas,100 ::
0x0057 0x2030 CALL _Delay_22us
;__Lib_ADC_A_E.mpas,103 ::
0x0058 0x149F BSF ADCON0, 1
;__Lib_ADC_A_E.mpas,106 ::
L__ADC_Read10:
0x0059 0x1C9F BTFSS ADCON0, 1
0x005A 0x285D GOTO L__ADC_Read11
0x005B 0x0000 NOP
0x005C 0x2859 GOTO L__ADC_Read10
L__ADC_Read11:
;__Lib_ADC_A_E.mpas,109 ::
0x005D 0x101F BCF ADCON0, 0
;__Lib_ADC_A_E.mpas,112 ::
0x005E 0x081E MOVF ADRESH, 0
0x005F 0x00D1 MOVWF R0+1
0x0060 0x01D0 CLRF R0
0x0061 0x1683 BSF STATUS, 5
0x0062 0x081E MOVF ADRESL, 0
0x0063 0x0450 IORWF R0, 0
0x0064 0x00C6 MOVWF ADC_Read_local_result
0x0065 0x0851 MOVF R0+1, 0
0x0066 0x00C7 MOVWF ADC_Read_local_result+1
0x0067 0x3000 MOVLW 0
0x0068 0x04C7 IORWF ADC_Read_local_result+1, 1
;__Lib_ADC_A_E.mpas,114 ::
0x0069 0x0846 MOVF ADC_Read_local_result, 0
0x006A 0x00D0 MOVWF R0
0x006B 0x0847 MOVF ADC_Read_local_result+1, 0
0x006C 0x00D1 MOVWF R0+1
L_end_ADC_Read:
0x006D 0x0008 RETURN
; end of _ADC_Read
_Mul_32x32_U:
;__Lib_Math.mpas,1775 ::
;__Lib_Math.mpas,1789 ::
0x006E 0x1283 BCF STATUS, 5
;__Lib_Math.mpas,1790 ::
0x006F 0x1303 BCF STATUS, 6
;__Lib_Math.mpas,1791 ::
0x0070 0x3022 MOVLW 34
;__Lib_Math.mpas,1792 ::
0x0071 0x00DC MOVWF R12
;__Lib_Math.mpas,1793 ::
0x0072 0x01D8 CLRF R8
;__Lib_Math.mpas,1794 ::
0x0073 0x01D9 CLRF R9
;__Lib_Math.mpas,1795 ::
0x0074 0x01DA CLRF R10
;__Lib_Math.mpas,1796 ::
0x0075 0x01DB CLRF R11
;__Lib_Math.mpas,1798 ::
_NEXT:
;__Lib_Math.mpas,1802 ::
0x0076 0x03DC DECF R12, 1
;__Lib_Math.mpas,1803 ::
0x0077 0x1903 BTFSC STATUS, 2
;__Lib_Math.mpas,1804 ::
0x0078 0x28A4 GOTO _EXIT2
;__Lib_Math.mpas,1805 ::
0x0079 0x1003 BCF STATUS, 0
;__Lib_Math.mpas,1807 ::
_LOOP:
;__Lib_Math.mpas,1816 ::
0x007A 0x0CDB RRF R11, 1
;__Lib_Math.mpas,1817 ::
0x007B 0x0CDA RRF R10, 1
;__Lib_Math.mpas,1818 ::
0x007C 0x0CD9 RRF R9, 1
;__Lib_Math.mpas,1819 ::
0x007D 0x0CD8 RRF R8, 1
;__Lib_Math.mpas,1820 ::
0x007E 0x0CD3 RRF R3, 1
;__Lib_Math.mpas,1821 ::
0x007F 0x0CD2 RRF R2, 1
;__Lib_Math.mpas,1822 ::
0x0080 0x0CD1 RRF R1, 1
;__Lib_Math.mpas,1823 ::
0x0081 0x0CD0 RRF R0, 1
;__Lib_Math.mpas,1828 ::
0x0082 0x1C03 BTFSS STATUS, 0
;__Lib_Math.mpas,1829 ::
0x0083 0x2876 GOTO _NEXT
;__Lib_Math.mpas,1830 ::
0x0084 0x03DC DECF R12, 1
;__Lib_Math.mpas,1831 ::
0x0085 0x1903 BTFSC STATUS, 2
;__Lib_Math.mpas,1832 ::
0x0086 0x2896 GOTO _EXIT1
;__Lib_Math.mpas,1839 ::
0x0087 0x0854 MOVF R4, 0
;__Lib_Math.mpas,1840 ::
0x0088 0x07D8 ADDWF R8, 1
;__Lib_Math.mpas,1841 ::
0x0089 0x0855 MOVF R5, 0
;__Lib_Math.mpas,1842 ::
0x008A 0x1803 BTFSC STATUS, 0
;__Lib_Math.mpas,1843 ::
0x008B 0x0F55 INCFSZ R5, 0
;__Lib_Math.mpas,1844 ::
0x008C 0x07D9 ADDWF R9, 1
;__Lib_Math.mpas,1845 ::
0x008D 0x0856 MOVF R6, 0
;__Lib_Math.mpas,1846 ::
0x008E 0x1803 BTFSC STATUS, 0
;__Lib_Math.mpas,1847 ::
0x008F 0x0F56 INCFSZ R6, 0
;__Lib_Math.mpas,1848 ::
0x0090 0x07DA ADDWF R10, 1
;__Lib_Math.mpas,1849 ::
0x0091 0x0857 MOVF R7, 0
;__Lib_Math.mpas,1850 ::
0x0092 0x1803 BTFSC STATUS, 0
;__Lib_Math.mpas,1851 ::
0x0093 0x0F57 INCFSZ R7, 0
;__Lib_Math.mpas,1852 ::
0x0094 0x07DB ADDWF R11, 1
;__Lib_Math.mpas,1854 ::
0x0095 0x287A GOTO _LOOP
;__Lib_Math.mpas,1856 ::
_EXIT1:
;__Lib_Math.mpas,1861 ::
0x0096 0x0854 MOVF R4, 0
;__Lib_Math.mpas,1862 ::
0x0097 0x07D8 ADDWF R8, 1
;__Lib_Math.mpas,1863 ::
0x0098 0x0855 MOVF R5, 0
;__Lib_Math.mpas,1864 ::
0x0099 0x1803 BTFSC STATUS, 0
;__Lib_Math.mpas,1865 ::
0x009A 0x0F55 INCFSZ R5, 0
;__Lib_Math.mpas,1866 ::
0x009B 0x07D9 ADDWF R9, 1
;__Lib_Math.mpas,1867 ::
0x009C 0x0856 MOVF R6, 0
;__Lib_Math.mpas,1868 ::
0x009D 0x1803 BTFSC STATUS, 0
;__Lib_Math.mpas,1869 ::
0x009E 0x0F56 INCFSZ R6, 0
;__Lib_Math.mpas,1870 ::
0x009F 0x07DA ADDWF R10, 1
;__Lib_Math.mpas,1871 ::
0x00A0 0x0857 MOVF R7, 0
;__Lib_Math.mpas,1872 ::
0x00A1 0x1803 BTFSC STATUS, 0
;__Lib_Math.mpas,1873 ::
0x00A2 0x0F57 INCFSZ R7, 0
;__Lib_Math.mpas,1874 ::
0x00A3 0x07DB ADDWF R11, 1
;__Lib_Math.mpas,1877 ::
_EXIT2:
;__Lib_Math.mpas,1879 ::
L_end_Mul_32x32_U:
0x00A4 0x0008 RETURN
; end of _Mul_32x32_U
_EEPROM_Write:
;__Lib_EEPROM.mpas,27 ::
;__Lib_EEPROM.mpas,28 ::
L__EEPROM_Write3:
0x00A5 0x1683 BSF STATUS, 5
0x00A6 0x1C9C BTFSS EECON1, 1
0x00A7 0x28AA GOTO L__EEPROM_Write4
0x00A8 0x0000 NOP
0x00A9 0x28A5 GOTO L__EEPROM_Write3
L__EEPROM_Write4:
;__Lib_EEPROM.mpas,30 ::
0x00AA 0x0845 MOVF FARG_EEPROM_Write_address, 0
0x00AB 0x009B MOVWF EEADR
;__Lib_EEPROM.mpas,31 ::
0x00AC 0x0846 MOVF FARG_EEPROM_Write_data_, 0
0x00AD 0x009A MOVWF EEDATA
;__Lib_EEPROM.mpas,32 ::
0x00AE 0x139C BCF EECON1, 7
;__Lib_EEPROM.mpas,33 ::
0x00AF 0x151C BSF EECON1, 2
;__Lib_EEPROM.mpas,35 ::
0x00B0 0x080B MOVF INTCON, 0
0x00B1 0x00D0 MOVWF R0
;__Lib_EEPROM.mpas,38 ::
0x00B2 0x138B BCF INTCON, 7
;__Lib_EEPROM.mpas,39 ::
0x00B3 0x3055 MOVLW 85
0x00B4 0x009D MOVWF EECON2
;__Lib_EEPROM.mpas,40 ::
0x00B5 0x30AA MOVLW 170
0x00B6 0x009D MOVWF EECON2
;__Lib_EEPROM.mpas,41 ::
0x00B7 0x149C BSF EECON1, 1
;__Lib_EEPROM.mpas,45 ::
0x00B8 0x1BD0 BTFSC R0, 7
0x00B9 0x28BC GOTO L__EEPROM_Write9
0x00BA 0x138B BCF INTCON, 7
0x00BB 0x28BD GOTO L__EEPROM_Write10
L__EEPROM_Write9:
0x00BC 0x178B BSF INTCON, 7
L__EEPROM_Write10:
;__Lib_EEPROM.mpas,46 ::
0x00BD 0x111C BCF EECON1, 2
;__Lib_EEPROM.mpas,47 ::
L_end_EEPROM_Write:
0x00BE 0x0008 RETURN
; end of _EEPROM_Write
_EEPROM_Read:
;__Lib_EEPROM.mpas,13 ::
;__Lib_EEPROM.mpas,14 ::
0x00BF 0x1283 BCF STATUS, 5
0x00C0 0x0845 MOVF FARG_EEPROM_Read_address, 0
0x00C1 0x1683 BSF STATUS, 5
0x00C2 0x009B MOVWF EEADR
;__Lib_EEPROM.mpas,15 ::
0x00C3 0x139C BCF EECON1, 7
;__Lib_EEPROM.mpas,21 ::
0x00C4 0x141C BSF EECON1, 0
;__Lib_EEPROM.mpas,22 ::
0x00C5 0x081A MOVF EEDATA, 0
0x00C6 0x00D1 MOVWF R1
;__Lib_EEPROM.mpas,23 ::
0x00C7 0x0851 MOVF R1, 0
0x00C8 0x00D0 MOVWF R0
L_end_EEPROM_Read:
0x00C9 0x0008 RETURN
; end of _EEPROM_Read
_main:
;12f675 MPPT.mpas,84 :: begin
;12f675 MPPT.mpas,85 :: CMCON:=7;
0x00CA 0x3007 MOVLW 7
0x00CB 0x1283 BCF STATUS, 5
0x00CC 0x0099 MOVWF CMCON
;12f675 MPPT.mpas,86 :: ANSEL:=%00111001; // ADC conversion clock = fRC, AN3, AN0;
0x00CD 0x3039 MOVLW 57
0x00CE 0x1683 BSF STATUS, 5
0x00CF 0x009F MOVWF ANSEL
;12f675 MPPT.mpas,88 :: TRISIO0_bit:=1; // AN0
0x00D0 0x1405 BSF TRISIO0_bit, BitPos(TRISIO0_bit+0)
;12f675 MPPT.mpas,89 :: TRISIO1_bit:=1; // VREF
0x00D1 0x1485 BSF TRISIO1_bit, BitPos(TRISIO1_bit+0)
;12f675 MPPT.mpas,90 :: TRISIO2_bit:=0; // PWM
0x00D2 0x1105 BCF TRISIO2_bit, BitPos(TRISIO2_bit+0)
;12f675 MPPT.mpas,91 :: TRISIO4_bit:=1; // AN3
0x00D3 0x1605 BSF TRISIO4_bit, BitPos(TRISIO4_bit+0)
;12f675 MPPT.mpas,92 :: TRISIO5_bit:=0; // LED
0x00D4 0x1285 BCF TRISIO5_bit, BitPos(TRISIO5_bit+0)
;12f675 MPPT.mpas,93 :: VCFG_bit:=1;
0x00D5 0x1283 BCF STATUS, 5
0x00D6 0x171F BSF VCFG_bit, BitPos(VCFG_bit+0)
;12f675 MPPT.mpas,94 :: CHS1_bit:=1;
0x00D7 0x159F BSF CHS1_bit, BitPos(CHS1_bit+0)
;12f675 MPPT.mpas,95 :: ADFM_bit:=1;
0x00D8 0x179F BSF ADFM_bit, BitPos(ADFM_bit+0)
;12f675 MPPT.mpas,97 :: LED1:=0;
0x00D9 0x1285 BCF GP5_bit, BitPos(GP5_bit+0)
;12f675 MPPT.mpas,98 :: PWM_SIG:=1;
0x00DA 0x1505 BSF GP2_bit, BitPos(GP2_bit+0)
;12f675 MPPT.mpas,99 :: LED1_tm:=100;
0x00DB 0x3064 MOVLW 100
0x00DC 0x00C0 MOVWF _LED1_tm
;12f675 MPPT.mpas,100 :: ON_PWM:=0;
0x00DD 0x01BC CLRF _ON_PWM
;12f675 MPPT.mpas,101 :: VOLPWM:=0;
0x00DE 0x01BB CLRF _VOLPWM
;12f675 MPPT.mpas,102 :: TICK_1000:=0;
0x00DF 0x01BE CLRF _TICK_1000
0x00E0 0x01BF CLRF _TICK_1000+1
;12f675 MPPT.mpas,104 :: OPTION_REG:=%01011111; // ~4KHz @ 4MHz
0x00E1 0x305F MOVLW 95
0x00E2 0x1683 BSF STATUS, 5
0x00E3 0x0081 MOVWF OPTION_REG
;12f675 MPPT.mpas,105 :: TMR0IE_bit:=1;
0x00E4 0x168B BSF TMR0IE_bit, BitPos(TMR0IE_bit+0)
;12f675 MPPT.mpas,107 :: LM358_diff:=cLM358_diff;
0x00E5 0x01BD CLRF _LM358_diff
;12f675 MPPT.mpas,108 :: Delay_100ms;
0x00E6 0x2036 CALL _Delay_100ms
;12f675 MPPT.mpas,109 :: Delay_100ms;
0x00E7 0x2036 CALL _Delay_100ms
;12f675 MPPT.mpas,110 :: ClrWDT;
0x00E8 0x0064 CLRWDT
;12f675 MPPT.mpas,112 :: if Write_OPAMP=0 then begin
0x00E9 0x1985 BTFSC GP3_bit, BitPos(GP3_bit+0)
0x00EA 0x2907 GOTO L__main13
;12f675 MPPT.mpas,113 :: Delay_100ms;
0x00EB 0x2036 CALL _Delay_100ms
;12f675 MPPT.mpas,114 :: Delay_100ms;
0x00EC 0x2036 CALL _Delay_100ms
;12f675 MPPT.mpas,115 :: adc_cur:=ADC_Read(0);
0x00ED 0x01C5 CLRF FARG_ADC_Read_channel
0x00EE 0x2042 CALL _ADC_Read
0x00EF 0x0850 MOVF R0, 0
0x00F0 0x00C3 MOVWF _adc_cur
0x00F1 0x0851 MOVF R0+1, 0
0x00F2 0x00C4 MOVWF _adc_cur+1
;12f675 MPPT.mpas,116 :: EEPROM_Write(0, Lo(adc_cur));
0x00F3 0x01C5 CLRF FARG_EEPROM_Write_address
0x00F4 0x0843 MOVF _adc_cur, 0
0x00F5 0x00C6 MOVWF FARG_EEPROM_Write_data_
0x00F6 0x20A5 CALL _EEPROM_Write
;12f675 MPPT.mpas,117 :: Delay_100ms;
0x00F7 0x2036 CALL _Delay_100ms
;12f675 MPPT.mpas,118 :: LED1:=1;
0x00F8 0x1685 BSF GP5_bit, BitPos(GP5_bit+0)
;12f675 MPPT.mpas,119 :: Delay_ms(700);
0x00F9 0x3004 MOVLW 4
0x00FA 0x00DB MOVWF R11
0x00FB 0x308E MOVLW 142
0x00FC 0x00DC MOVWF R12
0x00FD 0x3012 MOVLW 18
0x00FE 0x00DD MOVWF R13
L__main15:
0x00FF 0x0BDD DECFSZ R13, 1
0x0100 0x28FF GOTO L__main15
0x0101 0x0BDC DECFSZ R12, 1
0x0102 0x28FF GOTO L__main15
0x0103 0x0BDB DECFSZ R11, 1
0x0104 0x28FF GOTO L__main15
0x0105 0x0000 NOP
;12f675 MPPT.mpas,120 :: LED1:=0;
0x0106 0x1285 BCF GP5_bit, BitPos(GP5_bit+0)
;12f675 MPPT.mpas,121 :: end;
L__main13:
;12f675 MPPT.mpas,122 :: ClrWDT;
0x0107 0x0064 CLRWDT
;12f675 MPPT.mpas,126 :: Delay_100ms;
0x0108 0x2036 CALL _Delay_100ms
;12f675 MPPT.mpas,127 :: LM358_diff:=EEPROM_Read(0);
0x0109 0x01C5 CLRF FARG_EEPROM_Read_address
0x010A 0x20BF CALL _EEPROM_Read
0x010B 0x0850 MOVF R0, 0
0x010C 0x00BD MOVWF _LM358_diff
;12f675 MPPT.mpas,129 :: if LM358_diff>$1f then
0x010D 0x0850 MOVF R0, 0
0x010E 0x3C1F SUBLW 31
0x010F 0x1803 BTFSC STATUS, 0
0x0110 0x2912 GOTO L__main17
;12f675 MPPT.mpas,130 :: LM358_diff:=0;
0x0111 0x01BD CLRF _LM358_diff
L__main17:
;12f675 MPPT.mpas,132 :: T1CKPS1_bit:=0;
0x0112 0x1283 BCF STATUS, 5
0x0113 0x1290 BCF T1CKPS1_bit, BitPos(T1CKPS1_bit+0)
;12f675 MPPT.mpas,133 :: T1CKPS0_bit:=0; // timer prescaler 1:1
0x0114 0x1210 BCF T1CKPS0_bit, BitPos(T1CKPS0_bit+0)
;12f675 MPPT.mpas,134 :: TMR1CS_bit:=0;
0x0115 0x1090 BCF TMR1CS_bit, BitPos(TMR1CS_bit+0)
;12f675 MPPT.mpas,135 :: TMR1L:=TMR1L_LOAD;
0x0116 0x3030 MOVLW 48
0x0117 0x008E MOVWF TMR1L
;12f675 MPPT.mpas,136 :: TMR1H:=TMR1H_LOAD;
0x0118 0x30F8 MOVLW 248
0x0119 0x008F MOVWF TMR1H
;12f675 MPPT.mpas,137 :: T1IF_bit:=0;
0x011A 0x100C BCF T1IF_bit, BitPos(T1IF_bit+0)
;12f675 MPPT.mpas,139 :: adc_vol:=0;
0x011B 0x01AC CLRF _adc_vol
0x011C 0x01AD CLRF _adc_vol+1
;12f675 MPPT.mpas,140 :: adc_cur:=0;
0x011D 0x01C3 CLRF _adc_cur
0x011E 0x01C4 CLRF _adc_cur+1
;12f675 MPPT.mpas,141 :: power_curr:=0;
0x011F 0x01B1 CLRF _power_curr
0x0120 0x01B2 CLRF _power_curr+1
0x0121 0x01B3 CLRF _power_curr+2
0x0122 0x01B4 CLRF _power_curr+3
;12f675 MPPT.mpas,143 :: TMR1IE_bit:=1;
0x0123 0x1683 BSF STATUS, 5
0x0124 0x140C BSF TMR1IE_bit, BitPos(TMR1IE_bit+0)
;12f675 MPPT.mpas,144 :: PEIE_bit:=1;
0x0125 0x170B BSF PEIE_bit, BitPos(PEIE_bit+0)
;12f675 MPPT.mpas,146 :: GIE_bit:=1; // enable Interrupt
0x0126 0x178B BSF GIE_bit, BitPos(GIE_bit+0)
;12f675 MPPT.mpas,148 :: TMR1ON_bit:=1;
0x0127 0x1283 BCF STATUS, 5
0x0128 0x1410 BSF TMR1ON_bit, BitPos(TMR1ON_bit+0)
;12f675 MPPT.mpas,150 :: VOLPWM:=PWM_MIN;
0x0129 0x300A MOVLW 10
0x012A 0x00BB MOVWF _VOLPWM
;12f675 MPPT.mpas,151 :: flag_inc:=True;
0x012B 0x30FF MOVLW 255
0x012C 0x00B0 MOVWF _flag_inc
;12f675 MPPT.mpas,152 :: vol_prev1:=0;
0x012D 0x01AE CLRF _vol_prev1
0x012E 0x01AF CLRF _vol_prev1+1
;12f675 MPPT.mpas,154 :: powertime:=0;
0x012F 0x01AA CLRF _powertime
0x0130 0x01AB CLRF _powertime+1
;12f675 MPPT.mpas,155 :: prevtime:=0;
0x0131 0x01A4 CLRF _prevtime
0x0132 0x01A5 CLRF _prevtime+1
;12f675 MPPT.mpas,156 :: voltime:=0;
0x0133 0x01A2 CLRF _voltime
0x0134 0x01A3 CLRF _voltime+1
;12f675 MPPT.mpas,159 :: clrwdt;
0x0135 0x0064 CLRWDT
;12f675 MPPT.mpas,160 :: delay_ms(300);
0x0136 0x3002 MOVLW 2
0x0137 0x00DB MOVWF R11
0x0138 0x3086 MOVLW 134
0x0139 0x00DC MOVWF R12
0x013A 0x3099 MOVLW 153
0x013B 0x00DD MOVWF R13
L__main19:
0x013C 0x0BDD DECFSZ R13, 1
0x013D 0x293C GOTO L__main19
0x013E 0x0BDC DECFSZ R12, 1
0x013F 0x293C GOTO L__main19
0x0140 0x0BDB DECFSZ R11, 1
0x0141 0x293C GOTO L__main19
;12f675 MPPT.mpas,161 :: LED1:=1;
0x0142 0x1685 BSF GP5_bit, BitPos(GP5_bit+0)
;12f675 MPPT.mpas,162 :: delay_ms(300);
0x0143 0x3002 MOVLW 2
0x0144 0x00DB MOVWF R11
0x0145 0x3086 MOVLW 134
0x0146 0x00DC MOVWF R12
0x0147 0x3099 MOVLW 153
0x0148 0x00DD MOVWF R13
L__main20:
0x0149 0x0BDD DECFSZ R13, 1
0x014A 0x2949 GOTO L__main20
0x014B 0x0BDC DECFSZ R12, 1
0x014C 0x2949 GOTO L__main20
0x014D 0x0BDB DECFSZ R11, 1
0x014E 0x2949 GOTO L__main20
;12f675 MPPT.mpas,163 :: LED1:=0;
0x014F 0x1285 BCF GP5_bit, BitPos(GP5_bit+0)
;12f675 MPPT.mpas,164 :: clrwdt;
0x0150 0x0064 CLRWDT
;12f675 MPPT.mpas,166 :: while True do begin
L__main22:
;12f675 MPPT.mpas,168 :: wtmp := TICK_1000;
0x0151 0x083E MOVF _TICK_1000, 0
0x0152 0x00A0 MOVWF _wtmp
0x0153 0x083F MOVF _TICK_1000+1, 0
0x0154 0x00A1 MOVWF _wtmp+1
;12f675 MPPT.mpas,169 :: if wtmp - prevtime > LED1_tm then begin
0x0155 0x0824 MOVF _prevtime, 0
0x0156 0x023E SUBWF _TICK_1000, 0
0x0157 0x00D1 MOVWF R1
0x0158 0x0825 MOVF _prevtime+1, 0
0x0159 0x1C03 BTFSS STATUS, 0
0x015A 0x3E01 ADDLW 1
0x015B 0x023F SUBWF _TICK_1000+1, 0
0x015C 0x00D2 MOVWF R1+1
0x015D 0x0852 MOVF R1+1, 0
0x015E 0x3C00 SUBLW 0
0x015F 0x1D03 BTFSS STATUS, 2
0x0160 0x2963 GOTO L__main66
0x0161 0x0851 MOVF R1, 0
0x0162 0x0240 SUBWF _LED1_tm, 0
L__main66:
0x0163 0x1803 BTFSC STATUS, 0
0x0164 0x296C GOTO L__main27
;12f675 MPPT.mpas,170 :: prevtime := wtmp;
0x0165 0x1283 BCF STATUS, 5
0x0166 0x0820 MOVF _wtmp, 0
0x0167 0x00A4 MOVWF _prevtime
0x0168 0x0821 MOVF _wtmp+1, 0
0x0169 0x00A5 MOVWF _prevtime+1
;12f675 MPPT.mpas,171 :: LED1 := not LED1;
0x016A 0x3020 MOVLW 32
0x016B 0x0685 XORWF GP5_bit, 1
;12f675 MPPT.mpas,172 :: end;
L__main27:
;12f675 MPPT.mpas,175 :: vol_prev2:=vol_prev1;
0x016C 0x082E MOVF _vol_prev1, 0
0x016D 0x00A8 MOVWF _vol_prev2
0x016E 0x082F MOVF _vol_prev1+1, 0
0x016F 0x00A9 MOVWF _vol_prev2+1
;12f675 MPPT.mpas,176 :: vol_prev1:=adc_vol;
0x0170 0x082C MOVF _adc_vol, 0
0x0171 0x00AE MOVWF _vol_prev1
0x0172 0x082D MOVF _adc_vol+1, 0
0x0173 0x00AF MOVWF _vol_prev1+1
;12f675 MPPT.mpas,178 :: doADCRead:=0;
0x0174 0x01A7 CLRF _doADCRead
;12f675 MPPT.mpas,179 :: while doADCRead=0 do ;
L__main30:
0x0175 0x0827 MOVF _doADCRead, 0
0x0176 0x3A00 XORLW 0
0x0177 0x1903 BTFSC STATUS, 2
0x0178 0x2975 GOTO L__main30
;12f675 MPPT.mpas,181 :: adc_cur:=ADC_Read(0);
0x0179 0x01C5 CLRF FARG_ADC_Read_channel
0x017A 0x2042 CALL _ADC_Read
0x017B 0x0850 MOVF R0, 0
0x017C 0x00C3 MOVWF _adc_cur
0x017D 0x0851 MOVF R0+1, 0
0x017E 0x00C4 MOVWF _adc_cur+1
;12f675 MPPT.mpas,182 :: adc_vol:=ADC_Read(3);
0x017F 0x3003 MOVLW 3
0x0180 0x00C5 MOVWF FARG_ADC_Read_channel
0x0181 0x2042 CALL _ADC_Read
0x0182 0x0850 MOVF R0, 0
0x0183 0x00AC MOVWF _adc_vol
0x0184 0x0851 MOVF R0+1, 0
0x0185 0x00AD MOVWF _adc_vol+1
;12f675 MPPT.mpas,183 :: for i:=0 to adc_max_loop-2 do begin
0x0186 0x01A6 CLRF _i
L__main35:
;12f675 MPPT.mpas,184 :: xtmp:=ADC_Read(0);
0x0187 0x01C5 CLRF FARG_ADC_Read_channel
0x0188 0x2042 CALL _ADC_Read
0x0189 0x0850 MOVF R0, 0
0x018A 0x00B9 MOVWF _xtmp
0x018B 0x0851 MOVF R0+1, 0
0x018C 0x00BA MOVWF _xtmp+1
;12f675 MPPT.mpas,185 :: wtmp:=ADC_Read(3);
0x018D 0x3003 MOVLW 3
0x018E 0x00C5 MOVWF FARG_ADC_Read_channel
0x018F 0x2042 CALL _ADC_Read
0x0190 0x0850 MOVF R0, 0
0x0191 0x00A0 MOVWF _wtmp
0x0192 0x0851 MOVF R0+1, 0
0x0193 0x00A1 MOVWF _wtmp+1
;12f675 MPPT.mpas,186 :: adc_vol:=(adc_vol+wtmp) div 2;
0x0194 0x0850 MOVF R0, 0
0x0195 0x07AC ADDWF _adc_vol, 1
0x0196 0x0851 MOVF R0+1, 0
0x0197 0x1803 BTFSC STATUS, 0
0x0198 0x3E01 ADDLW 1
0x0199 0x07AD ADDWF _adc_vol+1, 1
0x019A 0x0CAD RRF _adc_vol+1, 1
0x019B 0x0CAC RRF _adc_vol, 1
0x019C 0x13AD BCF _adc_vol+1, 7
;12f675 MPPT.mpas,187 :: if xtmp > adc_cur then
0x019D 0x083A MOVF _xtmp+1, 0
0x019E 0x0244 SUBWF _adc_cur+1, 0
0x019F 0x1D03 BTFSS STATUS, 2
0x01A0 0x29A3 GOTO L__main67
0x01A1 0x0839 MOVF _xtmp, 0
0x01A2 0x0243 SUBWF _adc_cur, 0
L__main67:
0x01A3 0x1803 BTFSC STATUS, 0
0x01A4 0x29A9 GOTO L__main40
;12f675 MPPT.mpas,188 :: adc_cur:=xtmp;
0x01A5 0x0839 MOVF _xtmp, 0
0x01A6 0x00C3 MOVWF _adc_cur
0x01A7 0x083A MOVF _xtmp+1, 0
0x01A8 0x00C4 MOVWF _adc_cur+1
L__main40:
;12f675 MPPT.mpas,190 :: end;
0x01A9 0x0826 MOVF _i, 0
0x01AA 0x3A03 XORLW 3
0x01AB 0x1903 BTFSC STATUS, 2
0x01AC 0x29AF GOTO L__main38
0x01AD 0x0AA6 INCF _i, 1
0x01AE 0x2987 GOTO L__main35
L__main38:
;12f675 MPPT.mpas,191 :: adc_vol:=adc_vol * VOLMUL;
0x01AF 0x0DAC RLF _adc_vol, 1
0x01B0 0x0DAD RLF _adc_vol+1, 1
0x01B1 0x102C BCF _adc_vol, 0
0x01B2 0x0DAC RLF _adc_vol, 1
0x01B3 0x0DAD RLF _adc_vol+1, 1
0x01B4 0x102C BCF _adc_vol, 0
;12f675 MPPT.mpas,194 :: wtmp:=TICK_1000;
0x01B5 0x083E MOVF _TICK_1000, 0
0x01B6 0x00A0 MOVWF _wtmp
0x01B7 0x083F MOVF _TICK_1000+1, 0
0x01B8 0x00A1 MOVWF _wtmp+1
;12f675 MPPT.mpas,195 :: if wtmp - powertime < _UPDATE_INT then
0x01B9 0x082A MOVF _powertime, 0
0x01BA 0x023E SUBWF _TICK_1000, 0
0x01BB 0x00D1 MOVWF R1
0x01BC 0x082B MOVF _powertime+1, 0
0x01BD 0x1C03 BTFSS STATUS, 0
0x01BE 0x3E01 ADDLW 1
0x01BF 0x023F SUBWF _TICK_1000+1, 0
0x01C0 0x00D2 MOVWF R1+1
0x01C1 0x3000 MOVLW 0
0x01C2 0x0252 SUBWF R1+1, 0
0x01C3 0x1D03 BTFSS STATUS, 2
0x01C4 0x29C7 GOTO L__main68
0x01C5 0x300F MOVLW 15
0x01C6 0x0251 SUBWF R1, 0
L__main68:
0x01C7 0x1803 BTFSC STATUS, 0
0x01C8 0x29CA GOTO L__main43
;12f675 MPPT.mpas,196 :: goto CONTLOOP;
0x01C9 0x2A42 GOTO L__main_CONTLOOP
L__main43:
;12f675 MPPT.mpas,197 :: clrwdt;
0x01CA 0x0064 CLRWDT
;12f675 MPPT.mpas,198 :: powertime:=wtmp;
0x01CB 0x0820 MOVF _wtmp, 0
0x01CC 0x00AA MOVWF _powertime
0x01CD 0x0821 MOVF _wtmp+1, 0
0x01CE 0x00AB MOVWF _powertime+1
;12f675 MPPT.mpas,200 :: power_prev:= power_curr;
0x01CF 0x0831 MOVF _power_curr, 0
0x01D0 0x00B5 MOVWF _power_prev
0x01D1 0x0832 MOVF _power_curr+1, 0
0x01D2 0x00B6 MOVWF _power_prev+1
0x01D3 0x0833 MOVF _power_curr+2, 0
0x01D4 0x00B7 MOVWF _power_prev+2
0x01D5 0x0834 MOVF _power_curr+3, 0
0x01D6 0x00B8 MOVWF _power_prev+3
;12f675 MPPT.mpas,201 :: power_curr:= dword(adc_vol * adc_cur);
0x01D7 0x082C MOVF _adc_vol, 0
0x01D8 0x00D0 MOVWF R0
0x01D9 0x082D MOVF _adc_vol+1, 0
0x01DA 0x00D1 MOVWF R0+1
0x01DB 0x01D2 CLRF R0+2
0x01DC 0x01D3 CLRF R0+3
0x01DD 0x0843 MOVF _adc_cur, 0
0x01DE 0x00D4 MOVWF R4
0x01DF 0x0844 MOVF _adc_cur+1, 0
0x01E0 0x00D5 MOVWF R4+1
0x01E1 0x01D6 CLRF R4+2
0x01E2 0x01D7 CLRF R4+3
0x01E3 0x206E CALL _Mul_32x32_U
0x01E4 0x0850 MOVF R0, 0
0x01E5 0x00B1 MOVWF _power_curr
0x01E6 0x0851 MOVF R0+1, 0
0x01E7 0x00B2 MOVWF _power_curr+1
0x01E8 0x0852 MOVF R0+2, 0
0x01E9 0x00B3 MOVWF _power_curr+2
0x01EA 0x0853 MOVF R0+3, 0
0x01EB 0x00B4 MOVWF _power_curr+3
;12f675 MPPT.mpas,215 :: if adc_cur>LM358_diff then begin
0x01EC 0x0844 MOVF _adc_cur+1, 0
0x01ED 0x3C00 SUBLW 0
0x01EE 0x1D03 BTFSS STATUS, 2
0x01EF 0x29F2 GOTO L__main69
0x01F0 0x0843 MOVF _adc_cur, 0
0x01F1 0x023D SUBWF _LM358_diff, 0
L__main69:
0x01F2 0x1803 BTFSC STATUS, 0
0x01F3 0x2A1E GOTO L__main46
;12f675 MPPT.mpas,217 :: if power_curr = power_prev then begin
0x01F4 0x0834 MOVF _power_curr+3, 0
0x01F5 0x0638 XORWF _power_prev+3, 0
0x01F6 0x1D03 BTFSS STATUS, 2
0x01F7 0x2A02 GOTO L__main70
0x01F8 0x0833 MOVF _power_curr+2, 0
0x01F9 0x0637 XORWF _power_prev+2, 0
0x01FA 0x1D03 BTFSS STATUS, 2
0x01FB 0x2A02 GOTO L__main70
0x01FC 0x0832 MOVF _power_curr+1, 0
0x01FD 0x0636 XORWF _power_prev+1, 0
0x01FE 0x1D03 BTFSS STATUS, 2
0x01FF 0x2A02 GOTO L__main70
0x0200 0x0831 MOVF _power_curr, 0
0x0201 0x0635 XORWF _power_prev, 0
L__main70:
0x0202 0x1D03 BTFSS STATUS, 2
0x0203 0x2A07 GOTO L__main49
;12f675 MPPT.mpas,218 :: LED1_tm:=250;
0x0204 0x30FA MOVLW 250
0x0205 0x00C0 MOVWF _LED1_tm
;12f675 MPPT.mpas,219 :: goto CONTLOOP;
0x0206 0x2A42 GOTO L__main_CONTLOOP
;12f675 MPPT.mpas,220 :: end else if power_curr < power_prev then begin
L__main49:
0x0207 0x0838 MOVF _power_prev+3, 0
0x0208 0x0234 SUBWF _power_curr+3, 0
0x0209 0x1D03 BTFSS STATUS, 2
0x020A 0x2A15 GOTO L__main71
0x020B 0x0837 MOVF _power_prev+2, 0
0x020C 0x0233 SUBWF _power_curr+2, 0
0x020D 0x1D03 BTFSS STATUS, 2
0x020E 0x2A15 GOTO L__main71
0x020F 0x0836 MOVF _power_prev+1, 0
0x0210 0x0232 SUBWF _power_curr+1, 0
0x0211 0x1D03 BTFSS STATUS, 2
0x0212 0x2A15 GOTO L__main71
0x0213 0x0835 MOVF _power_prev, 0
0x0214 0x0231 SUBWF _power_curr, 0
L__main71:
0x0215 0x1803 BTFSC STATUS, 0
0x0216 0x2A1B GOTO L__main52
;12f675 MPPT.mpas,221 :: LED1_tm:=150;
0x0217 0x3096 MOVLW 150
0x0218 0x00C0 MOVWF _LED1_tm
;12f675 MPPT.mpas,222 :: flag_inc:=not flag_inc;
0x0219 0x09B0 COMF _flag_inc, 1
;12f675 MPPT.mpas,223 :: end else
0x021A 0x2A1D GOTO L__main53
L__main52:
;12f675 MPPT.mpas,224 :: LED1_tm:=150;
0x021B 0x3096 MOVLW 150
0x021C 0x00C0 MOVWF _LED1_tm
L__main53:
;12f675 MPPT.mpas,230 :: end else begin
0x021D 0x2A2B GOTO L__main47
L__main46:
;12f675 MPPT.mpas,231 :: LED1_tm:=100;
0x021E 0x3064 MOVLW 100
0x021F 0x00C0 MOVWF _LED1_tm
;12f675 MPPT.mpas,232 :: VOLPWM:=PWM_MIN;
0x0220 0x300A MOVLW 10
0x0221 0x00BB MOVWF _VOLPWM
;12f675 MPPT.mpas,233 :: flag_inc:=True;
0x0222 0x30FF MOVLW 255
0x0223 0x00B0 MOVWF _flag_inc
;12f675 MPPT.mpas,234 :: power_curr:=0;
0x0224 0x01B1 CLRF _power_curr
0x0225 0x01B2 CLRF _power_curr+1
0x0226 0x01B3 CLRF _power_curr+2
0x0227 0x01B4 CLRF _power_curr+3
;12f675 MPPT.mpas,235 :: adc_cur:=0;
0x0228 0x01C3 CLRF _adc_cur
0x0229 0x01C4 CLRF _adc_cur+1
;12f675 MPPT.mpas,236 :: goto CONTLOOP;
0x022A 0x2A42 GOTO L__main_CONTLOOP
;12f675 MPPT.mpas,237 :: end;
L__main47:
;12f675 MPPT.mpas,240 :: if flag_inc then begin
0x022B 0x0830 MOVF _flag_inc, 0
0x022C 0x1903 BTFSC STATUS, 2
0x022D 0x2A38 GOTO L__main55
;12f675 MPPT.mpas,241 :: if VOLPWM<PWM_MAX then
0x022E 0x30FA MOVLW 250
0x022F 0x023B SUBWF _VOLPWM, 0
0x0230 0x1803 BTFSC STATUS, 0
0x0231 0x2A34 GOTO L__main58
;12f675 MPPT.mpas,242 :: Inc(VOLPWM)
0x0232 0x0ABB INCF _VOLPWM, 1
0x0233 0x2A37 GOTO L__main59
;12f675 MPPT.mpas,243 :: else begin
L__main58:
;12f675 MPPT.mpas,244 :: VOLPWM:=PWM_MAX;
0x0234 0x30FA MOVLW 250
0x0235 0x00BB MOVWF _VOLPWM
;12f675 MPPT.mpas,245 :: flag_inc:=false;
0x0236 0x01B0 CLRF _flag_inc
;12f675 MPPT.mpas,246 :: end;
L__main59:
;12f675 MPPT.mpas,247 :: end else begin
0x0237 0x2A42 GOTO L__main56
L__main55:
;12f675 MPPT.mpas,248 :: if VOLPWM>PWM_MIN then
0x0238 0x083B MOVF _VOLPWM, 0
0x0239 0x3C0A SUBLW 10
0x023A 0x1803 BTFSC STATUS, 0
0x023B 0x2A3E GOTO L__main61
;12f675 MPPT.mpas,249 :: Dec(VOLPWM)
0x023C 0x03BB DECF _VOLPWM, 1
0x023D 0x2A42 GOTO L__main62
;12f675 MPPT.mpas,250 :: else begin
L__main61:
;12f675 MPPT.mpas,251 :: VOLPWM:=PWM_MIN;
0x023E 0x300A MOVLW 10
0x023F 0x00BB MOVWF _VOLPWM
;12f675 MPPT.mpas,252 :: flag_inc:=true;
0x0240 0x30FF MOVLW 255
0x0241 0x00B0 MOVWF _flag_inc
;12f675 MPPT.mpas,253 :: end;
L__main62:
;12f675 MPPT.mpas,254 :: end;
L__main56:
;12f675 MPPT.mpas,255 :: CONTLOOP:
L__main_CONTLOOP:
;12f675 MPPT.mpas,257 :: end;
0x0242 0x2951 GOTO L__main22
;12f675 MPPT.mpas,258 :: end.
L_end_main:
0x0243 0x2A43 GOTO $+0
; end of _main
Symbol List:
//** Routines locations **
//ADDRESS SIZE PROCEDURE
//----------------------------------------------
0x0004 [44] _Interrupt
0x0030 [6] _Delay_22us
0x0036 [12] _Delay_100ms
0x0042 [44] _ADC_Read
0x006E [55] _Mul_32x32_U
0x00A5 [26] _EEPROM_Write
0x00BF [11] _EEPROM_Read
0x00CA [378] _main
//** Variables locations **
//ADDRESS SIZE VARIABLE
//----------------------------------------------
0x0001 [1] TMR0
0x0003 [1] STATUS
0x0005 [0] Write_OPAMP
0x0005 [0] GP3_bit
0x0005 [0] GP5_bit
0x0005 [0] LED1
0x0005 [0] GP2_bit
0x0005 [0] PWM_SIG
0x000B [0] T0IF_bit
0x000B [0] PEIE_bit
0x000B [0] GIE_bit
0x000B [0] TMR0IE_bit
0x000B [1] INTCON
0x000C [0] T1IF_bit
0x000E [1] TMR1L
0x000F [1] TMR1H
0x0010 [0] TMR1CS_bit
0x0010 [0] T1CKPS1_bit
0x0010 [0] T1CKPS0_bit
0x0010 [0] TMR1ON_bit
0x0019 [1] CMCON
0x001E [1] ADRESH
0x001F [0] CHS1_bit
0x001F [0] ADFM_bit
0x001F [1] ADCON0
0x001F [0] VCFG_bit
0x0020 [2] _wtmp
0x0022 [2] _voltime
0x0024 [2] _prevtime
0x0026 [1] _i
0x0027 [1] _doADCRead
0x0028 [2] _vol_prev2
0x002A [2] _powertime
0x002C [2] _adc_vol
0x002E [2] _vol_prev1
0x0030 [1] _flag_inc
0x0031 [4] _power_curr
0x0035 [4] _power_prev
0x0039 [2] _xtmp
0x003B [1] _VOLPWM
0x003C [1] _ON_PWM
0x003D [1] _LM358_diff
0x003E [2] _TICK_1000
0x0040 [1] _LED1_tm
0x0041 [1] ___savePCLATH
0x0042 [1] ___saveSTATUS
0x0043 [2] _adc_cur
0x0045 [1] FARG_ADC_Read_channel
0x0045 [1] FARG_EEPROM_Read_address
0x0045 [1] FARG_EEPROM_Write_address
0x0046 [1] FARG_EEPROM_Write_data_
0x0046 [2] ADC_Read_local_result
0x0050 [1] R0
0x0051 [1] R1
0x0052 [1] R2
0x0053 [1] R3
0x0054 [1] R4
0x0055 [1] R5
0x0056 [1] R6
0x0057 [1] R7
0x0058 [1] R8
0x0059 [1] R9
0x005A [1] R10
0x005B [1] R11
0x005C [1] R12
0x005D [1] R13
0x005E [1] R14
0x005F [1] R15
0x0081 [1] OPTION_REG
0x0085 [0] TRISIO4_bit
0x0085 [0] TRISIO5_bit
0x0085 [0] TRISIO1_bit
0x0085 [0] TRISIO0_bit
0x0085 [0] TRISIO2_bit
0x008C [0] TMR1IE_bit
0x009A [1] EEDATA
0x009B [1] EEADR
0x009C [1] EECON1
0x009D [1] EECON2
0x009E [1] ADRESL
0x009F [1] ANSEL