#define OUTPUT 1 //define terms #define INPUT 0 #define TRUE 1 #define FALSE 0 #define NULL 0 // Define the IO for the LCD Display. // Requirements are one 8 bit port for data output to display (DATA_PORT) // and 4 output bits for control (reset, enable, data/instruction & write) #define DATA_PORT p9 #define RST_PIN p10_3 #define EN_PIN p10_2 #define DI_PIN p6_0 #define WR_PIN p6_1 #define DATA_PORT_DDR pd9 // Port Direction #define DATA_PORT_DDR_VALUE_IN 0x00 // bit mask for port output #define DATA_PORT_DDR_VALUE_OUT 0xff // bit mask for port input #define DI_MASK 0x0 // bit mask from entire port #define DI_DDR pd6_0 // D*I pin DDR #define WR_PIN_MASK 0x02 // bit mask from entire port #define WR_PIN_DDR pd6_1 // EN pin DDR #define RST_PIN_MASK 0x08 // bit mask from entire port #define RST_PIN_DDR pd10_3 // RST* pin DDR #define EN_PIN_DDR pd10_2 // EN_PIN pin DDR #define EN_PIN_MASK 0x04 #define DSP_PWM p7_0 #define DSP_PWM_DDR pd7_0 //Prototypes for LCD Functions // The use of _far is needed to handle address constraints in the Renesas processor void Init_LCD_IO(void); void DisplayDelay(unsigned long int units); void Wait(int time); void LCD_write_Cntrl(unsigned char datum); void Show_Display(_far char *lcd_string, int nor_inv); void LCD_Init(void); void OutputData(unsigned char Start_Col, int j,int nor_inv); void LCD_write_Data(unsigned char value, int nor_inv); void LCD_write_COLUMN(long value); _far char * char_conv( _far char *conv_strng); void Clear_Display(int start, int end); void PosSetUp(unsigned char Page, unsigned char column); void DisplayString(unsigned char Start_Col, _far char *value, int nor_inv); void DisplayChar(unsigned char Start_Col, char value, int nor_inv); void InitDisplay( void ); //extern char logo_map[]; /**********************************************************************************/ // LCD commands - use LCD_write function to write these commands to the LCD. /**********************************************************************************/ #define LCD_ON 0xAF // Turn LCD display on #define LCD_OFF 0xAE // Turn LCD display off #define COLUMN_0_MSB 0x10 // Set column address to 0 #define COLUMN_0_LSB 0x00 #define LINE_0 0xB0 // Set Row address to 0 #define NORMAL 1 #define INVERTED 0 #define SPACE 0 #define LOW 0 #define HIGH 1 #define PAGE_0 0xB0 #define P_0 0x00 #define P_1 0x01 #define P_2 0x02 #define P_3 0x03 #define P_4 0x04 #define P_5 0x05 #define P_6 0x06 #define P_7 0x07 #define P_8 0x08 #define P_9 0x09 #define P_10 0x0A #define P_11 0x0B #define P_12 0x0C #define P_13 0x0D #define P_14 0x0E #define P_15 0x0F