comparison src/tft.asm @ 441:360acdcda0d7

+BUGFIX: Compatibility with "hwOS Config" fixed +NEW: New hardware descriptor command 0x60 added (For PC programs)
author heinrichsweikamp
date Tue, 26 Jul 2016 12:08:29 +0200
parents 95ee78f4a974
children 4927ba3bd3b5
comparison
equal deleted inserted replaced
440:36a9ac914ce3 441:360acdcda0d7
319 bsf lightsen_power ; Supply power to light sensor 319 bsf lightsen_power ; Supply power to light sensor
320 320
321 ; Data Transfer Synchronization 321 ; Data Transfer Synchronization
322 Parameter_out 0x00, 0x00 322 Parameter_out 0x00, 0x00
323 Parameter_out 0x00, 0x00 323 Parameter_out 0x00, 0x00
324 324
325 Index_out 0x00 325 ; Get screentype from Bootloader-Info
326 rcall TFT_CmdRead_PROD ; Get ID into PRODL:PRODH 326 movlw 0x7B
327 ; 5:197 -> display0 327 movwf TBLPTRL
328 ;37:147 -> display1 328 movlw 0xF7
329 movlw .5 329 movwf TBLPTRH
330 cpfseq PRODL ; display0? 330 movlw 0x01
331 bra TFT_boot_1 ; No 331 movwf TBLPTRU
332 movlw .197 332 TBLRD*+ ; Reads .110 for cR and USB OSTC3, .0 for BLE (2 and 3), and .2 for display1 OSTC
333 cpfseq PRODH ; display0? 333 movlw 0x02
334 bra TFT_boot_1 ; No 334 cpfseq TABLAT
335 335 bra TFT_boot_0 ; Display0
336 ; Init through config table...
337 movlw LOW display0_config_table
338 movwf TBLPTRL
339 movlw HIGH display0_config_table
340 movwf TBLPTRH
341 movlw UPPER display0_config_table
342 movwf TBLPTRU
343 bcf screen_type
344 bra TFT_boot_com
345 336
346 TFT_boot_1: 337 TFT_boot_1:
347 ; Init through config table... 338 ; Init through config table...
348 movlw 0x74 339 movlw 0x74
349 movwf TBLPTRL 340 movwf TBLPTRL
350 movlw 0xF7 341 movlw 0xF7
351 movwf TBLPTRH 342 movwf TBLPTRH
352 movlw 0x01 343 movlw 0x01
353 movwf TBLPTRU 344 movwf TBLPTRU
354 bsf screen_type 345 bsf screen_type
355 346 bra TFT_boot_com
347
348 TFT_boot_0:
349 ; Init through config table...
350 movlw LOW display0_config_table
351 movwf TBLPTRL
352 movlw HIGH display0_config_table
353 movwf TBLPTRH
354 movlw UPPER display0_config_table
355 movwf TBLPTRU
356 bcf screen_type
357
356 TFT_boot_com: 358 TFT_boot_com:
357 rcall display0_init_loop 359 rcall display0_init_loop
358 360
359 Index_out 0x03 361 Index_out 0x03
360 btfsc flip_screen ; 180° rotation ? 362 btfsc flip_screen ; 180° rotation ?
658 Index_out 0x22 ; Frame Memory Data Read start 660 Index_out 0x22 ; Frame Memory Data Read start
659 TFT_CmdRead_PROD: 661 TFT_CmdRead_PROD:
660 setf TRISA ; PortA as input. 662 setf TRISA ; PortA as input.
661 setf TRISH ; PortH as input. 663 setf TRISH ; PortH as input.
662 RS_H ; Data 664 RS_H ; Data
663 ; WR_H ; Not write 665 WR_H ; Not write
664 RD_L ; Read! 666 RD_L ; Read!
665 nop 667 nop
666 nop 668 nop
667 nop 669 nop
668 RD_H ; Tick 670 RD_H ; Tick