i2c.X.rar
(625.15 KB)
#include "mcc_generated_files/system/system.h"
#include "oled/oled.h"
#include "oled/oledpic.h"
/*
Main application
*/
int main(void)
{
float numberfu=12.5;
SYSTEM_Initialize();
// If using interrupts in PIC18 High/Low Priority Mode you need to enable the Global High and Low Interrupts
// If using interrupts in PIC Mid-Range Compatibility Mode you need to enable the Global Interrupts
// Use the following macros to:
// Enable the Global Interrupts
INTERRUPT_GlobalInterruptEnable();
// Disable the Global Interrupts
//INTERRUPT_GlobalInterruptDisable();
OLED_Init();
OLED_Allfill();
OLED_Clear();
OLED_ShowPic(90,0,122,4,BMP1);
OLED_ShowHzbig(0,0,0);
OLED_ShowStr(33,0,"Hello",16);
HAL_Delay(1000);
OLED_Clear();
OLED_ShowFloat(50,0,numberfu,3,16);
OLED_ShowHanzi(50,2,0);
OLED_ShowHanzi(34,2,1);
for(uint32_t number=500;number<600;number++)
{
OLED_ShowNum(80,2,number,4,16);
HAL_Delay(10);
}
OLED_ShowChar(4,0,'H',16);
OLED_ShowChar(4,2,'M',16);
HAL_Delay(2100);
while(1)
{
}
}
|