summaryrefslogtreecommitdiff
path: root/software/ihu/solar.inc
diff options
context:
space:
mode:
authorChristian Pointner <equinox@mur.at>2012-01-03 23:23:31 +0000
committerChristian Pointner <equinox@mur.at>2012-01-03 23:23:31 +0000
commit5da4b7e9f38ce5772f6555a30717a9946454565e (patch)
treeea481318da4b79f114c7e8c4e921de3923980745 /software/ihu/solar.inc
parentadding datasheets for RDA 1846 (diff)
first solar power calc tests
git-svn-id: https://svn.spreadspace.org/mur.sat@230 7de4ea59-55d0-425e-a1af-a3118ea81d4c
Diffstat (limited to 'software/ihu/solar.inc')
-rw-r--r--software/ihu/solar.inc4
1 files changed, 4 insertions, 0 deletions
diff --git a/software/ihu/solar.inc b/software/ihu/solar.inc
index c41bcc3..484a538 100644
--- a/software/ihu/solar.inc
+++ b/software/ihu/solar.inc
@@ -40,6 +40,7 @@ sol_calc_power_single
;; sum up all currents -> SOL_CALC_0:2
sol_sum_current
movf INDF,w
+ bcf STATUS,C
addwf SOL_CALC_0,f
btfsc STATUS,C
incf SOL_CALC_1,f
@@ -90,6 +91,7 @@ sol_mula_rotate
;; -------------------------------------
solar_calc_power
+ ;; calc power of power line 1
movlw ADC_SOLAR_C0
movwf FSR
call sol_calc_power_single
@@ -102,11 +104,13 @@ solar_calc_power
movf SOL_CALC_5,w
movwf SOL_CALC_8
+ ;; calc power of power line 2
movlw ADC_SOLAR_C4
movwf FSR
call sol_calc_power_single
;; add SOL_CALC_3:5 to SOL_CALC_6:8 -> SOL_CALC_6:8
+ bcf STATUS,C
movf SOL_CALC_3,w
addwf SOL_CALC_6,f
movlw .1