#ifndef jh_f330 #define jh_f330 #include #endif typedef unsigned char uint8; typedef unsigned int uint16; /*************端口配置**************/ //****************************************************** sbit CS =P0^4; sbit RSET=P0^3; sbit A0 =P0^2; sbit WR =P0^1; sbit RD =P0^0; #define DATAPORT P1 //数据口 uint8 code word1[]= { 0x04,0x44,0x84,0x04,0xE4,0x1F,0x84,0x44,0xA4,0x3F,0xA4,0xA4,0x64,0x06,0x04,0x00, 0x20,0x10,0x09,0x04,0xFF,0x04,0x04,0x14,0x26,0x05,0x84,0xFF,0x04,0x06,0x04,0x00 }; /**********预定义数据*********/ #define LCD_X 128-1 //屏幕的X 轴的物理宽度 #define LCD_Y 64-1 //屏幕的Y 轴的物理宽度 /***********LCD 指令集***************/ //LCD 开关命令 #define LCD_ON() Wr_Com(0xaf) #define LCD_OFF() Wr_Com(0xae) //设置显示起始行 #define LCD_START_LINE 0x40 //起始行地址为,0x40+(0-63) //页地址设置 #define LCD_Page 0xb0 //页地址为:0xb0+(0-8) //列地址设