标题:
0.96 OLED STM32驱动代码
[打印本页]
作者:
beast777
时间:
2021-5-9 09:49
标题:
0.96 OLED STM32驱动代码
以前做的OLED显示。
支持英文,数字,字符,但不支持中文
供大家参考一下吧
单片机源程序如下:
#include "stm32f10x.h"
#include "bsp_i2c_gpio.h"
#include "bsp_usart.h"
#include "SSD1306.h"
extern OLED_IN OLED_In;
static void BSP_Init(void);
int main(void)
{
uint16_t i;
BSP_Init();
OLED_Refresh();
OLED_In.buff_in[0] ="a0";
OLED_In.buff_in[1] ="b1";
OLED_In.buff_in[2] ="c2";
OLED_In.buff_in[3] ="d3";
OLED_In.buff_in[4] ="e4";
OLED_In.buff_in[5] ="f5";
OLED_In.buff_in[6] ="a6";
OLED_In.buff_in[7] ="b7";
OLED_In.buff_in[8] ="c8";
OLED_In.buff_in[9] ="d9";
OLED_In.buff_in[10] ="10";
OLED_In.buff_in[11] ="11";
OLED_Refresh();
// OLED_ShowString(0,0,"hhhhhh",16);
while(1){
OLED_ShowON(12);
}
}
static void BSP_Init(void)
{
Key_GPIO_Config();
USART_Config();
OLED_Config();
}
复制代码
所有资料51hei提供下载:
OLED_last.7z
(446.21 KB, 下载次数: 17)
2021-5-9 16:21 上传
点击文件名下载附件
下载积分: 黑币 -5
欢迎光临 (http://www.51hei.com/bbs/)
Powered by Discuz! X3.1