comparison 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
comparison
equal deleted inserted replaced
575:cbdcbbc91877 576:ab2686087bce
202 ; Output : NONE 202 ; Output : NONE
203 ; Trash : WREG 203 ; Trash : WREG
204 ; 204 ;
205 AA_CMD_WRITE macro cmd 205 AA_CMD_WRITE macro cmd
206 movlw cmd 206 movlw cmd
207 rcall PLED_CmdWrite 207 ; rcall PLED_CmdWrite ; slow but saves a lot of bytes in flash
208 ; bcf oled_rs ; Cmd mode 208 ; /* Fast writing
209 ; movwf PORTD,A 209 bcf oled_rs ; Cmd mode
210 ; bcf oled_rw ; Tick the clock 210 movwf PORTD,A
211 ; bsf oled_rw 211 bcf oled_rw ; Tick the clock
212 bsf oled_rw
213 ; Fast writing */
212 endm 214 endm
213 ; 215 ;
214 ; Input : data as macro parameter. 216 ; Input : data as macro parameter.
215 ; Output : NONE 217 ; Output : NONE
216 ; Trash : WREG 218 ; Trash : WREG
223 ; Input : PRODH:L as 16bits data. 225 ; Input : PRODH:L as 16bits data.
224 ; Output : NONE 226 ; Output : NONE
225 ; Trash : NONE 227 ; Trash : NONE
226 ; 228 ;
227 AA_DATA_WRITE_PROD macro 229 AA_DATA_WRITE_PROD macro
228 rcall PLED_DataWrite_PROD 230 ; rcall PLED_DataWrite_PROD ; slow but saves a lot of bytes in flash
229 ; bsf oled_rs ; Data mode 231 ; /* Fast writing
230 ; movff PRODH,PORTD ; NOTE: OLED is BIGENDIAN! 232 bsf oled_rs ; Data mode
231 ; bcf oled_rw ; Tick the clock 233 movff PRODH,PORTD ; NOTE: OLED is BIGENDIAN!
232 ; bsf oled_rw 234 bcf oled_rw ; Tick the clock
233 ; movff PRODL,PORTD 235 bsf oled_rw
234 ; bcf oled_rw ; Tick the clock 236 movff PRODL,PORTD
235 ; bsf oled_rw 237 bcf oled_rw ; Tick the clock
238 bsf oled_rw
239 ; Fast writing */
236 endm 240 endm
237 241
238 ;============================================================================= 242 ;=============================================================================
239 ; Output OLED Window Address commands. 243 ; Output OLED Window Address commands.
240 ; Inputs : win_top, win_leftx2, win_height, aa_width. 244 ; Inputs : win_top, win_leftx2, win_height, aa_width.