当前位置:网站首页>dsPIC30F6014a LCD 方块显示
dsPIC30F6014a LCD 方块显示
2022-07-01 09:06: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();}
}
}
边栏推荐
- LogBack
- 足球篮球体育比赛比分直播平台源码/app开发建设项目
- JCL and slf4j
- Nacos - Configuration Management
- An overview of the design of royalties and service fees of mainstream NFT market platforms
- Personal decoration notes
- 2.3 [pytorch] data preprocessing torchvision datasets. ImageFolder
- Jeecg restart alarm 40001
- Pain points and solutions of fixed assets management of group companies
- Shell脚本-if else语句
猜你喜欢
3D打印Arduino 四轴飞行器
2.3 [pytorch] data preprocessing torchvision datasets. ImageFolder
Principles of Microcomputer - internal and external structure of microprocessor
Reproduced Xray - cve-2017-7921 (unauthorized access by Hikvision)
Jetson nano installs tensorflow GPU and problem solving
Jetson Nano 安装TensorFlow GPU及问题解决
3. Detailed explanation of Modbus communication protocol
Jeecg restart alarm 40001
NiO zero copy
Phishing identification app
随机推荐
Shell脚本-字符串
通过 代码实例 理解 浅复制 与 深复制
Vsync+ triple cache mechanism +choreographer
How to effectively align team cognition
美团2022年机试
安装Oracle EE
【pytorch学习】torch.device
Principles of Microcomputer - internal and external structure of microprocessor
Design and manufacture of simple digital display electronic scale
Shell脚本-if else语句
【pytorch】softmax函数
pcl_viewer命令
记一次redis超时
【pytorch】nn.CrossEntropyLoss() 与 nn.NLLLoss()
钓鱼识别app
2.3 【pytorch】数据预处理 torchvision.datasets.ImageFolder
[ESP nanny level tutorial] crazy completion chapter - Case: chemical environment system detection based on Alibaba cloud and Arduino, supporting nail robot alarm
Promise asynchronous programming
Shell脚本-read命令:读取从键盘输入的数据
Shell script - string