C51--OLED

GME12864-12

OLED写入指令数据:

在这里插入图片描述
1、start()开始
2、slave address 存积地址:011110 xx
写入:b 0111 1000 (0x78)(R / W位置为0时,表示写入)
3、ACK
4、cotrol byte:(Co) (D / C)000000

(Co置为0时,接下来传输的信息包含数据字节data byte)
(D / C位置为0时,表示为命令;为 1 时,表示为数据)
0000 0000 写入命令
0100 0000 写入数据

5、ACK
6、写入指令/数据
7、ACK
8、STOP

//写入命令
void Oled_Write_Cmd(char dataCmd)
{ICC_Start();			//	1、start()开始IIC_Send_Byte(0x78);	//	2、slave address  存积地址:011110 xx//	写入:b 0111 1000(0x78)(R/W位置为0时,表示写入)ICC_ACK();				//	3、ACKIIC_Send_Byte(0x00);	//	4、cotrol byte:(Co) (D/C)000000	//(Co置为0时,接下来传输的信息包含数据字节data byte)//(D / C位置为0时,表示为命令;为 1 时,表示为数据)//  0000 0000 写入命令//	0100 0000 写入数据ICC_ACK();				//	5、ACKIIC_Send_Byte(dataCmd); //  6、写入指令/数据ICC_ACK();				//	7、ACKICC_Stop();				//	8、STOP
}//写入数据
void Oled_Write_Data(char dataData)
{ICC_Start();			//	1、start()开始IIC_Send_Byte(0x78);	//	2、slave address  存积地址:011110 xx//	写入:b 0111 1000(0x78)(R/W位置为0时,表示写入)ICC_ACK();				//	3、ACKIIC_Send_Byte(0x40);	//	4、cotrol byte:(Co) (D/C)000000	//(Co置为0时,接下来传输的信息包含数据字节data byte)//(D / C位置为0时,表示为命令;为 1 时,表示为数据)//  0000 0000 写入命令//	0100 0000 写入数据ICC_ACK();				//	5、ACKIIC_Send_Byte(dataData);//  6、写入指令/数据ICC_ACK();				//	7、ACKICC_Stop();				//	8、STOP
}

OLED显示点:

VDD = 1.65V——3.3V
VCC = 7V —— 15V

128x64个点阵组成:

64=8Page*8bit
自动右移
横向:SEG0——SEG127
竖向:Page0——Page7

寻址模式:

页地址模式:

在这里插入图片描述
水平横向寻址,写到127时,他会返回到该行的头部。

1、发送cmd:0x20
2、发送cmd:0x02;(默认为页模式)

水平地址模式:

在这里插入图片描述
水平横向寻址,写到127时,他会返回到下一行的头部

垂直地址模式:

在这里插入图片描述
竖向寻址,到尾部时,会返回下一列的头部继续

页模式:显示一个点

配置页地址模式:
Oled_Write_Cmd(0x20);
Oled_Write_Cmd(0x02);
配置显示地址:
Oled_Write_Cmd(0xB0);//配置page1-8
Oled_Write_Cmd(0x00);//列地址,从头开始
Oled_Write_Cmd(0x10);

主函数:
1、OLED初始化
2、选择一个位置
2.1、确认为页面寻址模式

Oled_Write_Cmd(0x20);
Oled_Write_Cmd(0x02);

2.2、选择PAGE0

Oled_Write_Cmd(0xB0);//1011 0000(0xB0)配置page1-8.

3、显示一个点

#include "reg52.h"
#include "intrins.h"sbit SCL = P0^1;
sbit SDA = P0^3;void ICC_Start()
{SDA = 1;SCL = 1;_nop_();	//一个nop用时5usSDA = 0;_nop_();
}void ICC_Stop()
{SDA = 0;SCL = 1;_nop_();SDA = 1;_nop_();
}char ICC_ACK()
{char flag;SDA = 1;		//在时钟脉冲9期间释放_nop_();SCL = 1;_nop_();flag = SDA;_nop_();SCL = 0;_nop_();return flag;
}void IIC_Send_Byte(char dataSend)
{int i;for(i = 0;i < 8;i++){SCL = 0;						//SCL低电平,让SDA做好数据准备SDA = dataSend & 0x80;			//与上1000 0000 获得dataSend的最高位,给SDA_nop_();						//发送数据建立的时间SCL = 1;						//SCL高电平,开始发送数据_nop_();						//发送数据需要时间SCL= 0;						//发送完毕,SCL拉回低电平_nop_();dataSend = dataSend << 1;}
}//写入命令
void Oled_Write_Cmd(char dataCmd)
{ICC_Start();			//	1、start()开始IIC_Send_Byte(0x78);	//	2、slave address  存积地址:011110 xx//	写入:b 0111 1000(0x78)(R/W位置为0时,表示写入)ICC_ACK();				//	3、ACKIIC_Send_Byte(0x00);	//	4、cotrol byte:(Co) (D/C)000000	//(Co置为0时,接下来传输的信息包含数据字节data byte)//(D / C位置为0时,表示为命令;为 1 时,表示为数据)//  0000 0000 写入命令//	0100 0000 写入数据ICC_ACK();				//	5、ACKIIC_Send_Byte(dataCmd); //  6、写入指令/数据ICC_ACK();				//	7、ACKICC_Stop();				//	8、STOP
}//写入数据
void Oled_Write_Data(char dataData)
{ICC_Start();			//	1、start()开始IIC_Send_Byte(0x78);	//	2、slave address  存积地址:011110 xx//	写入:b 0111 1000(0x78)(R/W位置为0时,表示写入)ICC_ACK();				//	3、ACKIIC_Send_Byte(0x40);	//	4、cotrol byte:(Co) (D/C)000000	//(Co置为0时,接下来传输的信息包含数据字节data byte)//(D / C位置为0时,表示为命令;为 1 时,表示为数据)//  0000 0000 写入命令//	0100 0000 写入数据ICC_ACK();				//	5、ACKIIC_Send_Byte(dataData);//  6、写入指令/数据ICC_ACK();				//	7、ACKICC_Stop();				//	8、STOP
}void Oled_Init()
{Oled_Write_Cmd(0xAE);//--display offOled_Write_Cmd(0x00);//---set low column addressOled_Write_Cmd(0x10);//---set high column addressOled_Write_Cmd(0x40);//--set start line addressOled_Write_Cmd(0xB0);//--set page addressOled_Write_Cmd(0x81); // contract controlOled_Write_Cmd(0xFF);//--128Oled_Write_Cmd(0xA1);//set segment remapOled_Write_Cmd(0xA6);//--normal / reverseOled_Write_Cmd(0xA8);//--set multiplex ratio(1 to 64)Oled_Write_Cmd(0x3F);//--1/32 dutyOled_Write_Cmd(0xC8);//Com scan directionOled_Write_Cmd(0xD3);//-set display offsetOled_Write_Cmd(0x00);//Oled_Write_Cmd(0xD5);//set osc divisionOled_Write_Cmd(0x80);//Oled_Write_Cmd(0xD8);//set area color mode offOled_Write_Cmd(0x05);//Oled_Write_Cmd(0xD9);//Set Pre-Charge PeriodOled_Write_Cmd(0xF1);//Oled_Write_Cmd(0xDA);//set com pin configuartionOled_Write_Cmd(0x12);//Oled_Write_Cmd(0xDB);//set VcomhOled_Write_Cmd(0x30);//Oled_Write_Cmd(0x8D);//set charge pump enableOled_Write_Cmd(0x14);//Oled_Write_Cmd(0xAF);//--turn on oled panel}void main()
{Oled_Init();				//OLED初始化Oled_Write_Cmd(0x20);		//选择一个位置,确认为页面寻址模式Oled_Write_Cmd(0x02);Oled_Write_Cmd(0xB0);		//1011 0000(0xB0)配置page1-8.//显示一个点while(1);
}

页模式:显示字符

选择列地址显示
主函数:
1、OLED初始化
2、选择一个位置
2.1、确认为页面寻址模式

Oled_Write_Cmd(0x20);
Oled_Write_Cmd(0x02);

2.2、选择PAGE0

Oled_Write_Cmd(0xB0);//1011 0000(0xB0)配置page1-8.
Oled_Write_Cmd(0x00);//列地址,从头开始
Oled_Write_Cmd(0x10);

3、显示屏写入数据

用点阵液晶取模工具取模
要勾选纵向取模,文字倒序

显示字符A:

#include "reg52.h"
#include "intrins.h"sbit SCL = P0^1;
sbit SDA = P0^3;void ICC_Start()
{SCL = 0;	//防止雪花屏SDA = 1;SCL = 1;_nop_();	//一个nop用时5usSDA = 0;_nop_();
}void ICC_Stop()
{SCL = 0;	//防止雪花屏SDA = 0;SCL = 1;_nop_();SDA = 1;_nop_();
}char ICC_ACK()
{char flag;SDA = 1;		//在时钟脉冲9期间释放_nop_();SCL = 1;_nop_();flag = SDA;_nop_();SCL = 0;_nop_();return flag;
}void IIC_Send_Byte(char dataSend)
{int i;for(i = 0;i < 8;i++){SCL = 0;						//SCL低电平,让SDA做好数据准备SDA = dataSend & 0x80;			//与上1000 0000 获得dataSend的最高位,给SDA_nop_();						//发送数据建立的时间SCL = 1;						//SCL高电平,开始发送数据_nop_();						//发送数据需要时间SCL= 0;						//发送完毕,SCL拉回低电平_nop_();dataSend = dataSend << 1;}
}//写入命令
void Oled_Write_Cmd(char dataCmd)
{ICC_Start();			//	1、start()开始IIC_Send_Byte(0x78);	//	2、slave address  存积地址:011110 xx//	写入:b 0111 1000(0x78)(R/W位置为0时,表示写入)ICC_ACK();				//	3、ACKIIC_Send_Byte(0x00);	//	4、cotrol byte:(Co) (D/C)000000	//(Co置为0时,接下来传输的信息包含数据字节data byte)//(D / C位置为0时,表示为命令;为 1 时,表示为数据)//  0000 0000 写入命令//	0100 0000 写入数据ICC_ACK();				//	5、ACKIIC_Send_Byte(dataCmd); //  6、写入指令/数据ICC_ACK();				//	7、ACKICC_Stop();				//	8、STOP
}//写入数据
void Oled_Write_Data(char dataData)
{ICC_Start();			//	1、start()开始IIC_Send_Byte(0x78);	//	2、slave address  存积地址:011110 xx//	写入:b 0111 1000(0x78)(R/W位置为0时,表示写入)ICC_ACK();				//	3、ACKIIC_Send_Byte(0x40);	//	4、cotrol byte:(Co) (D/C)000000	//(Co置为0时,接下来传输的信息包含数据字节data byte)//(D / C位置为0时,表示为命令;为 1 时,表示为数据)//  0000 0000 写入命令//	0100 0000 写入数据ICC_ACK();				//	5、ACKIIC_Send_Byte(dataData);//  6、写入指令/数据ICC_ACK();				//	7、ACKICC_Stop();				//	8、STOP
}void Oled_Init(void)
{Oled_Write_Cmd(0xAE);//--display offOled_Write_Cmd(0x00);//---set low column addressOled_Write_Cmd(0x10);//---set high column addressOled_Write_Cmd(0x40);//--set start line addressOled_Write_Cmd(0xB0);//--set page addressOled_Write_Cmd(0x81); // contract controlOled_Write_Cmd(0xFF);//--128Oled_Write_Cmd(0xA1);//set segment remapOled_Write_Cmd(0xA6);//--normal / reverseOled_Write_Cmd(0xA8);//--set multiplex ratio(1 to 64)Oled_Write_Cmd(0x3F);//--1/32 dutyOled_Write_Cmd(0xC8);//Com scan directionOled_Write_Cmd(0xD3);//-set display offsetOled_Write_Cmd(0x00);//Oled_Write_Cmd(0xD5);//set osc divisionOled_Write_Cmd(0x80);//Oled_Write_Cmd(0xD8);//set area color mode offOled_Write_Cmd(0x05);//Oled_Write_Cmd(0xD9);//Set Pre-Charge PeriodOled_Write_Cmd(0xF1);//Oled_Write_Cmd(0xDA);//set com pin configuartionOled_Write_Cmd(0x12);//Oled_Write_Cmd(0xDB);//set VcomhOled_Write_Cmd(0x30);//Oled_Write_Cmd(0x8D);//set charge pump enableOled_Write_Cmd(0x14);//Oled_Write_Cmd(0xAF);//--turn on oled panel}//清屏
void Oled_Clear()
{int i,j;//unsigned char i,j;		char范围-128——127,定义char类型会产生越界for(i = 0;i < 8;i++){Oled_Write_Cmd(0xB0 + i);		//Page0——Page7Oled_Write_Cmd(0x00);			//每个Page从0开始Oled_Write_Cmd(0x10);for(j = 0;j < 128;j++){			//0——127列,依次写入0,每写入数据列地址自动偏移。Oled_Write_Data(0);			}}
}/*--  文字:  A  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   (一个Page为8位)--*/
char A1[8] = {0x00,0x00,0xC0,0x38,0xE0,0x00,0x00,0x00};char A2[8] = {0x20,0x3C,0x23,0x02,0x02,0x27,0x38,0x20};void main()
{int i;Oled_Init();				//OLED初始化Oled_Write_Cmd(0x20);		//选择一个位置,确认为页面寻址模式Oled_Write_Cmd(0x02);Oled_Clear();				//清屏Oled_Write_Cmd(0xB0);		//1011 0000(0xB0)配置page1-8.//显示一个点Oled_Write_Cmd(0x00);		//列地址,从头开始Oled_Write_Cmd(0x10);for(i = 0;i < 8;i++){Oled_Write_Data(A1[i]);}Oled_Write_Cmd(0xB1);	Oled_Write_Cmd(0x00);Oled_Write_Cmd(0x10);for(i = 0;i < 8;i++){Oled_Write_Data(A2[i]);}while(1);
}
各数据类型大小和取值范围:
https://blog.csdn.net/weixin_42856843/article/details/81989737

页模式:显示图片

大小:128x64像素
保存模式:bmp模式

位图(Bitmap)模式:它没有进行数据压缩,其内部存储的色彩信息(灰度图,RGB 或 ARGB)直接以二进制的形式暴露在外,也十分方便借助计算机软件进行简单或深入的分析。

#include "reg52.h"
#include "intrins.h"sbit SCL = P0^1;
sbit SDA = P0^3;void ICC_Start()
{SCL = 0;	//防止雪花屏SDA = 1;SCL = 1;_nop_();	//一个nop用时5usSDA = 0;_nop_();
}void ICC_Stop()
{SCL = 0;	//防止雪花屏SDA = 0;SCL = 1;_nop_();SDA = 1;_nop_();
}char ICC_ACK()
{char flag;SDA = 1;		//在时钟脉冲9期间释放_nop_();SCL = 1;_nop_();flag = SDA;_nop_();SCL = 0;_nop_();return flag;
}void IIC_Send_Byte(char dataSend)
{int i;for(i = 0;i < 8;i++){SCL = 0;						//SCL低电平,让SDA做好数据准备SDA = dataSend & 0x80;			//与上1000 0000 获得dataSend的最高位,给SDA_nop_();						//发送数据建立的时间SCL = 1;						//SCL高电平,开始发送数据_nop_();						//发送数据需要时间SCL= 0;						//发送完毕,SCL拉回低电平_nop_();dataSend = dataSend << 1;}
}//写入命令
void Oled_Write_Cmd(char dataCmd)
{ICC_Start();			//	1、start()开始IIC_Send_Byte(0x78);	//	2、slave address  存积地址:011110 xx//	写入:b 0111 1000(0x78)(R/W位置为0时,表示写入)ICC_ACK();				//	3、ACKIIC_Send_Byte(0x00);	//	4、cotrol byte:(Co) (D/C)000000	//(Co置为0时,接下来传输的信息包含数据字节data byte)//(D / C位置为0时,表示为命令;为 1 时,表示为数据)//  0000 0000 写入命令//	0100 0000 写入数据ICC_ACK();				//	5、ACKIIC_Send_Byte(dataCmd); //  6、写入指令/数据ICC_ACK();				//	7、ACKICC_Stop();				//	8、STOP
}//写入数据
void Oled_Write_Data(char dataData)
{ICC_Start();			//	1、start()开始IIC_Send_Byte(0x78);	//	2、slave address  存积地址:011110 xx//	写入:b 0111 1000(0x78)(R/W位置为0时,表示写入)ICC_ACK();				//	3、ACKIIC_Send_Byte(0x40);	//	4、cotrol byte:(Co) (D/C)000000	//(Co置为0时,接下来传输的信息包含数据字节data byte)//(D / C位置为0时,表示为命令;为 1 时,表示为数据)//  0000 0000 写入命令//	0100 0000 写入数据ICC_ACK();				//	5、ACKIIC_Send_Byte(dataData);//  6、写入指令/数据ICC_ACK();				//	7、ACKICC_Stop();				//	8、STOP
}void Oled_Init(void)
{Oled_Write_Cmd(0xAE);//--display offOled_Write_Cmd(0x00);//---set low column addressOled_Write_Cmd(0x10);//---set high column addressOled_Write_Cmd(0x40);//--set start line addressOled_Write_Cmd(0xB0);//--set page addressOled_Write_Cmd(0x81); // contract controlOled_Write_Cmd(0xFF);//--128Oled_Write_Cmd(0xA1);//set segment remapOled_Write_Cmd(0xA6);//--normal / reverseOled_Write_Cmd(0xA8);//--set multiplex ratio(1 to 64)Oled_Write_Cmd(0x3F);//--1/32 dutyOled_Write_Cmd(0xC8);//Com scan directionOled_Write_Cmd(0xD3);//-set display offsetOled_Write_Cmd(0x00);//Oled_Write_Cmd(0xD5);//set osc divisionOled_Write_Cmd(0x80);//Oled_Write_Cmd(0xD8);//set area color mode offOled_Write_Cmd(0x05);//Oled_Write_Cmd(0xD9);//Set Pre-Charge PeriodOled_Write_Cmd(0xF1);//Oled_Write_Cmd(0xDA);//set com pin configuartionOled_Write_Cmd(0x12);//Oled_Write_Cmd(0xDB);//set VcomhOled_Write_Cmd(0x30);//Oled_Write_Cmd(0x8D);//set charge pump enableOled_Write_Cmd(0x14);//Oled_Write_Cmd(0xAF);//--turn on oled panel}//清屏
void Oled_Clear()
{int i,j;//unsigned char i,j;		char范围-128——127,定义char类型会产生越界for(i = 0;i < 8;i++){Oled_Write_Cmd(0xB0 + i);		//Page0——Page7Oled_Write_Cmd(0x00);			//每个Page从0开始Oled_Write_Cmd(0x10);for(j = 0;j < 128;j++){			//0——127列,依次写入0,每写入数据列地址自动偏移。Oled_Write_Data(0);			}}
}code unsigned char bmpImager[] = {/*--  调入了一幅图像:12864演示图片.bmp  --*/
/*--  宽度x高度=128x64  (有128x8x8个数据)--*/
0x00,0x00,0x80,0xC0,0xE0,0xF0,0xF0,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF0,0xF0,
0xF0,0xE0,0xE0,0x60,0x70,0x70,0x30,0x30,0x38,0x18,0x18,0x18,0x18,0x18,0x18,0x1C,
0x0C,0x1C,0x1C,0x1C,0x18,0x18,0x18,0x18,0x18,0x30,0x30,0x30,0x60,0x60,0xE0,0xE0,
0xE0,0xF0,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF0,0xF0,0xE0,0xC0,0x80,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x3E,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0x1F,0x1F,0x07,0x07,0x03,
0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x01,0x01,0x03,0x07,0x0F,0x1F,0x3F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,
0x7F,0x00,0x00,0x00,0x00,0x00,0xF0,0xF0,0x70,0x30,0x30,0x30,0xF0,0xE0,0x00,0x00,
0x40,0xE0,0x70,0x30,0x30,0x30,0x70,0xF0,0xE0,0x00,0x00,0x00,0xF0,0xF0,0x70,0x30,
0x30,0x70,0xF0,0xE0,0x00,0x00,0xC0,0xE0,0x70,0x30,0x30,0x30,0x30,0x74,0xFF,0xFF,
0x00,0x00,0x00,0xE0,0xF0,0x30,0x30,0x30,0x70,0xF0,0xE0,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x03,0x07,0x0F,0x1F,0xFF,0xFF,0x0F,0x01,0x00,0x00,0x00,0x80,0xE0,0xF0,
0xF8,0xF8,0xFC,0xFC,0x7E,0x7E,0x7E,0xFE,0xFC,0xF8,0x60,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0xF8,0xFC,0xFC,0xFE,0x7E,0xFE,0xFC,0xF8,
0xF8,0xF0,0xE0,0x80,0x00,0x00,0x00,0x01,0x0F,0xFF,0xFF,0x1F,0x0F,0x07,0x03,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x60,0x60,0xE0,0x60,0x7F,0x3F,0x02,0x00,
0x38,0x7D,0xFE,0x66,0xE6,0x66,0x76,0x7F,0x7F,0x00,0x00,0x00,0x7F,0x7F,0x00,0x00,
0x00,0x00,0x7F,0x7F,0x00,0x00,0x1F,0x3F,0x7A,0x60,0xE0,0xE0,0x60,0x78,0x7F,0x7F,
0x00,0x00,0x38,0x7D,0x7F,0xE6,0x46,0x66,0x76,0x7F,0x7F,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0xFF,0xE0,0x00,0x00,0x00,0x3E,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0x1F,0x03,0x00,0x00,0x00,0x60,0xF0,0xF8,
0xF8,0xF8,0xF0,0xF0,0x70,0x00,0x00,0x00,0x07,0x3F,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0x7F,0x00,0x00,0x80,0xE0,0xFF,0x3F,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x0F,0x1C,0x38,0x60,0xE0,0xC1,0x81,
0x83,0x03,0x03,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x03,0x83,
0x83,0x83,0xC1,0xE0,0x70,0x38,0x1C,0x0F,0x03,0x80,0x80,0xA0,0xB0,0xB8,0xFC,0xF7,
0xF7,0x92,0x94,0xDC,0xF8,0xD0,0xC0,0x40,0x00,0x00,0x00,0xC0,0xC2,0x46,0xFC,0x40,
0x00,0x10,0x70,0xC7,0x9E,0xC0,0xFE,0x1C,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0xF0,
0xA0,0xB0,0xB3,0xFF,0xB2,0x90,0xB0,0xF0,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x80,0x80,0x84,0x84,0x84,0x86,0xB6,0xE6,0x96,0x8E,0x86,0x86,0xC0,0xC0,0x80,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
0x3F,0xFF,0xFF,0x7F,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0x7C,0x0C,0x0C,0x0C,0x0C,0x0C,
0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0xFC,0xFC,0xFE,0xFE,0xFE,0xFE,0xFF,0x7F,0xFF,
0xFF,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x18,0x89,0x8C,0x96,0xB7,0xD5,0xD6,
0xD6,0xD6,0xDF,0xD7,0xCE,0x5C,0x18,0x18,0x08,0x00,0x00,0x00,0x00,0x40,0x7F,0xB0,
0xD8,0x6C,0x30,0x19,0x0F,0x1F,0x78,0xE0,0xC0,0xC0,0x00,0x00,0x00,0x00,0x08,0x1F,
0x0C,0x0D,0x0C,0x7F,0xC4,0x84,0x86,0x87,0x80,0xF0,0xF0,0xF0,0x00,0x00,0x00,0x00,
0x01,0x01,0x01,0x01,0x31,0x60,0xC0,0xFF,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x0F,0x7F,0xF8,0xE1,0xE1,0xC1,0xC1,0x81,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0xC1,0x81,0xC1,0xE1,0xF5,0xFE,0x1F,
0x01,0x00,0x00,0xE0,0xC0,0x60,0x60,0xC0,0xC0,0x00,0x01,0xE1,0xC1,0x61,0x61,0xC1,
0xC1,0x81,0x01,0x01,0xE1,0xE0,0x60,0x60,0xC0,0x80,0x00,0x60,0xF8,0xF8,0x40,0x01,
0xC1,0xE0,0x60,0x60,0xE0,0xC0,0x00,0x01,0xFD,0xF9,0x00,0xF8,0xFC,0x80,0xC0,0xE0,
0x60,0x00,0x00,0x00,0x01,0x01,0x01,0xC1,0xC1,0x61,0x61,0x61,0xE0,0xC0,0x00,0xC0,
0xE0,0x60,0x60,0x60,0xC0,0x00,0x01,0xE1,0xE0,0x60,0x60,0xE0,0xC0,0x60,0x60,0xE0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x03,0x0F,0x0F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x03,0x07,0x03,0x03,
0x03,0x03,0x02,0x03,0x03,0x07,0x0F,0x1F,0x1F,0x1F,0x1F,0x1F,0x0F,0x07,0x00,0x00,
0x00,0x00,0x00,0xFF,0xFF,0x10,0x30,0x1F,0x0F,0x00,0x00,0xFF,0xBC,0x10,0x30,0x1F,
0x1F,0x0F,0x00,0x22,0xFF,0x18,0x10,0x10,0x1F,0x0F,0x00,0x00,0x1F,0x1F,0x10,0x08,
0x1E,0x1E,0x13,0x1B,0x1F,0x1F,0x00,0x00,0x1F,0x1F,0x00,0x1F,0x1F,0x03,0x07,0x1E,
0x18,0x00,0x00,0x18,0x18,0x00,0x04,0x0F,0x1D,0x30,0x10,0x10,0x1C,0x1C,0x00,0x0F,
0x1F,0x10,0x30,0x18,0x1F,0x07,0x00,0x1F,0x1F,0x00,0x00,0x1F,0x1F,0x00,0x00,0x1F,};void Oled_Show_Image(unsigned char *image)
{unsigned int j;unsigned char i;		//char范围-128——127,定义char类型会产生越界for(i = 0;i < 8;i++){Oled_Write_Cmd(0xB0 + i);		//Page0——Page7Oled_Write_Cmd(0x00);			//每个Page从0开始Oled_Write_Cmd(0x10);for(j = 128 * i;j < (128 * (i + 1));j++){			//0——127列,依次写入0,每写入数据列地址自动偏移。Oled_Write_Data(image[j]);			}}
}void main()
{Oled_Init();				//OLED初始化Oled_Write_Cmd(0x20);		//选择一个位置,确认为页面寻址模式Oled_Write_Cmd(0x02);Oled_Clear();				//清屏Oled_Show_Image(bmpImager);while(1);
}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/210019.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

操作系统———磁盘调度算法模拟

实验目的 磁盘是可供多个进程共享的设备&#xff0c;当有多个进程都要求访问磁盘是&#xff0c;应采用一种最佳调度算法&#xff0c;以使各进程对磁盘的平均访问时间最小。目前最成用的磁盘调度算法有先来先服务&#xff08;FCFS&#xff09;&#xff0c;最短寻道时间优先&…

Spring Boot的配置文件

配置文件的作用 整个项目中所有重要的数据都是在配置文件中配置&#xff0c;如数据库的连接信息&#xff0c;项目的启动端口&#xff0c;用于发现和定位问题的普通日志和异常日志等等。配置文件可以分为两类 系统使用的配置文件&#xff08;系统配置文件&#xff09;&#xf…

JS基础源码之手写模拟new

JS基础源码之手写模拟new 手写模拟new初步实现最终实现 手写模拟new new 运算符创建一个用户定义的对象类型的实例或具有构造函数的内置对象类型之一。 我们先看看new实现了哪些功能&#xff1a; function Person (name,age){this.name name;this.age age;this.habit Games;…

开发猿的平平淡淡周末---2023/12/9

上周回顾 完成了遗留的开发任务&#xff0c;基本全部完成进一步了解了系统当时设计的原理熟悉了代码的重构 2023.12.9 天气晴 温度适宜 前言 小伙伴们大家好&#xff0c;时间很快&#xff0c;又来到了周末&#xff0c;也是一个平平淡淡的周末。上周只更了一篇博客...原…

渗透测试 | 渗透测试之信息收集

渗透测试&#xff08;penetration test&#xff0c;pentest&#xff09;是实施安全评估&#xff08;即审计&#xff09;的具体手段。 渗透测试可能是单独进行的一项工作&#xff0c;也可能是常规研发生命周期&#xff08;例如&#xff0c;Microsoft SDLC&#xff09;里 IT 安全…

Unicode编码解码

一、Unicode概述 Unicode是一种字符编码标准&#xff0c;旨在解决不同字符集之间的兼容性问题。它为全球所有语言提供了一种统一的编码方式&#xff0c;使得各种字符能够在计算机系统中正确显示和处理。Unicode字符集包含了世界上几乎所有的字符&#xff0c;包括中文字符、英文…

算法Day23 简单吃饭(0-1背包)

简单吃饭&#xff08;0-1背包&#xff09; Description Input Output Sample 代码 import java.util.Scanner; public class Main {public static void main(String[] args) {Scanner scanner new Scanner(System.in);int n scanner.nextInt();int total scanner.nextInt(…

高项备考葵花宝典-项目进度管理输入、输出、工具和技术(中,很详细考试必过)

项目进度管理的目标是使项目按时完成。有效的进度管理是项目管理成功的关键之一&#xff0c;进度问题在项目生命周期内引起的冲突最多。 小型项目中&#xff0c;定义活动、排列活动顺序、估算活动持续时间及制定进度模型形成进度计划等过程的联系非常密切&#xff0c;可以视为一…

情深不必纠缠

那一年&#xff0c;男孩女孩在万千人中相遇了。多年后女人的一封邮件&#xff0c;让男人与女人的灵魂相遇了。他们无缘夫妻&#xff0c;却发现彼此是灵魂的陪伴。不能携手相守&#xff0c;却懂得彼此的心灵。 有一天&#xff0c;女人告诉男人要回家了&#xff0c;问男人心里会不…

VMware安装Ubuntu20.04并使用Xshell连接虚拟机

文章目录 虚拟机环境准备重置虚拟网络适配器属性&#xff08;可选&#xff09;配置NAT模式的静态IP创建虚拟机虚拟机安装配置 Xshell连接虚拟机 虚拟机环境准备 VMware WorkStation Pro 17.5&#xff1a;https://customerconnect.vmware.com/cn/downloads/details?downloadGr…

网上下载的pdf文件,为什么不能复制文字?

不知道大家有没有到过这种情况&#xff1f;在网上下载的PDF文件打开之后&#xff0c;发现选中文字之后无法复制。甚至其他功能也都无法使用&#xff0c;这是怎么回事&#xff1f;该怎么办&#xff1f; 当我们发现文件打开之后&#xff0c;编辑功能无法使用&#xff0c;很可能是…

AlexNet

概念 过拟合:根本原因是特征维度过多&#xff0c;模型假设过于复杂&#xff0c;参数过多&#xff0c;训练数据过少&#xff0c;噪声过多&#xff0c;导致拟合的函数完美的预测训练集&#xff0c;但对新数据的测试集预测结果差。 过度的拟合了训练数据&#xff0c;而没有考虑到…

29、卷积 - 参数 padding 的作用

在卷积过程中,Padding(填充)是一个关键的概念,它对于保留输入信息和有效地处理边缘信息至关重要。 1、Padding是什么? Padding 指的是在输入图像的周围添加额外的像素值,用来以扩大输入图像的尺寸,这些额外填充的像素值通常设置为零,卷积操作在这个填充后的输入图像上…

ThinkPHP生活用品商城系统

有需要请加文章底部Q哦 可远程调试 ThinkPHP生活用品商城系统 一 介绍 此生活用品商城系统基于ThinkPHP框架开发&#xff0c;数据库mysql&#xff0c;前端bootstrap。系统分为用户和管理员。(附带配套设计文档) 技术栈&#xff1a;ThinkPHPmysqlbootstrapphpstudyvscode 二 …

MYSQL主从复制配置指引

MYSQL主从复制配置指引 1.前期准备 部署完主备数据库&#xff0c;初始化主备库表结构和数据。 2. 主库配置修改 修改主库配置文件etc/my.cnf&#xff0c;新增以下配置&#xff1a; #服务器 id&#xff0c;需唯一 server-id 1 #二进制文件存放路径 log-bin mysql-bin …

深入理解JavaScript的箭头函数

深入理解JavaScript的箭头函数 在ES6中&#xff0c;JavaScript引入了箭头函数的概念&#xff0c;它提供了一种更简洁的语法来定义匿名函数。虽然箭头函数看起来很简单&#xff0c;但它们在实际应用中有一些独特的特性和行为。让我们深入理解箭头函数并学习如何正确地使用它们。…

记账中心二开

系统预设了 这几种 FSubSystem 为子系统 T_VC_SubSystem 卡片显示的表 字段 FNeedRalteAccount 设置为1的话 &#xff0c;需要与总账连用系统将去查找 系统状态控制表。 如果系统状态 没有配置这个子系统 将无法显示数据 select sysStaCtr.fid from T_BD_SystemStatusCt…

Java LeetCode篇-深入了解二叉树的经典解法(多种方式实现:构造二叉树)

&#x1f525;博客主页&#xff1a; 【小扳_-CSDN博客】 ❤感谢大家点赞&#x1f44d;收藏⭐评论✍ 文章目录 1.0 从前序与中序遍历序列来构造二叉树 1.1 实现从前序与中序遍历序列来构造二叉树思路 1.2 代码实现从前序与中序遍历序列来构造二叉树 2.0 从中序与后序遍历序…

计算目标检测和语义分割的PR

需求描述 实际工作中&#xff0c;相比于mAP项目更加关心的是特定阈值下的precision和recall结果&#xff1b;由于本次的GT中除了目标框之外还存在多边形标注&#xff0c;为此&#xff0c;计算IoU的方式从框与框之间变成了mask之间&#xff1b; 本文的代码适用于MMDetection下的…

Java Web 学习之路(2) —— 概念、SpringBoot + MyBatis(controller+service+mapper)开发流程与过程梳理

文章目录 前言1. 常见的一些概念1.1 POJO&#xff08;Plain Ordinary Java Object 简单Java对象&#xff09;1.2 DAO和Mapper 2. Java的三层架构2.1 包的层级结构2.2 交互层 controller&#xff08;用户界面、网页&#xff09;jsp文件2.3 业务处理层 service2.4 Mapper层 3. 注…