当前位置:网站首页>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();}
}
}

边栏推荐
- JS use toString to distinguish between object and array
- [pytorch] softmax function
- [ESP nanny level tutorial] crazy completion chapter - Case: ws2812 light control system based on Alibaba cloud, applet and Arduino
- js this丢失问题分析 及 解决方案
- JS variable lifting
- 【pytorch学习】torch.device
- 手指点击屏幕就模拟进入F11进入全屏
- How to launch circle of friends marketing and wechat group activities
- Which method is good for the management of fixed assets of small and medium-sized enterprises?
- js函数arguments对象
猜你喜欢

【pytorch】nn. Crossentropyloss() and nn NLLLoss()

JS原型链

nacos簡易實現負載均衡

Jetson Nano 安装TensorFlow GPU及问题解决
![[video game training] real topic of 2013 video game of infrared optical communication device](/img/ef/c2c45c1c6c24aed0a4e93101047372.png)
[video game training] real topic of 2013 video game of infrared optical communication device

An overview of the design of royalties and service fees of mainstream NFT market platforms

Which method is good for the management of fixed assets of small and medium-sized enterprises?

nacos服务配置和持久化配置

【pytorch】softmax函数

2022.02.15_ Daily question leetcode six hundred and ninety
随机推荐
Log4j 日志框架
Simple load balancing with Nacos
js原型继承仅可继承实例而非构造器
集成积木报表报错 org.apache.catalina.core.StandardContext.filterStart 启动过滤器异常
[interview brush 101] linked list
How to launch circle of friends marketing and wechat group activities
2022.02.15_ Daily question leetcode six hundred and ninety
Using closures to implement private variables
[pytorch] softmax function
[video game training] real topic of 2013 video game of infrared optical communication device
[ESP nanny level tutorial] crazy completion chapter - Case: gy906 infrared temperature measurement access card swiping system based on the Internet of things
Shell script case in statement
Naoqi robot summary 28
Niuke monthly race 22 tree sub chain
韦东山板子编译内核问题解决
pcl_viewer命令
An overview of the design of royalties and service fees of mainstream NFT market platforms
Shell script -select in loop
PR training notes
Niuke monthly race 22- collect pieces of paper