colvstef
Newbie level 4
- Joined
- Mar 30, 2008
- Messages
- 7
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Activity points
- 1,353
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Code dot - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 ;======================================================= bcf CS_LCD ; chip select TFT IC call Delay5ms ;======================================================= ; Hard Reset bsf RST_LCD call Delay10ms bcf RST_LCD ; hard reset call Delay100ms bsf RST_LCD call Delay100ms ;======================================================= ; SDT018ATFT RGB Interface Initialization Code ; **broken link removed** Code#.VCktHlPBBCh write_command(0x01) ; soft reset call Delay100 ; delay(100);//delay 100ms write_command(0x11) ; //Exit Sleep call Delay100 ; delay(100); write_command(0x3A) ; //Set Interface Pixel write_index(0x66) ;//18bit RGB IF call Delay100 ;¡@¡@¡@delay(100); write_command(0x26) ; //Set Default Gamma write_index(0x04); write_command(0xf2); //E0h & E1h Enable/Disable write_index(0x01) ; write_command(0xE0) ; write_index(0x3F) ; write_index(0x25) ; write_index(0x1C) ; write_index(0x1E) ; write_index(0x20) ; write_index(0x12) ; write_index(0x2A) ; write_index(0x90) ; write_index(0x24) ; write_index(0x11) ; write_index(0x00) ; write_index(0x00) ; write_index(0x00) ; write_index(0x00) ; write_index(0x00) ; write_command(0xE1) ; //Negative Gamma Setting write_index(0x20) ; write_index(0x20) ; write_index(0x20) ; write_index(0x20) ; write_index(0x05) ; write_index(0x00) ; write_index(0x15) ; write_index(0xA7) ; write_index(0x3D) ; write_index(0x18) ; write_index(0x25) ; write_index(0x2A) ; write_index(0x2B) ; write_index(0x2B) ; write_index(0x3A) ; write_command(0xB1) ; Frame Rate Control write_index(0x08) ;//08 write_index(0x08) ;//14 write_command(0xc0) ; //Set VRH1[4:0] & VC[2:0] for VCI1 & GVDD write_index(0x14) ; //0A write_index(0x02) ; write_command(0xC1) ; //Set BT[2:0] for AVDD & VCL & VGH & VGL write_index(0x02) ; write_command(0xC5) ; //Set VMH[6:0] & VML[6:0] for VOMH & VCOML write_index(0x1d) ; //1a write_index(0x4a) ; //4a write_command(0xC7) ; //Set VMH[6:0] & VML[6:0] for VOMH & VCOML write_index(0xCa) ; //d0 modify the fliker write_command(0x2A) ; //Set Column Address write_index(0x00) ; write_index(0x00) ; write_index(0x00) ; write_index(0x7F) ; write_command(0x2B) ; //Set Page Address write_index(0x00) ; write_index(0x00) ; write_index(0x00) ; write_index(0x9F) ; write_command(0xEC) ; ???????????? write_index(0x0C) ; write_command(0x36) ; //Set Scanning Direction write_index(0xC8) ; write_command(0x29) ; // Display On write_command(0x2c) ; //WRITE ram Data display call Delay100 ; delay(100); ;and i try to write ram data display but i don't view any modification on ;display ;i try Display Inversion Off/Off command and i suppose to change color of ;display but i don't view any ;modification on display. I don't know ? ;------------------------------------------------------------- write_index macro value movlw value movwf BUFFER call Parameter endm ;------------------------------------------------------------- write_command macro value movlw value movwf BUFFER ; store register call Command endm ;------------------------------------------------------------- Command: bcf D_CX nop nop nop nop nop movf BUFFER,0 movwf SSP2BUF LOOP_WC BTFSS SSP2STAT, BF ;Has data been received (transmit complete)? BRA LOOP_WC ;No bcf SSP2STAT, BF bsf D_CX return ;--------------------------------------------------- Parameter: bsf D_CX nop nop nop nop nop movf BUFFER,0 movwf SSP2BUF LOOP_WI BTFSS SSP2STAT, BF ;Has data been received (transmit complete)? BRA LOOP_WI ;No bcf SSP2STAT, BF return ;---------------------------------------------------