【】LCD12864 cubie驱动显示
本帖最后由 SUNROC1 于 2014-12-19 23:06 编辑操作系统: 使用的是官方网站上的ubuntu sd card 1.1
1. 安装python的库和cubie的gpio库sudo apt-get install python-dev
wget http://dl.linux-sunxi.org/users/tom/pySUNXI-0.1.12.tar.gz
tar zxf pySUNXI-0.1.12.tar.gz
sudo python setup.py install2. 用Python GPIO里面的GPIO C库文件直接编写 C应用程序
在/home/cubie/pySUNXI-0.1.12/source目录下编写:
pyinclude.c文件(见附件)
pyinclude.h文件(见附件)
LCD12864Serial.c文件(见附件)
LCD12864Serial.h文件 (见附件)
test12864.c文件如下:#include "pyinclude.h"
#include "LCD12864Serial.h"
int main(void)
{
if(SETUP_OK!=sunxi_gpio_init())
{
printf("Failed to initialize GPIO\n");
return -1;
}
LCD12864Init();
while(1)
{
Test12864();
}
sunxi_gpio_cleanup();
return 0;
}3.硬件连接:
cubie LCD12864
PD6 CS (RS)
PD7 SID (RW)
PD8 SCLK (EN)
PD9 RST
4. 编译运行:gcc LCD12864Serial.c -c
gcc gpio_lib.c -c
gcc pyinclude.c -c
gcc test12864.c -c
gcc test12864.o gpio_lib.o pyinclude.o LCD12864Serial.o -o test12864
./test128645.有图有真相:
附上代码:
8月11 :更新Makefile
欢迎访问俺的网站:{:soso_e157:}{:soso_e121:}{:soso_e157:}http://www.heartiot.com/ {:soso_e157:}{:soso_e182:}{:soso_e157:}
抢沙发,来赞一个{:soso_e113:} 寒寒 发表于 2013-8-9 10:48 static/image/common/back.gif
抢沙发,来赞一个
:) 互相学习 顶一个~~ 怎么样才能有积分? 顶楼主,谢谢!
有搞过TFT的吗?
MCU驱动那种的 能给一个详细的接线图吗,谢谢
页:
[1]