//--------------------------------------------------------- /* NHD-C160100AZ/CZ.c Program for writing to Newhaven Display graphic LCD. (c)2008 Curt Lagerstam - Newhaven Display International, LLC. 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. */ //----------------------------------------------------------- #include #include "picture.h" //----------------------------------------------------------- sbit CS1 = P3^5;//0; sbit RES = P3^2;//1; sbit A0 = P3^0; sbit RW = P3^7;//3; sbit E = P3^4;//4; //----------------------------------------------------------- void lcd_init(void); void delay(unsigned int time); void wait(unsigned int time); void show_display(unsigned char *lcd_string); void write_command(unsigned char datum); void write_data(unsigned char datum); unsigned char vopcode; unsigned char Ra_Rb; //------------------------------------------------------------ void delay(unsigned int time) /*Delay*/ { while(time-->0); } void wait(unsigned int time) { int i; int j; for (i=0;i