diff options
Diffstat (limited to 'software/ihu')
-rw-r--r-- | software/ihu/ihu.asm | 6 | ||||
-rw-r--r-- | software/ihu/solar.inc | 13 |
2 files changed, 13 insertions, 6 deletions
diff --git a/software/ihu/ihu.asm b/software/ihu/ihu.asm index 6ccc821..da0ef9b 100644 --- a/software/ihu/ihu.asm +++ b/software/ihu/ihu.asm @@ -368,7 +368,7 @@ uart_rx_fe ;; MAINLOOP main ; sleep - nop +; nop ;; -------------------- ;; ADC Test @@ -436,12 +436,10 @@ main call wait_ms movf SOL_POWERL,w - movwf TXREG - + movwf TXREG movlw .8 call wait_ms - clrf TMP goto main ;; -------------------- diff --git a/software/ihu/solar.inc b/software/ihu/solar.inc index 484a538..3c7134e 100644 --- a/software/ihu/solar.inc +++ b/software/ihu/solar.inc @@ -61,14 +61,19 @@ sol_mula_vc btfss SOL_CALC_9,0 goto sol_mula_rotate + bcf STATUS,C movf SOL_CALC_0,w addwf SOL_CALC_3,f - movlw .1 btfss STATUS,C + goto sol_mula_vc1 + bcf STATUS,C + movlw .1 addwf SOL_CALC_4,f btfsc STATUS,C incf SOL_CALC_5,f +sol_mula_vc1 + bcf STATUS,C movf SOL_CALC_1,w addwf SOL_CALC_4,f btfsc STATUS,C @@ -113,12 +118,15 @@ solar_calc_power bcf STATUS,C movf SOL_CALC_3,w addwf SOL_CALC_6,f - movlw .1 btfss STATUS,C + goto solar_calc_power1 + bcf STATUS,C + movlw .1 addwf SOL_CALC_7,f btfsc STATUS,C incf SOL_CALC_8,f +solar_calc_power1 movf SOL_CALC_4,w addwf SOL_CALC_7,f btfsc STATUS,C @@ -133,6 +141,7 @@ solar_calc_power rlf SOL_CALC_8,f ;; if(SOL_CALC_6 & 0x80) SOL_CALC_7:8+=1 + bcf STATUS,C movlw .1 btfsc SOL_CALC_6,7 addwf SOL_CALC_7,f |