stm32F103C8T6单片机操作oled的程序显示鸡年大吉
单片机源程序如下:
- #include "delay.h"
- #include "sys.h"
- #include "oled.h"
- #include "bmp.h"
- int main(void)
- {
- u8 t;
- delay_init(); //延时函数初始化
- OLED_Init();
- NVIC_Configuration(); //设置NVIC中断分组2:2位抢占优先级,2位响应优先级 LED_Init(); //LED端口初始化
- OLED_Clear();
-
- while(1)
- {
- OLED_ShowCHinese(0,0,0);
- OLED_ShowCHinese(16,0,1);
- OLED_ShowCHinese(32,0,2);
- OLED_ShowCHinese(48,0,3);
- OLED_ShowCHinese(64,0,4);
- OLED_ShowCHinese(80,0,5);
-
-
- OLED_ShowCHinese(0,3,6);
- OLED_ShowCHinese(16,3,7);
- OLED_ShowCHinese(0,5,8);
- OLED_ShowCHinese(16,5,9);
-
-
- OLED_ShowCHinese(32,3,10);
- OLED_ShowCHinese(48,3,11);
- OLED_ShowCHinese(32,5,12);
- OLED_ShowCHinese(48,5,13);
-
- OLED_ShowCHinese(64,3,14);
- OLED_ShowCHinese(80,3,15);
- OLED_ShowCHinese(64,5,16);
- OLED_ShowCHinese(80,5,17);
-
- OLED_ShowCHinese(96,3,18);
- OLED_ShowCHinese(112,3,19);
- OLED_ShowCHinese(96,5,20);
- OLED_ShowCHinese(112,5,21);
-
- delay_ms(8000);
-
- }
- }
-
复制代码
所有资料51hei提供下载:
oled驱动例程(鸡年大吉).rar
(305.63 KB, 下载次数: 482)
|