summaryrefslogtreecommitdiff
path: root/software/ihu/rtc.inc
diff options
context:
space:
mode:
authorChristian Pointner <equinox@mur.at>2011-08-04 23:37:25 +0000
committerChristian Pointner <equinox@mur.at>2011-08-04 23:37:25 +0000
commited86861a1662c98a3267281e9f29cbed057ca2e5 (patch)
treeb06eb6bcdc00ae549af756bf0a96b592572d1471 /software/ihu/rtc.inc
parentminor cleanup (diff)
added multiplication code
git-svn-id: https://svn.spreadspace.org/mur.sat@102 7de4ea59-55d0-425e-a1af-a3118ea81d4c
Diffstat (limited to 'software/ihu/rtc.inc')
-rw-r--r--software/ihu/rtc.inc26
1 files changed, 23 insertions, 3 deletions
diff --git a/software/ihu/rtc.inc b/software/ihu/rtc.inc
index ba76bdb..79b4bdc 100644
--- a/software/ihu/rtc.inc
+++ b/software/ihu/rtc.inc
@@ -209,15 +209,35 @@ rtc_init_after_clock_fail
btfsc RTC_BYTE,0
goto rtc_error_ack
- movlw .16
+ movlw .4
movwf RTC_BYTE_CNT
-rtc_init_clear
+rtc_init_clear1
clrw
call i2c_send_byte
btfsc RTC_BYTE,0
goto rtc_error_ack
decfsz RTC_BYTE_CNT,f
- goto rtc_init_clear
+ goto rtc_init_clear1
+
+ movlw .2
+ movwf RTC_BYTE_CNT
+rtc_init_clear2
+ movlw .1
+ call i2c_send_byte
+ btfsc RTC_BYTE,0
+ goto rtc_error_ack
+ decfsz RTC_BYTE_CNT,f
+ goto rtc_init_clear2
+
+ movlw .10
+ movwf RTC_BYTE_CNT
+rtc_init_clear3
+ clrw
+ call i2c_send_byte
+ btfsc RTC_BYTE,0
+ goto rtc_error_ack
+ decfsz RTC_BYTE_CNT,f
+ goto rtc_init_clear3
call i2c_stop
return