/* Nokia 6100 Display Test Copyright 2006 Refik Hadzialic (http://www.e-dsp.com) but this code was derived from Thomas Pfeifer's code at http://thomaspfeifer.net/nokia_6100_display.htm and Owen Osborn's code at http://www.sparkfun.com/datasheets/LCD/Nokia6100_Demo.c. I don't the credits for it. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Target: AVR-ATMega32 Compiler: AVRGcc Note: */ //#### CONFIG #### #define F_CPU 16000000UL // 16 MHz #define SPIPORT PORTC #define SPIDDR DDRC #define CS 4 #define CLK 7 #define SDA 5 #define RESET 6 // Epson S1D15G10 Command Set #define DISON 0xaf #define DISOFF 0xae #define DISNOR 0xa6 #define DISINV 0xa7 #define COMSCN 0xbb #define DISCTL 0xca #define SLPIN 0x95 #define SLPOUT 0x94 #define PASET 0x75 #define CASET 0x15 #define DATCTL 0xbc #define RGBSET8 0xce #define RAMWR 0x5c #define RAMRD 0x5d #define PTLIN 0xa8 #define PTLOUT 0xa9 #define RMWIN 0xe0 #define RMWOUT 0xee #define ASCSET 0xaa #define SCSTART 0xab #define OSCON 0xd1 #define OSCOFF 0xd2 #define PWRCTR 0x20 #define VOLCTR 0x81 #define VOLUP 0xd6 #define VOLDOWN 0xd7 #define TMPGRD 0x82 #define EPCTIN 0xcd #define EPCOUT 0xcc #define EPMWR 0xfc #define EPMRD 0xfd #define EPSRRD1 0x7c #define EPSRRD2 0x7d #define NOP 0x25 /******** Useful colors ********/ #define lightgray 0x6E #define brown 137 #define yellow 252 #define blue 7 #define red 128 #define white 255 #define black 0 #define orange 236 #define brightred 224 #define lightpurple 227 #define darkpurple 34 #define teal 31 #define aqua 30 #define green 28 #define trans 1 //################# #include #define cbi(reg, bit) (reg&=~(1< void draw_font_12x12(unsigned char letter, unsigned char x, unsigned char y); void LCD_say(unsigned char *str, unsigned char x, unsigned char y); void LCDInit (void) { int i; SPIDDR=(1<