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

边栏推荐
- Installing Oracle EE
- nacos服务配置和持久化配置
- 【ESP 保姆级教程】疯狂毕设篇 —— 案例:基于物联网的GY906红外测温门禁刷卡系统
- 3. Detailed explanation of Modbus communication protocol
- JCL and slf4j
- R语言观察日志(part24)--初始化设置
- [ESP nanny level tutorial preview] crazy node JS server - Case: esp8266 + DHT11 +nodejs local service + MySQL database
- Set the type of the input tag to number, and remove the up and down arrows
- 类加载
- 【ESP 保姆级教程】疯狂毕设篇 —— 案例:基于阿里云、小程序、Arduino的WS2812灯控系统
猜你喜欢

What are the differences between the architecture a, R and m of arm V7, and in which fields are they applied?

如何一站式高效管理固定资产?

安装Oracle EE

Nacos - gestion de la configuration

Principles of Microcomputer - internal and external structure of microprocessor

2.2 【pytorch】torchvision. transforms

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

Why is the Ltd independent station a Web3.0 website!

Nacos - Configuration Management

jeecg 重启报40001
随机推荐
Class loading
Shell script - special variables: shell $, $*, [email protected], $$$
Reproduced Xray - cve-2017-7921 (unauthorized access by Hikvision)
【pytorch】transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))
R语言观察日志(part24)--初始化设置
记一次redis超时
Vsync+ triple cache mechanism +choreographer
Football and basketball game score live broadcast platform source code /app development and construction project
Embedded Engineer Interview Question 3 Hardware
【pytorch】nn. Crossentropyloss() and nn NLLLoss()
【电赛训练】红外光通信装置 2013年电赛真题
美团2022年机试
日常办公耗材管理解决方案
Redis——Lettuce连接redis集群
[ESP nanny level tutorial] crazy completion chapter - Case: gy906 infrared temperature measurement access card swiping system based on the Internet of things
Bird recognition app
Can diffusion models be regarded as an autoencoder?
【ESP 保姆级教程】疯狂毕设篇 —— 案例:基于阿里云和Arduino的化学环境系统检测,支持钉钉机器人告警
2.3 【pytorch】数据预处理 torchvision.datasets.ImageFolder
Shell脚本-数组定义以及获取数组元素