/*****************************************************/ /* NHD-1-8-128160ZF.c Program for writing to Newhaven Display 1.8" TFT (c)2009 Curt Lagerstam - Newhaven Display International, Inc. 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 CS = P3^0; //Chip select sbit RS = P3^7; //Data/Instruction Register select sbit WR1 = P3^4; //Write sbit RD1 = P3^6; //Read sbit RESET = P3^1; //Reset /*****************************************************/ void delay(unsigned int n) //Delay subroutine { unsigned int i,j; for (i=0;i