当前位置: 首页 > news >正文

STM32单片机OLED显示

OLED接口电路

STM32单片机OLED显示程序源代码

#include "sys.h"

#define OLED_RST_Clr() PCout(13)=0 //RST

#define OLED_RST_Set() PCout(13)=1 //RST

#define OLED_RS_Clr() PBout(4)=0 //DC

#define OLED_RS_Set() PBout(4)=1 //DC

#define OLED_SCLK_Clr()PCout(15)=0 //SCL

#define OLED_SCLK_Set()PCout(15)=1 //SCL

#define OLED_SDIN_Clr()PCout(14)=0 //SDA

#define OLED_SDIN_Set()PCout(14)=1 //SDA

#define OLED_CMD 0 //写命令

#define OLED_DATA 1 //写数据

static u8 fac_us=0; //us延时倍乘数

static u16 fac_ms=0; //ms延时倍乘数

u8 OLED_GRAM[128][8];

void delay_init(u8 SYSCLK);

void delay_ms(u16 nms);

void delay_us(u32 nus);

void OLED_WR_Byte(u8 dat,u8 cmd);

void OLED_Display_On(void);

void OLED_Display_Off(void);

void OLED_Refresh_Gram(void);

void Oled_Init(void);

void OLED_Clear(void);

void OLED_DrawPoint(u8 x,u8 y,u8 t);

void OLED_ShowChar(u8 x,u8 y,u8 chr,u8size,u8 mode);

void OLED_ShowNumber(u8 x,u8 y,u32num,u8 len,u8 size);

void OLED_ShowString(u8 x,u8 y,const u8*p);

void Oled_Show(void);

const unsigned charoled_asc2_1206[95][12]={

{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"",0*/

{0x00,0x00,0x00,0x00,0x3F,0x40,0x00,0x00,0x00,0x00,0x00,0x00},/*"!",1*/

{0x00,0x00,0x30,0x00,0x40,0x00,0x30,0x00,0x40,0x00,0x00,0x00},/*""",2*/

{0x09,0x00,0x0B,0xC0,0x3D,0x00,0x0B,0xC0,0x3D,0x00,0x09,0x00},/*"#",3*/

{0x18,0xC0,0x24,0x40,0x7F,0xE0,0x22,0x40,0x31,0x80,0x00,0x00},/*"$",4*/

{0x18,0x00,0x24,0xC0,0x1B,0x00,0x0D,0x80,0x32,0x40,0x01,0x80},/*"%",5*/

{0x03,0x80,0x1C,0x40,0x27,0x40,0x1C,0x80,0x07,0x40,0x00,0x40},/*"&",6*/

{0x10,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"'",7*/

{0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x80,0x20,0x40,0x40,0x20},/*"(",8*/

{0x00,0x00,0x40,0x20,0x20,0x40,0x1F,0x80,0x00,0x00,0x00,0x00},/*")",9*/

{0x09,0x00,0x06,0x00,0x1F,0x80,0x06,0x00,0x09,0x00,0x00,0x00},/*"*",10*/

{0x04,0x00,0x04,0x00,0x3F,0x80,0x04,0x00,0x04,0x00,0x00,0x00},/*"+",11*/

{0x00,0x10,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*",",12*/

{0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x00,0x00},/*"-",13*/

{0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*".",14*/

{0x00,0x20,0x01,0xC0,0x06,0x00,0x38,0x00,0x40,0x00,0x00,0x00},/*"/",15*/

{0x1F,0x80,0x20,0x40,0x20,0x40,0x20,0x40,0x1F,0x80,0x00,0x00},/*"0",16*/

{0x00,0x00,0x10,0x40,0x3F,0xC0,0x00,0x40,0x00,0x00,0x00,0x00},/*"1",17*/

{0x18,0xC0,0x21,0x40,0x22,0x40,0x24,0x40,0x18,0x40,0x00,0x00},/*"2",18*/

{0x10,0x80,0x20,0x40,0x24,0x40,0x24,0x40,0x1B,0x80,0x00,0x00},/*"3",19*/

{0x02,0x00,0x0D,0x00,0x11,0x00,0x3F,0xC0,0x01,0x40,0x00,0x00},/*"4",20*/

{0x3C,0x80,0x24,0x40,0x24,0x40,0x24,0x40,0x23,0x80,0x00,0x00},/*"5",21*/

{0x1F,0x80,0x24,0x40,0x24,0x40,0x34,0x40,0x03,0x80,0x00,0x00},/*"6",22*/

{0x30,0x00,0x20,0x00,0x27,0xC0,0x38,0x00,0x20,0x00,0x00,0x00},/*"7",23*/

{0x1B,0x80,0x24,0x40,0x24,0x40,0x24,0x40,0x1B,0x80,0x00,0x00},/*"8",24*/

{0x1C,0x00,0x22,0xC0,0x22,0x40,0x22,0x40,0x1F,0x80,0x00,0x00},/*"9",25*/

{0x00,0x00,0x00,0x00,0x08,0x40,0x00,0x00,0x00,0x00,0x00,0x00},/*":",26*/

{0x00,0x00,0x00,0x00,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00},/*";",27*/

{0x00,0x00,0x04,0x00,0x0A,0x00,0x11,0x00,0x20,0x80,0x40,0x40},/*"<",28*/

{0x09,0x00,0x09,0x00,0x09,0x00,0x09,0x00,0x09,0x00,0x00,0x00},/*"=",29*/

{0x00,0x00,0x40,0x40,0x20,0x80,0x11,0x00,0x0A,0x00,0x04,0x00},/*">",30*/

{0x18,0x00,0x20,0x00,0x23,0x40,0x24,0x00,0x18,0x00,0x00,0x00},/*"?",31*/

{0x1F,0x80,0x20,0x40,0x27,0x40,0x29,0x40,0x1F,0x40,0x00,0x00},/*"@",32*/

{0x00,0x40,0x07,0xC0,0x39,0x00,0x0F,0x00,0x01,0xC0,0x00,0x40},/*"A",33*/

{0x20,0x40,0x3F,0xC0,0x24,0x40,0x24,0x40,0x1B,0x80,0x00,0x00},/*"B",34*/

{0x1F,0x80,0x20,0x40,0x20,0x40,0x20,0x40,0x30,0x80,0x00,0x00},/*"C",35*/

{0x20,0x40,0x3F,0xC0,0x20,0x40,0x20,0x40,0x1F,0x80,0x00,0x00},/*"D",36*/

{0x20,0x40,0x3F,0xC0,0x24,0x40,0x2E,0x40,0x30,0xC0,0x00,0x00},/*"E",37*/

{0x20,0x40,0x3F,0xC0,0x24,0x40,0x2E,0x00,0x30,0x00,0x00,0x00},/*"F",38*/

{0x0F,0x00,0x10,0x80,0x20,0x40,0x22,0x40,0x33,0x80,0x02,0x00},/*"G",39*/

{0x20,0x40,0x3F,0xC0,0x04,0x00,0x04,0x00,0x3F,0xC0,0x20,0x40},/*"H",40*/

{0x20,0x40,0x20,0x40,0x3F,0xC0,0x20,0x40,0x20,0x40,0x00,0x00},/*"I",41*/

{0x00,0x60,0x20,0x20,0x20,0x20,0x3F,0xC0,0x20,0x00,0x20,0x00},/*"J",42*/

{0x20,0x40,0x3F,0xC0,0x24,0x40,0x0B,0x00,0x30,0xC0,0x20,0x40},/*"K",43*/

{0x20,0x40,0x3F,0xC0,0x20,0x40,0x00,0x40,0x00,0x40,0x00,0xC0},/*"L",44*/

{0x3F,0xC0,0x3C,0x00,0x03,0xC0,0x3C,0x00,0x3F,0xC0,0x00,0x00},/*"M",45*/

{0x20,0x40,0x3F,0xC0,0x0C,0x40,0x23,0x00,0x3F,0xC0,0x20,0x00},/*"N",46*/

{0x1F,0x80,0x20,0x40,0x20,0x40,0x20,0x40,0x1F,0x80,0x00,0x00},/*"O",47*/

{0x20,0x40,0x3F,0xC0,0x24,0x40,0x24,0x00,0x18,0x00,0x00,0x00},/*"P",48*/

{0x1F,0x80,0x21,0x40,0x21,0x40,0x20,0xE0,0x1F,0xA0,0x00,0x00},/*"Q",49*/

{0x20,0x40,0x3F,0xC0,0x24,0x40,0x26,0x00,0x19,0xC0,0x00,0x40},/*"R",50*/

{0x18,0xC0,0x24,0x40,0x24,0x40,0x22,0x40,0x31,0x80,0x00,0x00},/*"S",51*/

{0x30,0x00,0x20,0x40,0x3F,0xC0,0x20,0x40,0x30,0x00,0x00,0x00},/*"T",52*/

{0x20,0x00,0x3F,0x80,0x00,0x40,0x00,0x40,0x3F,0x80,0x20,0x00},/*"U",53*/

{0x20,0x00,0x3E,0x00,0x01,0xC0,0x07,0x00,0x38,0x00,0x20,0x00},/*"V",54*/

{0x38,0x00,0x07,0xC0,0x3C,0x00,0x07,0xC0,0x38,0x00,0x00,0x00},/*"W",55*/

{0x20,0x40,0x39,0xC0,0x06,0x00,0x39,0xC0,0x20,0x40,0x00,0x00},/*"X",56*/

{0x20,0x00,0x38,0x40,0x07,0xC0,0x38,0x40,0x20,0x00,0x00,0x00},/*"Y",57*/

{0x30,0x40,0x21,0xC0,0x26,0x40,0x38,0x40,0x20,0xC0,0x00,0x00},/*"Z",58*/

{0x00,0x00,0x00,0x00,0x7F,0xE0,0x40,0x20,0x40,0x20,0x00,0x00},/*"[",59*/

{0x00,0x00,0x70,0x00,0x0C,0x00,0x03,0x80,0x00,0x40,0x00,0x00},/*"\",60*/

{0x00,0x00,0x40,0x20,0x40,0x20,0x7F,0xE0,0x00,0x00,0x00,0x00},/*"]",61*/

{0x00,0x00,0x20,0x00,0x40,0x00,0x20,0x00,0x00,0x00,0x00,0x00},/*"^",62*/

{0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10},/*"_",63*/

{0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"`",64*/

{0x00,0x00,0x02,0x80,0x05,0x40,0x05,0x40,0x03,0xC0,0x00,0x40},/*"a",65*/

{0x20,0x00,0x3F,0xC0,0x04,0x40,0x04,0x40,0x03,0x80,0x00,0x00},/*"b",66*/

{0x00,0x00,0x03,0x80,0x04,0x40,0x04,0x40,0x06,0x40,0x00,0x00},/*"c",67*/

{0x00,0x00,0x03,0x80,0x04,0x40,0x24,0x40,0x3F,0xC0,0x00,0x40},/*"d",68*/

{0x00,0x00,0x03,0x80,0x05,0x40,0x05,0x40,0x03,0x40,0x00,0x00},/*"e",69*/

{0x00,0x00,0x04,0x40,0x1F,0xC0,0x24,0x40,0x24,0x40,0x20,0x00},/*"f",70*/

{0x00,0x00,0x02,0xE0,0x05,0x50,0x05,0x50,0x06,0x50,0x04,0x20},/*"g",71*/

{0x20,0x40,0x3F,0xC0,0x04,0x40,0x04,0x00,0x03,0xC0,0x00,0x40},/*"h",72*/

{0x00,0x00,0x04,0x40,0x27,0xC0,0x00,0x40,0x00,0x00,0x00,0x00},/*"i",73*/

{0x00,0x10,0x00,0x10,0x04,0x10,0x27,0xE0,0x00,0x00,0x00,0x00},/*"j",74*/

{0x20,0x40,0x3F,0xC0,0x01,0x40,0x07,0x00,0x04,0xC0,0x04,0x40},/*"k",75*/

{0x20,0x40,0x20,0x40,0x3F,0xC0,0x00,0x40,0x00,0x40,0x00,0x00},/*"l",76*/

{0x07,0xC0,0x04,0x00,0x07,0xC0,0x04,0x00,0x03,0xC0,0x00,0x00},/*"m",77*/

{0x04,0x40,0x07,0xC0,0x04,0x40,0x04,0x00,0x03,0xC0,0x00,0x40},/*"n",78*/

{0x00,0x00,0x03,0x80,0x04,0x40,0x04,0x40,0x03,0x80,0x00,0x00},/*"o",79*/

{0x04,0x10,0x07,0xF0,0x04,0x50,0x04,0x40,0x03,0x80,0x00,0x00},/*"p",80*/

{0x00,0x00,0x03,0x80,0x04,0x40,0x04,0x50,0x07,0xF0,0x00,0x10},/*"q",81*/

{0x04,0x40,0x07,0xC0,0x02,0x40,0x04,0x00,0x04,0x00,0x00,0x00},/*"r",82*/

{0x00,0x00,0x06,0x40,0x05,0x40,0x05,0x40,0x04,0xC0,0x00,0x00},/*"s",83*/

{0x00,0x00,0x04,0x00,0x1F,0x80,0x04,0x40,0x00,0x40,0x00,0x00},/*"t",84*/

{0x04,0x00,0x07,0x80,0x00,0x40,0x04,0x40,0x07,0xC0,0x00,0x40},/*"u",85*/

{0x04,0x00,0x07,0x00,0x04,0xC0,0x01,0x80,0x06,0x00,0x04,0x00},/*"v",86*/

{0x06,0x00,0x01,0xC0,0x07,0x00,0x01,0xC0,0x06,0x00,0x00,0x00},/*"w",87*/

{0x04,0x40,0x06,0xC0,0x01,0x00,0x06,0xC0,0x04,0x40,0x00,0x00},/*"x",88*/

{0x04,0x10,0x07,0x10,0x04,0xE0,0x01,0x80,0x06,0x00,0x04,0x00},/*"y",89*/

{0x00,0x00,0x04,0x40,0x05,0xC0,0x06,0x40,0x04,0x40,0x00,0x00},/*"z",90*/

{0x00,0x00,0x00,0x00,0x04,0x00,0x7B,0xE0,0x40,0x20,0x00,0x00},/*"{",91*/

{0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xF0,0x00,0x00,0x00,0x00},/*"|",92*/

{0x00,0x00,0x40,0x20,0x7B,0xE0,0x04,0x00,0x00,0x00,0x00,0x00},/*"}",93*/

{0x40,0x00,0x80,0x00,0x40,0x00,0x20,0x00,0x20,0x00,0x40,0x00},/*"~",94*/

};

const unsigned charoled_asc2_1608[95][16]={

{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

0x00},/*"",0*/

{0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0xCC,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,

0x00},/*"!",1*/

{0x00,0x00,0x08,0x00,0x30,0x00,0x60,0x00,0x08,0x00,0x30,0x00,0x60,0x00,0x00,

0x00},/*""",2*/

{0x02,0x20,0x03,0xFC,0x1E,0x20,0x02,0x20,0x03,0xFC,0x1E,0x20,0x02,0x20,0x00,

0x00},/*"#",3*/

{0x00,0x00,0x0E,0x18,0x11,0x04,0x3F,0xFF,0x10,0x84,0x0C,0x78,0x00,0x00,0x00,

0x00},/*"$",4*/

{0x0F,0x00,0x10,0x84,0x0F,0x38,0x00,0xC0,0x07,0x78,0x18,0x84,0x00,0x78,0x00,

0x00},/*"%",5*/

{0x00,0x78,0x0F,0x84,0x10,0xC4,0x11,0x24,0x0E,0x98,0x00,0xE4,0x00,0x84,0x00,

0x08},/*"&",6*/

{0x08,0x00,0x68,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

0x00},/*"'",7*/

{0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xE0,0x18,0x18,0x20,0x04,0x40,0x02,0x00,

0x00},/*"(",8*/

{0x00,0x00,0x40,0x02,0x20,0x04,0x18,0x18,0x07,0xE0,0x00,0x00,0x00,0x00,0x00,

0x00},/*")",9*/

{0x02,0x40,0x02,0x40,0x01,0x80,0x0F,0xF0,0x01,0x80,0x02,0x40,0x02,0x40,0x00,

0x00},/*"*",10*/

{0x00,0x80,0x00,0x80,0x00,0x80,0x0F,0xF8,0x00,0x80,0x00,0x80,0x00,0x80,0x00,

0x00},/*"+",11*/

{0x00,0x01,0x00,0x0D,0x00,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

0x00},/*",",12*/

{0x00,0x00,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,

0x80},/*"-",13*/

{0x00,0x00,0x00,0x0C,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

0x00},/*".",14*/

{0x00,0x00,0x00,0x06,0x00,0x18,0x00,0x60,0x01,0x80,0x06,0x00,0x18,0x00,0x20,

0x00},/*"/",15*/

{0x00,0x00,0x07,0xF0,0x08,0x08,0x10,0x04,0x10,0x04,0x08,0x08,0x07,0xF0,0x00,

0x00},/*"0",16*/

{0x00,0x00,0x08,0x04,0x08,0x04,0x1F,0xFC,0x00,0x04,0x00,0x04,0x00,0x00,0x00,

0x00},/*"1",17*/

{0x00,0x00,0x0E,0x0C,0x10,0x14,0x10,0x24,0x10,0x44,0x11,0x84,0x0E,0x0C,0x00,

0x00},/*"2",18*/

{0x00,0x00,0x0C,0x18,0x10,0x04,0x11,0x04,0x11,0x04,0x12,0x88,0x0C,0x70,0x00,

0x00},/*"3",19*/

{0x00,0x00,0x00,0xE0,0x03,0x20,0x04,0x24,0x08,0x24,0x1F,0xFC,0x00,0x24,0x00,

0x00},/*"4",20*/

{0x00,0x00,0x1F,0x98,0x10,0x84,0x11,0x04,0x11,0x04,0x10,0x88,0x10,0x70,0x00,

0x00},/*"5",21*/

{0x00,0x00,0x07,0xF0,0x08,0x88,0x11,0x04,0x11,0x04,0x18,0x88,0x00,0x70,0x00,

0x00},/*"6",22*/

{0x00,0x00,0x1C,0x00,0x10,0x00,0x10,0xFC,0x13,0x00,0x1C,0x00,0x10,0x00,0x00,

0x00},/*"7",23*/

{0x00,0x00,0x0E,0x38,0x11,0x44,0x10,0x84,0x10,0x84,0x11,0x44,0x0E,0x38,0x00,

0x00},/*"8",24*/

{0x00,0x00,0x07,0x00,0x08,0x8C,0x10,0x44,0x10,0x44,0x08,0x88,0x07,0xF0,0x00,

0x00},/*"9",25*/

{0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x0C,0x03,0x0C,0x00,0x00,0x00,0x00,0x00,

0x00},/*":",26*/

{0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

0x00},/*";",27*/

{0x00,0x00,0x00,0x80,0x01,0x40,0x02,0x20,0x04,0x10,0x08,0x08,0x10,0x04,0x00,

0x00},/*"<",28*/

{0x02,0x20,0x02,0x20,0x02,0x20,0x02,0x20,0x02,0x20,0x02,0x20,0x02,0x20,0x00,

0x00},/*"=",29*/

{0x00,0x00,0x10,0x04,0x08,0x08,0x04,0x10,0x02,0x20,0x01,0x40,0x00,0x80,0x00,

0x00},/*">",30*/

{0x00,0x00,0x0E,0x00,0x12,0x00,0x10,0x0C,0x10,0x6C,0x10,0x80,0x0F,0x00,0x00,

0x00},/*"?",31*/

{0x03,0xE0,0x0C,0x18,0x13,0xE4,0x14,0x24,0x17,0xC4,0x08,0x28,0x07,0xD0,0x00,

0x00},/*"@",32*/

{0x00,0x04,0x00,0x3C,0x03,0xC4,0x1C,0x40,0x07,0x40,0x00,0xE4,0x00,0x1C,0x00,

0x04},/*"A",33*/

{0x10,0x04,0x1F,0xFC,0x11,0x04,0x11,0x04,0x11,0x04,0x0E,0x88,0x00,0x70,0x00,

0x00},/*"B",34*/

{0x03,0xE0,0x0C,0x18,0x10,0x04,0x10,0x04,0x10,0x04,0x10,0x08,0x1C,0x10,0x00,

0x00},/*"C",35*/

{0x10,0x04,0x1F,0xFC,0x10,0x04,0x10,0x04,0x10,0x04,0x08,0x08,0x07,0xF0,0x00,

0x00},/*"D",36*/

{0x10,0x04,0x1F,0xFC,0x11,0x04,0x11,0x04,0x17,0xC4,0x10,0x04,0x08,0x18,0x00,

0x00},/*"E",37*/

{0x10,0x04,0x1F,0xFC,0x11,0x04,0x11,0x00,0x17,0xC0,0x10,0x00,0x08,0x00,0x00,

0x00},/*"F",38*/

{0x03,0xE0,0x0C,0x18,0x10,0x04,0x10,0x04,0x10,0x44,0x1C,0x78,0x00,0x40,0x00,

0x00},/*"G",39*/

{0x10,0x04,0x1F,0xFC,0x10,0x84,0x00,0x80,0x00,0x80,0x10,0x84,0x1F,0xFC,0x10,

0x04},/*"H",40*/

{0x00,0x00,0x10,0x04,0x10,0x04,0x1F,0xFC,0x10,0x04,0x10,0x04,0x00,0x00,0x00,

0x00},/*"I",41*/

{0x00,0x03,0x00,0x01,0x10,0x01,0x10,0x01,0x1F,0xFE,0x10,0x00,0x10,0x00,0x00,

0x00},/*"J",42*/

{0x10,0x04,0x1F,0xFC,0x11,0x04,0x03,0x80,0x14,0x64,0x18,0x1C,0x10,0x04,0x00,

0x00},/*"K",43*/

{0x10,0x04,0x1F,0xFC,0x10,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x0C,0x00,

0x00},/*"L",44*/

{0x10,0x04,0x1F,0xFC,0x1F,0x00,0x00,0xFC,0x1F,0x00,0x1F,0xFC,0x10,0x04,0x00,

0x00},/*"M",45*/

{0x10,0x04,0x1F,0xFC,0x0C,0x04,0x03,0x00,0x00,0xE0,0x10,0x18,0x1F,0xFC,0x10,

0x00},/*"N",46*/

{0x07,0xF0,0x08,0x08,0x10,0x04,0x10,0x04,0x10,0x04,0x08,0x08,0x07,0xF0,0x00,

0x00},/*"O",47*/

{0x10,0x04,0x1F,0xFC,0x10,0x84,0x10,0x80,0x10,0x80,0x10,0x80,0x0F,0x00,0x00,

0x00},/*"P",48*/

{0x07,0xF0,0x08,0x18,0x10,0x24,0x10,0x24,0x10,0x1C,0x08,0x0A,0x07,0xF2,0x00,

0x00},/*"Q",49*/

{0x10,0x04,0x1F,0xFC,0x11,0x04,0x11,0x00,0x11,0xC0,0x11,0x30,0x0E,0x0C,0x00,

0x04},/*"R",50*/

{0x00,0x00,0x0E,0x1C,0x11,0x04,0x10,0x84,0x10,0x84,0x10,0x44,0x1C,0x38,0x00,

0x00},/*"S",51*/

{0x18,0x00,0x10,0x00,0x10,0x04,0x1F,0xFC,0x10,0x04,0x10,0x00,0x18,0x00,0x00,

0x00},/*"T",52*/

{0x10,0x00,0x1F,0xF8,0x10,0x04,0x00,0x04,0x00,0x04,0x10,0x04,0x1F,0xF8,0x10,

0x00},/*"U",53*/

{0x10,0x00,0x1E,0x00,0x11,0xE0,0x00,0x1C,0x00,0x70,0x13,0x80,0x1C,0x00,0x10,

0x00},/*"V",54*/

{0x1F,0xC0,0x10,0x3C,0x00,0xE0,0x1F,0x00,0x00,0xE0,0x10,0x3C,0x1F,0xC0,0x00,

0x00},/*"W",55*/

{0x10,0x04,0x18,0x0C,0x16,0x34,0x01,0xC0,0x01,0xC0,0x16,0x34,0x18,0x0C,0x10,

0x04},/*"X",56*/

{0x10,0x00,0x1C,0x00,0x13,0x04,0x00,0xFC,0x13,0x04,0x1C,0x00,0x10,0x00,0x00,

0x00},/*"Y",57*/

{0x08,0x04,0x10,0x1C,0x10,0x64,0x10,0x84,0x13,0x04,0x1C,0x04,0x10,0x18,0x00,

0x00},/*"Z",58*/

{0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFE,0x40,0x02,0x40,0x02,0x40,0x02,0x00,

0x00},/*"[",59*/

{0x00,0x00,0x30,0x00,0x0C,0x00,0x03,0x80,0x00,0x60,0x00,0x1C,0x00,0x03,0x00,

0x00},/*"\",60*/

{0x00,0x00,0x40,0x02,0x40,0x02,0x40,0x02,0x7F,0xFE,0x00,0x00,0x00,0x00,0x00,

0x00},/*"]",61*/

{0x00,0x00,0x00,0x00,0x20,0x00,0x40,0x00,0x40,0x00,0x40,0x00,0x20,0x00,0x00,

0x00},/*"^",62*/

{0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,

0x01},/*"_",63*/

{0x00,0x00,0x40,0x00,0x40,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

0x00},/*"`",64*/

{0x00,0x00,0x00,0x98,0x01,0x24,0x01,0x44,0x01,0x44,0x01,0x44,0x00,0xFC,0x00,

0x04},/*"a",65*/

{0x10,0x00,0x1F,0xFC,0x00,0x88,0x01,0x04,0x01,0x04,0x00,0x88,0x00,0x70,0x00,

0x00},/*"b",66*/

{0x00,0x00,0x00,0x70,0x00,0x88,0x01,0x04,0x01,0x04,0x01,0x04,0x00,0x88,0x00,

0x00},/*"c",67*/

{0x00,0x00,0x00,0x70,0x00,0x88,0x01,0x04,0x01,0x04,0x11,0x08,0x1F,0xFC,0x00,

0x04},/*"d",68*/

{0x00,0x00,0x00,0xF8,0x01,0x44,0x01,0x44,0x01,0x44,0x01,0x44,0x00,0xC8,0x00,

0x00},/*"e",69*/

{0x00,0x00,0x01,0x04,0x01,0x04,0x0F,0xFC,0x11,0x04,0x11,0x04,0x11,0x00,0x18,

0x00},/*"f",70*/

{0x00,0x00,0x00,0xD6,0x01,0x29,0x01,0x29,0x01,0x29,0x01,0xC9,0x01,0x06,0x00,

0x00},/*"g",71*/

{0x10,0x04,0x1F,0xFC,0x00,0x84,0x01,0x00,0x01,0x00,0x01,0x04,0x00,0xFC,0x00,

0x04},/*"h",72*/

{0x00,0x00,0x01,0x04,0x19,0x04,0x19,0xFC,0x00,0x04,0x00,0x04,0x00,0x00,0x00,

0x00},/*"i",73*/

{0x00,0x00,0x00,0x03,0x00,0x01,0x01,0x01,0x19,0x01,0x19,0xFE,0x00,0x00,0x00,

0x00},/*"j",74*/

{0x10,0x04,0x1F,0xFC,0x00,0x24,0x00,0x40,0x01,0xB4,0x01,0x0C,0x01,0x04,0x00,

0x00},/*"k",75*/

{0x00,0x00,0x10,0x04,0x10,0x04,0x1F,0xFC,0x00,0x04,0x00,0x04,0x00,0x00,0x00,

0x00},/*"l",76*/

{0x01,0x04,0x01,0xFC,0x01,0x04,0x01,0x00,0x01,0xFC,0x01,0x04,0x01,0x00,0x00,

0xFC},/*"m",77*/

{0x01,0x04,0x01,0xFC,0x00,0x84,0x01,0x00,0x01,0x00,0x01,0x04,0x00,0xFC,0x00,

0x04},/*"n",78*/

{0x00,0x00,0x00,0xF8,0x01,0x04,0x01,0x04,0x01,0x04,0x01,0x04,0x00,0xF8,0x00,

0x00},/*"o",79*/

{0x01,0x01,0x01,0xFF,0x00,0x85,0x01,0x04,0x01,0x04,0x00,0x88,0x00,0x70,0x00,

0x00},/*"p",80*/

{0x00,0x00,0x00,0x70,0x00,0x88,0x01,0x04,0x01,0x04,0x01,0x05,0x01,0xFF,0x00,

0x01},/*"q",81*/

{0x01,0x04,0x01,0x04,0x01,0xFC,0x00,0x84,0x01,0x04,0x01,0x00,0x01,0x80,0x00,

0x00},/*"r",82*/

{0x00,0x00,0x00,0xCC,0x01,0x24,0x01,0x24,0x01,0x24,0x01,0x24,0x01,0x98,0x00,

0x00},/*"s",83*/

{0x00,0x00,0x01,0x00,0x01,0x00,0x07,0xF8,0x01,0x04,0x01,0x04,0x00,0x00,0x00,

0x00},/*"t",84*/

{0x01,0x00,0x01,0xF8,0x00,0x04,0x00,0x04,0x00,0x04,0x01,0x08,0x01,0xFC,0x00,

0x04},/*"u",85*/

{0x01,0x00,0x01,0x80,0x01,0x70,0x00,0x0C,0x00,0x10,0x01,0x60,0x01,0x80,0x01,

0x00},/*"v",86*/

{0x01,0xF0,0x01,0x0C,0x00,0x30,0x01,0xC0,0x00,0x30,0x01,0x0C,0x01,0xF0,0x01,

0x00},/*"w",87*/

{0x00,0x00,0x01,0x04,0x01,0x8C,0x00,0x74,0x01,0x70,0x01,0x8C,0x01,0x04,0x00,

0x00},/*"x",88*/

{0x01,0x01,0x01,0x81,0x01,0x71,0x00,0x0E,0x00,0x18,0x01,0x60,0x01,0x80,0x01,

0x00},/*"y",89*/

{0x00,0x00,0x01,0x84,0x01,0x0C,0x01,0x34,0x01,0x44,0x01,0x84,0x01,0x0C,0x00,

0x00},/*"z",90*/

{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x3E,0xFC,0x40,0x02,0x40,

0x02},/*"{",91*/

{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,

0x00},/*"|",92*/

{0x00,0x00,0x40,0x02,0x40,0x02,0x3E,0xFC,0x01,0x00,0x00,0x00,0x00,0x00,0x00,

0x00},/*"}",93*/

{0x00,0x00,0x60,0x00,0x80,0x00,0x80,0x00,0x40,0x00,0x40,0x00,0x20,0x00,0x20,

0x00},/*"~",94*/

};

/******************************************************

函数功能:OLED显示信息

入口参数:无

返回 值:无

******************************************************/

void Oled_Show(void)

{

OLED_ShowString(0,0,"****************");

OLED_ShowString(30,20,"OLED-TEST");

OLED_ShowString(5,30,"YOU AREWELCOME");

OLED_ShowString(0,50,"****************");

OLED_Refresh_Gram();

}

//初始化延迟函数

//SYSTICK的时钟固定为HCLK时钟的1/8

//SYSCLK:系统时钟

void delay_init(u8 SYSCLK)

{

SysTick->CTRL&=0xfffffffb; //bit2清空,选择外部时钟HCLK/8

fac_us=SYSCLK/8;

fac_ms=(u16)fac_us*1000;

}

//延时nms

//注意nms的范围,nms<=1864

void delay_ms(u16 nms)

{

u32 temp;

SysTick->LOAD=(u32)nms*fac_ms; //时间加载(SysTick->LOAD为24bit)

SysTick->VAL =0x00; //清空计数器

SysTick->CTRL=0x01 ; //开始倒数

do{temp=SysTick->CTRL;}

while(temp&0x01&&!(temp&(1<<16))); //等待时间到达

SysTick->CTRL=0x00; //关闭计数器

SysTick->VAL =0X00; //清空计数器

}

//延时nus

//nus为要延时的us数

void delay_us(u32 nus)

{

u32 temp;

SysTick->LOAD=nus*fac_us; //时间加载

SysTick->VAL=0x00; //清空计数器

SysTick->CTRL=0x01 ; //开始倒数

do{temp=SysTick->CTRL;}

while(temp&0x01&&!(temp&(1<<16))); //等待时间到达

SysTick->CTRL=0x00; //关闭计数器

SysTick->VAL =0X00; //清空计数器

}

/*****************************************************

函数功能:更新显示

入口参数:无

返回 值:无

*****************************************************/

void OLED_Refresh_Gram(void)

{

u8 i,n;

for(i=0;i<8;i++)

{

OLED_WR_Byte(0xb0+i,OLED_CMD); //设置页地址(0~7)

OLED_WR_Byte(0x00,OLED_CMD); //设置显示位置—列低地址

OLED_WR_Byte(0x10,OLED_CMD); //设置显示位置—列高地址

for(n=0;n<128;n++)

{OLED_WR_Byte(OLED_GRAM[n][i],OLED_DATA);}

}

}

/*****************************************************

函数功能:向OLED写入一个字节

入口参数:dat:要写入的数据/命令, cmd:数据/命令标志 0,表示命令;1,表示数据;

返回 值:无

*****************************************************/

void OLED_WR_Byte(u8 dat,u8 cmd)

{

u8 i;

if(cmd){OLED_RS_Set();}

else{OLED_RS_Clr();}

for(i=0;i<8;i++)

{

OLED_SCLK_Clr();

if(dat&0x80){OLED_SDIN_Set();}

else{OLED_SDIN_Clr();}

OLED_SCLK_Set();

dat<<=1;

}

OLED_RS_Set();

}

/*****************************************************

函数功能:开启OLED显示

入口参数:无

返回 值:无

*****************************************************/

void OLED_Display_On(void)

{

OLED_WR_Byte(0X8D,OLED_CMD); //SET DCDC命令

OLED_WR_Byte(0X14,OLED_CMD); //DCDC ON

OLED_WR_Byte(0XAF,OLED_CMD); //DISPLAY ON

}

/*****************************************************

函数功能:关闭OLED显示

入口参数:无

返回 值:无

*****************************************************/

void OLED_Display_Off(void)

{

OLED_WR_Byte(0X8D,OLED_CMD); //SET DCDC命令

OLED_WR_Byte(0X10,OLED_CMD); //DCDC OFF

OLED_WR_Byte(0XAE,OLED_CMD); //DISPLAY OFF

}

/*****************************************************

函数功能:清屏函数

入口参数:无

返回 值:无

*****************************************************/

void OLED_Clear(void)

{

u8 i,n;

for(i=0;i<8;i++)for(n=0;n<128;n++)OLED_GRAM[n][i]=0X00;

OLED_Refresh_Gram(); //更新显示

}

/*****************************************************

函数功能:画点

入口参数:x:0~127,y:0~63,t:1 填充 0,清空

返回 值:无

*****************************************************/

void OLED_DrawPoint(u8 x,u8 y,u8 t)

{

u8 pos,bx,temp=0;

if(x>127||y>63)return; //超出范围了

pos=7-y/8;

bx=y%8;

temp=1<<(7-bx);

if(t)OLED_GRAM[x][pos]|=temp;

else OLED_GRAM[x][pos]&=~temp;

}

/*****************************************************

函数功能:在指定位置显示一个字符,包括部分字符

入口参数:x:0~127,y:0~63,size:选择字体 16/12,mode:0,反白显示;1,正常显示

返回 值:无

*****************************************************/

void OLED_ShowChar(u8 x,u8 y,u8 chr,u8size,u8 mode)

{

u8 temp,t,t1;

u8 y0=y;

chr=chr-' '; //得到偏移后的值

for(t=0;t<size;t++)

{

if(size==12){temp=oled_asc2_1206[chr][t];}//调用1206字体

else{temp=oled_asc2_1608[chr][t];} //调用1608字体

for(t1=0;t1<8;t1++)

{

if(temp&0x80){OLED_DrawPoint(x,y,mode);}

else{OLED_DrawPoint(x,y,!mode);}

temp<<=1;y++;

if((y-y0)==size){y=y0;x++;break;}

}

}

}

/***************************************************

函数功能:m^n函数

入口参数:

返回 值:无

***************************************************/

u32 oled_pow(u8 m,u8 n)

{

u32 result=1;

while(n--)result*=m;

return result;

}

/***************************************************

函数功能:显示2个数字

入口参数:x,y :起点坐标,num:数值(0~4294967295);,len :数字的位数,size:字体大小

返回 值:无

***************************************************/

void OLED_ShowNumber(u8 x,u8 y,u32num,u8 len,u8 size)

{

u8 t,temp;

u8 enshow=0;

for(t=0;t<len;t++)

{

temp=(num/oled_pow(10,len-t-1))%10;

if(enshow==0&&t<(len-1))

{

if(temp==0){OLED_ShowChar(x+(size/2)*t,y,' ',size,1);continue;}

else{enshow=1;}

}

OLED_ShowChar(x+(size/2)*t,y,temp+'0',size,1);

}

}

/***************************************************

函数功能:显示字符串

入口参数:x,y:起点坐标 *p:字符串起始地址

返回 值:无

***************************************************/

void OLED_ShowString(u8 x,u8 y,const u8*p)

{

#define MAX_CHAR_POSX 122

#define MAX_CHAR_POSY 58

while(*p!='\0')

{

if(x>MAX_CHAR_POSX){x=0;y+=16;}

if(y>MAX_CHAR_POSY){y=x=0;OLED_Clear();}

OLED_ShowChar(x,y,*p,12,1);

x+=8;

p++;

}

}

/***************************************************

函数功能:初始化OLED

入口参数:无

返回 值:无

***************************************************/

void Oled_Init(void)

{

RCC->APB2ENR|=1<<3; //使能PORTB时钟

GPIOB->CRL&=0XFFF0FFFF;

GPIOB->CRL|=0X00020000; //PB4 推挽输出

RCC->APB2ENR|=1<<4; //使能PORTC时钟

RCC->APB2ENR|=1<<0; //使能AFIO时钟

GPIOC->CRH&=0X000FFFFF; //PC13,14,15设置成输出2MHz 推挽输出

GPIOC->CRH|=0X22200000;

PWR->CR|=1<<8; //取消备份区写保护

RCC->BDCR&=0xFFFFFFFE; //外部低俗振荡器关闭 PC14,PC15成为普通IO

BKP->CR&=0xFFFFFFFE; //侵入检测TAMPER引脚作为通用IO口使用

PWR->CR&=0xFFFFFEFF; //备份区写保护

OLED_RST_Clr();

delay_ms(100);

OLED_RST_Set();

OLED_WR_Byte(0xAE,OLED_CMD); //关闭显示

OLED_WR_Byte(0xD5,OLED_CMD); //设置时钟分频因子,震荡频率

OLED_WR_Byte(80,OLED_CMD); //[3:0],分频因子;[7:4],震荡频率

OLED_WR_Byte(0xA8,OLED_CMD); //设置驱动路数

OLED_WR_Byte(0X3F,OLED_CMD); //默认0X3F(1/64)

OLED_WR_Byte(0xD3,OLED_CMD); //设置显示偏移

OLED_WR_Byte(0X00,OLED_CMD); //默认为0

OLED_WR_Byte(0x40,OLED_CMD); //设置显示开始行 [5:0],行数

OLED_WR_Byte(0x8D,OLED_CMD); //电荷泵设置

OLED_WR_Byte(0x14,OLED_CMD); //bit2,开启/关闭

OLED_WR_Byte(0x20,OLED_CMD); //设置内存地址模式

OLED_WR_Byte(0x02,OLED_CMD);

//[1:0],00,列地址模式;01,行地址模式;10,页地址模式;默认10;

OLED_WR_Byte(0xA1,OLED_CMD); //段重定义设置,bit0:0,0->0;1,0->127;

OLED_WR_Byte(0xC0,OLED_CMD);

//设置COM扫描方向;bit3:0,普通模式;1,重定义模式COM[N-1]->COM0;N:驱动路数

OLED_WR_Byte(0xDA,OLED_CMD); //设置COM硬件引脚配置

OLED_WR_Byte(0x12,OLED_CMD); //[5:4]配置

OLED_WR_Byte(0x81,OLED_CMD); //对比度设置

OLED_WR_Byte(0xEF,OLED_CMD); //1~255;默认0X7F (亮度设置,越大越亮)

OLED_WR_Byte(0xD9,OLED_CMD); //设置预充电周期

OLED_WR_Byte(0xf1,OLED_CMD); //[3:0],PHASE 1;[7:4],PHASE 2;

OLED_WR_Byte(0xDB,OLED_CMD); //设置VCOMH 电压倍率

OLED_WR_Byte(0x30,OLED_CMD);

//[6:4]000,0.65*vcc;001,0.77*vcc;011,0.83*vcc;

OLED_WR_Byte(0xA4,OLED_CMD);

//全局显示开启;bit0:1,开启;0,关闭;(白屏/黑屏)

OLED_WR_Byte(0xA6,OLED_CMD);

//设置显示方式;bit0:1,反相显示;0,正常显示

OLED_WR_Byte(0xAF,OLED_CMD); //开启显示

OLED_Clear();

}

/*****************************************************

程序功能

开发板上电后在oled液晶屏中显示一些提示信息。

*****************************************************/

int main(void)

{

Stm32_Clock_Init(9); //系统时钟设置

delay_init(72); //延时初始化

JTAG_Set(JTAG_SWD_DISABLE); //关闭JTAG接口

JTAG_Set(SWD_ENABLE); //打开SWD接口

Oled_Init();

while(1){Oled_Show();}

}

相关文章:

STM32单片机OLED显示

OLED接口电路STM32单片机OLED显示程序源代码#include "sys.h"#define OLED_RST_Clr() PCout(13)0 //RST#define OLED_RST_Set() PCout(13)1 //RST#define OLED_RS_Clr() PBout(4)0 //DC#define OLED_RS_Set() PBout(4)1 //DC#define OLED_SCLK_Clr()PCout(15)0 //SCL…...

备战金三银四,软件测试面试题(全)

1.B/S架构和C/S架构区别 B/S 只需要有操作系统和浏览器就行&#xff0c;可以实现跨平台&#xff0c;客户端零维护&#xff0c;维护成本低&#xff0c;但是个性化能力低&#xff0c;响应速度较慢 C/S响应速度快&#xff0c;安全性强&#xff0c;一般应用于局域网中&#xff0c;因…...

硬件篇-配置

机箱->239元 机箱选用的itx迷你机箱&#xff0c;为了后期nas方便拓展选了4盘位&#xff0c;该机箱还是比较符合我的预期的&#xff0c;颇有种麻雀虽小五脏俱全的感觉&#xff0c;机箱可以安装matx主板和itx主板&#xff0c;还是比较方便的&#xff0c;机箱带三个大散热风扇&…...

网页内容 中文乱码 解决办法

原因 是因为没有网页没有设置charset是utf-8 解决办法 <!DOCTYPE html> <html lang"en"><head><!-- 这一个标签不能少 --><meta charset"UTF-8" /><body></body> </html>...

【C++之容器篇】造轮子:模拟实现vector类

目录前言一、项目结构1. vector的简介2. 项目结构二、vector的底层结构三、默认成员函数(Member functions)1. 构造函数(1)无参构造函数(2)使用n个值来构造对象(3)使用一段迭代器区间来进行初始化(4)测试构造函数2. 拷贝构造函数&#xff08;现代写法&#xff09;3. 析构函数4.…...

C++中的右值引用与移动构造函数

1.右值引用右值引用是 C11 引入的与 Lambda 表达式齐名的重要特性之一。它的引入解决了 C 中大量的历史遗留问题&#xff0c; 消除了诸如 std::vector、std::string 之类的额外开销&#xff0c; 也才使得函数对象容器 std::function 成为了可能。1.1左值、右值的纯右值、将亡值…...

Swift如何使用依赖注入进行解藕

Swift 中可以使用依赖注入&#xff08;Dependency Injection&#xff09;来解耦组件之间的依赖关系。依赖注入是一种设计模式&#xff0c;指的是在运行时&#xff0c;将一个组件所依赖的其他组件通过构造函数或者属性注入的方式传递给该组件。 例如&#xff0c;有两个组件 A 和…...

合宙ESP32S3-CORE开发板|保姆级|Arduino IDE|windows11|esp32S3支持库|helloword例程:Arduino 环境搭建

Arduino主页网址&#xff1a; Software | Arduino 以windows11版本为例&#xff1a; Arduino IDE最新版本为2.0.3 左边的按钮是直接下载&#xff08;免捐赠&#xff09;&#xff1a; 下载安装完成后&#xff0c;更改软件默认语言&#xff1a; 默认的库是不支持ESP32的&#…...

CMake中target_precompile_headers的使用

CMake中的target_precompile_headers命令用于添加要预编译的头文件列表&#xff0c;其格式如下&#xff1a; target_precompile_headers(<target><INTERFACE|PUBLIC|PRIVATE> [header1...][<INTERFACE|PUBLIC|PRIVATE> [header2...] ...]) # 1 target_preco…...

SpringCloud和微服务介绍

SpringCloud介绍 SpringCloud是在SpringBoot的基础上构建的,用于简化分布式系统构建的工具集。 该工具集为微服务架构中所涉及的配置管理,服务发现,智能路由,断路器,微代理和控制总线等操作提供了一种简单的开发方式。 SpringCloud中包含了多个子项目&#xff1a; Spring …...

Qt源码编译过程中配置文件中的选项说明

文章目录选项说明默认值顶级安装目录-prefix 部署目录&#xff0c;如目标设备上所示。/usr/local/Qt-$QT_VERSION-extprefix 安装目录&#xff0c;如主机上所示。SYSROOT/PREFIX-hostprefix [dir]主机上运行的生成工具的安装目录。如果未给定[dir]&#xff0c;则将使用当前构建…...

Mysql 增删改查(一) —— 查询(条件查询where、分页limits、排序order by、分组 group by)

查询 select 可以认为是四个基本操作中使用最为频繁的操作&#xff0c;然而数据量比较大的时候&#xff0c;我们不可能查询所有内容&#xff0c;我们一般会搭配其他语句进行查询&#xff1a; 假如要查询某一个字段的内容&#xff0c;可以使用 where假如要查询前几条记录&#…...

VScode 结合clangd 构建linux源代码阅读环境

1、背景介绍上一篇文章&#xff1a;VScode 结合Global构建linux源代码阅读环境 &#xff0c;介绍了在VS Code工具中通过remote-ssh远程登陆到Linux远程服务器&#xff0c;使用Global构建linux源代码阅读环境&#xff0c;对linux kernel代码进行解析&#xff0c;实现全局搜索、自…...

web应用 —— JavaScript

Web应用(acwing) 三、JavaScript 1.JS的调用方式与执行顺序 ①使用方法 HTML页面中任意位置加上<script type"module"></script>标签即可 常见使用方式&#xff1a; 直接在<script type"module"></script>标签内写JS代码。直…...

SSM整合SpringSecurity简单使用

一、SpringSecurity 1.1 什么是SpringSecurity Spring Security 的前身是 Acegi Security &#xff0c;是 Spring 项目组中用来提供安全认证服务的框架。(官网地址) Spring Security 为基于J2EE企业应用软件提供了全面安全服务。特别是使用领先的J2EE解决方案-Spring框架开发…...

Java零基础教程——数据类型

目录数据类型数据类型的分类运算符算术运算符符号做连接符的识别自增、自减运算符赋值运算符关系运算符逻辑运算符短路逻辑运算符三元运算符运算符优先级数据类型 数据类型的分类 引用数据类型&#xff08;除基本数据类型之外的&#xff0c;如String &#xff09; 基本数据类…...

【Linux 信号】信号的产生方式、信号的捕捉的全过程

信号的处理方式是远远比信号的产生当闹钟响了就知道时间到了&#xff0c;说明对应信号处理方法比信号产生更早操作系统的信号处理方法在编写操作系统的时候就已经编写好了signal函数1.1所有的信号1.2 signal函数的概念和简单使用捕捉信号就是自定义对应的信号的处理方法9号信号…...

代码随想录第58天(动态规划):● 392.判断子序列 ● 115.不同的子序列

一、判断子序列 题目描述&#xff1a; 思路和想法&#xff1a; 这道题目还是最长公共子序列的拓展&#xff0c;只是这里进行删除的一定是t字符串&#xff0c;当不相等时&#xff0c;dp[i][j] dp[i][j - 1]&#xff1b;其余基本一致。当最长公共子序列个数等s.size()时&#x…...

代码随想录第55天(动态规划):● 309.最佳买卖股票时机含冷冻期 ● 714.买卖股票的最佳时机含手续费

一、最佳买卖股票时机含冷冻期 题目描述: 思路和想法&#xff1a; 这道题相较于之前的题目&#xff0c;注重对状态的分析&#xff0c;这里分为四个状态。 &#xff08;1&#xff09;状态一&#xff0c;买入状态 dp[i][0] 操作一&#xff1a;前一天就是持有状态&#xff08;状…...

字符串装换整数(atoi)-力扣8-java

一、题目描述请你来实现一个 myAtoi(string s) 函数&#xff0c;使其能将字符串转换成一个 32 位有符号整数&#xff08;类似 C/C 中的 atoi 函数&#xff09;。函数 myAtoi(string s) 的算法如下&#xff1a;读入字符串并丢弃无用的前导空格检查下一个字符&#xff08;假设还未…...

毕业5年,从月薪3000到年薪40w,我掌握了那些核心技能?(建议收藏)

大家好&#xff0c;我是静静~~是一枚一线大厂的测试开发工程师很多读者私信问我&#xff0c;自己时间不短了&#xff0c;随着工作年限的不断增长&#xff0c;感觉自己的技术水平与自己的工作年限严重不符。想跳槽出去换个新环境吧&#xff0c;又感觉自己的能力达不到心仪公司的…...

C++中的并行与并发

1.1 并行基础std::thread 用于创建一个执行的线程实例&#xff0c;所以它是一切并发编程的基础&#xff0c;使用时需要包含 <thread> 头文件&#xff0c; 它提供了很多基本的线程操作&#xff0c;例如 get_id() 来获取所创建线程的线程 ID&#xff0c;使用 join() 来加入…...

h2database源码解析-如何更新一条行记录

这里的更新包括两种操作&#xff1a;删、改。更新操作涉及的内容在其他文章里面已经做过介绍了&#xff0c;本文主要是介绍更新的代码流程&#xff0c;以了解更新操作都做了哪些事情。如果有未介绍过的知识点会详细介绍。 目录改(update)如何判读是否加了行锁删(delete)改(upda…...

FyListen——生命周期监听器(设计原理之理解生命周期)

FyListen——生命周期监听器&#xff08;设计原理之理解生命周期&#xff09; FyListen 的核心原理有两个&#xff1a; 通过子Fragment对Activity、Fragment进行生命周期监听Java8 接口特性 default 1. 什么是上下文Context 这是一个装饰器模式&#xff0c; ContextImpl 是 …...

Element UI框架学习篇(六)

Element UI框架学习篇(六) 1 删除数据 1.1 前台核心函数 1.1.1 elementUI中的消息提示框语法 //①其中type类型和el-button中的type类型是一致的,有info灰色,success绿色,danger红色,warning黄色,primary蓝色 //②message是你所要填写的提示信息 //③建议都用,因为比双引号…...

Python如何安装模块,python模块安装失败的原因以及解决办法

前言 今天来给刚开始学习python的朋友讲解一下 如何安装python模块, python模块安装失败的原因以及解决办法 很多朋友拿到代码之后&#xff0c;就开始复制粘贴 --> 然后右键进行运行 结果就是报错说 没有这个模块 得安装啥的 Python模块安装 一. 打开命令提示符 win …...

《NFL橄榄球》:洛杉矶闪电·橄榄1号位

洛杉矶闪电&#xff08;英语&#xff1a;Los Angeles Chargers&#xff09;&#xff0c;又译“洛杉磯衝鋒者”。是一支位于加利福尼亚州洛杉矶郡英格尔伍德的职业美式橄榄球球队&#xff0c;现为美国橄榄球联合会西区成员之一。该队曾于1961年搬迁到圣地亚哥而改叫圣地亚哥电光…...

4.7 Python设置代码格式

随着你编写的程序越来越长&#xff0c;有必要了解一些代码格式设置约定。请花时让你的代码尽可能易于阅读&#xff1b;让代码易于阅读有助于你掌握程序是做什么的,也可以帮助他人理解你编写的代码。为确保所有人编写的代码的结构都大致一致&#xff0c;Python程序员都遵循一些格…...

Zabbix 构建监控告警平台(五)

Zabbix 自动发现Zabbix 自动注册1.Zabbix 自动发现 1.1前言 为了满足监控企业成千上万台服务器&#xff0c;因此我们需要使用Zabbix批量监控来实现。自动发现和自动注册。 1.2zabbix-server &#xff08;一&#xff09;1、创建自动发现规则 在“配置”->“自动发现”->“…...

2023关键词:挑战

未失踪人口回归… 好久不见&#xff0c;不经意间拖更2个多月。今天周末&#xff0c;外面淅淅沥沥下着小雨&#xff0c;这种窝在床上的时刻最适合写点东西了。 但是建议大家在办公或者写博客的时候尽量还是端正坐姿&#xff0c;我就是因为喜欢这样靠在床背上&#xff0c;长时间…...

网站pc端网址和手机端网址建设/网络营销方案设计

今日突发奇想&#xff0c;欲找一个在线的 语音留言系统。结果一搜索&#xff0c;出来结果甚少&#xff0c;大致如下&#xff1a; MyChingo&#xff1a;是一个 语音留言系统&#xff0c;它提供一个播放器&#xff0c;播放器的列表窗口中把读者的 语音留言全部列出来&#xff0c;…...

深圳软件公司排行/seo网站推广推荐

2019独角兽企业重金招聘Python工程师标准>>> 本文是MyEclipse方面教程&#xff0c;主要介绍在MyEclipse中该如何设置jsp页面为默认utf-8编码&#xff1f; 在MyEclispe中创建Jsp页面&#xff0c;Jsp页面的默认编码是“ISO-8859-1”&#xff0c;如下图所示&#xff1a…...

关于新农村网络建设网站/网络营销与传统营销的区别

那么&#xff0c;区块链技术能带来哪些好处&#xff1f;能解决什么问题&#xff1f; 企业家和创新型公司自是不必说的。他们已经掌握了这项新技术&#xff0c;就像水中的鸭子&#xff0c;忙于创新业务和解决方式&#xff0c;使用不同的规则&#xff0c;来取代现有的形式。 企业…...

程序员做笔记的网站/进入百度一下官网

String类型常用的操作 后面的Spark在处理文件数据时会用到 scala可以无缝衔接Java类库&#xff0c;调用Java类库的方法scala有一种隐式转换机制&#xff0c;比如String类型&#xff0c; 底层会通过隐式转换变为scala的StringOps类型 即take,takeRight等方法都是StringOps类型…...

一个小胖子从网站做任务的色情故事/互联网app推广具体怎么做

前面我写了三篇关于利用OBS推流服务在抖音上直播电脑游戏或者画面的教程&#xff0c;访问量挺大的&#xff0c;于是有好多小伙伴加我微信或者QQ说他自己按照我的教程设置的OBS推流直播抖音&#xff0c;但是会出现各种问题&#xff0c;比如黑屏的、卡顿的、延迟高的、无法连接服…...

怎么知道网站开发语言/网络营销方法有几种类型

https://blog.csdn.net/Fiona_lms/article/details/79497914 npm install...