changeset 359:91352bb698cf

Oups... time to sleep !
author JeanDo
date Tue, 07 Jun 2011 19:10:49 +0200
parents b41f615d4219
children d4ca9196e830
files code_part1/OSTC_code_asm_part1/isr.asm code_part1/OSTC_code_asm_part1/start.asm
diffstat 2 files changed, 4 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/isr.asm	Tue Jun 07 11:55:31 2011 +0200
+++ b/code_part1/OSTC_code_asm_part1/isr.asm	Tue Jun 07 19:10:49 2011 +0200
@@ -375,11 +375,9 @@
 RTCisr2:
 		incf		secs,F					; adjusts seconds, minutes, hours, day, month and year. Checks for a leap year and works until 2099!
 		movlw		d'60'
-		cpfseq		secs
-		bra         secs_60
-        return
-secs_60:
-		clrf		secs
+		cpfseq		secs                    ; Secs == 60 ?
+        return                              ; NO : done.
+		clrf		secs                    ; YES: increment minutes instead...
 		bsf			oneminupdate
 		incf		mins,F
 		movlw		d'59'
--- a/code_part1/OSTC_code_asm_part1/start.asm	Tue Jun 07 11:55:31 2011 +0200
+++ b/code_part1/OSTC_code_asm_part1/start.asm	Tue Jun 07 19:10:49 2011 +0200
@@ -39,7 +39,7 @@
 	call	PLED_resetdebugger		; Yes! Something went wrong, show reset informations
 start3:
 	clrf	STKPTR					; Clear Stackpointer
-	lfsr	FSR0, 10Bh				; Clear rambank 1-9, do not delete RTC registers
+	lfsr	FSR0,year+1				; Clear rambank 1-9, do not delete RTC registers
 clear_rambank:
 	clrf	POSTINC0
 	movlw	0x0A