forked from KentuckySolarCar/Drivetek_MPPT
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathunderv.asm
More file actions
48 lines (42 loc) · 2.13 KB
/
underv.asm
File metadata and controls
48 lines (42 loc) · 2.13 KB
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
;**********************************************************************
; P R O G R A M M MPPTnG *
; *
; Undervoltage routine *
;**********************************************************************
; *
; Filename: underv.asm *
; Date: 21.09.01 *
; Last Update: 28.09.01 *
; File Version: V3.0 *
; *
; Author: Michael Zürcher *
; *
; Company: HTA-Biel/Bienne Indulab *
; *
; Changes: program part which waits for sufficient input *
; voltage *
; *
;**********************************************************************
; *
; Notes: *
; - Main program : mpptngv4.asm *
; *
;**********************************************************************
UnderVoltage ;call PWMoff
call UpdateCAN
call GetFilteredUin
jmpFltL UIF0H,MINUINH,UnderVoltageloop ; jmp, if minimal voltage not reached
jmpFgtL UIF0H,MINUINH,EnoughVin ; go on, if minimal reached
jmpFleL UIF0L,MINUINL,UnderVoltageloop ; consider L-Byte
goto EnoughVin
UnderVoltageloop
bsf UNDV
bsf REDLED ; in this state, the red LED is blinking
call wait20ms
bcf REDLED
call wait1s
call DecDuty
goto UnderVoltage
EnoughVin bcf UNDV
;call PWMon
RETURN