diff code_part1/OSTC_code_asm_part1/oled_samsung.asm @ 330:447390289f47 ScreenDump

NEW screen_dump serial command (l)
author JeanDo
date Tue, 10 May 2011 03:18:20 +0200
parents cb055a7d75f3
children 469f4861c7c1
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/oled_samsung.asm	Mon May 09 08:12:12 2011 +0200
+++ b/code_part1/OSTC_code_asm_part1/oled_samsung.asm	Tue May 10 03:18:20 2011 +0200
@@ -184,6 +184,15 @@
 ;		bsf		oled_rw
 		endm
 ;
+; Input	 : data as macro parameter.
+; Output : NONE
+; Trash  : WREG
+;
+AA_DATA_WRITE macro data
+        movlw   data
+        rcall   PLED_DataWrite
+        endm
+;
 ; Input	 : PRODH:L as 16bits data.
 ; Output : NONE
 ; Trash  : NONE
@@ -517,6 +526,24 @@
 	return
 
 ; -----------------------------
+; PLED Read data into WREG
+; -----------------------------
+; NOTE: you should "setf TRISD" before calling this function,
+;       to make PortD an input port...
+PLED_DataRead:
+	bsf		oled_rs					; Data register.
+    nop                             ; Enable delay to read data...
+	bcf		oled_e_nwr              ; Read enable.
+    nop
+    nop
+    nop
+    nop
+    nop
+	movf	PORTD,W				    ; Read byte.
+	bsf		oled_e_nwr              ; release bus.
+	return
+
+; -----------------------------
 ; PLED boot
 ; -----------------------------
 PLED_boot: