Estoy disfrutando como un bebé con su chupete nuebo .
Codigo:
byte CONST System_3_6_0 [195]={ /* font System 3x6 (char #32 to #96) */
0x00,0x00,0x00, /* Espace 0x20 */
0x00,0x5C,0x00, /* ! */
0x0C,0x00,0x0C, /* " */
0x7C,0x28,0x7C, /* # */
0x7C,0x44,0x7C, /* 0x */
0x24,0x10,0x48, /* % */
0x28,0x54,0x08, /* & */
0x00,0x0C,0x00, /* " */
0x38,0x44,0x00, /* ( */
0x44,0x38,0x00, /* ) */
0x20,0x10,0x08, /* // */
0x10,0x38,0x10, /* + */
0x80,0x40,0x00, /* , */
0x10,0x10,0x10, /* - */
0x00,0x40,0x00, /* . */
0x20,0x10,0x08, /* / */
0x38,0x44,0x38, /* 0 0x30 */
0x00,0x7C,0x00, /* 1 */
0x64,0x54,0x48, /* 2 */
0x44,0x54,0x28, /* 3 */
0x1C,0x10,0x7C, /* 4 */
0x4C,0x54,0x24, /* 5 */
0x38,0x54,0x20, /* 6 */
0x04,0x74,0x0C, /* 7 */
0x28,0x54,0x28, /* 8 */
0x08,0x54,0x38, /* 9 */
0x00,0x50,0x00, /* : */
0x80,0x50,0x00, /* ; */
0x10,0x28,0x44, /* < */
0x28,0x28,0x28, /* = */
0x44,0x28,0x10, /* > */
0x04,0x54,0x08, /* ? */
0x38,0x4C,0x5C, /* @ 0x40 */
0x78,0x14,0x78, /* A */
0x7C,0x54,0x28, /* B */
0x38,0x44,0x44, /* C */
0x7C,0x44,0x38, /* D */
0x7C,0x54,0x44, /* E */
0x7C,0x14,0x04, /* F */
0x38,0x44,0x34, /* G */
0x7C,0x10,0x7C, /* H */
0x00,0x7C,0x00, /* I */
0x20,0x40,0x3C, /* J */
0x7C,0x10,0x6C, /* K */
0x7C,0x40,0x40, /* L */
0x7C,0x08,0x7C, /* M */
0x7C,0x04,0x7C, /* N */
0x7C,0x44,0x7C, /* O */
0x7C,0x14,0x08, /* P 0x50 */
0x38,0x44,0x78, /* Q */
0x7C,0x14,0x68, /* R */
0x48,0x54,0x24, /* S */
0x04,0x7C,0x04, /* T */
0x7C,0x40,0x7C, /* U */
0x3C,0x40,0x3C, /* V */
0x7C,0x20,0x7C, /* W */
0x6C,0x10,0x6C, /* X */
0x1C,0x60,0x1C, /* Y */
0x64,0x54,0x4C, /* Z */
0x7C,0x44,0x00, /* [ */
0x08,0x10,0x20, /* */
0x44,0x7C,0x00, /* ] */
0x08,0x04,0x08, /* ^ */
0x80,0x80,0x80, /* _ */
0x04,0x08,0x00 /* ` 0x60 */
};
/// *****************************************************************************
byte CONST System_7_8_0 [255]={ /* System 7x8 (char #32 to #67) */
0, 0, 0, 0, 0, 0, 0, //" "
0, 6, 95, 95, 6, 0, 0, //"!"
0, 7, 7, 0, 7, 7, 0, //"""
20, 127, 127, 20, 127, 127, 20, //"#"
36, 46, 107, 107, 58, 18, 0, //"$"
70, 102, 48, 24, 12, 102, 98, //"%"
48, 122, 79, 93, 55, 122, 72, //"&"
4, 7, 3, 0, 0, 0, 0, //"""
0, 28, 62, 99, 65, 0, 0, //"("
0, 65, 99, 62, 28, 0, 0, //")"
8, 42, 62, 28, 28, 62, 42, //"*"
8, 8, 62, 62, 8, 8, 0, //"+"
0, 128, 224, 96, 0, 0, 0, //","
8, 8, 8, 8, 8, 8, 0, //"-"
0, 0, 96, 96, 0, 0, 0, //"."
96, 48, 24, 12, 6, 3, 1, //"/"
62, 127, 113, 89, 77, 127, 62, //"0"
64, 66, 127, 127, 64, 64, 0, //"1"
98, 115, 89, 73, 111, 102, 0, //"2"
34, 99, 73, 73, 127, 54, 0, //"3"
24, 28, 22, 83, 127, 127, 80, //"4"
39, 103, 69, 69, 125, 57, 0, //"5"
60, 126, 75, 73, 121, 48, 0, //"6"
3, 3, 113, 121, 15, 7, 0, //"7"
54, 127, 73, 73, 127, 54, 0, //"8"
6, 79, 73, 105, 63, 30, 0, //"9"
0, 0, 102, 102, 0, 0, 0, //":"
0, 128, 230, 102, 0, 0, 0, //";"
8, 28, 54, 99, 65, 0, 0, //"<"
36, 36, 36, 36, 36, 36, 0, //"="
0, 65, 99, 54, 28, 8, 0, //">"
2, 3, 81, 89, 15, 6, 0, //"?"
62, 127, 65, 93, 93, 31, 30, //"@"
124, 126, 19, 19, 126, 124, 0, //"A"
65, 127, 127, 73, 73, 127, 54, //"B"
28, 62, 99, 65, 65, 99, 34 //"C"
};
byte CONST System_7_8_1 [255]={ /* System 7x8 (char #68 to #103) */
65, 127, 127, 65, 99, 62, 28, //"D"
65, 127, 127, 73, 93, 65, 99, //"E"
65, 127, 127, 73, 29, 1, 3, //"F"
28, 62, 99, 65, 81, 115, 114, //"G"
127, 127, 8, 8, 127, 127, 0, //"H"
0, 65, 127, 127, 65, 0, 0, //"I"
48, 112, 64, 65, 127, 63, 1, //"J"
65, 127, 127, 8, 28, 119, 99, //"K"
65, 127, 127, 65, 64, 96, 112, //"L"
127, 127, 14, 28, 14, 127,127, //"M"
127, 127, 6, 12, 24, 127,127, //"N"
28, 62, 99, 65, 99, 62, 28, //"O"
65, 127, 127, 73, 9, 15, 6, //"P"
30, 63, 33, 113, 127, 94, 0, //"Q"
65, 127, 127, 9, 25, 127, 102, //"R"
38, 111, 77, 89, 115, 50, 0, //"S"
3, 65, 127, 127, 65, 3, 0, //"T"
127, 127, 64, 64, 127, 127, 0, //"U"
31, 63, 96, 96, 63, 31, 0, //"V"
127, 127, 48, 24, 48, 127, 127, //"W"
67, 103, 60, 24, 60, 103, 67, //"X"
7, 79, 120, 120, 79, 7, 0, //"Y"
71, 99, 113, 89, 77, 103, 115, //"Z"
0, 127, 127, 65, 65, 0, 0, //"["
1, 3, 6, 12, 24, 48, 96, //""
0, 65, 65, 127, 127, 0, 0, //"]"
8, 12, 6, 3, 6, 12, 8, //"^"
128, 128, 128, 128, 128,128, 128, //"_"
0, 0, 3, 7, 4, 0, 0, //"`"
32, 116, 84, 84, 60, 120, 64, //"a"
65, 127, 63, 72, 72, 120, 48, //"b"
56, 124, 68, 68, 108, 40, 0, //"c"
48, 120, 72, 73, 63, 127, 64, //"d"
56, 124, 84, 84, 92, 24, 0, //"e"
72, 126, 127, 73, 3, 2, 0, //"f"
56, 188, 164, 164, 252, 120, 0 //"g"
};
byte CONST System_7_8_2 [175]={ /* System 7x8 (char #104 to #128) */
65, 127, 127, 8, 4, 124, 120, //"h"
0, 68, 125, 125, 64, 0, 0, //"i"
96, 224, 128, 128, 253, 125, 0, //"j"
65, 127, 127, 16, 56, 108, 68, //"k"
0, 65, 127, 127, 64, 0, 0, //"l"
120, 124, 28, 56, 28, 124, 120, //"m"
124, 124, 4, 4, 124, 120, 0, //"n"
56, 124, 68, 68, 124, 56, 0, //"o"
0, 252, 252, 164, 36, 60, 24, //"p"
24, 60, 36, 164, 248, 252, 132, //"q"
68, 124, 120, 76, 4, 28, 24, //"r"
72, 92, 84, 84, 116, 36, 0, //"s"
0, 4, 62, 127, 68, 36, 0, //"t"
60, 124, 64, 64, 60, 124, 64, //"u"
28, 60, 96, 96, 60, 28, 0, //"v"
60, 124, 112, 56, 112, 124, 60, //"w"
68, 108, 56, 16, 56, 108, 68, //"x"
60, 188, 160, 160, 252, 124, 0, //"y"
76, 100, 116, 92, 76, 100, 0, //"z"
8, 8, 62, 119, 65, 65, 0, //"{"
0, 0, 0, 119, 119, 0, 0, //"|"
65, 65, 119, 62, 8, 8, 0, //"}"
2, 3, 1, 3, 2, 3, 1, //"~"
255, 29, 129,129, 129, 129, 255, //""
14, 159, 145, 177, 251, 74, 0 //"ç"
};
//*******************************************
////////////////////////////////////////////////////////////////////////////////
// Escribe en la LCD font System 3x6
////////////////////////////////////////////////////////////////////////////////
void nokia_print_3_6(byte caracter )
{
byte char_row,charpos;
charpos=(((caracter&0xff)-0x20)*3);
for (char_row=0;char_row<3;char_row++) { // Son 3 Bytes por caracter
nokia_write_data(System_3_6_0[charpos+char_row]); // Manda el caracter
}
nokia_write_data(0x00); // Mandamos 1 espacio Blanco
}
////////////////////////////////////////////////////////////////////////////////
// Escribe en la LCD font System 7x8
////////////////////////////////////////////////////////////////////////////////
void nokia_print_7_8(byte caracter )
{
byte char_row,charpos,chardata,f;
if (caracter < 0x44 ) { // D
charpos=(((caracter&0xff)-0x20)*7);
f=0;
} else
if ((caracter > 0x43 ) & (caracter < 0x68 )) { // h
charpos=(((caracter&0xff)-0x44)*7);
f=1;
} else
{
charpos=(((caracter&0xff)-0x68)*7);
f=2;
}
for (char_row=0;char_row<7;char_row++) { // Son 7 Bytes por caracter
switch (f) {
case 0:
chardata=System_7_8_0[(charpos+char_row)];
break;
case 1:
chardata=System_7_8_1[(charpos+char_row)];
break;
case 2:
chardata=System_7_8_2[(charpos+char_row)];
break;
}
nokia_write_data(chardata); // Manda el caracter
}
nokia_write_data(0x00); // Mandamos 1 espacio Blanco
}
El display es de solo escritura y para imprimir pixels sueltos es necesario hacer el AND correspondiente para no borrar el byte entero existente .
Habia pensado con algun 18F que tienen mucha y cabe mas programa .
Boy haber mientras si hago alguna rutinilla para circulitos y mariconadas de estas .
Helena esto lo haria en asm sin despeinarse seguro , almenos en las partes de medición etc seria importante (sobre la marcha ya lo veras)