标题:
0.96寸OLED显示汉字程序+OLED驱动芯片手册SSD1306规格书
[打印本页]
作者:
大表嫂
时间:
2022-9-19 11:39
标题:
0.96寸OLED显示汉字程序+OLED驱动芯片手册SSD1306规格书
GE)P1Z36Y{Y0YAQT{MFBU21.jpg
(433.42 KB, 下载次数: 46)
下载附件
2022-9-19 11:33 上传
芯片:STM32F103C6T6
0.96寸OLED 4针脚IIC协议
汉字的字模库对应英文长宽比10*16
STM32单片机源程序如下:
#include "stm32f10x.h" // Device header
#include "delay.h"
#include "OLED.h"
void OLED_GPIO_Init(void)
{
GPIO_InitTypeDef GPIO_InitStruct;
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB,ENABLE);
GPIO_InitStruct.GPIO_Mode = GPIO_Mode_Out_PP;
GPIO_InitStruct.GPIO_Pin = GPIO_Pin_6|GPIO_Pin_7;
GPIO_InitStruct.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_Init(GPIOB,&GPIO_InitStruct);
GPIO_ResetBits(GPIOB,GPIO_Pin_6);
GPIO_SetBits(GPIOB,GPIO_Pin_7);
}
int main()
{
OLED_GPIO_Init();
OLED_Init();
OLED_ShowString(1,1,"51");
OLED_ShowCN(1,2,0);
OLED_ShowCN(1,3,1);
OLED_ShowCN(1,4,2);
OLED_ShowCN(1,5,3);
OLED_ShowCN(1,6,4);
OLED_ShowCN(2,1,5);
OLED_ShowCN(2,2,6);
while(1)
{
}
}
复制代码
另外分享一下
OLED的驱动手册
SSD1306规格书,网上找半天才找到的,给有需要的人吧~~~
STM32代码下载:
程序+SSD1306规格书.7z
(963.48 KB, 下载次数: 89)
2022-9-22 05:14 上传
点击文件名下载附件
下载积分: 黑币 -5
欢迎光临 (http://www.51hei.com/bbs/)
Powered by Discuz! X3.1