当前位置:网站首页>Dspic30f6014a LCD block display
Dspic30f6014a LCD block display
2022-07-01 09:22:00 【iCxhust】
void lcd_test00(void)
{
unsigned char i,page;
CSA=0;CSB=0;//left block
Nop();
write_com(0xc0);
for(page=0xb8;page<0xb8+8;page++)
{
write_com(page);
write_com(0x40);
//for()
if((page-0xb8)%2==0)
{
for(i=0;i<64;i++)
{
if((i/8%2)==0)
{write_data(0xff);}
else
{write_data(0);}
}
}
else
{
for(i=0;i<64;i++)
{
if((i/8%2)==0)
{write_data(0x0);}
else
{write_data(0xff);}
}
}
void clear_all_ram(unsigned char b)
{
unsigned char i,page;
//--------------------------------------
CSA=0;CSB=0;//left block
Nop();
write_com(0xc0);
for(page=0xb8;page<0xc0;page++)
{
write_com(page);
write_com(0x40);
for(i=0;i<64;i++)
{write_data(b);}
}
NOP();
//--------------------------------------
CSA=0;
Nop();Nop();Nop();Nop();Nop();
CSB=1;//medium block
Nop();
write_com(0xc0);
for(page=0xb8;page<0xc0;page++)
{
write_com(page);
write_com(0x40);
for(i=0;i<64;i++)
{write_data(b);}
}
NOP();
//--------------------------------------
CSA=1;CSB=0;//right block
Nop();
write_com(0xc0);
for(page=0xb8;page<0xc0;page++)
{
write_com(page);
write_com(0x40);
for(i=0;i<64;i++)
{write_data(b);}
}
NOP();
}
void delay1s(void)
{
unsigned int i,j;
for(i=0;i<800;i++)
{
for(j=0;j<50;j++)
{NOP();}
}
}
边栏推荐
- 树结构---二叉树1
- 【pytorch】transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))
- phpexcel 里 获取某一列的列表 获取某一列的字母
- Win7 pyinstaller reports an error DLL load failed while importing after packaging exe_ Socket: parameter error
- 2.4 activation function
- js作用域链与闭包
- Mysql8.0 learning record 17 -create table
- LeetCode 344. Reverse string
- SDN_简单总结
- JS use toString to distinguish between object and array
猜你喜欢
2.2 【pytorch】torchvision. transforms
ESP8266 FreeRTOS开发环境搭建
Simple load balancing with Nacos
Installation and use of NoSQL database
Nacos service configuration and persistence configuration
JS原型链
【pytorch】softmax函数
集成积木报表报错 org.apache.catalina.core.StandardContext.filterStart 启动过滤器异常
【检测技术课案】简易数显电子秤的设计与制作
Error org apache. catalina. core. StandardContext. FilterStart start filter exception
随机推荐
Exception handling of classes in C #
JS原型链
Differences between JS valueof and toString
JS scope chain and closure
[ESP nanny level tutorial] crazy completion chapter - Case: gy906 infrared temperature measurement access card swiping system based on the Internet of things
Principle and application of single chip microcomputer timer, serial communication and interrupt system
[pytorch] 2.4 convolution function nn conv2d
[video game training] real topic of 2013 video game of infrared optical communication device
Leetcode daily question brushing record --540 A single element in an ordered array
js原型陷阱
phpexcel 里 获取某一列的列表 获取某一列的字母
delete和delete[]引发的问题
利用闭包实现私有变量
OSPF - virtual link details (including configuration commands)
Mise en œuvre simple de l'équilibrage de la charge par nacos
Reproduced Xray - cve-2017-7921 (unauthorized access by Hikvision)
Network counting 01 physical layer
laravel postman 提交表单出现419错误。2020年7月6日记。
Short circuit operator lazy evaluation
NoSQL数据库的安装和使用