Gast
#366751
Hallo
Bin am verzweifeln beim Textdarstellen eines Displays von Display
3000.
Bekomme die textdarstellung nicht hin.
habe aus einen Beispiel folgendes
int n6100DrawChar(char c) {
uint16_t index;
uint8_t i, j, w, data, skipped=1, startY=yCoord;
sendCMD(MEM_ACCESS_CTRL);
memAccessCtrl |= (0x01 << VERT_WRITE);
sendData(memAccessCtrl);
if(c == '\n')
n6100NewLine();
if(c < 32)
return 0;
c -= 32;
index = c*f.width*(f.height/8);
for(w=0; w<f.width; w++) {
for(i=0; i<f.height/8; i++) {
data = pgm_read_byte(f.charData + index++);
for(j=0; j<8; j++) {
if(data & 0x01) {
if(skipped) {
n6100GotoXY(xCoord, yCoord);
sendCMD(MEM_WRITE);
skipped=0;
}
n6100DrawPixel();
yCoord++;
} else {
skipped=1;
n6100GotoXY(xCoord, ++yCoord);
}
data >>= 1;
}
}
n6100GotoXY(++xCoord, startY);
}
sendCMD(MEM_ACCESS_CTRL);
memAccessCtrl &= ~(0x01 << VERT_WRITE);
sendData(memAccessCtrl);
return 0;
}
wenn ich als c ='9' schicke dann sieht es aus wie Japanische
Schrift.
aber nicht wie eine 9
0x00, 0x06, 0x49, 0x49, 0x29, 0x1E, // "9"
welchen wert hat data bei
data = pgm_read_byte(f.charData + index++);
hatt data 01101101????
danke