Arduino控制LCD12864 有兴趣的看看
- /*
- LCD Arduino
- PIN1 = GND
- PIN2 = 5V
- RS(CS) = 8;
- RW(SID)= 9;
- EN(CLK) = 3;
- PIN15 PSB = GND;
- 行:汉字:8个 字母16个
- 列:4列
- */
- #include <LCD12864RSPI.h>
- #define AR_SIZE( a ) sizeof( a ) / sizeof( a[0] )
- unsigned char show1[]={0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50};
- unsigned char show2[]={0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70};
- unsigned char show3[]={0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A};
- unsigned char show4[]={0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A};
- void setup()
- {
- LCDA.Initialise(); // 屏幕初始化
- delay(100);
- }
- void loop()
- {
- LCDA.CLEAR();//清屏
- delay(100);
- LCDA.DisplayString(0,0,show1,AR_SIZE(show1));
- LCDA.DisplayString(1,0,show2,AR_SIZE(show2));
- LCDA.DisplayString(2,0,show3,AR_SIZE(show3));
- LCDA.DisplayString(3,0,show4,AR_SIZE(show4));
- while(1);
- //LCDA.CLEAR();//清屏
- }
复制代码
以上资料51hei下载地址:
Arduino_LCD12864.zip
(2.76 KB, 下载次数: 114)
|