diff code_part1/OSTC_code_asm_part1/oled_samsung.asm @ 576:ab2686087bce

faster font display, code cleaning
author heinrichsweikamp
date Sun, 22 Apr 2012 14:38:10 +0200
parents 2ac77db9c150
children e3ffc6d62a63
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/oled_samsung.asm	Sat Apr 21 15:08:09 2012 +0200
+++ b/code_part1/OSTC_code_asm_part1/oled_samsung.asm	Sun Apr 22 14:38:10 2012 +0200
@@ -204,11 +204,13 @@
 ;
 AA_CMD_WRITE macro cmd
 		movlw	cmd
-		rcall   PLED_CmdWrite
-;		bcf		oled_rs				    ; Cmd mode
-;		movwf	PORTD,A
-;		bcf		oled_rw				    ; Tick the clock
-;		bsf		oled_rw
+;		rcall   PLED_CmdWrite			; slow but saves a lot of bytes in flash
+	; /* Fast writing
+		bcf		oled_rs				    ; Cmd mode
+		movwf	PORTD,A
+		bcf		oled_rw				    ; Tick the clock
+		bsf		oled_rw
+	; Fast writing */
 		endm
 ;
 ; Input	 : data as macro parameter.
@@ -225,14 +227,16 @@
 ; Trash  : NONE
 ;
 AA_DATA_WRITE_PROD	macro
-        rcall   PLED_DataWrite_PROD
-;		bsf		oled_rs				    ; Data mode
-;		movff	PRODH,PORTD			    ; NOTE: OLED is BIGENDIAN!
-;		bcf		oled_rw				    ; Tick the clock
-;		bsf		oled_rw
-;		movff	PRODL,PORTD
-;		bcf		oled_rw				    ; Tick the clock
-;		bsf		oled_rw
+;       rcall   PLED_DataWrite_PROD	; slow but saves a lot of bytes in flash
+	; /* Fast writing
+		bsf		oled_rs				    ; Data mode
+		movff	PRODH,PORTD			    ; NOTE: OLED is BIGENDIAN!
+		bcf		oled_rw				    ; Tick the clock
+		bsf		oled_rw
+		movff	PRODL,PORTD
+		bcf		oled_rw				    ; Tick the clock
+		bsf		oled_rw
+	; Fast writing */
 		endm
 
 ;=============================================================================