diff code_part1/OSTC_code_asm_part1/start.asm @ 153:17de42ab02b6

realtime clock defaults
author heinrichsweikamp
date Thu, 13 Jan 2011 09:05:45 +0100
parents 8b75ba28d641
children a52ba692ad7f
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/start.asm	Wed Jan 12 14:38:24 2011 +0100
+++ b/code_part1/OSTC_code_asm_part1/start.asm	Thu Jan 13 09:05:45 2011 +0100
@@ -133,9 +133,6 @@
 	GETCUSTOM8	d'48'				; time correction value
 	movff	WREG, time_correction_value	; store in Bank0 register
 
-	GETCUSTOM8	d'63'				; OLED flip_screen flag(s).
-	movff	WREG,win_flags          ; store in Bank0 register
-
 	clrf	flag1					; clear all flags
 	clrf	flag2
 	clrf	flag3
@@ -151,6 +148,19 @@
 	clrf	flag13
 	clrf	flag14
 	clrf	flag15
+
+	bsf		flag1,0
+	clrf	EEADRH					; Reset EEADRH
+	read_int_eeprom	d'1'
+	movlw	.7
+	cpfsgt	EEDATA					; >2048?
+	bcf		flag1,0
+	movff	flag1,win_flags			; store in Bank0 register
+	clrf	flag1					; Clear flag1 (again)
+	movlw	.39
+	cpfslt	EEDATA					; >10000
+	bsf		nsm						; For hardware debugging
+
 	call	gassetup_sort_gaslist       ; Sorts Gaslist according to change depth
 	call	PLED_boot                   ; PLED boot (Incl. Clear Screen!)
 	WIN_TOP		.0