/************** OLED.C ** ******************** US2066 P3.7=RS ,P3.6=R/W P3.5=EN ,P1=DATA_BUS ************************************************/ #ifndef __LCD_US2006_H__ #define __LCD_US2006_H__ //#include unsigned char switch_buf; unsigned char buf_4; typedef unsigned char uchar; typedef unsigned int uint; typedef unsigned long ulong; //uchar code Table_0[] = {0x0a,0x0a,0x0a,0x02,0x0a,0x0a,0x0a,0x08, // uchar code Table_0[] = {0x0a,0x15,0x0a,0x15,0x0a,0x15,0x0a,0x15, // 0x04,0x0F,0x12,0x0F,0x0A,0x1F,0x02,0x00, // 0x1F,0x11,0x1F,0x11,0x1F,0x11,0x11,0x00, // 0x1F,0x11,0x11,0x1F,0x11,0x11,0x1F,0x00, // 0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F};//FF uchar code Table_F[] = {0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff}; // // P89C51 //#ifdef Parallel_8080 #define DATA_BUS P1 // P1 #define RS P3_7 // DI D/C #define WRZ P3_6 // R/W WR #define RDZ P3_5 // E RD #define RESB P3_0 // RES #define CS1 P3_1 // CS1 //#elif defined(Parallel_6800) #define DATA_BUS P1 // P1 #define RS P3_7 // DI D/C #define RW P3_6 // R/W WR #define EN P3_5 // E RD #define RESB P3_0 // RES #define CS1 P3_1 // CS1 //#elif defined(Parallel_SPI) #define SCL P1_0 // SCL DB0 #define SDI P1_1 // SDI DB1 #define RS P3_7 // DI D/C #define RESB P3_0 // RES #define CS1 P3_1 // CS1 //#elif defined(Parallel_I2C) #define SCL P1_0 // Serial Clock #define SDA P1_1 // Serial Data #define RES P3_0 // Serial Data //#endif void uDelay(uchar l); void delay10ms(uint count); void Delay(uint del); void DLY(uchar dly); void Chk_Busy(); //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // Read/Write Sequence //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= void uDelay(uchar l) { while(l--); } void delay10ms(uint count) { uint i,j; for(i=0;i