Mercurial > public > mk2
changeset 331:469f4861c7c1 ScreenDump
Debug screen dump
author | JeanDo |
---|---|
date | Tue, 10 May 2011 09:49:18 +0200 |
parents | 447390289f47 |
children | 1828234369fc |
files | code_part1/OSTC_code_asm_part1/dump_screen.asm code_part1/OSTC_code_asm_part1/oled_samsung.asm code_part1/OSTC_code_asm_part1/surfmode.asm |
diffstat | 3 files changed, 20 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/dump_screen.asm Tue May 10 03:18:20 2011 +0200 +++ b/code_part1/OSTC_code_asm_part1/dump_screen.asm Tue May 10 09:49:18 2011 +0200 @@ -52,7 +52,7 @@ dump_screen_0: ;---- Send OLED box command for the full screen window ------------------- - mullw 0 ; PRODH:L <- 0 + mullw 0 ; PRODH:L <- 0 AA_CMD_WRITE 0x35 ; VerticalStartAddress HIGH:LOW AA_DATA_WRITE_PROD ; 00:00 @@ -76,41 +76,44 @@ rcall PLED_DataRead ; Dummy pixel to skip. movlw .160 ; 160x2 columns - movwf PRODH + movwf uart1_temp dump_screen_1: btg LED_red ; LEDactivity toggle + AA_CMD_WRITE 0x22 ; Re-sync data. + movlw .240 ; 240 lines - movwf PRODL + movwf uart2_temp + + setf TRISD ; PortD as input. + clrf PORTD dump_screen_2: - setf TRISD ; PortD as input. rcall PLED_DataRead ; read first pixel-low byte movwf TXREG ; send call rs232_wait_tx ; wait for UART - + rcall PLED_DataRead ; read first pixel-high byte movwf TXREG ; send - call rs232_wait_tx ; wait for UART - + call rs232_wait_tx ; wait for UART + rcall PLED_DataRead ; read second pixel-low byte movwf TXREG ; send - call rs232_wait_tx ; wait for UART + call rs232_wait_tx ; wait for UART rcall PLED_DataRead ; read second pixel-high byte movwf TXREG ; send - call rs232_wait_tx ; wait for UART + call rs232_wait_tx ; wait for UART + + + decfsz uart2_temp,F + bra dump_screen_2 clrf TRISD ; Back to normal (PortD as output) - decfsz PRODL,F - bra dump_screen_2 - - AA_CMD_WRITE 0x22 ; Sync high/low byte, again. - - decfsz PRODH,F - bra dump_screen_1 + decfsz uart1_temp,F + bra dump_screen_1 AA_CMD_WRITE 0x00 ; NOP, to stop Address Update Counter return
--- a/code_part1/OSTC_code_asm_part1/oled_samsung.asm Tue May 10 03:18:20 2011 +0200 +++ b/code_part1/OSTC_code_asm_part1/oled_samsung.asm Tue May 10 09:49:18 2011 +0200 @@ -532,13 +532,7 @@ ; 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
--- a/code_part1/OSTC_code_asm_part1/surfmode.asm Tue May 10 03:18:20 2011 +0200 +++ b/code_part1/OSTC_code_asm_part1/surfmode.asm Tue May 10 09:49:18 2011 +0200 @@ -200,7 +200,7 @@ btfsc uart_reset_battery_stats ; Reset Battery stats? goto reset_battery_stats ; Yes! btfsc uart_dump_screen ; Dumps screen contains ? - goto dump_screen ; Yes! + call dump_screen ; Yes! bra surfloop_loop ; loop surfacemode