6 void UTFT::LCD_Writ_Bus(
char VH,
char VL, byte mode)
11 if (display_serial_mode==SERIAL_4PIN)
17 pulse_low(P_SCL, B_SCL);
31 pulse_low(P_SCL, B_SCL);
36 pulse_low(P_SCL, B_SCL);
41 pulse_low(P_SCL, B_SCL);
46 pulse_low(P_SCL, B_SCL);
51 pulse_low(P_SCL, B_SCL);
56 pulse_low(P_SCL, B_SCL);
61 pulse_low(P_SCL, B_SCL);
66 pulse_low(P_SCL, B_SCL);
72 PORTC += ((VH & 0x20)<<1);
73 PORTD += ((VH & 0x40)<<1) + (VH & 0x10) + ((VH & 0x08)>>3) + ((VH & 0x04)>>1) + ((VH & 0x03)<<2);
74 PORTE += ((VH & 0x80)>>1);
75 pulse_low(P_WR, B_WR);
80 PORTC += ((VL & 0x20)<<1);
81 PORTD += ((VL & 0x40)<<1) + (VL & 0x10) + ((VL & 0x08)>>3) + ((VL & 0x04)>>1) + ((VL & 0x03)<<2);
82 PORTE += ((VL & 0x80)>>1);
83 pulse_low(P_WR, B_WR);
92 PORTB |= ((VL & 0x0F)<<4);
93 PORTC |= ((VL & 0x20)<<2) + ((VH & 0x20)<<1);
94 PORTD |= ((VH & 0x40)<<1) + (VH & 0x10) + ((VH & 0x08)>>3) + ((VH & 0x04)>>1) + ((VH & 0x03)<<2) + ((VL & 0x10)<<2);
95 PORTE |= ((VH & 0x80)>>1);
96 PORTF |= ((VL & 0x80)>>1) + ((VL & 0x40)<<1);
98 pulse_low(P_WR, B_WR);
104 PORTC += ((VH & 0x20)<<1);
105 PORTD += ((VH & 0x40)<<1) + (VH & 0x10) + ((VH & 0x08)>>3) + ((VH & 0x04)>>1) + ((VH & 0x03)<<2);
106 PORTE += ((VH & 0x80)>>1);
108 pulse_high(P_ALE, B_ALE);
113 PORTC += ((VL & 0x20)<<1);
114 PORTD += ((VL & 0x40)<<1) + (VL & 0x10) + ((VL & 0x08)>>3) + ((VL & 0x04)>>1) + ((VL & 0x03)<<2);
115 PORTE += ((VL & 0x80)>>1);
116 pulse_low(P_WR, B_WR);
122 void UTFT::_set_direction_registers(byte mode)
142 void UTFT::_fast_fill_16(
int ch,
int cl,
long pix)
152 PORTB |= ((cl & 0x0F)<<4);
153 PORTC |= ((cl & 0x20)<<2) + ((ch & 0x20)<<1);
154 PORTD |= ((ch & 0x40)<<1) + (ch & 0x10) + ((ch & 0x08)>>3) + ((ch & 0x04)>>1) + ((ch & 0x03)<<2) + ((cl & 0x10)<<2);
155 PORTE |= ((ch & 0x80)>>1);
156 PORTF |= ((cl & 0x80)>>1) + ((cl & 0x40)<<1);
159 for (
int i=0; i<blocks; i++)
161 pulse_low(P_WR, B_WR);
162 pulse_low(P_WR, B_WR);
163 pulse_low(P_WR, B_WR);
164 pulse_low(P_WR, B_WR);
165 pulse_low(P_WR, B_WR);
166 pulse_low(P_WR, B_WR);
167 pulse_low(P_WR, B_WR);
168 pulse_low(P_WR, B_WR);
169 pulse_low(P_WR, B_WR);
170 pulse_low(P_WR, B_WR);
171 pulse_low(P_WR, B_WR);
172 pulse_low(P_WR, B_WR);
173 pulse_low(P_WR, B_WR);
174 pulse_low(P_WR, B_WR);
175 pulse_low(P_WR, B_WR);
176 pulse_low(P_WR, B_WR);
179 for (
int i=0; i<(pix % 16)+1; i++)
181 pulse_low(P_WR, B_WR);
185 void UTFT::_fast_fill_8(
int ch,
long pix)
193 PORTC |= ((ch & 0x20)<<1);
194 PORTD |= ((ch & 0x40)<<1) + (ch & 0x10) + ((ch & 0x08)>>3) + ((ch & 0x04)>>1) + ((ch & 0x03)<<2);
195 PORTE |= ((ch & 0x80)>>1);
198 for (
int i=0; i<blocks; i++)
200 pulse_low(P_WR, B_WR);pulse_low(P_WR, B_WR);
201 pulse_low(P_WR, B_WR);pulse_low(P_WR, B_WR);
202 pulse_low(P_WR, B_WR);pulse_low(P_WR, B_WR);
203 pulse_low(P_WR, B_WR);pulse_low(P_WR, B_WR);
204 pulse_low(P_WR, B_WR);pulse_low(P_WR, B_WR);
205 pulse_low(P_WR, B_WR);pulse_low(P_WR, B_WR);
206 pulse_low(P_WR, B_WR);pulse_low(P_WR, B_WR);
207 pulse_low(P_WR, B_WR);pulse_low(P_WR, B_WR);
208 pulse_low(P_WR, B_WR);pulse_low(P_WR, B_WR);
209 pulse_low(P_WR, B_WR);pulse_low(P_WR, B_WR);
210 pulse_low(P_WR, B_WR);pulse_low(P_WR, B_WR);
211 pulse_low(P_WR, B_WR);pulse_low(P_WR, B_WR);
212 pulse_low(P_WR, B_WR);pulse_low(P_WR, B_WR);
213 pulse_low(P_WR, B_WR);pulse_low(P_WR, B_WR);
214 pulse_low(P_WR, B_WR);pulse_low(P_WR, B_WR);
215 pulse_low(P_WR, B_WR);pulse_low(P_WR, B_WR);
218 for (
int i=0; i<(pix % 16)+1; i++)
220 pulse_low(P_WR, B_WR);pulse_low(P_WR, B_WR);