/* Reprogram a fontbank on the tellymate. This requires TellyMate firmware v1.0.14 or above. Instructions: 1. Change the fontbank you'd like to program in FONTBANK 2. Paste the comma-separated hex values needed into the font_data definition below 3. Upload the program to your Arduino. 4. Wait about 20 seconds. The TellyMate will be reset 6 times in total. It will print 'Fontbank programmed' when finished and show all the characters. version 2 18th Feb 2012 Modified for Arduino 1.0 (replaced Serial.print with Serial.write where necessary) */ // CHANGE FONTBANK IF REQUIRED - Note that most TellyMates have only fontbank 0. #define FONTBANK 0 #define BAUD_RATE 57600 #define CHAR_ESC 0x1B #define CHAR_DLE 0x10 #define CHAR_PROGRAM_FONTBANK 'R' #include byte PROGMEM font_data[ 2304 ] = { // TODO: // Replace all of the comma-separated data below with data that defines your fontbank. // // Generating the comma separated data can be done in at least 3 different ways: // 1) Work it out by hand (not recommended) // 2) Use a google spreadsheet (http://spreadsheets.google.com/ccc?key=0ApGEEX3jHnhDdGhiM19MRWpWbEg5el9zU2k1NzkzVUE&hl=en_GB) // 3) Copy the data from one of the FontX.c files in the TellyMate source code from Batsocks. // 0x00,0x38,0x38,0x00,0x10,0x10,0x10,0x00,0xff,0x00,0xff,0x0e,0x38,0x00,0x02,0x54, 0x80,0x02,0x10,0x00,0x7c,0x38,0x00,0x10,0x10,0x10,0x00,0x00,0x40,0x00,0x10,0xfe, 0x00,0x18,0x6c,0x6c,0x18,0x60,0x70,0x0c,0x0c,0x30,0x00,0x00,0x00,0x00,0x00,0x00, 0x3c,0x18,0x3c,0x3c,0x0c,0x7e,0x1c,0x7e,0x3c,0x3c,0x00,0x00,0x0c,0x00,0x30,0x3c, 0x3c,0x3c,0x7c,0x3c,0x78,0x7e,0x7e,0x3c,0x66,0x7e,0x3e,0x66,0x60,0xc6,0x66,0x3c, 0x7c,0x3c,0x7c,0x3c,0x7e,0x66,0x66,0xc6,0x66,0x66,0x7e,0x7c,0x00,0x3e,0x18,0x00, 0x30,0x00,0x60,0x00,0x06,0x00,0x1c,0x00,0x60,0x18,0x18,0x60,0x38,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x0c,0x18,0x30,0x62,0x00, 0x78,0x00,0x0e,0x7e,0x66,0x70,0x18,0x00,0x7e,0x66,0x70,0x66,0x7c,0x70,0xc6,0x18, 0x0e,0x00,0x7e,0x38,0x00,0x00,0x3c,0x00,0x00,0xc6,0x66,0x18,0x1c,0xcc,0xf0,0x0c, 0x1c,0x1c,0x00,0x00,0x00,0x7e,0x3c,0x38,0x18,0x00,0x00,0x86,0x86,0x18,0x00,0x00, 0x60,0xcc,0xf3,0x18,0x18,0x18,0x36,0x00,0x00,0x36,0x36,0x00,0x36,0x36,0x18,0x00, 0x18,0x18,0x00,0x18,0x00,0x18,0x18,0x36,0x36,0x00,0x36,0x00,0x36,0x00,0x36,0x18, 0x36,0x00,0x00,0x36,0x18,0x00,0x00,0x36,0x18,0x18,0x00,0xff,0x00,0xf0,0x0f,0xff, 0x00,0x00,0x00,0x00,0x7e,0x00,0x00,0x00,0xfc,0x38,0x38,0x1c,0x00,0x06,0x1c,0x3c, 0x00,0x18,0x30,0x0c,0x0c,0x18,0x18,0x00,0x38,0x00,0x00,0x0f,0x78,0x70,0xaa,0xff, 0x00,0x44,0x7c,0x6c,0x38,0x38,0x10,0x3c,0xc3,0x3c,0xc3,0x06,0x44,0x0c,0x0e,0x38, 0xe0,0x0e,0x38,0x44,0xf4,0x44,0x00,0x38,0x38,0x10,0x08,0x20,0x40,0x28,0x10,0x7c, 0x00,0x18,0x6c,0x6c,0x7e,0x66,0xd8,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x06, 0x66,0x38,0x66,0x66,0x1c,0x60,0x30,0x06,0x66,0x66,0x00,0x00,0x18,0x00,0x18,0x66, 0x66,0x66,0x66,0x66,0x6c,0x60,0x60,0x66,0x66,0x18,0x0c,0x6c,0x60,0xee,0x66,0x66, 0x66,0x66,0x66,0x66,0x18,0x66,0x66,0xc6,0x66,0x66,0x06,0x60,0x60,0x06,0x3c,0x00, 0x18,0x00,0x60,0x00,0x06,0x00,0x30,0x00,0x60,0x00,0x00,0x60,0x18,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x18,0xd6,0x10, 0xcc,0x66,0x00,0xc3,0x00,0x00,0x18,0x00,0xc3,0x00,0x00,0x00,0xc6,0x00,0x00,0x18, 0x00,0x00,0xd8,0x66,0x66,0x70,0x66,0x70,0x66,0x18,0x00,0x18,0x36,0xcc,0xd8,0x1a, 0x00,0x00,0x0e,0x0e,0x7c,0x00,0x6c,0x6c,0x00,0x00,0x00,0x8c,0x8c,0x18,0x36,0xd8, 0x01,0xcc,0x9f,0x18,0x18,0x18,0x36,0x00,0x00,0x36,0x36,0x00,0x36,0x36,0x18,0x00, 0x18,0x18,0x00,0x18,0x00,0x18,0x18,0x36,0x36,0x00,0x36,0x00,0x36,0x00,0x36,0x18, 0x36,0x00,0x00,0x36,0x18,0x00,0x00,0x36,0x18,0x18,0x00,0xff,0x00,0xf0,0x0f,0xff, 0x00,0x3c,0x7e,0xfe,0x66,0x00,0x66,0x76,0x30,0x6c,0x6c,0x30,0x00,0x0c,0x30,0x66, 0x7e,0x18,0x18,0x18,0x1a,0x18,0x18,0x76,0x6c,0x00,0x00,0x0c,0x6c,0x18,0x55,0xff, 0x00,0xaa,0xd6,0xfe,0x7c,0x38,0x38,0x7e,0x81,0x42,0xbd,0x0a,0x44,0x0e,0x3e,0x44, 0xf8,0x3e,0x7c,0xee,0xf4,0x70,0x7e,0x7c,0x7c,0x10,0x0c,0x60,0x40,0x6c,0x38,0x7c, 0x00,0x18,0x6c,0xfe,0xd0,0x0c,0xd8,0x30,0x30,0x0c,0x7e,0x18,0x00,0x00,0x00,0x0c, 0x6e,0x18,0x06,0x06,0x3c,0x7c,0x60,0x0c,0x66,0x66,0x18,0x18,0x30,0x7e,0x0c,0x0c, 0x6e,0x66,0x66,0x60,0x66,0x60,0x60,0x60,0x66,0x18,0x0c,0x78,0x60,0xfe,0x76,0x66, 0x66,0x66,0x66,0x60,0x18,0x66,0x66,0xc6,0x3c,0x66,0x0c,0x60,0x30,0x06,0x66,0x00, 0x0c,0x3c,0x7c,0x3c,0x3e,0x3c,0x30,0x3e,0x7c,0x38,0x38,0x66,0x18,0x6c,0x7c,0x3c, 0x7c,0x7c,0x6c,0x3e,0x7c,0x66,0x66,0xc6,0x66,0x66,0x7e,0x18,0x18,0x18,0x8c,0x38, 0xc0,0x00,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x38,0x38,0x38,0x3c,0x00, 0x3e,0x7e,0xd8,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x66,0x7e,0x30,0x78,0xd8,0x18, 0x78,0x38,0x00,0x00,0x00,0x66,0x6c,0x6c,0x18,0x00,0x00,0x98,0x98,0x00,0x6c,0x6c, 0x0c,0x33,0xfe,0x18,0x18,0x18,0x36,0x00,0x00,0x36,0x36,0x00,0x36,0x36,0x18,0x00, 0x18,0x18,0x00,0x18,0x00,0x18,0x18,0x36,0x36,0x00,0x36,0x00,0x36,0x00,0x36,0x18, 0x36,0x00,0x00,0x36,0x18,0x00,0x00,0x36,0x18,0x18,0x00,0xff,0x00,0xf0,0x0f,0xff, 0x76,0x66,0x66,0x6c,0x30,0x3e,0x66,0xdc,0x78,0xc6,0xc6,0x18,0x6c,0x7e,0x60,0x66, 0x00,0x7e,0x0c,0x30,0x1a,0x18,0x00,0xdc,0x6c,0x00,0x00,0x0c,0x6c,0x30,0xaa,0xff, 0x00,0x82,0xfe,0xfe,0xfe,0x54,0x7c,0x7e,0x81,0x42,0xbd,0x70,0x44,0x0a,0x32,0xc6, 0xfe,0xfe,0x10,0xee,0xf4,0x28,0x7e,0x10,0x10,0x10,0xfe,0xfe,0x40,0xfe,0x38,0x38, 0x00,0x18,0x00,0x6c,0x7c,0x18,0x70,0x00,0x30,0x0c,0x3c,0x7e,0x00,0x7e,0x00,0x18, 0x7e,0x18,0x0c,0x1c,0x6c,0x06,0x7c,0x18,0x3c,0x3e,0x18,0x18,0x60,0x00,0x06,0x18, 0x6a,0x7e,0x7c,0x60,0x66,0x7c,0x7c,0x6e,0x7e,0x18,0x0c,0x70,0x60,0xd6,0x7e,0x66, 0x7c,0x66,0x7c,0x3c,0x18,0x66,0x66,0xd6,0x18,0x3c,0x18,0x60,0x18,0x06,0x42,0x00, 0x00,0x06,0x66,0x66,0x66,0x66,0x7c,0x66,0x66,0x18,0x18,0x6c,0x18,0xfe,0x66,0x66, 0x66,0xcc,0x76,0x60,0x30,0x66,0x66,0xd6,0x3c,0x66,0x0c,0x70,0x00,0x0e,0x00,0x6c, 0xcc,0x66,0x66,0x06,0x06,0x06,0x06,0x60,0x66,0x66,0x66,0x18,0x18,0x18,0x66,0x3c, 0x30,0x18,0xfc,0x3c,0x3c,0x3c,0x66,0x66,0x66,0x66,0x66,0xc0,0x7c,0xfc,0xf4,0x3c, 0x0c,0x18,0x3c,0x66,0x7c,0x76,0x3c,0x38,0x30,0x7e,0x7e,0xb4,0xb6,0x18,0xd8,0x36, 0x60,0x33,0xf3,0x18,0x18,0xf8,0x36,0x00,0xf8,0xf6,0x36,0xfe,0xf6,0x36,0xf8,0x00, 0x18,0x18,0x00,0x18,0x00,0x18,0x1f,0x36,0x37,0x3f,0xf7,0xff,0x37,0xff,0xf7,0xff, 0x36,0xff,0x00,0x36,0x1f,0x1f,0x00,0x36,0xff,0x18,0x00,0xff,0x00,0xf0,0x0f,0xff, 0xdc,0x7c,0x60,0x6c,0x18,0x6c,0x66,0x18,0xcc,0xfe,0xc6,0x7c,0xd6,0xdb,0x7c,0x66, 0x7e,0x18,0x18,0x18,0x18,0x18,0x7e,0x00,0x38,0x18,0x00,0x0c,0x6c,0x60,0x55,0xff, 0x00,0xaa,0xd6,0xfe,0x7c,0xfe,0xfe,0x7e,0x81,0x42,0xbd,0x88,0x38,0x08,0x26,0x44, 0xf8,0x3e,0x10,0x44,0x74,0x1c,0x7e,0x10,0x10,0x10,0x0c,0x60,0x7c,0x6c,0x7c,0x38, 0x00,0x18,0x00,0xfe,0x16,0x30,0xda,0x00,0x30,0x0c,0x7e,0x18,0x00,0x00,0x00,0x30, 0x76,0x18,0x18,0x06,0x7e,0x06,0x66,0x30,0x66,0x06,0x00,0x00,0x30,0x7e,0x0c,0x18, 0x6e,0x66,0x66,0x60,0x66,0x60,0x60,0x66,0x66,0x18,0x0c,0x78,0x60,0xd6,0x6e,0x66, 0x60,0x6a,0x6c,0x06,0x18,0x66,0x66,0xfe,0x3c,0x18,0x30,0x60,0x0c,0x06,0x00,0x00, 0x00,0x3e,0x66,0x60,0x66,0x7e,0x30,0x66,0x66,0x18,0x18,0x78,0x18,0xd6,0x66,0x66, 0x66,0xcc,0x60,0x3c,0x30,0x66,0x66,0xd6,0x18,0x66,0x18,0x18,0x18,0x18,0x00,0xc6, 0x78,0x66,0x7e,0x3e,0x3e,0x3e,0x3e,0x60,0x7e,0x7e,0x7e,0x18,0x18,0x18,0x7e,0x66, 0x3c,0x7c,0xd8,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0xc0,0x30,0x30,0xc4,0x18, 0x7c,0x18,0x66,0x66,0x66,0x7e,0x00,0x00,0x60,0x60,0x06,0x62,0x6a,0x18,0x6c,0x6c, 0x01,0xcc,0x9f,0x18,0xf8,0x18,0xf6,0xfe,0x18,0x06,0x36,0x06,0x06,0xfe,0x18,0xf8, 0x1f,0xff,0xff,0x1f,0xff,0xff,0x18,0x37,0x30,0x30,0x00,0x00,0x30,0x00,0x00,0x00, 0xff,0x00,0xff,0x3f,0x18,0x18,0x3f,0xff,0x18,0xf8,0x1f,0xff,0xff,0xf0,0x0f,0x00, 0xc8,0x66,0x60,0x6c,0x30,0x6c,0x66,0x18,0xcc,0xc6,0x6c,0xcc,0xd6,0xdb,0x60,0x66, 0x00,0x18,0x30,0x0c,0x18,0x18,0x00,0x76,0x00,0x18,0x18,0xec,0x6c,0x78,0xaa,0xff, 0x00,0x92,0xee,0x7c,0x38,0xfe,0xfe,0x7e,0x81,0x42,0xbd,0x88,0x10,0x38,0x6e,0x38, 0xe0,0x0e,0x7c,0x44,0x14,0x44,0x00,0x7c,0x10,0x7c,0x08,0x20,0x00,0x28,0x7c,0x10, 0x00,0x00,0x00,0x6c,0xfc,0x66,0xcc,0x00,0x18,0x18,0x18,0x18,0x18,0x00,0x18,0x60, 0x66,0x18,0x30,0x66,0x0c,0x66,0x66,0x30,0x66,0x0c,0x18,0x18,0x18,0x00,0x18,0x00, 0x60,0x66,0x66,0x66,0x6c,0x60,0x60,0x66,0x66,0x18,0x6c,0x6c,0x60,0xc6,0x66,0x66, 0x60,0x6c,0x66,0x66,0x18,0x66,0x3c,0xee,0x66,0x18,0x60,0x60,0x06,0x06,0x00,0x00, 0x00,0x66,0x66,0x66,0x66,0x60,0x30,0x3e,0x66,0x18,0x18,0x6c,0x18,0xd6,0x66,0x66, 0x7c,0x7c,0x60,0x06,0x30,0x66,0x3c,0xfe,0x3c,0x3e,0x30,0x18,0x18,0x18,0x00,0xc6, 0x18,0x66,0x60,0x66,0x66,0x66,0x66,0x60,0x60,0x60,0x60,0x18,0x18,0x18,0x66,0x7e, 0x30,0xd8,0xd8,0x66,0x66,0x66,0x66,0x66,0x3e,0x3c,0x66,0x7e,0x30,0xfc,0xce,0x18, 0xcc,0x18,0x66,0x66,0x66,0x6e,0x7e,0x7c,0x66,0x60,0x06,0xc4,0xd2,0x18,0x36,0xd8, 0x0c,0xcc,0xfe,0x18,0x18,0xf8,0x36,0x36,0xf8,0xf6,0x36,0xf6,0xfe,0x00,0xf8,0x18, 0x00,0x00,0x18,0x18,0x00,0x18,0x1f,0x36,0x3f,0x37,0xff,0xf7,0x37,0xff,0xf7,0xff, 0x00,0xff,0x36,0x00,0x1f,0x1f,0x36,0x36,0xff,0x00,0x18,0xff,0xff,0xf0,0x0f,0x00, 0xdc,0x7c,0x60,0x6c,0x66,0x6c,0x66,0x18,0x78,0x6c,0x6c,0xcc,0x6c,0x7e,0x30,0x66, 0x7e,0x00,0x00,0x00,0x18,0xd8,0x18,0xdc,0x00,0x00,0x00,0x6c,0x00,0x00,0x55,0xff, 0x00,0x44,0x7c,0x38,0x10,0x54,0x54,0x3c,0xc3,0x3c,0xc3,0x88,0x38,0x78,0x64,0x54, 0x80,0x02,0x38,0x00,0x14,0x38,0x00,0x38,0x10,0x38,0x00,0x00,0x00,0x00,0xfe,0x10, 0x00,0x18,0x00,0x6c,0x30,0x06,0x76,0x00,0x0c,0x30,0x00,0x00,0x18,0x00,0x18,0x00, 0x3c,0x7e,0x7e,0x3c,0x0c,0x3c,0x3c,0x30,0x3c,0x38,0x18,0x18,0x0c,0x00,0x30,0x18, 0x3c,0x66,0x7c,0x3c,0x78,0x7e,0x60,0x3c,0x66,0x7e,0x38,0x66,0x7e,0xc6,0x66,0x3c, 0x60,0x36,0x66,0x3c,0x18,0x3c,0x18,0xc6,0x66,0x18,0x7e,0x7c,0x00,0x3e,0x00,0x00, 0x00,0x3e,0x7c,0x3c,0x3e,0x3c,0x30,0x06,0x66,0x3c,0x18,0x66,0x3c,0xc6,0x66,0x3c, 0x60,0x0c,0x60,0x7c,0x1c,0x3e,0x18,0x6c,0x66,0x06,0x7e,0x0c,0x18,0x30,0x00,0xfe, 0x0c,0x3e,0x3c,0x3e,0x3e,0x3e,0x3e,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x66,0x66, 0x3e,0x7e,0xde,0x3c,0x3c,0x3c,0x3e,0x3e,0x06,0x18,0x3c,0x18,0x7e,0x30,0xc4,0x18, 0x7c,0x3c,0x3c,0x3e,0x66,0x66,0x00,0x00,0x3c,0x00,0x00,0x08,0x9e,0x18,0x00,0x00, 0x60,0x33,0xf3,0x18,0x18,0x18,0x36,0x36,0x18,0x36,0x36,0x36,0x00,0x00,0x00,0x18, 0x00,0x00,0x18,0x18,0x00,0x18,0x18,0x36,0x00,0x36,0x00,0x36,0x36,0x00,0x36,0x00, 0x00,0x18,0x36,0x00,0x00,0x18,0x36,0x36,0x18,0x00,0x18,0xff,0xff,0xf0,0x0f,0x00, 0x76,0x60,0x60,0x6c,0x7e,0x38,0x7c,0x18,0x30,0x38,0xee,0x78,0x00,0x60,0x1c,0x66, 0x00,0x7e,0x7e,0x7e,0x18,0xd8,0x18,0x00,0x00,0x00,0x00,0x3c,0x00,0x00,0xaa,0xff, 0x00,0x38,0x38,0x10,0x00,0x10,0x10,0x00,0xff,0x00,0xff,0x70,0x10,0x30,0x40,0x00, 0x00,0x00,0x10,0x44,0x14,0x00,0x00,0x10,0x10,0x10,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00, 0x60,0x0e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x00,0x00,0x00,0x00,0x00,0x00, 0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x00,0x00,0x18,0x00,0x30,0xc2,0xd8, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0e,0x02,0x00,0x00,0x00, 0x01,0x33,0x9f,0x18,0x18,0x18,0x36,0x36,0x18,0x36,0x36,0x36,0x00,0x00,0x00,0x18, 0x00,0x00,0x18,0x18,0x00,0x18,0x18,0x36,0x00,0x36,0x00,0x36,0x36,0x00,0x36,0x00, 0x00,0x18,0x36,0x00,0x00,0x18,0x36,0x36,0x18,0x00,0x18,0xff,0xff,0xf0,0x0f,0x00, 0x00,0x60,0x00,0x00,0x00,0x00,0x40,0x00,0xfc,0x00,0x00,0x00,0x00,0xc0,0x00,0x00, 0x00,0x00,0x00,0x00,0x18,0x50,0x00,0x00,0x00,0x00,0x00,0x1c,0x00,0x00,0x55,0xff, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00,0xff,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00, 0x0c,0x33,0xfe,0x18,0x18,0x18,0x36,0x36,0x18,0x36,0x36,0x36,0x00,0x00,0x00,0x18, 0x00,0x00,0x18,0x18,0x00,0x18,0x18,0x36,0x00,0x36,0x00,0x36,0x36,0x00,0x36,0x00, 0x00,0x18,0x36,0x00,0x00,0x18,0x36,0x36,0x18,0x00,0x18,0xff,0xff,0xf0,0x0f,0x00, 0x00,0x60,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x18,0x70,0x00,0x00,0x00,0x00,0x00,0x0c,0x00,0x00,0xaa,0xff // When pasting in font data, don't accidentally overwrite any code below here! }; void setup( void ) { Serial.begin( BAUD_RATE ) ; Serial.write(CHAR_ESC); Serial.write('E'); Serial.print("About to program fontbank "); Serial.print(FONTBANK,DEC); Serial.println('.'); for( byte countdown = 10 ; countdown > 0 ; countdown-- ) { Serial.println(countdown,DEC); delay(1000); } byte chunk = 0; for( unsigned int offset = 0 ; offset < 2304 ;) { Serial.write( CHAR_ESC ) ; Serial.write( 'E' ) ; // clear screen for( byte row = 0 ; row < 24 ; row++ ) { for( byte b = 0 ; b < 16 ; b++ ) { byte value = pgm_read_byte( font_data + offset ); byte nybble; nybble = value >> 4 ; Serial.write((nybble>=10)?'a'+(nybble-10):'0'+nybble); nybble = value & 0b1111; Serial.write((nybble>=10)?'a'+(nybble-10):'0'+nybble); offset++; } Serial.println(); } // the screen is now full of data... Serial.write(CHAR_ESC); Serial.write(CHAR_PROGRAM_FONTBANK ); Serial.write(' ' + FONTBANK); Serial.write(' ' + chunk); chunk++; // Now we need to wait a short while to let the TellyMate write to flash. // It will reset itself afterwards. // Half a second should be more than enough. delay(500); } Serial.write(CHAR_ESC); Serial.write('E'); Serial.write("Fontbank programmed."); byte b = 0; for ( byte row = 0 ; row < 16 ; row++ ) { Serial.write(CHAR_ESC); Serial.write('_'); Serial.write('6' + FONTBANK ); for ( byte col =0 ; col < 16 ; col++ ) { if ( b < 32 ) Serial.write( CHAR_DLE ) ; if (b == 0) { Serial.write(' '); } else { Serial.write( b ) ; } b++; } Serial.println(); } } void loop( void ) { // this is a simple serial echoing loop. while( Serial.available() <= 0 ){/* do nothing until serial data is found */} Serial.write( Serial.read() ); }