summaryrefslogtreecommitdiff
path: root/software/ihu/solar.inc
diff options
context:
space:
mode:
Diffstat (limited to 'software/ihu/solar.inc')
-rw-r--r--software/ihu/solar.inc20
1 files changed, 10 insertions, 10 deletions
diff --git a/software/ihu/solar.inc b/software/ihu/solar.inc
index 3c7134e..3848f44 100644
--- a/software/ihu/solar.inc
+++ b/software/ihu/solar.inc
@@ -8,10 +8,10 @@
;; ESC im Labor and realraum.
;;
;; Please visit the project hompage at sat.mur.at for further information.
- ;;
+ ;;
;;
;; Copyright (C) 2011 Christian Pointner <equinox@mur.at>
- ;;
+ ;;
;; This file is part of mur.sat.
;;
;; mur.sat is free software: you can redistribute it and/or modify
@@ -36,7 +36,7 @@ sol_calc_power_single
clrf SOL_CALC_2
movlw .4
movwf SOL_CALC_CNT
-
+
;; sum up all currents -> SOL_CALC_0:2
sol_sum_current
movf INDF,w
@@ -53,7 +53,7 @@ sol_sum_current
clrf SOL_CALC_3
clrf SOL_CALC_4
clrf SOL_CALC_5
-
+
;; multiply SOL_CALC_0:2 with SOL_CALC_9 -> SOL_CALC_3:5
movlw .8
movwf SOL_CALC_CNT
@@ -81,7 +81,7 @@ sol_mula_vc1
movf SOL_CALC_2,w
addwf SOL_CALC_5,f
-
+
sol_mula_rotate
rrf SOL_CALC_9,f
bcf STATUS,C
@@ -91,9 +91,9 @@ sol_mula_rotate
decfsz SOL_CALC_CNT,f
goto sol_mula_vc
-
+
return
-
+
;; -------------------------------------
solar_calc_power
;; calc power of power line 1
@@ -108,7 +108,7 @@ solar_calc_power
movwf SOL_CALC_7
movf SOL_CALC_5,w
movwf SOL_CALC_8
-
+
;; calc power of power line 2
movlw ADC_SOLAR_C4
movwf FSR
@@ -139,7 +139,7 @@ solar_calc_power1
rlf SOL_CALC_6,f
rlf SOL_CALC_7,f
rlf SOL_CALC_8,f
-
+
;; if(SOL_CALC_6 & 0x80) SOL_CALC_7:8+=1
bcf STATUS,C
movlw .1
@@ -147,7 +147,7 @@ solar_calc_power1
addwf SOL_CALC_7,f
btfsc STATUS,C
incf SOL_CALC_8,f
-
+
;; SOL_CALC_7 -> SOL_POWERL, SOL_CALC_8 -> SOL_POWERH
movf SOL_CALC_7,w
movwf SOL_POWERL