w_bwr
Member level 3
- Joined
- Feb 4, 2010
- Messages
- 66
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,286
- Location
- Karachi, Pakistan
- Activity points
- 1,810
Controller: PIC-18f452
Compiler : CCS v 4.125
GLCD: 96*60 KS0713 Family Graphic LCDs
I want to make changes to GLCD Driver and I don't understand the following things:
Print Character Routine:
TABLE5[48][5] contains the ASCII codes for characters.
dt_Lcd_Write_data() & dt_lcd_write_dorc routines are:
Q1: How to set a single pixel?
Q2: I am create a menu in GLCD and want to highlight the text. For that purpose, I have draw a rectangle of dark pixels and write text in white. How to do that?
Q3:
t_lcd_write_data(char bytefor) takes a character as input then,
what is this supposed to mean?
Compiler : CCS v 4.125
GLCD: 96*60 KS0713 Family Graphic LCDs
I want to make changes to GLCD Driver and I don't understand the following things:
Print Character Routine:
Code:
void dt_lcd_printchar(byte cvar) // Write 1 character to LCD
{
charsel=cvar;
int i;
for ( i = 0; i < 5; i++ ){
if(charsel<0x50) dt_Lcd_Write_data(TABLE5[charsel - 0x20][i] << 1);
else if(charsel>0x4f) dt_Lcd_Write_data(TABLE6[charsel - 0x50][i] << 1);
} // send data to nokia
dt_lcd_write_data(0x00); // 1 byte (always blank)
}
TABLE5[48][5] contains the ASCII codes for characters.
dt_Lcd_Write_data() & dt_lcd_write_dorc routines are:
Code:
oid dt_lcd_write_data(char bytefor_data)
{
dt_cs=0;
//nop;nop;nop;nop;
dt_rs=1;
dt_lcd_write_dorc(bytefor_data); // write display data
dt_cs=1;
}
//////////////////////////////////////////////////////////////////////////////////
void dt_lcd_write_dorc(char bytefor) // serial write data or command subroutine
{
char caa;
for (caa=8;caa>0;caa--) {
dt_sclk=0;
// delay_us(2);
if ((bytefor&0x80)==0){dt_sid=0;}
else {dt_sid=1;}
//nop;nop;
dt_sclk=1;
bytefor=bytefor<<1;
//nop;nop;
}
}
Q1: How to set a single pixel?
Q2: I am create a menu in GLCD and want to highlight the text. For that purpose, I have draw a rectangle of dark pixels and write text in white. How to do that?
Q3:
t_lcd_write_data(char bytefor) takes a character as input then,
what is this supposed to mean?
Code:
the " << 1 " in the following line:
dt_Lcd_Write_data(TABLE5[charsel - 0x20][i] << 1);