超过460,000+ 应用技术资源下载
null

12864底层驱动

  • 1星
  • 日期: 2018-05-07
  • 大小: 12.39KB
  • 所需积分:5分
  • 下载次数:0
  • favicon收藏
  • rep举报
  • 分享
  • free评论
标签: 51stm32程序

底层驱动 适合51 stm32等单片机

文档内容节选

龙丘OLED屏测试程序STC89C52 Designed by Chiu Sir Emailchiusiryahoocn 软件版本V11 最后更新2011年9月3日 相关信息参考下列地址: 网站: httpwwwlqistcn 淘宝店:httpshop36265907taobaocom 使用说明: OLED电源使用33V G 电源地 33V 接33V电源 D0 P10 D1 P11 RST P12 DC P13 CS 已接地,不用接 OLED电源使用5V G 电源地 33V 接5V电源,电源跟模块之间串接100欧姆电阻,并加33V钳位二极管 D0 P10 单片机跟模块之间串接1k33k电阻 D1 P11 单片机跟模块之间串接1k33k电阻 RST P12 单片机跟模块之间串接1k33k电阻 DC P13 单片机跟模块之间串接1k33k电阻 CS 已接地,不用接 如果用户使用的是5V单片机,请看用户手册,切勿烧毁模块 include stc15h include intrinsh include LQ12864h ......

/******************************************** 龙丘OLED屏测试程序-STC&89C52 Designed by Chiu Sir E-mail:chiusir@yahoo.cn 软件版本:V1.1 最后更新:2011年9月3日 相关信息参考下列地址: 网站: http://www.lqist.cn 淘宝店:http://shop36265907.taobao.com 使用说明: OLED电源使用3.3V。 ---------------- G 电源地 3.3V 接3.3V电源 D0 P1.0 D1 P1.1 RST P1.2 DC P1.3 CS 已接地,不用接 ============================================ OLED电源使用5V。 ---------------- G 电源地 3.3V 接5V电源,电源跟模块之间串接100欧姆电阻,并加3.3V钳位二极管 D0 P1.0 单片机跟模块之间串接1k-3.3k电阻 D1 P1.1 单片机跟模块之间串接1k-3.3k电阻 RST P1.2 单片机跟模块之间串接1k-3.3k电阻 DC P1.3 单片机跟模块之间串接1k-3.3k电阻 CS 已接地,不用接 ============================================ 如果用户使用的是5V单片机,请看用户手册,切勿烧毁模块! *********************************************************/ #include "stc15.h" #include "intrins.h" #include "LQ12864.h" sbit LCD_SCL=P2^0; sbit LCD_SDA=P2^1; sbit LCD_RST=P2^2; sbit LCD_DC =P2^3; #define XLevelL 0x00 #define XLevelH 0x10 #define XLevel ((XLevelH&0x0F)*16+XLevelL) #define Max_Column 128 #define Max_Row 64 #define Brightness 0xCF /* 4线SPI使用说明: VBT 供内部DC-DC电压,3.3~4.3V,如果使用5V电压,为保险起见串一个100~500欧的电阻 VCC 供内部逻辑电压 1.8~6V GND 地 BS0 低电平 BS1 低电平 BS2 低电平 CS 片选管脚 DC 命令数据选择管脚 RES 模块复位管脚 D0(SCLK) ,时钟脚,由MCU控制 D1(MOSI) ,主输出从输入数据脚,由MCU控制 D2 悬空 D3-D7 , 低电平 , 也可悬空,但最好设为低电平 RD 低电平 ,也可悬空,但最好设为低电平 RW 低电平 ,也可悬空,但最好设为低电平 RD 低电平 ,也可悬空,但最好设为低电平 */ #define X_WIDTH 128 #define Y_WIDTH 64 //====================================== const unsigned char F14x16[] = { 0x00,0x08,0x88,0x88,0x9C,0x9A,0xE8,0x88,0xBE,0x88,0x88,0x08,0x08,0x00, 0x00,0x88,0x4C,0x20,0x10,0x0E,0x01,0x40,0x40,0x3F,0x00,0x02,0x0C,0x00,/*"苏",0*/ 0x00,0x60,0x84,0x40,0x20,0xFC,0x2A,0x68,0xA8,0x28,0xE8,0x28,0x08,0x00, 0x00,0x78,0x07,0x02,0x1E,0x13,0x12,0x1E,0x12,0x52,0x7F,0x12,0x11,0x00,/*"海",1*/ 0x00,0x40,0x84,0xC8,0x20,0xA0,0xA4,0xAC,0xE0,0x98,0xA6,0x90,0x00,0x00, 0x00,0x08,0x7C,0x03,0x00,0x08,0x08,0x08,0x7F,0x08,0x08,0x08,0x04,0x00,/*"洋",2*/ 0x00,0x00,0x78,0x80,0xFE,0x90,0x50,0xF4,0x24,0x9C,0x24,0x24,0xF2,0x00, 0x00,0x0C,0x43,0x28,0x17,0x0C,0x02,0x4F,0x20,0x1F,0x10,0x18,0x67,0x00,/*"频",3*/ 0x00,0x18,0x28,0x68,0x48,0x68,0xDE,0x48,0x28,0x48,0x28,0x08,0x00,0x00, 0x00,0x02,0x12,0x11,0x12,0x13,0x7E,0x12,0x11,0x11,0x11,0x13,0x08,0x00,/*"率",4*/ 0x00,0x00,0xF0,0x90,0x90,0x90,0xFE,0x90,0x90,0x90,0xF0,0x10,0x00,0x00, 0x00,0x00,0x0F,0x04,0x04,0x04,0x7F,0x44,0x44,0x44,0x4F,0x50,0x60,0x00,/*"电",5*/ 0x00,0x00,0xFC,0x04,0x04,0x04,0x04,0xFC,0x04,0x04,0x04,0x86,0x04,0x00, 0x00,0x20,0x5F,0x40,0x40,0x41,0x41,0x3F,0x41,0x43,0x4D,0x40,0x20,0x00,/*"压",6*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x33,0x32,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*":",7*/ 0x00,0x00,0x00,0x00,0xE0,0x18,0x08,0x08,0xF0,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x07,0x18,0x20,0x20,0x1F,0x00,0x00,0x00,0x00,0x00,/*"0",8*/ 0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x10,0x00,0x00,0x00,0x00,0x00,0x00,/*"1",9*/ 0x00,0x00,0x00,0x00,0x30,0x28,0x08,0x08,0xD8,0x70,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x10,0x1C,0x12,0x11,0x18,0x00,0x00,0x00,0x00,0x00,/*"2",10*/ 0x00,0x00,0x00,0x00,0x10,0x18,0x08,0x88,0x78,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x08,0x10,0x11,0x10,0x11,0x0E,0x00,0x00,0x00,0x00,/*"3",11*/ 0x00,0x00,0x00,0x00,0x00,0xC0,0x20,0xF0,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x07,0x04,0x04,0x1F,0x14,0x04,0x00,0x00,0x00,0x00,/*"4",12*/ 0x00,0x00,0x00,0x00,0x60,0x98,0x88,0x88,0x88,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x08,0x18,0x10,0x10,0x19,0x07,0x00,0x00,0x00,0x00,/*"5",13*/ 0x00,0x00,0x00,0x00,0xC0,0x30,0x88,0x88,0x98,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x07,0x19,0x10,0x10,0x19,0x06,0x00,0x00,0x00,0x00,/*"6",14*/ 0x00,0x00,0x00,0x00,0x18,0x08,0x08,0xC8,0x28,0x18,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"7",15*/ 0x00,0x00,0x00,0x00,0x00,0x78,0x88,0x88,0x78,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x0E,0x11,0x10,0x11,0x13,0x0E,0x00,0x00,0x00,0x00,/*"8",16*/ 0x00,0x00,0x00,0x00,0xE0,0x18,0x08,0x08,0x18,0xE0,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x19,0x12,0x11,0x1D,0x03,0x00,0x00,0x00,0x00,/*"9",17*/ 0x00,0x00,0x00,0x08,0x78,0xC0,0x00,0x00,0xC0,0x30,0x08,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x01,0x0E,0x0E,0x01,0x00,0x00,0x00,0x00,0x00,/*"V",18*/ 0x00,0x00,0x00,0x00,0x00,0xF8,0x00,0x80,0x40,0x40,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x1F,0x01,0x06,0x18,0x10,0x00,0x00,0x00,0x00,/*"k",19*/ 0x00,0x00,0x00,0x08,0xF8,0x00,0x00,0x00,0x00,0xF8,0x08,0x00,0x00,0x00, 0x00,0x00,0x00,0x10,0x1F,0x01,0x01,0x01,0x01,0x1F,0x10,0x00,0x00,0x00,/*"H",20*/ 0x00,0x00,0x00,0x00,0x00,0x40,0x40,0x40,0xC0,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x18,0x14,0x13,0x10,0x18,0x00,0x00,0x00,0x00,/*"z",21*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x30,0x78,0x78,0x20,0x00,0x00,0x00,0x00,0x00,/*"·",22*/ 0x00,0x08,0x08,0x08,0xE8,0xA8,0xA6,0xA8,0xA8,0xF8,0x08,0x08,0x04,0x00, 0x00,0x00,0x7F,0x02,0x2E,0x12,0x12,0x12,0x3E,0x42,0x42,0x7F,0x00,0x00,/*"高",0*/ 0x00,0x00,0x78,0x80,0xFE,0x90,0x50,0xF4,0x24,0x9C,0x24,0x24,0xF2,0x00, 0x00,0x0C,0x43,0x28,0x17,0x0C,0x02,0x4F,0x20,0x1F,0x10,0x18,0x67,0x00,/*"频",1*/ 0x00,0x00,0xE0,0xFE,0x98,0x28,0xE8,0xBE,0xA8,0xA8,0xBE,0xE8,0x00,0x00, 0x0C,0x03,0x00,0x7F,0x88,0x88,0x4B,0x2A,0x1E,0x1A,0x2A,0x4F,0x48,0x00,/*"模",2*/ 0x00,0x00,0x20,0x20,0x20,0x20,0xA0,0x2C,0xF2,0x20,0x24,0x18,0x10,0x00, 0x00,0x60,0x21,0x21,0x1F,0x11,0x10,0x01,0x07,0x18,0x20,0x40,0x70,0x00,/*"式",3*/ 0x00,0xC0,0xF0,0x0C,0x00,0xF8,0x88,0x88,0xF8,0x84,0x84,0x84,0x80,0x00, 0x00,0x00,0x7F,0x00,0x00,0x3F,0x20,0x30,0x51,0x0E,0x10,0x20,0x70,0x00,/*"低",4*/ 0x00,0x00,0x78,0x80,0xFE,0x90,0x50,0xF4,0x24,0x9C,0x24,0x24,0xF2,0x00, 0x00,0x0C,0x43,0x28,0x17,0x0C,0x02,0x4F,0x20,0x1F,0x10,0x18,0x67,0x00,/*"频",5*/ 0x00,0x00,0xE0,0xFE,0x98,0x28,0xE8,0xBE,0xA8,0xA8,0xBE,0xE8,0x00,0x00, 0x0C,0x03,0x00,0x7F,0x88,0x88,0x4B,0x2A,0x1E,0x1A,0x2A,0x4F,0x48,0x00,/*"模",6*/ 0x00,0x00,0x20,0x20,0x20,0x20,0xA0,0x2C,0xF2,0x20,0x24,0x18,0x10,0x00, 0x00,0x60,0x21,0x21,0x1F,0x11,0x10,0x01,0x07,0x18,0x20,0x40,0x70,0x00,/*"式",7*/ }; //====================================================== // 128X64I液晶底层驱动[8X16]字体库 // 设计者: powerint // 描 述: [8X16]西文字符的字模数据 (纵向取模,字节倒序) // !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ //====================================================== const unsigned char code F8x16[]= { 0x00,0x00,0xE0,0x10,0x10,0xE0,0x00,0x00,0x00,0x00,0x07,0x08,0x08,0x07, 0x00,0x00,/*"0",0*/ 0x00,0x00,0x10,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x0F,0x08,0x00, 0x00,0x00,/*"1",1*/ 0x00,0x00,0x20,0x10,0x10,0xE0,0x00,0x00,0x00,0x00,0x0C,0x0A,0x09,0x08, 0x00,0x00,/*"2",2*/ 0x00,0x00,0x90,0x90,0x70,0x00,0x00,0x00,0x00,0x00,0x08,0x08,0x07,0x00, 0x00,0x00,/*"3",3*/ 0x00,0x00,0xC0,0x20,0xF0,0x00,0x00,0x00,0x00,0x03,0x02,0x02,0x0F,0x02, 0x00,0x00,/*"4",4*/ 0x00,0x00,0xF0,0x90,0x10,0x00,0x00,0x00,0x00,0x00,0x08,0x08,0x07,0x00, 0x00,0x00,/*"5",5*/ 0x00,0x00,0xC0,0xB0,0x90,0x10,0x00,0x00,0x00,0x00,0x07,0x08,0x08,0x07, 0x00,0x00,/*"6",6*/ 0x00,0x10,0x10,0xD0,0x30,0x00,0x00,0x00,0x00,0x00,0x0E,0x01,0x00,0x00, 0x00,0x00,/*"7",7*/ 0x00,0x00,0x60,0x90,0x90,0x60,0x00,0x00,0x00,0x00,0x07,0x09,0x09,0x06, 0x00,0x00,/*"8",8*/ 0x00,0x00,0xE0,0x10,0x10,0xE0,0x00,0x00,0x00,0x00,0x08,0x09,0x0D,0x03, 0x00,0x00,/*"9",9*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x06,0x00,0x00, 0x00,0x00,/*"未命名文件",0*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,/*" ",11*/ }; void LCD_WrDat(unsigned char dat) { unsigned char i=8; //LCD_CS=0;; LCD_DC=1;; LCD_SCL=0;; //;; while(i--) { if(dat&0x80){LCD_SDA=1;} else{LCD_SDA=0;} LCD_SCL=1; ;;; //;; LCD_SCL=0;; dat<<=1; } //LCD_CS=1; } void LCD_WrCmd(unsigned char cmd) { unsigned char i=8; //LCD_CS=0;; LCD_DC=0;; LCD_SCL=0;; //;; while(i--) { if(cmd&0x80){LCD_SDA=1;} else{LCD_SDA=0;;} LCD_SCL=1;; ;;; //;; LCD_SCL=0;; cmd<<=1;; } //LCD_CS=1; } void LCD_Set_Pos(unsigned char x, unsigned char y) { LCD_WrCmd(0xb0+y); LCD_WrCmd(((x&0xf0)>>4)|0x10); LCD_WrCmd((x&0x0f)|0x00); } void LCD_Fill(unsigned char bmp_dat) { unsigned char y,x; for(y=0;y<8;y++) { LCD_WrCmd(0xb0+y); LCD_WrCmd(0x01); LCD_WrCmd(0x10); for(x=0;x
更多简介内容

推荐帖子

stm32驱动液晶12864,有程序,求助
编译也没错误,液晶就是不显示,线路连接也没错,请大侠看看程序有木有问题 工程上传了,小弟还是再贴一份吧。  用的是原子的system文件夹 /*********************************************/ 下面是主函数 #include #include"delay.h" #include"sys.h" #include"usart.h" #in
化雨眠 【stm32/stm8】
240*128液晶屏幕显示的驱动程序在STM32F103的移植
首先,发此贴的原因是,这个液晶屏幕我花了3天的时间才算是完成简单的功能要求(实际上,我做的东西也只需要相对简单的显示,相信多数人也是这样),没有GUI,没有图片显示,只有文字和符号的显示,文字是16*16的,符号就是西文字符。把这个过程记录总结一下,相信自己以后还会用的到。 1. 移植准备1.1看数据手册我的屏幕是240*128的5V版本的显示屏幕,控制芯片是T6963,了解屏幕控制芯片的型
mengyu139 【stm32/stm8】
基于STM32F030+L6230(FOC5.2库)BLDC电机驱动:程序+原理图+BOM等全部开源分享
本帖最后由 music_586 于 2018-12-28 21:00 编辑 基于STM32F030+L6230(FOC5.2库)BLDC电机驱动:程序+原理图+BOM等全部开源分享主芯片:STM32F030R8T6驱动芯片:L6230PD资料下载见附件,电脑登入软件:KEIL MDK打开(5.0以上版本)优酷视频播放链接:https://v.youku.com/v_show/id_XMzk4N
music_586 电机驱动控制(Motor Control)
STM32F051驱动LCD1602程序,及注意事项。
本帖最后由 dontium 于 2017-5-18 23:12 编辑 捣鼓STM32F051带的1602屏,屏是新买的,开始怎么也搞不亮,又把我很早使用的屏 ----- 用几个HD44100的屏拿出来,接上去仍然不亮,观察LCD,没有任何加上电的迹象! 反复看手册,VO的偏压端是按照手册上说明的去做的,不应该有问题,但后来还是怀疑了它,就拿了个电位器来这个电压,从5V调到0V,呵呵,发现
dontium 【stm32/stm8】
怎样将模拟多通道开关的51程序改写成STM32的表达方式
请多多指点,谢谢。 两个问题:   函数中,可以看出ABC的值是不停变换(程序里没考虑ABC一直加,溢出怎么办????) sel_B,代指P1.2. 然后由ABC与0x02运算,得出状态值。 stm32中该如何表达?????? 下面是个程序: #include #include sbit     sel_A = P1^1;  多通道开关 A,B,C三个选择端对应80C51的三个端
yanse51 【stm32/stm8】
基于L6230+STM32 FOC5.2库PMSM驱动:程序+原理图+BOM等全部开源分享
基于L6230+STM32 FOC5.2库PMSM驱动:程序+原理图+BOM等全部开源分享主芯片:STM32F030驱动芯片:L6230资料下载见附件,电脑登入软件:KEIL MDK打开(5.0以上版本)优酷视频播放链接:https://v.youku.com/v_show/id_XMzk4NTQ2MjExNg==.html?spm=a2h0j.11185381.listitem_page1.5~
music_586 电机驱动控制(Motor Control)

评论


个人中心

意见反馈

求资源

回顶部

About Us 关于我们 客户服务 联系方式 器件索引 网站地图 最新更新 手机版

EEWorld电子技术资料下载——分享有价值的资料

北京市海淀区知春路23号集成电路设计园量子银座1305 电话:(010)82350740 邮编:100191

电子工程世界版权所有 京ICP证060456号 京ICP备10001474号 电信业务审批[2006]字第258号函 京公海网安备110108001534 Copyright © 2005-2020 EEWORLD.com.cn, Inc. All rights reserved
$(function(){ var appid = $(".select li a").data("channel"); $(".select li a").click(function(){ var appid = $(this).data("channel"); $('.select dt').html($(this).html()); $('#channel').val(appid); }) })