//!/////////////////////////////////////////////////////////////////////////
/// glcd_characters.h                                                     //
///                                                                       //
/// Version:     0.6                                                      //
/// Date:        04/16/2010                                               //
/// Author:      Michael Skutek (michael@skutek.de)                       //
///                                                                       //
/// Description: 8 Bit Interface to GLCD displays with 128x64 dots        //
///              and KS0108 Controller.                                   //
///                                                                       //
/// Platform:    AVR ATmega (tested on ATmega16)                          //
///                                                                       //
/// Include Files:                                                        //
///              avr/io.h:             port accessing (part of avr-gcc)   //
///              util/delay.h:         time delays (part of avr-gcc)      //
///              port_definitions.h:   definition of output ports         //
///              glcd.h:               definitions and display setup      //
///              glcd_characters.h:    definitions for font(s)            //
///              glcd_bitmaps.h:       definitions for bitmaps            //
///                                                                       //
///                                                                       //
/// This program is free software: you can redistribute it and/or modify  //
/// it under the terms of the GNU Lesser General Public License as        //
/// published by the Free Software Foundation, either version 3 of the    //
/// License, or (at your option) any later version.                       //
///                                                                       //
/// This program is distributed in the hope that it will be useful,       //
/// but WITHOUT ANY WARRANTY; without even the implied warranty of        //
/// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the          //
/// GNU Lesser General Public License for more details.                   //
///                                                                       //
/// You should have received a copy of the GNU Lesser General Public      //
/// License along with this program. If not, see                          //
/// <http://www.gnu.org/licenses/>.                                       //
//!/////////////////////////////////////////////////////////////////////////




#ifndef GLCD_CHARACTERS_H_INCLUDED
#define GLCD_CHARACTERS_H_INCLUDED



///font definitions

#define STD_FONT_WIDTH              6     //width of std font: 6 dots
#define STD_FONT_LENGTH            95     //number of items (length of table)

#define GLCD_ASCII_TABLE_OFFSET   0x20    //ASCII Table Offset for internal Font Table

///display related font definitions

#define GLCD_CHARS_PER_LINE   GLCD_X_RESOLUTION/STD_FONT_WIDTH   //number of characters per line



///ascii table for font
const unsigned char ascii_std_tab[STD_FONT_LENGTH][STD_FONT_WIDTH] PROGMEM = {

  {0x00, 0x00, 0x00, 0x00, 0x00, 0x00},       // " ", address 0x20
  {0x00, 0x00, 0x2f, 0x00, 0x00, 0x00},       // "!", address 0x21
  {0x00, 0x03, 0x00, 0x03, 0x00, 0x00},       // """, address 0x22
  {0x0a, 0x3a, 0x0f, 0x3a, 0x0f, 0x0a},       // "#", address 0x23
  {0x00, 0x04, 0x2a, 0x3f, 0x2a, 0x10},       // "$", address 0x24
  {0x00, 0x26, 0x16, 0x08, 0x34, 0x32},       // "%", address 0x25
  {0x10, 0x2a, 0x25, 0x2d, 0x12, 0x28},       // "&", address 0x26
  {0x00, 0x00, 0x03, 0x00, 0x00, 0x00},       // "'", address 0x27
  {0x00, 0x00, 0x1e, 0x21, 0x00, 0x00},       // "(", address 0x28
  {0x00, 0x00, 0x21, 0x1e, 0x00, 0x00},       // ")", address 0x29
  {0x00, 0x2a, 0x1c, 0x3e, 0x1c, 0x2a},       // "*", address 0x2a
  {0x00, 0x08, 0x08, 0x3e, 0x08, 0x08},       // "+", address 0x2b
  {0x00, 0x80, 0x60, 0x00, 0x00, 0x00},       // ",", address 0x2c
  {0x00, 0x08, 0x08, 0x08, 0x08, 0x00},       // "-", address 0x2d
  {0x00, 0x00, 0x20, 0x00, 0x00, 0x00},       // ".", address 0x2e
  {0x00, 0x30, 0x0c, 0x03, 0x00, 0x00},       // "/", address 0x2f
  {0x00, 0x1e, 0x23, 0x2d, 0x31, 0x1e},       // "0", address 0x30
  {0x00, 0x04, 0x22, 0x3f, 0x20, 0x00},       // "1", address 0x31
  {0x00, 0x22, 0x31, 0x29, 0x25, 0x22},       // "2", address 0x32
  {0x00, 0x12, 0x21, 0x25, 0x25, 0x1e},       // "3", address 0x33
  {0x00, 0x0c, 0x0a, 0x09, 0x3c, 0x08},       // "4", address 0x34
  {0x00, 0x27, 0x25, 0x25, 0x25, 0x19},       // "5", address 0x35
  {0x00, 0x1e, 0x25, 0x25, 0x25, 0x18},       // "6", address 0x36
  {0x00, 0x01, 0x01, 0x39, 0x05, 0x03},       // "7", address 0x37
  {0x00, 0x1a, 0x25, 0x25, 0x25, 0x1a},       // "8", address 0x38
  {0x00, 0x02, 0x25, 0x25, 0x25, 0x1e},       // "9", address 0x39
  {0x00, 0x00, 0x12, 0x00, 0x00, 0x00},       // ":", address 0x3a
  {0x00, 0x20, 0x1a, 0x00, 0x00, 0x00},       // ";", address 0x3b
  {0x00, 0x08, 0x14, 0x22, 0x00, 0x00},       // "<", address 0x3c
  {0x00, 0x14, 0x14, 0x14, 0x14, 0x00},       // "=", address 0x3d
  {0x00, 0x22, 0x14, 0x08, 0x00, 0x00},       // ">", address 0x3e
  {0x00, 0x02, 0x01, 0x29, 0x05, 0x02},       // "?", address 0x3f
  {0x00, 0x1e, 0x21, 0x2d, 0x35, 0x3d},       // "@", address 0x40
  {0x00, 0x3c, 0x0a, 0x09, 0x0a, 0x3c},       // "A", address 0x41
  {0x00, 0x3f, 0x25, 0x25, 0x25, 0x1a},       // "B", address 0x42
  {0x00, 0x1e, 0x21, 0x21, 0x21, 0x12},       // "C", address 0x43
  {0x00, 0x3f, 0x21, 0x21, 0x21, 0x1e},       // "D", address 0x44
  {0x00, 0x3f, 0x25, 0x25, 0x21, 0x21},       // "E", address 0x45
  {0x00, 0x3f, 0x05, 0x05, 0x05, 0x01},       // "F", address 0x46
  {0x00, 0x1e, 0x21, 0x21, 0x29, 0x39},       // "G", address 0x47
  {0x00, 0x3f, 0x04, 0x04, 0x04, 0x3f},       // "H", address 0x48
  {0x00, 0x21, 0x3f, 0x21, 0x00, 0x00},       // "I", address 0x49
  {0x00, 0x11, 0x21, 0x21, 0x21, 0x1e},       // "J", address 0x4a
  {0x00, 0x3f, 0x04, 0x0c, 0x12, 0x21},       // "K", address 0x4b
  {0x00, 0x3f, 0x20, 0x20, 0x20, 0x20},       // "L", address 0x4c
  {0x00, 0x3f, 0x02, 0x04, 0x02, 0x3f},       // "M", address 0x4d
  {0x00, 0x3f, 0x06, 0x0c, 0x18, 0x3f},       // "N", address 0x4e
  {0x00, 0x1e, 0x21, 0x21, 0x21, 0x1e},       // "O", address 0x4f
  {0x00, 0x3f, 0x09, 0x09, 0x09, 0x06},       // "P", address 0x50
  {0x00, 0x1e, 0x21, 0x29, 0x31, 0x3e},       // "Q", address 0x51
  {0x00, 0x3f, 0x09, 0x09, 0x19, 0x26},       // "R", address 0x52
  {0x00, 0x12, 0x25, 0x2d, 0x29, 0x12},       // "S", address 0x53
  {0x00, 0x01, 0x01, 0x3f, 0x01, 0x01},       // "T", address 0x54
  {0x00, 0x1f, 0x20, 0x20, 0x20, 0x1f},       // "U", address 0x55
  {0x00, 0x0f, 0x10, 0x20, 0x10, 0x0f},       // "V", address 0x56
  {0x00, 0x3f, 0x10, 0x08, 0x10, 0x3f},       // "W", address 0x57
  {0x00, 0x31, 0x0a, 0x04, 0x0a, 0x31},       // "X", address 0x58
  {0x00, 0x03, 0x04, 0x38, 0x04, 0x03},       // "Y", address 0x59
  {0x00, 0x31, 0x29, 0x25, 0x23, 0x21},       // "Z", address 0x5a
  {0x00, 0x3f, 0x21, 0x21, 0x00, 0x00},       // "[", address 0x5b
  {0x00, 0x03, 0x0c, 0x30, 0x00, 0x00},       // "\", address 0x5c
  {0x00, 0x21, 0x21, 0x3f, 0x00, 0x00},       // "]", address 0x5d
  {0x00, 0x04, 0x02, 0x01, 0x02, 0x04},       // "^", address 0x5e
  {0x00, 0x20, 0x20, 0x20, 0x20, 0x20},       // "_", address 0x5f
  {0x00, 0x00, 0x01, 0x02, 0x00, 0x00},       // "`", address 0x60
  {0x00, 0x10, 0x2a, 0x2a, 0x3c, 0x00},       // "a", address 0x61
  {0x00, 0x3f, 0x24, 0x24, 0x18, 0x00},       // "b", address 0x62
  {0x00, 0x18, 0x24, 0x24, 0x24, 0x00},       // "c", address 0x63
  {0x00, 0x18, 0x24, 0x24, 0x3f, 0x00},       // "d", address 0x64
  {0x00, 0x1c, 0x2a, 0x2a, 0x2c, 0x00},       // "e", address 0x65
  {0x00, 0x00, 0x3c, 0x0a, 0x02, 0x00},       // "f", address 0x66
  {0x00, 0x18, 0xa4, 0xa4, 0x78, 0x00},       // "g", address 0x67
  {0x00, 0x3f, 0x04, 0x04, 0x38, 0x00},       // "h", address 0x68
  {0x00, 0x00, 0x3a, 0x00, 0x00, 0x00},       // "i", address 0x69
  {0x00, 0x00, 0x80, 0x7a, 0x00, 0x00},       // "j", address 0x6a
  {0x00, 0x3e, 0x10, 0x28, 0x00, 0x00},       // "k", address 0x6b
  {0x00, 0x00, 0x1e, 0x20, 0x00, 0x00},       // "l", address 0x6c
  {0x00, 0x3c, 0x04, 0x38, 0x04, 0x38},       // "m", address 0x6d
  {0x00, 0x3c, 0x08, 0x04, 0x38, 0x00},       // "n", address 0x6e
  {0x00, 0x18, 0x24, 0x24, 0x18, 0x00},       // "o", address 0x6f
  {0x00, 0xf8, 0x24, 0x24, 0x18, 0x00},       // "p", address 0x70
  {0x00, 0x18, 0x24, 0x24, 0xf8, 0x00},       // "q", address 0x71
  {0x00, 0x3c, 0x08, 0x04, 0x08, 0x00},       // "r", address 0x72
  {0x00, 0x24, 0x2a, 0x2a, 0x10, 0x00},       // "s", address 0x73
  {0x00, 0x00, 0x1e, 0x24, 0x00, 0x00},       // "t", address 0x74
  {0x00, 0x1c, 0x20, 0x20, 0x3c, 0x00},       // "u", address 0x75
  {0x00, 0x0c, 0x10, 0x20, 0x10, 0x0c},       // "v", address 0x76
  {0x00, 0x1c, 0x20, 0x10, 0x20, 0x1c},       // "w", address 0x77
  {0x00, 0x24, 0x18, 0x18, 0x24, 0x00},       // "x", address 0x78
  {0x00, 0x9c, 0xa0, 0xa0, 0x7c, 0x00},       // "y", address 0x79
  {0x00, 0x24, 0x34, 0x2c, 0x24, 0x00},       // "z", address 0x7a
  {0x00, 0x00, 0x08, 0x1e, 0x21, 0x00},       // "{", address 0x7b
  {0x00, 0x00, 0x00, 0x3f, 0x00, 0x00},       // "|", address 0x7c
  {0x00, 0x21, 0x1e, 0x08, 0x00, 0x00},       // "}", address 0x7d
  {0x10, 0x08, 0x08, 0x10, 0x10, 0x08},       // "~", address 0x7e

};




#endif // GLCD_CHARACTERS_H_INCLUDED
