OLED显示代码

[复制链接]
查看1079 | 回复6 | 2019-5-25 09:44:39 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区

您需要 登录 才可以下载或查看,没有账号?立即注册

×
#include "led.h"
#include "delay.h"
#include "key.h"
#include "sys.h"
#include "oled.h"
int main(void)
{    u8 t;
    delay_init();             //延时函数初始化      
    NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);     //设置NVIC中断分组2:2位抢占优先级,2位响应优先级
     LED_Init();                 //LED端口初始化
    OLED_Init();            //初始化OLED      
  OLED_ShowString(0,0,"ALIENTEK",24);  
    OLED_ShowString(0,24, "0.96' OLED TEST",16);  
     OLED_ShowString(0,40,"ATOM 2015/1/14",12);  
     OLED_ShowString(0,52,"ASCII:",12);  
     OLED_ShowString(64,52,"CODE:",12);  
  
    OLED_Refresh_Gram();        //更新显示到OLED
    t=' ';  
    while(1)
    {        
        OLED_ShowChar(48,48,t,16,1);//显示ASCII字符      
        OLED_Refresh_Gram();
        t++;
        if(t>'~')t=' ';
        OLED_ShowNum(103,48,t,3,16);//显示ASCII字符的码值
        delay_ms(500);
        LED0=!LED0;
    }      
   
}
回复

使用道具 举报

sun5304 | 2019-5-25 10:46:44 | 显示全部楼层
回复

使用道具 举报

roygu | 2019-5-25 12:05:05 | 显示全部楼层
回复

使用道具 举报

博弈 | 2019-5-25 12:11:39 | 显示全部楼层
回复

使用道具 举报

heming2216 | 2019-5-25 16:52:58 | 显示全部楼层
回复

使用道具 举报

你好李先生 | 2019-5-25 20:58:32 | 显示全部楼层
回复

使用道具 举报

郑先生 | 2019-5-26 09:21:13 | 显示全部楼层
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则