【51单片机】晨启科技,7针OLED显示驱动程序,STC89C52RC

news2024/12/27 12:27:13

文章目录

  • 原理图
  • oled.c
  • oled.h
  • main.c

原理图

在这里插入图片描述

在这里插入图片描述

sbit OLED_SCL=P4^3;//SCL-D0
sbit OLED_SDA=P4^1;//SDA-D1
sbit OLED_RES =P3^6;//RES
sbit OLED_DC =P3^7;//DC
sbit OLED_CS=P2^7; //CS

oled.c


#include "OLED.h"

//******************************说明*********************************************
//OLED显存存放方式:
//	 0列 1列 2列 3列 4列   ...   ...   ...   ...   ...  127列
//0行
//1行
//2行
//3行
//4行
//5行
//6行
//7行
//******************************OLED*********************************************
//****************************定义说明*******************************************
//数组名称:ascii_0806[][6]
//数组说明:显示(ASCII)的西方文字点阵字库,点阵(字体)大小6x8
//作    者:
//******************************OLED**********************************************
unsigned char code
ascii_0806[][6] ={
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},// space-空格
{ 0x00, 0x00, 0x00, 0x2f, 0x00, 0x00},// !
{ 0x00, 0x00, 0x07, 0x00, 0x07, 0x00},// "
{ 0x00, 0x14, 0x7f, 0x14, 0x7f, 0x14},// #
{ 0x00, 0x24, 0x2a, 0x7f, 0x2a, 0x12},// $
{ 0x00, 0x62, 0x64, 0x08, 0x13, 0x23},// %
{ 0x00, 0x36, 0x49, 0x55, 0x22, 0x50},// &
{ 0x00, 0x00, 0x05, 0x03, 0x00, 0x00},// '
{ 0x00, 0x00, 0x1c, 0x22, 0x41, 0x00},// (
{ 0x00, 0x00, 0x41, 0x22, 0x1c, 0x00},// )
{ 0x00, 0x14, 0x08, 0x3E, 0x08, 0x14},// *
{ 0x00, 0x08, 0x08, 0x3E, 0x08, 0x08},// +
{ 0x00, 0x00, 0x00, 0xA0, 0x60, 0x00},// ,
{ 0x00, 0x08, 0x08, 0x08, 0x08, 0x08},// -
{ 0x00, 0x00, 0x60, 0x60, 0x00, 0x00},// .
{ 0x00, 0x20, 0x10, 0x08, 0x04, 0x02},// /
{ 0x00, 0x3E, 0x51, 0x49, 0x45, 0x3E},// 0
{ 0x00, 0x00, 0x42, 0x7F, 0x40, 0x00},// 1
{ 0x00, 0x42, 0x61, 0x51, 0x49, 0x46},// 2
{ 0x00, 0x21, 0x41, 0x45, 0x4B, 0x31},// 3
{ 0x00, 0x18, 0x14, 0x12, 0x7F, 0x10},// 4
{ 0x00, 0x27, 0x45, 0x45, 0x45, 0x39},// 5
{ 0x00, 0x3C, 0x4A, 0x49, 0x49, 0x30},// 6
{ 0x00, 0x01, 0x71, 0x09, 0x05, 0x03},// 7
{ 0x00, 0x36, 0x49, 0x49, 0x49, 0x36},// 8
{ 0x00, 0x06, 0x49, 0x49, 0x29, 0x1E},// 9
{ 0x00, 0x00, 0x36, 0x36, 0x00, 0x00},// :
{ 0x00, 0x00, 0x56, 0x36, 0x00, 0x00},// ;
{ 0x00, 0x08, 0x14, 0x22, 0x41, 0x00},// <
{ 0x00, 0x14, 0x14, 0x14, 0x14, 0x14},// =
{ 0x00, 0x00, 0x41, 0x22, 0x14, 0x08},// >
{ 0x00, 0x02, 0x01, 0x51, 0x09, 0x06},// ?
{ 0x00, 0x32, 0x49, 0x59, 0x51, 0x3E},// @
{ 0x00, 0x7C, 0x12, 0x11, 0x12, 0x7C},// A
{ 0x00, 0x7F, 0x49, 0x49, 0x49, 0x36},// B
{ 0x00, 0x3E, 0x41, 0x41, 0x41, 0x22},// C
{ 0x00, 0x7F, 0x41, 0x41, 0x22, 0x1C},// D
{ 0x00, 0x7F, 0x49, 0x49, 0x49, 0x41},// E
{ 0x00, 0x7F, 0x09, 0x09, 0x09, 0x01},// F
{ 0x00, 0x3E, 0x41, 0x49, 0x49, 0x7A},// G
{ 0x00, 0x7F, 0x08, 0x08, 0x08, 0x7F},// H
{ 0x00, 0x00, 0x41, 0x7F, 0x41, 0x00},// I
{ 0x00, 0x20, 0x40, 0x41, 0x3F, 0x01},// J
{ 0x00, 0x7F, 0x08, 0x14, 0x22, 0x41},// K
{ 0x00, 0x7F, 0x40, 0x40, 0x40, 0x40},// L
{ 0x00, 0x7F, 0x02, 0x0C, 0x02, 0x7F},// M
{ 0x00, 0x7F, 0x04, 0x08, 0x10, 0x7F},// N
{ 0x00, 0x3E, 0x41, 0x41, 0x41, 0x3E},// O
{ 0x00, 0x7F, 0x09, 0x09, 0x09, 0x06},// P
{ 0x00, 0x3E, 0x41, 0x51, 0x21, 0x5E},// Q
{ 0x00, 0x7F, 0x09, 0x19, 0x29, 0x46},// R
{ 0x00, 0x46, 0x49, 0x49, 0x49, 0x31},// S
{ 0x00, 0x01, 0x01, 0x7F, 0x01, 0x01},// T
{ 0x00, 0x3F, 0x40, 0x40, 0x40, 0x3F},// U
{ 0x00, 0x1F, 0x20, 0x40, 0x20, 0x1F},// V
{ 0x00, 0x3F, 0x40, 0x38, 0x40, 0x3F},// W
{ 0x00, 0x63, 0x14, 0x08, 0x14, 0x63},// X
{ 0x00, 0x07, 0x08, 0x70, 0x08, 0x07},// Y
{ 0x00, 0x61, 0x51, 0x49, 0x45, 0x43},// Z
{ 0x00, 0x00, 0x7F, 0x41, 0x41, 0x00},// [
{ 0x00, 0x55, 0x2A, 0x55, 0x2A, 0x55},// 55
{ 0x00, 0x00, 0x41, 0x41, 0x7F, 0x00},// ]
{ 0x00, 0x04, 0x02, 0x01, 0x02, 0x04},// ^
{ 0x00, 0x40, 0x40, 0x40, 0x40, 0x40},// _
{ 0x00, 0x00, 0x01, 0x02, 0x04, 0x00},// '
{ 0x00, 0x20, 0x54, 0x54, 0x54, 0x78},// a
{ 0x00, 0x7F, 0x48, 0x44, 0x44, 0x38},// b
{ 0x00, 0x38, 0x44, 0x44, 0x44, 0x20},// c
{ 0x00, 0x38, 0x44, 0x44, 0x48, 0x7F},// d
{ 0x00, 0x38, 0x54, 0x54, 0x54, 0x18},// e
{ 0x00, 0x08, 0x7E, 0x09, 0x01, 0x02},// f
{ 0x00, 0x18, 0xA4, 0xA4, 0xA4, 0x7C},// g
{ 0x00, 0x7F, 0x08, 0x04, 0x04, 0x78},// h
{ 0x00, 0x00, 0x44, 0x7D, 0x40, 0x00},// i
{ 0x00, 0x40, 0x80, 0x84, 0x7D, 0x00},// j
{ 0x00, 0x7F, 0x10, 0x28, 0x44, 0x00},// k
{ 0x00, 0x00, 0x41, 0x7F, 0x40, 0x00},// l
{ 0x00, 0x7C, 0x04, 0x18, 0x04, 0x78},// m
{ 0x00, 0x7C, 0x08, 0x04, 0x04, 0x78},// n
{ 0x00, 0x38, 0x44, 0x44, 0x44, 0x38},// o
{ 0x00, 0xFC, 0x24, 0x24, 0x24, 0x18},// p
{ 0x00, 0x18, 0x24, 0x24, 0x18, 0xFC},// q
{ 0x00, 0x7C, 0x08, 0x04, 0x04, 0x08},// r
{ 0x00, 0x48, 0x54, 0x54, 0x54, 0x20},// s
{ 0x00, 0x04, 0x3F, 0x44, 0x40, 0x20},// t
{ 0x00, 0x3C, 0x40, 0x40, 0x20, 0x7C},// u
{ 0x00, 0x1C, 0x20, 0x40, 0x20, 0x1C},// v
{ 0x00, 0x3C, 0x40, 0x30, 0x40, 0x3C},// w
{ 0x00, 0x44, 0x28, 0x10, 0x28, 0x44},// x
{ 0x00, 0x1C, 0xA0, 0xA0, 0xA0, 0x7C},// y
{ 0x00, 0x44, 0x64, 0x54, 0x4C, 0x44},// z
{ 0x14, 0x14, 0x14, 0x14, 0x14, 0x14},// horiz lines

};


//****************************定义说明*******************************************
//数组名称:ascii_1608[][16]
//数组说明:显示(ASCII)的西方文字点阵字库,点阵(字体)大小16x16
//作    者:
//******************************OLED**********************************************
unsigned char code
ascii_1608[][16]={
{ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*" ",0*/
{ 0x00,0x00,0x00,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x33,0x30,0x00,0x00,0x00},/*"!",1*/
{ 0x00,0x10,0x0C,0x06,0x10,0x0C,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*""",2*/
{ 0x40,0xC0,0x78,0x40,0xC0,0x78,0x40,0x00,0x04,0x3F,0x04,0x04,0x3F,0x04,0x04,0x00},/*"#",3*/
{ 0x00,0x70,0x88,0xFC,0x08,0x30,0x00,0x00,0x00,0x18,0x20,0xFF,0x21,0x1E,0x00,0x00},/*"$",4*/
{ 0xF0,0x08,0xF0,0x00,0xE0,0x18,0x00,0x00,0x00,0x21,0x1C,0x03,0x1E,0x21,0x1E,0x00},/*"%",5*/
{ 0x00,0xF0,0x08,0x88,0x70,0x00,0x00,0x00,0x1E,0x21,0x23,0x24,0x19,0x27,0x21,0x10},/*"&",6*/
{ 0x10,0x16,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"'",7*/
{ 0x00,0x00,0x00,0xE0,0x18,0x04,0x02,0x00,0x00,0x00,0x00,0x07,0x18,0x20,0x40,0x00},/*"(",8*/
{ 0x00,0x02,0x04,0x18,0xE0,0x00,0x00,0x00,0x00,0x40,0x20,0x18,0x07,0x00,0x00,0x00},/*")",9*/
{ 0x40,0x40,0x80,0xF0,0x80,0x40,0x40,0x00,0x02,0x02,0x01,0x0F,0x01,0x02,0x02,0x00},/*"*",10*/
{ 0x00,0x00,0x00,0xF0,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x1F,0x01,0x01,0x01,0x00},/*"+",11*/
{ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xB0,0x70,0x00,0x00,0x00,0x00,0x00},/*",",12*/
{ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01},/*"-",13*/
{ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00,0x00,0x00},/*".",14*/
{ 0x00,0x00,0x00,0x00,0x80,0x60,0x18,0x04,0x00,0x60,0x18,0x06,0x01,0x00,0x00,0x00},/*"/",15*/
{ 0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x0F,0x10,0x20,0x20,0x10,0x0F,0x00},/*"0",16*/
{ 0x00,0x10,0x10,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00},/*"1",17*/
{ 0x00,0x70,0x08,0x08,0x08,0x88,0x70,0x00,0x00,0x30,0x28,0x24,0x22,0x21,0x30,0x00},/*"2",18*/
{ 0x00,0x30,0x08,0x88,0x88,0x48,0x30,0x00,0x00,0x18,0x20,0x20,0x20,0x11,0x0E,0x00},/*"3",19*/
{ 0x00,0x00,0xC0,0x20,0x10,0xF8,0x00,0x00,0x00,0x07,0x04,0x24,0x24,0x3F,0x24,0x00},/*"4",20*/
{ 0x00,0xF8,0x08,0x88,0x88,0x08,0x08,0x00,0x00,0x19,0x21,0x20,0x20,0x11,0x0E,0x00},/*"5",21*/
{ 0x00,0xE0,0x10,0x88,0x88,0x18,0x00,0x00,0x00,0x0F,0x11,0x20,0x20,0x11,0x0E,0x00},/*"6",22*/
{ 0x00,0x38,0x08,0x08,0xC8,0x38,0x08,0x00,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x00},/*"7",23*/
{ 0x00,0x70,0x88,0x08,0x08,0x88,0x70,0x00,0x00,0x1C,0x22,0x21,0x21,0x22,0x1C,0x00},/*"8",24*/
{ 0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x00,0x31,0x22,0x22,0x11,0x0F,0x00},/*"9",25*/
{ 0x00,0x00,0x00,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00},/*":",26*/
{ 0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x60,0x00,0x00,0x00,0x00},/*";",27*/
{ 0x00,0x00,0x80,0x40,0x20,0x10,0x08,0x00,0x00,0x01,0x02,0x04,0x08,0x10,0x20,0x00},/*"<",28*/
{ 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x00,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x00},/*"=",29*/
{ 0x00,0x08,0x10,0x20,0x40,0x80,0x00,0x00,0x00,0x20,0x10,0x08,0x04,0x02,0x01,0x00},/*">",30*/
{ 0x00,0x70,0x48,0x08,0x08,0x08,0xF0,0x00,0x00,0x00,0x00,0x30,0x36,0x01,0x00,0x00},/*"?",31*/
{ 0xC0,0x30,0xC8,0x28,0xE8,0x10,0xE0,0x00,0x07,0x18,0x27,0x24,0x23,0x14,0x0B,0x00},/*"@",32*/
{ 0x00,0x00,0xC0,0x38,0xE0,0x00,0x00,0x00,0x20,0x3C,0x23,0x02,0x02,0x27,0x38,0x20},/*"A",33*/
{ 0x08,0xF8,0x88,0x88,0x88,0x70,0x00,0x00,0x20,0x3F,0x20,0x20,0x20,0x11,0x0E,0x00},/*"B",34*/
{ 0xC0,0x30,0x08,0x08,0x08,0x08,0x38,0x00,0x07,0x18,0x20,0x20,0x20,0x10,0x08,0x00},/*"C",35*/
{ 0x08,0xF8,0x08,0x08,0x08,0x10,0xE0,0x00,0x20,0x3F,0x20,0x20,0x20,0x10,0x0F,0x00},/*"D",36*/
{ 0x08,0xF8,0x88,0x88,0xE8,0x08,0x10,0x00,0x20,0x3F,0x20,0x20,0x23,0x20,0x18,0x00},/*"E",37*/
{ 0x08,0xF8,0x88,0x88,0xE8,0x08,0x10,0x00,0x20,0x3F,0x20,0x00,0x03,0x00,0x00,0x00},/*"F",38*/
{ 0xC0,0x30,0x08,0x08,0x08,0x38,0x00,0x00,0x07,0x18,0x20,0x20,0x22,0x1E,0x02,0x00},/*"G",39*/
{ 0x08,0xF8,0x08,0x00,0x00,0x08,0xF8,0x08,0x20,0x3F,0x21,0x01,0x01,0x21,0x3F,0x20},/*"H",40*/
{ 0x00,0x08,0x08,0xF8,0x08,0x08,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00},/*"I",41*/
{ 0x00,0x00,0x08,0x08,0xF8,0x08,0x08,0x00,0xC0,0x80,0x80,0x80,0x7F,0x00,0x00,0x00},/*"J",42*/
{ 0x08,0xF8,0x88,0xC0,0x28,0x18,0x08,0x00,0x20,0x3F,0x20,0x01,0x26,0x38,0x20,0x00},/*"K",43*/
{ 0x08,0xF8,0x08,0x00,0x00,0x00,0x00,0x00,0x20,0x3F,0x20,0x20,0x20,0x20,0x30,0x00},/*"L",44*/
{ 0x08,0xF8,0xF8,0x00,0xF8,0xF8,0x08,0x00,0x20,0x3F,0x00,0x3F,0x00,0x3F,0x20,0x00},/*"M",45*/
{ 0x08,0xF8,0x30,0xC0,0x00,0x08,0xF8,0x08,0x20,0x3F,0x20,0x00,0x07,0x18,0x3F,0x00},/*"N",46*/
{ 0xE0,0x10,0x08,0x08,0x08,0x10,0xE0,0x00,0x0F,0x10,0x20,0x20,0x20,0x10,0x0F,0x00},/*"O",47*/
{ 0x08,0xF8,0x08,0x08,0x08,0x08,0xF0,0x00,0x20,0x3F,0x21,0x01,0x01,0x01,0x00,0x00},/*"P",48*/
{ 0xE0,0x10,0x08,0x08,0x08,0x10,0xE0,0x00,0x0F,0x18,0x24,0x24,0x38,0x50,0x4F,0x00},/*"Q",49*/
{ 0x08,0xF8,0x88,0x88,0x88,0x88,0x70,0x00,0x20,0x3F,0x20,0x00,0x03,0x0C,0x30,0x20},/*"R",50*/
{ 0x00,0x70,0x88,0x08,0x08,0x08,0x38,0x00,0x00,0x38,0x20,0x21,0x21,0x22,0x1C,0x00},/*"S",51*/
{ 0x18,0x08,0x08,0xF8,0x08,0x08,0x18,0x00,0x00,0x00,0x20,0x3F,0x20,0x00,0x00,0x00},/*"T",52*/
{ 0x08,0xF8,0x08,0x00,0x00,0x08,0xF8,0x08,0x00,0x1F,0x20,0x20,0x20,0x20,0x1F,0x00},/*"U",53*/
{ 0x08,0x78,0x88,0x00,0x00,0xC8,0x38,0x08,0x00,0x00,0x07,0x38,0x0E,0x01,0x00,0x00},/*"V",54*/
{ 0xF8,0x08,0x00,0xF8,0x00,0x08,0xF8,0x00,0x03,0x3C,0x07,0x00,0x07,0x3C,0x03,0x00},/*"W",55*/
{ 0x08,0x18,0x68,0x80,0x80,0x68,0x18,0x08,0x20,0x30,0x2C,0x03,0x03,0x2C,0x30,0x20},/*"X",56*/
{ 0x08,0x38,0xC8,0x00,0xC8,0x38,0x08,0x00,0x00,0x00,0x20,0x3F,0x20,0x00,0x00,0x00},/*"Y",57*/
{ 0x10,0x08,0x08,0x08,0xC8,0x38,0x08,0x00,0x20,0x38,0x26,0x21,0x20,0x20,0x18,0x00},/*"Z",58*/
{ 0x00,0x00,0x00,0xFE,0x02,0x02,0x02,0x00,0x00,0x00,0x00,0x7F,0x40,0x40,0x40,0x00},/*"[",59*/
{ 0x00,0x0C,0x30,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x06,0x38,0xC0,0x00},/*"\",60*/
{ 0x00,0x02,0x02,0x02,0xFE,0x00,0x00,0x00,0x00,0x40,0x40,0x40,0x7F,0x00,0x00,0x00},/*"]",61*/
{ 0x00,0x00,0x04,0x02,0x02,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"^",62*/
{ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80},/*"_",63*/
{ 0x00,0x02,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"`",64*/
{ 0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x19,0x24,0x22,0x22,0x22,0x3F,0x20},/*"a",65*/
{ 0x08,0xF8,0x00,0x80,0x80,0x00,0x00,0x00,0x00,0x3F,0x11,0x20,0x20,0x11,0x0E,0x00},/*"b",66*/
{ 0x00,0x00,0x00,0x80,0x80,0x80,0x00,0x00,0x00,0x0E,0x11,0x20,0x20,0x20,0x11,0x00},/*"c",67*/
{ 0x00,0x00,0x00,0x80,0x80,0x88,0xF8,0x00,0x00,0x0E,0x11,0x20,0x20,0x10,0x3F,0x20},/*"d",68*/
{ 0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x1F,0x22,0x22,0x22,0x22,0x13,0x00},/*"e",69*/
{ 0x00,0x80,0x80,0xF0,0x88,0x88,0x88,0x18,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00},/*"f",70*/
{ 0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x6B,0x94,0x94,0x94,0x93,0x60,0x00},/*"g",71*/
{ 0x08,0xF8,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x3F,0x21,0x00,0x00,0x20,0x3F,0x20},/*"h",72*/
{ 0x00,0x80,0x98,0x98,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00},/*"i",73*/
{ 0x00,0x00,0x00,0x80,0x98,0x98,0x00,0x00,0x00,0xC0,0x80,0x80,0x80,0x7F,0x00,0x00},/*"j",74*/
{ 0x08,0xF8,0x00,0x00,0x80,0x80,0x80,0x00,0x20,0x3F,0x24,0x02,0x2D,0x30,0x20,0x00},/*"k",75*/
{ 0x00,0x08,0x08,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00},/*"l",76*/
{ 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x20,0x3F,0x20,0x00,0x3F,0x20,0x00,0x3F},/*"m",77*/
{ 0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x3F,0x21,0x00,0x00,0x20,0x3F,0x20},/*"n",78*/
{ 0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x1F,0x20,0x20,0x20,0x20,0x1F,0x00},/*"o",79*/
{ 0x80,0x80,0x00,0x80,0x80,0x00,0x00,0x00,0x80,0xFF,0xA1,0x20,0x20,0x11,0x0E,0x00},/*"p",80*/
{ 0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x0E,0x11,0x20,0x20,0xA0,0xFF,0x80},/*"q",81*/
{ 0x80,0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x20,0x20,0x3F,0x21,0x20,0x00,0x01,0x00},/*"r",82*/
{ 0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x33,0x24,0x24,0x24,0x24,0x19,0x00},/*"s",83*/
{ 0x00,0x80,0x80,0xE0,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x1F,0x20,0x20,0x00,0x00},/*"t",84*/
{ 0x80,0x80,0x00,0x00,0x00,0x80,0x80,0x00,0x00,0x1F,0x20,0x20,0x20,0x10,0x3F,0x20},/*"u",85*/
{ 0x80,0x80,0x80,0x00,0x00,0x80,0x80,0x80,0x00,0x01,0x0E,0x30,0x08,0x06,0x01,0x00},/*"v",86*/
{ 0x80,0x80,0x00,0x80,0x00,0x80,0x80,0x80,0x0F,0x30,0x0C,0x03,0x0C,0x30,0x0F,0x00},/*"w",87*/
{ 0x00,0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x31,0x2E,0x0E,0x31,0x20,0x00},/*"x",88*/
{ 0x80,0x80,0x80,0x00,0x00,0x80,0x80,0x80,0x80,0x81,0x8E,0x70,0x18,0x06,0x01,0x00},/*"y",89*/
{ 0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x21,0x30,0x2C,0x22,0x21,0x30,0x00},/*"z",90*/
{ 0x00,0x00,0x00,0x00,0x80,0x7C,0x02,0x02,0x00,0x00,0x00,0x00,0x00,0x3F,0x40,0x40},/*"{",91*/
{ 0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00},/*"|",92*/
{ 0x00,0x02,0x02,0x7C,0x80,0x00,0x00,0x00,0x00,0x40,0x40,0x3F,0x00,0x00,0x00,0x00},/*"}",93*/
{ 0x00,0x06,0x01,0x01,0x02,0x02,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"~",94*/
};
//****************************定义说明*******************************************
//数组名称:HanZi[][32]
//数组说明:用户自定中文字库,需要用软件取模
//作    者:
//******************************OLED**********************************************
unsigned char code
HanZi[][32] = {
{0x00,0x80,0x60,0xF8,0x07,0x40,0x20,0x18,0x0F,0x08,0xC8,0x08,0x08,0x28,0x18,0x00,
0x01,0x00,0x00,0xFF,0x00,0x10,0x0C,0x03,0x40,0x80,0x7F,0x00,0x01,0x06,0x18,0x00},/*"你",0*/

{0x10,0x10,0xF0,0x1F,0x10,0xF0,0x00,0x80,0x82,0x82,0xE2,0x92,0x8A,0x86,0x80,0x00,
0x40,0x22,0x15,0x08,0x16,0x61,0x00,0x00,0x40,0x80,0x7F,0x00,0x00,0x00,0x00,0x00},/*"好",1*/

{0x24,0x24,0xA4,0xFE,0xA3,0x22,0x00,0x22,0xCC,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,
0x08,0x06,0x01,0xFF,0x00,0x01,0x04,0x04,0x04,0x04,0x04,0xFF,0x02,0x02,0x02,0x00},/*"科",2*/

{0x10,0x10,0x10,0xFF,0x10,0x90,0x08,0x88,0x88,0x88,0xFF,0x88,0x88,0x88,0x08,0x00,
0x04,0x44,0x82,0x7F,0x01,0x80,0x80,0x40,0x43,0x2C,0x10,0x28,0x46,0x81,0x80,0x00},/*"技",3*/
//这里添加用户字模代码
};

//****************************函数说明*******************************************
//函数名称:delay_ms()
//函数功能:	OLED延时函数
//参数说明:大致延时
//作    者:
//******************************OLED**********************************************
void delay_ms(unsigned int ms) {
    unsigned int a;
    while (ms) {
        a = 100;
        while (a--);
        ms--;
    }
    return;
}

//****************************函数说明*******************************************
//函数名称:OLED_ColorTurn()
//函数功能:	反显函数
//参数说明:阳显示或阴显示。当参数i=0时,为阳显示;当参数i=1时,为阴显示
//						    阳显示:初始化OLED128x64个像素点全灭,但需要显示的像素点亮起
//						    阴显示:初始化OLED128x64个像素点全亮,但需要显示的像素点熄灭
//注    意:在OLED初始化函数OLED_Init()中,初始化设置为OLED_WrCmd(0xA6,0);
//			即阳显默认为正常显示。所以大多数情况下,需要反向显示为阴时,才需要调用本函数
//			并设定i=1,即OLED_ColorTurn(1);
//作    者:
//******************************OLED**********************************************
void OLED_ColorTurn(u8 i) {
    if (i == 0) {
        OLED_WrCmd(0xA6, 0);//阳显
    }
    if (i == 1) {
        OLED_WrCmd(0xA7, 0);//阴显
    }
}

//****************************函数说明*******************************************
//函数名称:OLED_DisplayTurn()
//函数功能:	旋转显示函数
//参数说明:用于将显示的字符旋转180度。
//			当参数i=0时,为正常显示;
//			当参数i=1时,字符旋转180度显示。
//注    意:在OLED初始化函数OLED_Init()中,初始化设置为OLED_WrCmd(0xA1,0);OLED_WrCmd(0xC8,0);
//			即非反转状态为正常显示。如果显示屏的焊接排针更靠近自己,则需要使用反转显示
//			将其显示方向调转180度,需要设定i=1,即OLED_DisplayTurn(1);
//作    者:
//******************************OLED**********************************************
void OLED_DisplayTurn(u8 i) {
    if (i == 0) {
        OLED_WrCmd(0xC8, 0);//正常显示
        OLED_WrCmd(0xA1, 0);
    }
    if (i == 1) {
        OLED_WrCmd(0xC0, 0);//反转显示
        OLED_WrCmd(0xA0, 0);
    }
}

//****************************函数说明*******************************************
//函数名称:OLED_WrCmd()
//函数功能:	OLED命令写入函数
//参数说明:dat为需要写入的命令,cmd为控制位
//			OLED的控制分为写命令和写数据。因为OLED数据和命令线共用一根引脚(DC--Data or Command),
//			我们向OLED发送一串数据时,它需要分清这是命令还是数据,所以我们需要控制好OLED上的DC位。
//			当DC=0,表示写命令,DC=1,表示写数据
//作    者:
//*******************************OLED********************************************
void OLED_WrCmd(u8 dat, u8 cmd) {
    u8 i;
    if (cmd)
        OLED_DC = 1;
    else
        OLED_DC = 0;
    OLED_CS = 0;
    for (i = 0; i < 8; i++) {
        OLED_SCL = 0;
        if (dat & 0x80) {
            OLED_SDA = 1;
        } else {
            OLED_SDA = 0;
        }
        OLED_SCL = 1;
        dat <<= 1;
    }
    OLED_CS = 1;
    OLED_DC = 1;
}

//****************************函数说明*******************************************
//函数名称:OLED_Set_Pos()
//函数功能:	OLED坐标设置函数
//参数说明:用于确定OLED上需要显示字符的坐标
//			x:表示列,范围0~127
//			y:表示行,范围0~63
//作    者:
//*********************************OLED*******************************************
void OLED_Set_Pos(u8 x, u8 y) {
    OLED_WrCmd(0xb0 + y, 0);
    OLED_WrCmd(((x & 0xf0) >> 4) | 0x10, 0);
    OLED_WrCmd((x & 0x0f), 0);
}

//****************************函数说明********************************************
//函数名称:OLED_Display_On()
//函数功能:	开启OLED显示函数。用于开启OLED显示
//作    者:
//******************************OLED**********************************************
void OLED_Display_On(void) {
    OLED_WrCmd(0X8D, 0);  //SET DCDC命令
    OLED_WrCmd(0X14, 0);  //DCDC ON
    OLED_WrCmd(0XAF, 0);  //DISPLAY ON
}

//****************************函数说明********************************************
//函数名称:OLED_Display_Off()
//函数功能:	关闭OLED显示函数。用于关闭OLED显示
//作    者:
//******************************OLED**********************************************
void OLED_Display_Off(void) {
    OLED_WrCmd(0X8D, 0);  //SET DCDC命令
    OLED_WrCmd(0X10, 0);  //DCDC OFF
    OLED_WrCmd(0XAE, 0);  //DISPLAY OFF
}

//****************************函数说明********************************************
//函数名称:OLED_CLR()
//函数功能:	OLED清屏函数。用于清除全屏OLED显示。这里是所有像素点全灭。用阴显的注意了
//作    者:
//******************************OLED**********************************************
void OLED_CLR(void) {
    u8 i, n;
    for (i = 0; i < 8; i++) {
        OLED_WrCmd(0xb0 + i, 0);    //设置页地址(0~7)
        OLED_WrCmd(0x00, 0);      //设置显示位置—列低地址
        OLED_WrCmd(0x10, 0);      //设置显示位置—列高地址
        for (n = 0; n < 128; n++)OLED_WrCmd(0, 1);
    } //更新显示
}

//****************************函数说明********************************************
//函数名称:OLED_ShowChar()
//函数功能:	OLED单字符显示函数
//参数说明:OLED在对应坐标显示一个字符。
//			x:表示列,范围0~127
//			y:表示行,范围0~63
//			sizey:表示字体大小,可以选择6x8(sizey=8)或8x16(sizey=16)大小。
//作    者:
//*********************************OLED*******************************************
void OLED_ShowChar(u8 x, u8 y, u8 chr, u8 sizey) {
    u8 c = 0, sizex = sizey / 2;
    u16 i = 0, size1;
    if (sizey == 8)size1 = 6;
    else size1 = (sizey / 8 + ((sizey % 8) ? 1 : 0)) * (sizey / 2);
    c = chr - ' ';//得到偏移后的值
    OLED_Set_Pos(x, y);
    for (i = 0; i < size1; i++) {
        if (i % sizex == 0 && sizey != 8) OLED_Set_Pos(x, y++);
        if (sizey == 8) OLED_WrCmd(ascii_0806[c][i], 1);//6X8字号
        else if (sizey == 16) OLED_WrCmd(ascii_1608[c][i], 1);//8x16字号
//		else if(sizey==xx) OLED_WrCmd(ascii_xxxx[c][i],1);//用户添加字号
        else return;
    }
}

//m^n函数
u32 oled_pow(u8 m, u8 n) {
    u32 result = 1;
    while (n--)result *= m;
    return result;
}

//****************************函数说明********************************************
//函数名称:OLED_ShowNum()
//函数功能:	OLED显示数字(串)函数
//参数说明:OLED从对应坐标开始显示数字(串)。
//			x:表示列,范围0~127
//			y:表示行,范围0~63
//			num:表示需要显示的数字大小
//			len:表示需要显示的最大数字长度	【注意:假设要显示1234时,len=3,则只会显示“234”】
//					  【注意:假设要显示4时,len=3,则会显示“  4”,注意4前面有两个数字位空出】
//			sizey:表示字体大小,可以选择6x8(sizey=8)或8x16(sizey=16)大小。
//作    者:
//*********************************OLED*******************************************
void OLED_ShowNum(u8 x, u8 y, u32 num, u8 len, u8 sizey) {
    u8 t, temp, m = 0;
    u8 enshow = 0;
    if (sizey == 8)m = 2;
    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 + (sizey / 2 + m) * t, y, ' ', sizey);
                continue;
            } else enshow = 1;
        }
        OLED_ShowChar(x + (sizey / 2 + m) * t, y, temp + '0', sizey);
    }
}

//****************************函数说明********************************************
//函数名称:OLED_ShowString()
//函数功能:	OLED显示字符串函数
//参数说明:OLED从对应坐标开始显示数字(串)。
//			x:表示列,范围0~127
//			y:表示行,范围0~63
//			*chr:指针,指向所需显示的字符串,字符串请使用双引号引起来
//			sizey:表示字体大小,可以选择6x8(sizey=8)或8x16(sizey=16)大小。
//作    者:
//*********************************OLED*******************************************
void OLED_ShowString(u8 x, u8 y, u8 *chr, u8 sizey) {
    u8 j = 0;
    while (chr[j] != '\0') {
        OLED_ShowChar(x, y, chr[j++], sizey);
        if (sizey == 8)x += 6;
        else x += sizey / 2;
    }
}



//*********************************OLED*******************************************
void OLED_ShowChinese(u8 x, u8 y, u8 no, u8 sizey) {
    u16 i, size1 = (sizey / 8 + ((sizey % 8) ? 1 : 0)) * sizey;
    for (i = 0; i < size1; i++) {
        if (i % sizey == 0) OLED_Set_Pos(x, y++);
        if (sizey == 16) OLED_WrCmd(HanZi[no][i], 1);//16x16字号
//		else if(sizey==xx) OLED_WrCmd(xxx[c][i],1);//用户添加字号
        else return;
    }
}


//****************************函数说明********************************************
//函数名称:OLED_DrawBMP()
//函数功能:	OLED显示图片函数
//参数说明:OLED从对应坐标开始显示设定长宽的图片。
//			x:表示列,范围0~127
//			y:表示行,范围0~63
//			sizex:长度,最长128
//			sizey:宽度,最宽64
//作    者:
//*********************************OLED*******************************************
void OLED_DrawBMP(u8 x, u8 y, u8 sizex, u8 sizey, u8 BMP[]) {
    u16 j = 0;
    u8 i, m;
    sizey = sizey / 8 + ((sizey % 8) ? 1 : 0);
    for (i = 0; i < sizey; i++) {
        OLED_Set_Pos(x, i + y);
        for (m = 0; m < sizex; m++) {
            OLED_WrCmd(BMP[j++], 1);
        }
    }
}



//****************************函数说明********************************************
//函数名称:OLED_Init()
//函数功能:	OLED初始化函数
//说    明:用于初始化OLED

//作    者:
//*********************************OLED*******************************************
void OLED_Init(void) {
    OLED_RES = 0;
    delay_ms(200);
    OLED_RES = 1;

    OLED_WrCmd(0xAE, 0);//--turn off oled panel-关OLED屏幕
    OLED_WrCmd(0x00, 0);//---set low column address-设置低位地址
    OLED_WrCmd(0x10, 0);//---set high column address-设置高位地址
    OLED_WrCmd(0x40,
               0);//--set start line address  Set Mapping RAM Display Start Line (0x00~0x3F)-设置起始行地址和映射RAM显示起始行(0x00~0x3F)
    OLED_WrCmd(0x81, 0);//--set contrast control register-设置对比控制寄存器
    OLED_WrCmd(0xCF, 0);// Set SEG Output Current Brightness-设置输出电流
    OLED_WrCmd(0xA1, 0);//--Set SEG/Column Mapping-设置SEG/列映射     	 0xa0左右反置 0xa1正常
    OLED_WrCmd(0xC8, 0);//Set COM/Row Scan Direction-设置COM/行扫描方向   0xc0上下反置 0xc8正常
    OLED_WrCmd(0xA6, 0);//--set normal display-设置正常显示(阳显)
    OLED_WrCmd(0xA8, 0);//--set multiplex ratio(1 to 64) 设置多路复用比率
    OLED_WrCmd(0x3f, 0);//--1/64 duty
    OLED_WrCmd(0xD3, 0);//-set display offset	Shift Mapping RAM Counter (0x00~0x3F)-设置显示偏移移位映射RAM计数器(0OLED~0x3F)
    OLED_WrCmd(0x00, 0);//-not offset-不偏移
    OLED_WrCmd(0xd5, 0);//--set display clock divide ratio/oscillator frequency-设置显示时钟分频比/振荡器频率
    OLED_WrCmd(0x80, 0);//--set divide ratio, Set Clock as 100 Frames/Sec-设置分频比,将时钟设置为100帧/秒
    OLED_WrCmd(0xD9, 0);//--set pre-charge period-设置预充电周期
    OLED_WrCmd(0xF1, 0);//Set Pre-Charge as 15 Clocks & Discharge as 1 Clock	   将预充电设置为15个时钟,放电为1个时钟
    OLED_WrCmd(0xDA, 0);//--set com pins hardware configuration-设置com引脚硬件配置
    OLED_WrCmd(0x12, 0);
    OLED_WrCmd(0xDB, 0);//--set vcomh
    OLED_WrCmd(0x40, 0);//Set VCOM Deselect Level
    OLED_WrCmd(0x20, 0);//-Set Page Addressing Mode (0x00/0x01/0x02)-设置页面地址模式
    OLED_WrCmd(0x02, 0);//
    OLED_WrCmd(0x8D, 0);//--set Charge Pump enable/disable
    OLED_WrCmd(0x14, 0);//--set(0x10) disable
    OLED_WrCmd(0xA4, 0);// Disable Entire Display On (0xa4/0xa5)
    OLED_WrCmd(0xA6, 0);// Disable Inverse Display On (0xa6/a7)
    OLED_CLR();           //清屏
    OLED_WrCmd(0xAF, 0); /*display ON*///打开OLED屏幕
}





oled.h

#ifndef __OLED_H
#define __OLED_H

#include "STC89C5xRC.h"

#define  u8 unsigned char
#define  u16 unsigned int
#define  u32 unsigned int	 //注意,此处定义和u16一样用于节省代码占用空间
//如果OLED_ShowNum()函数需要装下更大的数,则请改此处的数据定义类型

/*口袋板OLED电路引脚定义*/
sbit OLED_SCL=P4^3;//SCL-D0
sbit OLED_SDA=P4^1;//SDA-D1
sbit OLED_RES =P3^6;//RES
sbit OLED_DC =P3^7;//DC
sbit OLED_CS=P2^7; //CS


/*Proteus仿真引脚定义*/
//sbit OLED_SCL=P1^4;//SCL-D0
//sbit OLED_SDA=P1^3;//SDA-D1
//sbit OLED_RES =P1^2;//RES
//sbit OLED_DC =P1^1;//DC
//sbit OLED_CS=P1^0; //CS




//OLED控制用函数
void delay_ms(unsigned int ms);
void OLED_ColorTurn(u8 i);
void OLED_DisplayTurn(u8 i);
void OLED_WrCmd(u8 dat,u8 cmd);
void OLED_Set_Pos(u8 x, u8 y);
void OLED_Display_On(void);
void OLED_Display_Off(void);
void OLED_CLR(void);
void OLED_ShowChar(u8 x,u8 y,u8 chr,u8 sizey);
u32 oled_pow(u8 m,u8 n);
void OLED_ShowNum(u8 x,u8 y,u32 num,u8 len,u8 sizey);
void OLED_ShowString(u8 x,u8 y,u8 *chr,u8 sizey);
void OLED_ShowChinese(u8 x,u8 y,u8 no,u8 sizey);
void OLED_DrawBMP(u8 x,u8 y,u8 sizex, u8 sizey,u8 BMP[]);
void OLED_Init(void);

#endif





main.c


#include "STC89C5xRC.h"	 //STC89C52RC的头文件
#include "OLED.h"		 //OLED显示头文件
//#include "Codedat.h"	 //图片取模头文件。将图片取模后,放入该头文件用于显示

sbit beep = P2^4;		 //蜂鸣器引脚
/*******************************************************************************
* 函 数 名       : main
* 函数功能		 : 主函数
* 输    入       : 无
* 输    出    	 : 无
*******************************************************************************/
int main(void)
{
    beep=0;			//蜂鸣器不响
    OLED_Init();	//初始化OLED
    OLED_ShowChinese(31,0,0,16);//“晨”。从第0+1行,第31+1列开始,显示对应位置号0的汉字,字体大小16x16
    OLED_ShowChinese(47,0,1,16);//“启”。从第1+1行,第47+1列开始,显示对应位置号1的汉字,字体大小16x16
    OLED_ShowChinese(63,0,2,16);//“科”
    OLED_ShowChinese(79,0,3,16);//“技”

    OLED_ShowString(0,2,"asd1234",16);

    while(1)	//while中不进行任何显示显示操作更新,那么OLED就会一直显示上面的“科技” ,不会刷新。
    {

    }
}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/842620.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

【gavh39芯片用什么代替-AH8652】

问&#xff1a;gavh39芯片用什么代替&#xff1f; 答&#xff1a;gavh39是一颗用于交流220v转5v输出的芯片&#xff0c;它的拼对拼代替型号为AH8652 AH8652是一款非隔离电源管理芯片&#xff0c;它用于将交流电压转换为直流电压输出。可以将输入的220V交流电转换为输出的5V直流…

Harbor企业镜像仓库部署(本地)

简述&#xff1a; Docker 官方镜像仓库是用于管理公共镜像的地方&#xff0c;大家可以在上面找到想要的镜像&#xff0c;也可以把自己的镜像推送上去。但是有时候服务器无法访问互联网&#xff0c;或者不希望将自己的镜像放到互联网上&#xff0c;那么就需要用到 Docker Regis…

Docker desktop使用配置

1. 下载安装 https://www.docker.com/ 官网下载并安装doker desktop 2. 配置镜像 &#xff08;1&#xff09;首先去阿里云网站上进行注册&#xff1a;https://cr.console.aliyun.com/cn-hangzhou/instances/mirrors &#xff08;2&#xff09;注册完成后搜索&#xff1a;容…

用 docker 创建 jmeter 容器,能做性能测试?

我们都知道&#xff0c;jmeter 可以做接口测试&#xff0c;也可以用于性能测试&#xff0c;现在企业中性能测试也大多使用 jmeter。docker 是最近这些年流行起来的容器部署工具&#xff0c;可以创建一个容器&#xff0c;然后把项目放到容器中&#xff0c;就可以构建出一个独立的…

独立站私域怎么玩?浅浅了解一下吧!

当你是一个跨境电商独立站的卖家&#xff0c;你的工作有三个主要焦点&#xff1a;充分利用流量、提升用户转化率和降低用户的总体成本。 然而&#xff0c;除了利用广告以外&#xff0c;是否有更多的策略可以帮助你接触到用户&#xff0c;同时降低吸引新用户的成本呢&#xff1…

LeetCode150道面试经典题-合并两个有序数组(简单)

合并两个有序数组 题目&#xff1a; 给你两个按 非递减顺序 排列的整数数组 nums1 和 nums2&#xff0c;另有两个整数 m 和 n &#xff0c;分别表示 nums1 和 nums2 中的元素数目。 请你 合并 nums2 到 nums1 中&#xff0c;使合并后的数组同样按 非递减顺序 排列。 注意&a…

每天一道leetcode:剑指 Offer 11. 旋转数组的最小数字(适合初学者)

今日份题目&#xff1a; 把一个数组最开始的若干个元素搬到数组的末尾&#xff0c;我们称之为数组的旋转。 给你一个可能存在 重复 元素值的数组 numbers &#xff0c;它原来是一个升序排列的数组&#xff0c;并按上述情形进行了一次旋转。请返回旋转数组的最小元素。例如&am…

前端页面性能优化,性能测试算法优化,MeterSphere开源持续测试平台v2.10.5 LTS版本发布

2023年8月7日&#xff0c;MeterSphere一站式开源持续测试平台正式发布v2.10.5 LTS版本。自2023年5月发布v2.10 LTS版本后&#xff0c;MeterSphere开源项目组坚持每两周发布小版本&#xff0c;持续进行问题的修复更新&#xff0c;并针对部分功能进行优化。 本次发布的MeterSphe…

【深度学习】采用自动编码器生成新图像

一、说明 你知道什么会很酷吗&#xff1f;如果我们不需要所有这些标记的数据来训练 我们的模型。我的意思是标记和分类数据需要太多的工作。 不幸的是&#xff0c;大多数现有模型从支持向量机到卷积神经网&#xff0c;没有它们&#xff0c;卷积神经网络就无法训练。无监督学习不…

7月27日上课内容 Firewalld防火墙

iptables 软件防火墙 包过滤防火墙firewalld 防火墙包过滤防火墙。网络层centos7自带的默认的防火墙。取代iptables firewalld两种配置模式 运行时配置 永久配置 iptables是静态防火墙 firewalld是动态防火墙。 firewalld安装区域来进行划分: 9个区域 moba里面要打开防火墙 fi…

智慧工厂解决方案[60页PPT]

导读&#xff1a;原文《》&#xff08;获取来源见文尾&#xff09;&#xff0c;本文精选其中精华及架构部分&#xff0c;逻辑清晰、内容完整&#xff0c;为快速形成售前方案提供参考。 完整版领取方式 完整版领取方式&#xff1a; 如需获取完整的电子版内容参考学习 您可以关注…

OpenCv.js(图像处理)学习历程

opencv.js官网 4.5.0文档 以下内容整理于opencv.js官网。 简介 OpenCV由Gary Bradski于1999年在英特尔创建。第一次发行是在2000年。OpenCV支持c、Python、Java等多种编程语言&#xff0c;支持Windows、Linux、Os X、Android、iOS等平台。基于CUDA和OpenCL的高速GPU操作接口也…

【Seata1.5.2 下载 配置 整合 踩坑 测试】—— 含各种踩坑记录(详细版)

&#x1f4a7; S e a t a 1.5.2 ——含各种踩坑记录 \color{#FF1493}{Seata1.5.2 —— 含各种踩坑记录} Seata1.5.2——含各种踩坑记录&#x1f4a7; &#x1f337; 仰望天空&#xff0c;妳我亦是行人.✨ &#x1f984; 个人主页——微风撞见云的博客&#x1f390; &…

KM生存分析

这个系列从2022年开始&#xff0c;一直更新使用R语言分析数据及绘制精美图形。小杜的生信笔记主要分享小杜学习日常&#xff01;如果&#xff0c;你对此感兴趣可以加入该系列的学习。 最终图形 本期图形代码 ##KM生存分析 ##20230807##导入包 library(survival) library(surv…

【深度学习】StyleGANv2 2019 论文,Analyzing and Improving the Image Quality of StyleGAN

StyleGAN论文&#xff1a; 《A Style-Based Generator Architecture for Generative Adversarial Networks》 论文&#xff1a;https://arxiv.org/abs/1812.04948 代码&#xff1a; https://github.com/NVlabs/stylegan StyleGANv2论文&#xff1a; 《Analyzing and Improving …

Linux葵花宝典-无需自宫版

1. Linux简介 1.1 什么是Linux Linux&#xff0c;全称GNU/Linux&#xff0c;是一种免费使用和自由传播的类UNIX操作系统&#xff0c;其内核由Linus Torvalds于1991年10月5日首次发布&#xff0c;它主要受到Minix和Unix思想的启发&#xff0c;是一个基于POSIX的多用户、多任务、…

【知网检索稳定】第八届现代管理和教育技术国际学术会议(MMET2023)

第八届现代管理和教育技术国际学术会议&#xff08;MMET 2023&#xff09;将于2023年09月22-24日在中国上海召开。会议由四川大学、泰国程逸皇家大学、泰国程逸皇家大学中泰同文同学国际交流中心主办、乐山师范学院、四川职业技术学院、AEIC学术交流中心协办。会议主要围绕会议…

边写代码边学习之numpy

1. numpy.matmul() 用法 matmul() 用于计算两个数组的矩阵乘积。示例如下 def matmul_test():array1 np.array([[[1.0, 3], [1, 1], [2, 3]]])array2 np.array([[2, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0],[1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0], ])result np.matmul(array1, …

C语言有关文件的操作

打开文件与关闭文件 在编写代码时&#xff0c;我有一个习惯是“保证一一对应”。 写下代码fopen()之后&#xff0c;还没有写对文件进行增删查改等操作的代码&#xff0c;先立刻写上fclose()&#xff0c;避免忘记关闭FILE* fd的情况。 不关闭fd&#xff0c;在fopen()次数较少的…

linux初始命令

如果没有ip地址&#xff0c;配置&#xff1a; 查看当前时间&#xff1a; 指定格式查看时间&#xff1a; 修改时间&#xff1a; 查看时区&#xff1a; 设置时区&#xff1a; 查看当前工作目录&#xff1a; root的家目录就是根&#xff0c;普通用户家目录是home