sed1335 c程序-源代码

sed1335 是日本seiko epson 公司出品的液晶显示控制器,它在同类产品中是功能最强的,其特点:
1、较强功能的i/o 缓冲器;
2、指令功能丰富;
3、四位数据并行发送,最大驱动能力为640 256 点
sed1335 c程序-源代码
#define iolcdstatexbyte[0x4000]
#define iolcdcommandxbyte[0x4001]
#define iolcddatawritexbyte[0x4000]
#define iolcddatareadxbyte[0x4001]
/*** 1335初始化 ***/
void org1335(void)
{
iolcdcommand=0x40;// 系统设置指令,8个参数
iolcddatawrite=0x30;
iolcddatawrite=0x87;
iolcddatawrite=0x07;
iolcddatawrite=40;// 显示域长度为320dot
iolcddatawrite=50;// 确定液晶工作频率
iolcddatawrite=240;// 显示屏高度为240dot
iolcddatawrite=40;// 显示屏一行所占显示缓冲区字节数(l)
iolcddatawrite=0;// 显示屏一行所占显示缓冲区字节数(h)
iolcdcommand=0x44;// 显示区设置,最多10个参数
iolcddatawrite=0x00;// 显示1区对应的显示ram起始地址(l)
iolcddatawrite=0x00;// 显示1区对应的显示ram起始地址(h)
iolcddatawrite=240;// 显示1区占用240个dot行
iolcdcommand=0x5a;// 水平卷动,初始化时必须清零
iolcddatawrite=0x00;
iolcdcommand=0x5b;// 各个显示区的合成方式,1个参数
iolcddatawrite=0x0c;// 简单叠加
iolcdcommand=0x59;// 打开显示,1个参数
iolcddatawrite=0x04;// 只保留第一个显示区
iolcdcommand=0x4c;// 光标向后移动
}
/*** 在液晶屏指定位置显示一个ascii字符 ***/
void displayoneascii(bit fnormal,uchar ihline,uchar iherect,uchar ihascii)
{
uchar ihdatasend;
uintxhvideoaddress;
cchar *pccbhasciifont;
if(ihline>14)ihline=0;
if(iherect>39) iherect=0;
pccbhasciifont=cxhasciifontorg;
pccbhasciifont=pccbhasciifont+(((uint)ihascii)<8);
iolcdcommand=0x42;
if(fnormal==1) iolcddatawrite =*pccbhasciifont++;
elseiolcddatawrite =~(*pccbhasciifont++);
xhvideoaddress+=40;
}
}
/*** 根据汉字机内码查找该汉字点阵的存储位置
*
* 1.小型应用中,只提取了专用字库,按照机内码排序索引
* 2.cbhchinesenumber为最多汉字数
* 3.cxhchineseindexfont 为索引表开始的位置
* 4.cxhchinesefontorg为汉字库开始的位置
*/
cchar *pseekchinesefont(uint xhchinesema)
{
uintxhlowseek,xhhighseek,xhmiddleseek;
cchar *pccbhchinesefont;
cint*pccxhchinesema;
xhlowseek =0x00;
xhhighseek=cbhchinesenumber;
pccbhchinesefont=cxhchinesefontorg;
for(;xhlowseek xhchinesema)
{
xhhighseek=xhmiddleseek-0x01;
}
else
{
xhlowseek=xhmiddleseek+0x01;
}
}
return(pccbhchinesefont);
}
/*** 在液晶屏指定位置显示一个汉字 ***/
void displayonehz(bit fnormal,uchar ihline,uchar iherect,uchar bhmachinemahigh,uchar bhmachinemalow)
{
uchar ihdatasend;
uintxhchinesema,xhvideoaddress;
cchar *pccbhchinesefont;
if(ihline>14)ihline=0;
if(iherect>39) iherect=0;
if(bhmachinemalow8;
iolcdcommand=0x42;
if(fnormal==1)
{
iolcddatawrite=*pccbhchinesefont++;
iolcddatawrite=*pccbhchinesefont++;
}
else
{
iolcddatawrite=~(*pccbhchinesefont++);
iolcddatawrite=~(*pccbhchinesefont++);
}
xhvideoaddress+=40;
}
}

详解赛灵思异构 3D 技术
Facebook新推出的Portal)与Portal+智能音响
HSDPA发展现状分析
推荐几款性价比高的TWS耳机,看看有没有你喜欢的
苹果造车对汽车厂商造成何种影响?
sed1335 c程序-源代码
蓝牙如何应用在灯光控制方面
虚拟现实设备CES上成热点,儿童佩戴安全吗
罗彻斯特电子为您的产品系统延长寿命
“十三五”期间,我国智能化、柔性化的先进制造业不断壮大
美国对人脸识别的态度急转直下 对其发出了禁令
Global Foundries与IBM将共同生产32纳米芯片
基于STM32单片机ADC连续采集和DMA循环转换
自动驾驶未来何在
音箱选购基础知识问与答
15A μModule稳压器通过将12V高效转换为1V来解决热问题
奥比中光亮相Japan IT Week春季展
OLED成为智能手机显示屏新主流
解读未来互联网的发展方向及趋势
电机的启动方式有哪些?因素是什么?