new project

Signed-off-by: kevin <wuwenfengmi@outlook.com>
This commit is contained in:
kevin
2023-05-15 15:24:33 +08:00
parent cc0f90e2d7
commit 83a03359d4
11 changed files with 115437 additions and 0 deletions
+42
View File
@@ -0,0 +1,42 @@
#include "Arduino.h"
#include "src/oled12864.h"
#define U_N 14
#define U_P 27
#define V_N 26
#define V_P 25
#define W_N 33
#define W_P 32
void setup() {
// put your setup code here, to run once:
pinMode(U_N, OUTPUT);
pinMode(U_P, OUTPUT);
pinMode(V_N, OUTPUT);
pinMode(V_P, OUTPUT);
pinMode(W_N, OUTPUT);
pinMode(W_P, OUTPUT);
digitalWrite(U_N, 1);
digitalWrite(U_P, 0);
digitalWrite(V_N, 1);
digitalWrite(V_P, 0);
digitalWrite(W_N, 1);
digitalWrite(W_P, 0);
Serial.begin(115200);
Wire.begin();
OLED_Init();
}
void loop() {
// put your main code here, to run repeatedly:
OLED_Str(0,0,16,"test",0,1);
OLED_Cache_to_hardware();
//OLED_Init();
}
+294
View File
@@ -0,0 +1,294 @@
const char asc2_0805[95][8]={
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x20,0x20,0x20,0x20,0x20,0x00,0x20,0x00,
0x50,0x50,0x50,0x00,0x00,0x00,0x00,0x00,
0x50,0x50,0xF8,0x50,0xF8,0x50,0x50,0x00,
0x20,0x78,0xC0,0x70,0x28,0xF0,0x20,0x00,
0xC0,0xC8,0x10,0x20,0x40,0x98,0x18,0x00,
0x40,0xA0,0xA0,0x40,0xA8,0x90,0x68,0x00,
0x30,0x20,0x40,0x00,0x00,0x00,0x00,0x00,
0x10,0x20,0x40,0x40,0x40,0x20,0x10,0x00,
0x40,0x20,0x10,0x10,0x10,0x20,0x40,0x00,
0x20,0xA8,0x70,0x20,0x70,0xA8,0x20,0x00,
0x20,0x20,0x20,0xF8,0x20,0x20,0x20,0x00,
0x00,0x00,0x00,0x00,0x60,0x40,0x80,0x00,
0x00,0x00,0x00,0xF8,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x60,0x60,0x00,
0x00,0x08,0x10,0x20,0x40,0x80,0x00,0x00,
0x70,0x88,0x98,0xA8,0xC8,0x88,0x70,0x00,
0x20,0x60,0x20,0x20,0x20,0x20,0x70,0x00,
0x70,0x88,0x08,0x30,0x40,0x80,0xF8,0x00,
0xF8,0x08,0x10,0x30,0x08,0x88,0x70,0x00,
0x10,0x30,0x50,0x90,0xF8,0x10,0x10,0x00,
0xF8,0x80,0xF0,0x08,0x08,0x88,0x70,0x00,
0x38,0x40,0x80,0xF0,0x88,0x88,0x70,0x00,
0xF8,0x08,0x10,0x20,0x40,0x40,0x40,0x00,
0x70,0x88,0x88,0x70,0x88,0x88,0x70,0x00,
0x70,0x88,0x88,0x78,0x08,0x10,0xE0,0x00,
0x00,0x60,0x60,0x00,0x60,0x60,0x00,0x00,
0x00,0x60,0x60,0x00,0x60,0x60,0x80,0x00,
0x10,0x20,0x40,0x80,0x40,0x20,0x10,0x00,
0x00,0x00,0xF8,0x00,0xF8,0x00,0x00,0x00,
0x40,0x20,0x10,0x08,0x10,0x20,0x40,0x00,
0x70,0x88,0x10,0x20,0x20,0x00,0x20,0x00,
0x70,0x88,0xB8,0xA8,0xB8,0x80,0x78,0x00,
0x20,0x50,0x88,0x88,0xF8,0x88,0x88,0x00,
0xF0,0x88,0x88,0xF0,0x88,0x88,0xF0,0x00,
0x70,0x88,0x80,0x80,0x80,0x88,0x70,0x00,
0xF0,0x88,0x88,0x88,0x88,0x88,0xF0,0x00,
0xF8,0x80,0x80,0xF0,0x80,0x80,0xF8,0x00,
0xF8,0x80,0x80,0xF0,0x80,0x80,0x80,0x00,
0x70,0x88,0x80,0x80,0xB8,0x88,0x78,0x00,
0x88,0x88,0x88,0xF8,0x88,0x88,0x88,0x00,
0x70,0x20,0x20,0x20,0x20,0x20,0x70,0x00,
0x38,0x10,0x10,0x10,0x10,0x90,0x60,0x00,
0x88,0x90,0xA0,0xC0,0xA0,0x90,0x88,0x00,
0x80,0x80,0x80,0x80,0x80,0x80,0xF8,0x00,
0x88,0xD8,0xA8,0xA8,0x88,0x88,0x88,0x00,
0x88,0x88,0xC8,0xA8,0x98,0x88,0x88,0x00,
0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x00,
0xF0,0x88,0x88,0xF0,0x80,0x80,0x80,0x00,
0x70,0x88,0x88,0x88,0xA8,0x90,0x68,0x00,
0xF0,0x88,0x88,0xF0,0xA0,0x90,0x88,0x00,
0x70,0x88,0x80,0x70,0x08,0x88,0x70,0x00,
0xF8,0x20,0x20,0x20,0x20,0x20,0x20,0x00,
0x88,0x88,0x88,0x88,0x88,0x88,0x70,0x00,
0x88,0x88,0x88,0x88,0x88,0x50,0x20,0x00,
0x88,0x88,0x88,0xA8,0xA8,0xD8,0x88,0x00,
0x88,0x88,0x50,0x20,0x50,0x88,0x88,0x00,
0x88,0x88,0x50,0x20,0x20,0x20,0x20,0x00,
0xF8,0x08,0x10,0x20,0x40,0x80,0xF8,0x00,
0xF0,0xC0,0xC0,0xC0,0xC0,0xC0,0xF0,0x00,
0x00,0x80,0x40,0x20,0x10,0x08,0x00,0x00,
0x78,0x18,0x18,0x18,0x18,0x18,0x78,0x00,
0x20,0x70,0xA8,0x20,0x20,0x20,0x20,0x00,
0x00,0x20,0x40,0xF8,0x40,0x20,0x00,0x00,
0x20,0x10,0x08,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0xE0,0x10,0x70,0x90,0x68,0x00,
0x80,0x80,0xB0,0xC8,0x88,0xC8,0xB0,0x00,
0x00,0x00,0x70,0x88,0x80,0x80,0x70,0x00,
0x08,0x08,0x68,0x98,0x88,0x98,0x68,0x00,
0x00,0x00,0x70,0x88,0xF0,0x80,0x70,0x00,
0x30,0x48,0x40,0xF0,0x40,0x40,0x40,0x00,
0x00,0x00,0x70,0x88,0x88,0x78,0x08,0xF0,
0x80,0x80,0xB0,0xC8,0x88,0x88,0x88,0x00,
0x20,0x00,0x00,0x20,0x20,0x20,0x20,0x00,
0x10,0x00,0x00,0x30,0x10,0x10,0x10,0x60,
0x80,0x80,0x90,0xA0,0xC0,0xA0,0x98,0x00,
0x60,0x20,0x20,0x20,0x20,0x20,0x70,0x00,
0x00,0x00,0x50,0xA8,0xA8,0xA8,0xA8,0x00,
0x00,0x00,0xB0,0x48,0x48,0x48,0x48,0x00,
0x00,0x00,0x70,0x88,0x88,0x88,0x70,0x00,
0x00,0x00,0xF0,0x88,0x88,0xF0,0x80,0x80,
0x00,0x00,0x78,0x88,0x88,0x78,0x08,0x08,
0x00,0x00,0xB0,0x48,0x40,0x40,0x40,0x00,
0x00,0x00,0x78,0x80,0x70,0x08,0xF0,0x00,
0x40,0x40,0xF8,0x40,0x40,0x48,0x30,0x00,
0x00,0x00,0x90,0x90,0x90,0x90,0x68,0x00,
0x00,0x00,0x88,0x88,0x88,0x50,0x20,0x00,
0x00,0x00,0xA8,0xA8,0xA8,0xA8,0x50,0x00,
0x00,0x00,0x88,0x50,0x20,0x50,0x88,0x00,
0x00,0x00,0x88,0x88,0x98,0x68,0x08,0xF0,
0x00,0x00,0xF8,0x10,0x20,0x40,0xF8,0x00,
0x20,0x40,0x40,0x80,0x40,0x40,0x20,0x00,
0x20,0x20,0x20,0x00,0x20,0x20,0x20,0x00,
0x20,0x10,0x10,0x08,0x10,0x10,0x20,0x00,
0x00,0x00,0x40,0xA8,0x10,0x00,0x00,0x00
};
const char asc2_1206[95][12]={
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x10,0x10,0x10,0x10,0x10,0x00,0x00,0x10,0x00,0x00,0x00,
0x00,0x6C,0x48,0x48,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x14,0x14,0x28,0x7C,0x28,0x7C,0x28,0x50,0x50,0x00,0x00,
0x00,0x10,0x38,0x40,0x40,0x38,0x48,0x70,0x10,0x10,0x00,0x00,
0x00,0x20,0x50,0x20,0x0C,0x70,0x08,0x14,0x08,0x00,0x00,0x00,
0x00,0x00,0x00,0x18,0x20,0x20,0x54,0x48,0x34,0x00,0x00,0x00,
0x00,0x10,0x10,0x10,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x08,0x08,0x10,0x10,0x10,0x10,0x10,0x10,0x08,0x08,0x00,
0x00,0x20,0x20,0x10,0x10,0x10,0x10,0x10,0x10,0x20,0x20,0x00,
0x00,0x10,0x7C,0x10,0x28,0x28,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x10,0x10,0x10,0xFC,0x10,0x10,0x10,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x10,0x30,0x20,0x00,
0x00,0x00,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00,
0x00,0x04,0x04,0x08,0x08,0x10,0x10,0x20,0x20,0x40,0x00,0x00,
0x00,0x38,0x44,0x44,0x44,0x44,0x44,0x44,0x38,0x00,0x00,0x00,
0x00,0x30,0x10,0x10,0x10,0x10,0x10,0x10,0x7C,0x00,0x00,0x00,
0x00,0x38,0x44,0x04,0x08,0x10,0x20,0x44,0x7C,0x00,0x00,0x00,
0x00,0x38,0x44,0x04,0x18,0x04,0x04,0x44,0x38,0x00,0x00,0x00,
0x00,0x0C,0x14,0x14,0x24,0x44,0x7C,0x04,0x0C,0x00,0x00,0x00,
0x00,0x3C,0x20,0x20,0x38,0x04,0x04,0x44,0x38,0x00,0x00,0x00,
0x00,0x1C,0x20,0x40,0x78,0x44,0x44,0x44,0x38,0x00,0x00,0x00,
0x00,0x7C,0x44,0x04,0x08,0x08,0x08,0x10,0x10,0x00,0x00,0x00,
0x00,0x38,0x44,0x44,0x38,0x44,0x44,0x44,0x38,0x00,0x00,0x00,
0x00,0x38,0x44,0x44,0x44,0x3C,0x04,0x08,0x70,0x00,0x00,0x00,
0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x30,0x30,0x00,0x00,0x00,
0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x18,0x30,0x20,0x00,0x00,
0x00,0x00,0x0C,0x10,0x60,0x80,0x60,0x10,0x0C,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x7C,0x00,0x7C,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0xC0,0x20,0x18,0x04,0x18,0x20,0xC0,0x00,0x00,0x00,
0x00,0x00,0x18,0x24,0x04,0x08,0x10,0x00,0x30,0x00,0x00,0x00,
0x38,0x44,0x44,0x4C,0x54,0x54,0x4C,0x40,0x44,0x38,0x00,0x00,
0x00,0x30,0x10,0x28,0x28,0x28,0x7C,0x44,0xEC,0x00,0x00,0x00,
0x00,0xF8,0x44,0x44,0x78,0x44,0x44,0x44,0xF8,0x00,0x00,0x00,
0x00,0x3C,0x44,0x40,0x40,0x40,0x40,0x44,0x38,0x00,0x00,0x00,
0x00,0xF0,0x48,0x44,0x44,0x44,0x44,0x48,0xF0,0x00,0x00,0x00,
0x00,0xFC,0x44,0x50,0x70,0x50,0x40,0x44,0xFC,0x00,0x00,0x00,
0x00,0x7C,0x20,0x28,0x38,0x28,0x20,0x20,0x70,0x00,0x00,0x00,
0x00,0x3C,0x44,0x40,0x40,0x4C,0x44,0x44,0x38,0x00,0x00,0x00,
0x00,0xEC,0x44,0x44,0x7C,0x44,0x44,0x44,0xEC,0x00,0x00,0x00,
0x00,0x7C,0x10,0x10,0x10,0x10,0x10,0x10,0x7C,0x00,0x00,0x00,
0x00,0x3C,0x08,0x08,0x08,0x48,0x48,0x48,0x30,0x00,0x00,0x00,
0x00,0xEC,0x44,0x48,0x50,0x70,0x48,0x44,0xE4,0x00,0x00,0x00,
0x00,0x70,0x20,0x20,0x20,0x20,0x24,0x24,0x7C,0x00,0x00,0x00,
0x00,0xEC,0x6C,0x6C,0x54,0x54,0x44,0x44,0xEC,0x00,0x00,0x00,
0x00,0xEC,0x64,0x64,0x54,0x54,0x54,0x4C,0xEC,0x00,0x00,0x00,
0x00,0x38,0x44,0x44,0x44,0x44,0x44,0x44,0x38,0x00,0x00,0x00,
0x00,0x78,0x24,0x24,0x24,0x38,0x20,0x20,0x70,0x00,0x00,0x00,
0x00,0x38,0x44,0x44,0x44,0x44,0x44,0x44,0x38,0x1C,0x00,0x00,
0x00,0xF8,0x44,0x44,0x44,0x78,0x48,0x44,0xE0,0x00,0x00,0x00,
0x00,0x34,0x4C,0x40,0x38,0x04,0x04,0x64,0x58,0x00,0x00,0x00,
0x00,0xFC,0x90,0x10,0x10,0x10,0x10,0x10,0x38,0x00,0x00,0x00,
0x00,0xEC,0x44,0x44,0x44,0x44,0x44,0x44,0x38,0x00,0x00,0x00,
0x00,0xEC,0x44,0x44,0x28,0x28,0x28,0x10,0x10,0x00,0x00,0x00,
0x00,0xEC,0x44,0x44,0x54,0x54,0x54,0x54,0x28,0x00,0x00,0x00,
0x00,0xC4,0x44,0x28,0x10,0x10,0x28,0x44,0xC4,0x00,0x00,0x00,
0x00,0xEC,0x44,0x28,0x28,0x10,0x10,0x10,0x38,0x00,0x00,0x00,
0x00,0x7C,0x44,0x08,0x10,0x10,0x20,0x44,0x7C,0x00,0x00,0x00,
0x00,0x38,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x38,0x00,
0x00,0x40,0x20,0x20,0x20,0x10,0x10,0x08,0x08,0x08,0x00,0x00,
0x00,0x38,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x38,0x00,
0x00,0x10,0x10,0x28,0x44,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,
0x00,0x10,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x38,0x44,0x3C,0x44,0x44,0x3C,0x00,0x00,0x00,
0x00,0xC0,0x40,0x58,0x64,0x44,0x44,0x44,0xF8,0x00,0x00,0x00,
0x00,0x00,0x00,0x3C,0x44,0x40,0x40,0x44,0x38,0x00,0x00,0x00,
0x00,0x0C,0x04,0x34,0x4C,0x44,0x44,0x44,0x3C,0x00,0x00,0x00,
0x00,0x00,0x00,0x38,0x44,0x7C,0x40,0x40,0x3C,0x00,0x00,0x00,
0x00,0x1C,0x20,0x7C,0x20,0x20,0x20,0x20,0x7C,0x00,0x00,0x00,
0x00,0x00,0x00,0x34,0x4C,0x44,0x44,0x44,0x3C,0x04,0x38,0x00,
0x00,0xC0,0x40,0x58,0x64,0x44,0x44,0x44,0xEC,0x00,0x00,0x00,
0x00,0x10,0x00,0x70,0x10,0x10,0x10,0x10,0x7C,0x00,0x00,0x00,
0x00,0x10,0x00,0x78,0x08,0x08,0x08,0x08,0x08,0x08,0x70,0x00,
0x00,0xC0,0x40,0x5C,0x48,0x70,0x50,0x48,0xDC,0x00,0x00,0x00,
0x00,0x30,0x10,0x10,0x10,0x10,0x10,0x10,0x7C,0x00,0x00,0x00,
0x00,0x00,0x00,0xE8,0x54,0x54,0x54,0x54,0xFC,0x00,0x00,0x00,
0x00,0x00,0x00,0xD8,0x64,0x44,0x44,0x44,0xEC,0x00,0x00,0x00,
0x00,0x00,0x00,0x38,0x44,0x44,0x44,0x44,0x38,0x00,0x00,0x00,
0x00,0x00,0x00,0xD8,0x64,0x44,0x44,0x44,0x78,0x40,0xE0,0x00,
0x00,0x00,0x00,0x34,0x4C,0x44,0x44,0x44,0x3C,0x04,0x0C,0x00,
0x00,0x00,0x00,0x6C,0x30,0x20,0x20,0x20,0x7C,0x00,0x00,0x00,
0x00,0x00,0x00,0x3C,0x44,0x38,0x04,0x44,0x78,0x00,0x00,0x00,
0x00,0x00,0x20,0x7C,0x20,0x20,0x20,0x20,0x1C,0x00,0x00,0x00,
0x00,0x00,0x00,0xCC,0x44,0x44,0x44,0x4C,0x34,0x00,0x00,0x00,
0x00,0x00,0x00,0xEC,0x44,0x44,0x28,0x28,0x10,0x00,0x00,0x00,
0x00,0x00,0x00,0xEC,0x44,0x54,0x54,0x54,0x28,0x00,0x00,0x00,
0x00,0x00,0x00,0xCC,0x48,0x30,0x30,0x48,0xCC,0x00,0x00,0x00,
0x00,0x00,0x00,0xEC,0x44,0x24,0x28,0x18,0x10,0x10,0x78,0x00,
0x00,0x00,0x00,0x7C,0x48,0x10,0x20,0x44,0x7C,0x00,0x00,0x00,
0x00,0x08,0x10,0x10,0x10,0x10,0x20,0x10,0x10,0x10,0x08,0x00,
0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x00,
0x00,0x20,0x10,0x10,0x10,0x10,0x08,0x10,0x10,0x10,0x20,0x00,
0x00,0x00,0x00,0x00,0x00,0x24,0x58,0x00,0x00,0x00,0x00,0x00
};
const char asc2_1608[95][16]={
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x18,0x3C,0x3C,0x3C,0x18,0x18,0x18,0x00,0x18,0x18,0x00,0x00,0x00,
0x00,0x66,0x66,0x66,0x66,0x24,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x6C,0x6C,0xFE,0x6C,0x6C,0x6C,0xFE,0x6C,0x6C,0x00,0x00,0x00,
0x18,0x18,0x18,0x7C,0xC6,0xC2,0xC0,0x7C,0x06,0x86,0xC6,0x7C,0x18,0x18,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xC2,0xC6,0x0C,0x18,0x30,0x60,0xC6,0x86,0x00,0x00,0x00,
0x00,0x00,0x00,0x38,0x6C,0x6C,0x38,0x76,0xDC,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,
0x00,0x30,0x30,0x30,0x30,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x0C,0x18,0x30,0x30,0x30,0x30,0x30,0x30,0x18,0x0C,0x00,0x00,0x00,
0x00,0x00,0x00,0x30,0x18,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x18,0x30,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x66,0x3C,0xFF,0x3C,0x66,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x7E,0x18,0x18,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x18,0x30,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x02,0x06,0x0C,0x18,0x30,0x60,0xC0,0x80,0x00,0x00,0x00,
0x00,0x00,0x00,0x7C,0xC6,0xC6,0xCE,0xD6,0xD6,0xE6,0xC6,0xC6,0x7C,0x00,0x00,0x00,
0x00,0x00,0x00,0x18,0x38,0x78,0x18,0x18,0x18,0x18,0x18,0x18,0x7E,0x00,0x00,0x00,
0x00,0x00,0x00,0x7C,0xC6,0x06,0x0C,0x18,0x30,0x60,0xC0,0xC6,0xFE,0x00,0x00,0x00,
0x00,0x00,0x00,0x7C,0xC6,0x06,0x06,0x3C,0x06,0x06,0x06,0xC6,0x7C,0x00,0x00,0x00,
0x00,0x00,0x00,0x0C,0x1C,0x3C,0x6C,0xCC,0xFE,0x0C,0x0C,0x0C,0x1E,0x00,0x00,0x00,
0x00,0x00,0x00,0xFE,0xC0,0xC0,0xC0,0xFC,0x0E,0x06,0x06,0xC6,0x7C,0x00,0x00,0x00,
0x00,0x00,0x00,0x38,0x60,0xC0,0xC0,0xFC,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,
0x00,0x00,0x00,0xFE,0xC6,0x06,0x06,0x0C,0x18,0x30,0x30,0x30,0x30,0x00,0x00,0x00,
0x00,0x00,0x00,0x7C,0xC6,0xC6,0xC6,0x7C,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,
0x00,0x00,0x00,0x7C,0xC6,0xC6,0xC6,0x7E,0x06,0x06,0x06,0x0C,0x78,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x18,0x18,0x30,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x06,0x0C,0x18,0x30,0x60,0x30,0x18,0x0C,0x06,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x60,0x30,0x18,0x0C,0x06,0x0C,0x18,0x30,0x60,0x00,0x00,0x00,
0x00,0x00,0x00,0x7C,0xC6,0xC6,0x0C,0x18,0x18,0x18,0x00,0x18,0x18,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x7C,0xC6,0xC6,0xDE,0xDE,0xDE,0xDC,0xC0,0x7C,0x00,0x00,0x00,
0x00,0x00,0x00,0x10,0x38,0x6C,0xC6,0xC6,0xFE,0xC6,0xC6,0xC6,0xC6,0x00,0x00,0x00,
0x00,0x00,0x00,0xFC,0x66,0x66,0x66,0x7C,0x66,0x66,0x66,0x66,0xFC,0x00,0x00,0x00,
0x00,0x00,0x00,0x3C,0x66,0xC2,0xC0,0xC0,0xC0,0xC0,0xC2,0x66,0x3C,0x00,0x00,0x00,
0x00,0x00,0x00,0xF8,0x6C,0x66,0x66,0x66,0x66,0x66,0x66,0x6C,0xF8,0x00,0x00,0x00,
0x00,0x00,0x00,0xFE,0x66,0x62,0x68,0x78,0x68,0x60,0x62,0x66,0xFE,0x00,0x00,0x00,
0x00,0x00,0x00,0xFE,0x66,0x62,0x68,0x78,0x68,0x60,0x60,0x60,0xF0,0x00,0x00,0x00,
0x00,0x00,0x00,0x3C,0x66,0xC2,0xC0,0xC0,0xDE,0xC6,0xC6,0x66,0x3A,0x00,0x00,0x00,
0x00,0x00,0x00,0xC6,0xC6,0xC6,0xC6,0xFE,0xC6,0xC6,0xC6,0xC6,0xC6,0x00,0x00,0x00,
0x00,0x00,0x00,0x3C,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,
0x00,0x00,0x00,0x1E,0x0C,0x0C,0x0C,0x0C,0x0C,0xCC,0xCC,0xCC,0x78,0x00,0x00,0x00,
0x00,0x00,0x00,0xE6,0x66,0x6C,0x6C,0x78,0x78,0x6C,0x66,0x66,0xE6,0x00,0x00,0x00,
0x00,0x00,0x00,0xF0,0x60,0x60,0x60,0x60,0x60,0x60,0x62,0x66,0xFE,0x00,0x00,0x00,
0x00,0x00,0x00,0xC6,0xEE,0xFE,0xFE,0xD6,0xC6,0xC6,0xC6,0xC6,0xC6,0x00,0x00,0x00,
0x00,0x00,0x00,0xC6,0xE6,0xF6,0xFE,0xDE,0xCE,0xC6,0xC6,0xC6,0xC6,0x00,0x00,0x00,
0x00,0x00,0x00,0x38,0x6C,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x6C,0x38,0x00,0x00,0x00,
0x00,0x00,0x00,0xFC,0x66,0x66,0x66,0x7C,0x60,0x60,0x60,0x60,0xF0,0x00,0x00,0x00,
0x00,0x00,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xD6,0xDE,0x7C,0x0C,0x0E,0x00,
0x00,0x00,0x00,0xFC,0x66,0x66,0x66,0x7C,0x6C,0x66,0x66,0x66,0xE6,0x00,0x00,0x00,
0x00,0x00,0x00,0x7C,0xC6,0xC6,0x60,0x38,0x0C,0x06,0xC6,0xC6,0x7C,0x00,0x00,0x00,
0x00,0x00,0x00,0x7E,0x7E,0x5A,0x18,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,
0x00,0x00,0x00,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,
0x00,0x00,0x00,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x6C,0x38,0x10,0x00,0x00,0x00,
0x00,0x00,0x00,0xC6,0xC6,0xC6,0xC6,0xC6,0xD6,0xD6,0xFE,0x6C,0x6C,0x00,0x00,0x00,
0x00,0x00,0x00,0xC6,0xC6,0x6C,0x6C,0x38,0x38,0x6C,0x6C,0xC6,0xC6,0x00,0x00,0x00,
0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x3C,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,
0x00,0x00,0x00,0xFE,0xC6,0x86,0x0C,0x18,0x30,0x60,0xC2,0xC6,0xFE,0x00,0x00,0x00,
0x00,0x00,0x00,0x3C,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x3C,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x80,0xC0,0xE0,0x70,0x38,0x1C,0x0E,0x06,0x02,0x00,0x00,0x00,
0x00,0x00,0x00,0x3C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x3C,0x00,0x00,0x00,
0x10,0x38,0x38,0x6C,0xC6,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,
0x30,0x30,0x30,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x0C,0x7C,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,
0x00,0x00,0x00,0xE0,0x60,0x60,0x78,0x6C,0x66,0x66,0x66,0x66,0xDC,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0xC6,0xC0,0xC0,0xC0,0xC6,0x7C,0x00,0x00,0x00,
0x00,0x00,0x00,0x1C,0x0C,0x0C,0x3C,0x6C,0xCC,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0xC6,0xFE,0xC0,0xC0,0xC6,0x7C,0x00,0x00,0x00,
0x00,0x00,0x00,0x38,0x6C,0x64,0x60,0xF0,0x60,0x60,0x60,0x60,0xF0,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x76,0xCC,0xCC,0xCC,0xCC,0xCC,0x7C,0x0C,0xCC,0x78,
0x00,0x00,0x00,0xE0,0x60,0x60,0x6C,0x76,0x66,0x66,0x66,0x66,0xE6,0x00,0x00,0x00,
0x00,0x00,0x00,0x18,0x18,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,
0x00,0x00,0x00,0x06,0x06,0x00,0x0E,0x06,0x06,0x06,0x06,0x06,0x06,0x66,0x66,0x3C,
0x00,0x00,0x00,0xE0,0x60,0x60,0x66,0x6C,0x78,0x78,0x6C,0x66,0xE6,0x00,0x00,0x00,
0x00,0x00,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0xEC,0xFE,0xD6,0xD6,0xD6,0xD6,0xD6,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0xDC,0x66,0x66,0x66,0x66,0x66,0x66,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0xDC,0x66,0x66,0x66,0x66,0x66,0x7C,0x60,0x60,0xF0,
0x00,0x00,0x00,0x00,0x00,0x00,0x76,0xCC,0xCC,0xCC,0xCC,0xCC,0x7C,0x0C,0x0C,0x1E,
0x00,0x00,0x00,0x00,0x00,0x00,0xDC,0x76,0x62,0x60,0x60,0x60,0xF0,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0xC6,0x60,0x38,0x0C,0xC6,0x7C,0x00,0x00,0x00,
0x00,0x00,0x00,0x10,0x30,0x30,0xFC,0x30,0x30,0x30,0x30,0x36,0x1C,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x66,0x3C,0x18,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0xC6,0xC6,0xC6,0xD6,0xD6,0xFE,0x6C,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0xC6,0x6C,0x38,0x38,0x38,0x6C,0xC6,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7E,0x06,0x0C,0xF8,
0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0xCC,0x18,0x30,0x60,0xC6,0xFE,0x00,0x00,0x00,
0x00,0x00,0x00,0x0E,0x18,0x18,0x18,0x70,0x18,0x18,0x18,0x18,0x0E,0x00,0x00,0x00,
0x00,0x00,0x00,0x18,0x18,0x18,0x18,0x00,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00,
0x00,0x00,0x00,0x70,0x18,0x18,0x18,0x0E,0x18,0x18,0x18,0x18,0x70,0x00,0x00,0x00,
0x00,0x00,0x00,0x76,0xDC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
+24
View File
@@ -0,0 +1,24 @@
#include "interface.h"
void IIC_SAND_DATE(uint16_t DEVICE_ADD,uint16_t IN_DEVICE_ADD,uint8_t *DATAS,uint16_t LONG)
{
Wire.beginTransmission(DEVICE_ADD);
Wire.write(IN_DEVICE_ADD);
for(uint16_t a=0;a<LONG;a++)
{
Wire.write(DATAS[a]);
}
Wire.endTransmission();
}
void IIC_READ_DATE(uint16_t DEVICE_ADD,uint16_t IN_DEVICE_ADD,uint8_t *DATAS,uint16_t LONG)
{
Wire.beginTransmission(DEVICE_ADD);
Wire.write(IN_DEVICE_ADD);
for(uint16_t a=0;a<LONG;a++)
{
DATAS[a]=Wire.read();
}
Wire.endTransmission();
}
+11
View File
@@ -0,0 +1,11 @@
#ifndef HREAD_INTERFACE_H_
#define HREAD_INTERFACE_H_
#include "Arduino.h"
#include "Wire.h"
void IIC_SAND_DATE(uint16_t DEVICE_ADD,uint16_t IN_DEVICE_ADD,uint8_t *DATAS,uint16_t LONG);
void IIC_READ_DATE(uint16_t DEVICE_ADD,uint16_t IN_DEVICE_ADD,uint8_t *DATAS,uint16_t LONG);
#endif /* HREAD_INTERFACE_H_ */
+472
View File
@@ -0,0 +1,472 @@
#include "oled12864.h"
/*
通过IIC发送指令到OLED
*/
void OLED_WrCmd(unsigned char IIC_Command)
{
uint8_t *pData;
pData = &IIC_Command;
IIC_SAND_DATE(OLED_ADDRESS,0x00,pData,1);
}
/*
通过IIC发送数据到OLED
*/
void OLED_WrDat(unsigned char IIC_Data)
{
uint8_t *pData;
pData = &IIC_Data;
IIC_SAND_DATE(OLED_ADDRESS,0x40,pData,1);
}
/*
设置硬件内的光标
*/
void OLED_Set_Pos(unsigned char x, unsigned char y)
{
OLED_WrCmd( 0xb0 + 7-y );
OLED_WrCmd(((x&0xf0)>>4)|0x10);
OLED_WrCmd( (x&0x0f) |0x00);
}
/*
初始化硬件内存(显存)
*/
void OLED_Init_Display_Buffer(char a)
{
for(unsigned char y = 0;y < Y_WIDTH_;y++)
{
OLED_Set_Pos(0,y);
for(unsigned char x = 0;x < X_WIDTH;x++)
{
OLED_WrDat(a);
}
}
}
/*
设置屏幕亮度
*/
void OLED_Setting_luminance(unsigned char a)
{
OLED_WrCmd(0x81);
OLED_WrCmd(a*2.55);
}
/*
初始化OLED
硬件扫描方式
从左到右从上到下
纵向8点上高位
*/
void OLED_Init(void)
{
//HAL_Delay(200);
OLED_WrCmd(0xAE); //关闭显示
OLED_WrCmd(0xD5); //设置时钟分频因子,震荡频率
OLED_WrCmd( 80); //[3:0],分频因子;[7:4],震荡频率
OLED_WrCmd(0xA8); //设置驱动路数
OLED_WrCmd(0X3F); //默认0X3F(1/64)
OLED_WrCmd(0xD3); //设置显示偏移
OLED_WrCmd(0X00); //默认为0
OLED_WrCmd(0x40); //设置显示开始行 [5:0],行数.
OLED_WrCmd(0x8D); //电荷泵设置
OLED_WrCmd(0x14); //bit2,开启/关闭
OLED_WrCmd(0x20); //设置内存地址模式
OLED_WrCmd(0x02); //[1:0],00,列地址模式;01,行地址模式;10,页地址模式;默认10;
OLED_WrCmd(0xA1); //段重定义设置,bit0:0,0->0;1,0->127;
OLED_WrCmd(0xC0); //设置COM扫描方向;bit3:0,普通模式;1,重定义模式 COM[N-1]->COM0;N:驱动路数
//OLED_WrCmd(0xDA); //设置COM硬件引脚配置
//OLED_WrCmd(0x12); //[5:4]配置
//显示方向设置
//OLED_WrCmd(0xc8);//OLED_WrCmd(0xa0);
//行扫描顺序:从上到下
//列扫描顺序:从左到右
OLED_WrCmd(0xD9); //设置预充电周期
OLED_WrCmd(0xf1); //[3:0],PHASE 1;[7:4],PHASE 2;
OLED_WrCmd(0xDB); //设置VCOMH 电压倍率
OLED_WrCmd(0x30); //[6:4] 000,0.65*vcc;001,0.77*vcc;011,0.83*vcc;
OLED_WrCmd(0xA4); //全局显示开启;bit0:1,开启;0,关闭;(白屏/黑屏)
OLED_WrCmd(0xA6);
//设置显示方式;bit0:1,反相显示;0,正常显示
OLED_WrCmd(0xAF); //开启显示
OLED_Init_Display_Buffer(0);
}
/*************************************************************************************************************************************************************************************/
/*硬件与软件之间的部分*/
/*
定义显存
*/
char OLED_buff[Y_WIDTH_][X_WIDTH];
/*
加速缓存
*/
char OLED_speedup[Y_WIDTH_][X_WIDTH];
/*
将显存发送到硬件
*/
void OLED_Cache_to_hardware()
{
char b=0;
for(uint8_t y=0;y<Y_WIDTH_;y++)
{
OLED_Set_Pos(0,y);
for(uint8_t x=0;x<X_WIDTH;x++)
{
if(OLED_buff[y][x]!=OLED_speedup[y][x])
{
if(b==0){b=1;OLED_Set_Pos(x,y);}
OLED_WrDat(OLED_buff[y][x]);
OLED_speedup[y][x]=OLED_buff[y][x];
}else
{b=0;}
OLED_buff[y][x]=0x00;
}
}
}
/*
打点函数
打点类型
dot_type=0 清除点
=1 打点
=2 取反点
*/
void OLED_set_dot(unsigned char x,unsigned char y,unsigned char dot_type)
{
if(x>=X_WIDTH||y>=Y_WIDTH)
{
return ;
}
uint8_t y1=y/8;
uint8_t y2=y%8;
uint8_t y3=(0x80>>y2);
char temp=OLED_buff[y1][x];
switch(dot_type)
{
case 0:
temp &= ~y3;
break;
case 1:
temp |= y3;
break;
case 2:
temp ^= y3;
break;
case 3:break;
}
OLED_buff[y1][x]=temp;
}
/*
绘图函数
数据格式 从左到右,从上到下,横向8点右高位
type=0 清空区域
=1 区域图层
=2 正片叠底
=3 正片清空
=4 负片
=5 正片负片
*/
void OLED_Pix(unsigned char x,unsigned char y,unsigned char w,unsigned char h,const char *p,unsigned char type)
{
unsigned char b=0;
unsigned int c=0;
for(uint8_t h1=0;h1<h;h1++)
{
for(uint8_t w1=0;w1<w;w1++)
{
if(p[c]&0x80>>b)
{
switch(type)
{
case 0:
OLED_set_dot(w1+x,h1+y,0);
break;
case 1:
OLED_set_dot(w1+x,h1+y,1);
break;
case 2:
OLED_set_dot(w1+x,h1+y,1);
break;
case 3:
OLED_set_dot(w1+x,h1+y,0);
break;
case 4:
OLED_set_dot(w1+x,h1+y,0);
break;
case 5:
OLED_set_dot(w1+x,h1+y,2);
break;
}
}else
{
switch(type)
{
case 0:
OLED_set_dot(w1+x,h1+y,0);
break;
case 1:
OLED_set_dot(w1+x,h1+y,0);
break;
case 2:
break;
case 4:
OLED_set_dot(w1+x,h1+y,1);
break;
}
}
b++;
if(b==8)
{
b=0;c++;
}
}
if(b!=0)
{
b=0;c++;
}
}
}
/*
显示字符
数据格式 从左到右,从上到下,横向8点左高位 (同一个函数实现的显示不知道为何这里要用左高位才能正常显示)
type=0 清空区域
=1 区域图层
=2 正片叠底
=3 正片清空
=4 负片
*/
void OLED_Ascii(unsigned char x,unsigned char y,unsigned char size,char *chr,unsigned char type)
{
if(*chr>=' '&&*chr<='~')
{
switch(size)
{
case 8:
OLED_Pix(x,y,5,8,asc2_0805[*chr-' '],type);
break;
case 12:
OLED_Pix(x,y,6,12,asc2_1206[*chr-' '],type);
break;
case 16:
OLED_Pix(x,y,8,16,asc2_1608[*chr-' '],type);
break;
}
}
}
void OLED_Ch(unsigned char x,unsigned char y,unsigned char size,char *chr,unsigned char type)
{
//顯示中文
}
void OLED_Str(unsigned char x,unsigned char y,unsigned char size,char *str,unsigned char lenconst,unsigned char type)
{
unsigned char size2;
unsigned char tempx=x;
unsigned char templenstard=1;
switch(size)
{
case 8:
size2=6;
break;
case 12:
size2=7;
break;
case 16:
size2=8;
break;
}
while(*str!='\0')
{
if((x+size2>=X_WIDTH)||(*str=='\n'))
{
if(lenconst!=0)
{
if(templenstard>=lenconst)
{
return;
}
}
templenstard++;
y+=size;
if(y>=Y_WIDTH)
{
//y=0;
return;
}
x=tempx;
}else
{
if(*str<127)
{
OLED_Ascii(x,y,size,str,type);
x+=size2;
}else
{
OLED_Ch(x,y,size,str,type);
str++;
x+=16;
}
}
str++;
}
}
void OLED_Str_list(unsigned char x,unsigned char y,unsigned char size,char *str,unsigned char lenstard,unsigned char lenconst,unsigned char type)
{
unsigned char templenstard=0;
while(templenstard!=lenstard)//跳转到指定行
{
switch(*str)
{
case '\n': //如果是回车 行加加
templenstard++;
break;
case '\0': //如果字符串提前结束 报错 直接返回
return;
}
str++;
}
OLED_Str(x,y,size,str,lenconst,type);
}
/*
几何绘图
*/
/*画横线*/
void OLED_HL(unsigned char x,unsigned char y,unsigned char size,unsigned char dot_type)
{
}
/*画竖线*/
void OLED_VL(unsigned char x,unsigned char y,unsigned char size,unsigned char dot_type)
{
}
/*画任意线*/
void OLED_AL(int sx,int sy,int ex,int ey,unsigned char dot_type)
{
int dx,dy,absx,absy;
//计算差
dx=ex-sx;
dy=ey-sy;
//取绝对值 就是轴长
absx=dx<0?0-dx:dx;
absy=dy<0?0-dy:dy;
if(dx==0)
{
if(dy>0)
{
for(int y=ey;y>sy;y--)
{
OLED_set_dot(sx,y,dot_type);
}
}else
if(dy<0)
{
for(int y=ey;y<sy;y++)
{
OLED_set_dot(sx,y,dot_type);
}
}
return ;
}
if(dy==0)
{
if(dx>0)
{
for(int x=ex;x>sx;x--)
{
OLED_set_dot(x,sy,dot_type);
}
}else
if(dx<0)
{
for(int x=ex;x<sx;x++)
{
OLED_set_dot(x,sy,dot_type);
}
}
return ;
}
if(dx==0&&dy==0)
{
//OLED_set_dot(sx,sy,dot_type);
return ;
}
}
/*画方框*/
void OLED_square(int Start_x, int Start_y, int End_x, int End_y, char type)
{
if(Start_x > End_x){int i1 = Start_x; Start_x = End_x; End_x=i1;}
if(Start_y > End_y){int i1 = Start_y; Start_y = End_y; End_y=i1;}
for(; Start_x < End_x ; Start_x++)
{
for(int y2 = Start_y ; y2 < End_y ; y2++)
{
OLED_set_dot(Start_x, y2, type);
}
}
}
+30
View File
@@ -0,0 +1,30 @@
#ifndef OLED12864_H
#define OLED12864_H
#include "Arduino.h"
#include "interface.h"
#include "fonts.h"
#define OLED_ADDRESS 0x3C
#define PI 3.141592654
#define X_WIDTH 128
#define Y_WIDTH 64
#define Y_WIDTH_ 8
void OLED_Init(void);
void OLED_Cache_to_hardware();
void OLED_Setting_luminance(unsigned char a);
void OLED_set_dot(unsigned char x,unsigned char y,unsigned char dot_type);
void OLED_Pix(unsigned char x,unsigned char y,unsigned char w,unsigned char h,const char *p,unsigned char type);
void OLED_Ascii(unsigned char x,unsigned char y,unsigned char size,char *chr,unsigned char type);
void OLED_Ch(unsigned char x,unsigned char y,unsigned char size,char *chr,unsigned char type);
void OLED_Str(unsigned char x,unsigned char y,unsigned char size,char *str,unsigned char lenconst,unsigned char type);
void OLED_Str_list(unsigned char x,unsigned char y,unsigned char size,char *str,unsigned char lenstard,unsigned char lenconst,unsigned char type);
void OLED_AL(int sx,int sy,int ex,int ey,unsigned char dot_type);
void OLED_square(int Start_x, int Start_y, int End_x, int End_y, char type);
#endif
+90252
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+77
View File
@@ -0,0 +1,77 @@
{
"board": {
"active_layer": 36,
"active_layer_preset": "",
"auto_track_width": true,
"hidden_netclasses": [],
"hidden_nets": [],
"high_contrast_mode": 0,
"net_color_mode": 1,
"opacity": {
"images": 0.6,
"pads": 1.0,
"tracks": 1.0,
"vias": 1.0,
"zones": 0.6
},
"selection_filter": {
"dimensions": false,
"footprints": true,
"graphics": false,
"keepouts": false,
"lockedItems": false,
"otherItems": false,
"pads": false,
"text": true,
"tracks": false,
"vias": false,
"zones": false
},
"visible_items": [
0,
1,
2,
3,
4,
5,
8,
9,
10,
11,
12,
13,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
32,
33,
34,
35,
36,
39,
40
],
"visible_layers": "ffcfcff_ffffffff",
"zone_display_mode": 0
},
"meta": {
"filename": "pcbdemo1.kicad_prl",
"version": 3
},
"project": {
"files": []
}
}
+490
View File
@@ -0,0 +1,490 @@
{
"board": {
"3dviewports": [],
"design_settings": {
"defaults": {
"board_outline_line_width": 0.09999999999999999,
"copper_line_width": 0.19999999999999998,
"copper_text_italic": false,
"copper_text_size_h": 1.5,
"copper_text_size_v": 1.5,
"copper_text_thickness": 0.3,
"copper_text_upright": false,
"courtyard_line_width": 0.049999999999999996,
"dimension_precision": 4,
"dimension_units": 3,
"dimensions": {
"arrow_length": 1270000,
"extension_offset": 500000,
"keep_text_aligned": true,
"suppress_zeroes": false,
"text_position": 0,
"units_format": 1
},
"fab_line_width": 0.09999999999999999,
"fab_text_italic": false,
"fab_text_size_h": 1.0,
"fab_text_size_v": 1.0,
"fab_text_thickness": 0.15,
"fab_text_upright": false,
"other_line_width": 0.15,
"other_text_italic": false,
"other_text_size_h": 1.0,
"other_text_size_v": 1.0,
"other_text_thickness": 0.15,
"other_text_upright": false,
"pads": {
"drill": 0.762,
"height": 1.524,
"width": 1.524
},
"silk_line_width": 0.15,
"silk_text_italic": false,
"silk_text_size_h": 1.0,
"silk_text_size_v": 1.0,
"silk_text_thickness": 0.15,
"silk_text_upright": false,
"zones": {
"min_clearance": 0.5
}
},
"diff_pair_dimensions": [
{
"gap": 0.0,
"via_gap": 0.0,
"width": 0.0
}
],
"drc_exclusions": [],
"meta": {
"version": 2
},
"rule_severities": {
"annular_width": "error",
"clearance": "error",
"connection_width": "warning",
"copper_edge_clearance": "error",
"copper_sliver": "warning",
"courtyards_overlap": "error",
"diff_pair_gap_out_of_range": "error",
"diff_pair_uncoupled_length_too_long": "error",
"drill_out_of_range": "error",
"duplicate_footprints": "warning",
"extra_footprint": "warning",
"footprint": "error",
"footprint_type_mismatch": "ignore",
"hole_clearance": "error",
"hole_near_hole": "error",
"invalid_outline": "error",
"isolated_copper": "warning",
"item_on_disabled_layer": "error",
"items_not_allowed": "error",
"length_out_of_range": "error",
"lib_footprint_issues": "warning",
"lib_footprint_mismatch": "warning",
"malformed_courtyard": "error",
"microvia_drill_out_of_range": "error",
"missing_courtyard": "ignore",
"missing_footprint": "warning",
"net_conflict": "warning",
"npth_inside_courtyard": "ignore",
"padstack": "warning",
"pth_inside_courtyard": "ignore",
"shorting_items": "error",
"silk_edge_clearance": "warning",
"silk_over_copper": "warning",
"silk_overlap": "warning",
"skew_out_of_range": "error",
"solder_mask_bridge": "error",
"starved_thermal": "error",
"text_height": "warning",
"text_thickness": "warning",
"through_hole_pad_without_hole": "error",
"too_many_vias": "error",
"track_dangling": "warning",
"track_width": "error",
"tracks_crossing": "error",
"unconnected_items": "error",
"unresolved_variable": "error",
"via_dangling": "warning",
"zones_intersect": "error"
},
"rules": {
"max_error": 0.005,
"min_clearance": 0.0,
"min_connection": 0.0,
"min_copper_edge_clearance": 0.0,
"min_hole_clearance": 0.25,
"min_hole_to_hole": 0.25,
"min_microvia_diameter": 0.19999999999999998,
"min_microvia_drill": 0.09999999999999999,
"min_resolved_spokes": 2,
"min_silk_clearance": 0.0,
"min_text_height": 0.7999999999999999,
"min_text_thickness": 0.08,
"min_through_hole_diameter": 0.3,
"min_track_width": 0.0,
"min_via_annular_width": 0.09999999999999999,
"min_via_diameter": 0.5,
"solder_mask_clearance": 0.0,
"solder_mask_min_width": 0.0,
"solder_mask_to_copper_clearance": 0.0,
"use_height_for_length_calcs": true
},
"teardrop_options": [
{
"td_allow_use_two_tracks": true,
"td_curve_segcount": 5,
"td_on_pad_in_zone": false,
"td_onpadsmd": true,
"td_onroundshapesonly": false,
"td_ontrackend": false,
"td_onviapad": true
}
],
"teardrop_parameters": [
{
"td_curve_segcount": 0,
"td_height_ratio": 1.0,
"td_length_ratio": 0.5,
"td_maxheight": 2.0,
"td_maxlen": 1.0,
"td_target_name": "td_round_shape",
"td_width_to_size_filter_ratio": 0.9
},
{
"td_curve_segcount": 0,
"td_height_ratio": 1.0,
"td_length_ratio": 0.5,
"td_maxheight": 2.0,
"td_maxlen": 1.0,
"td_target_name": "td_rect_shape",
"td_width_to_size_filter_ratio": 0.9
},
{
"td_curve_segcount": 0,
"td_height_ratio": 1.0,
"td_length_ratio": 0.5,
"td_maxheight": 2.0,
"td_maxlen": 1.0,
"td_target_name": "td_track_end",
"td_width_to_size_filter_ratio": 0.9
}
],
"track_widths": [
0.0
],
"via_dimensions": [
{
"diameter": 0.0,
"drill": 0.0
}
],
"zones_allow_external_fillets": false
},
"layer_presets": [],
"viewports": []
},
"boards": [],
"cvpcb": {
"equivalence_files": []
},
"erc": {
"erc_exclusions": [],
"meta": {
"version": 0
},
"pin_map": [
[
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
2
],
[
0,
2,
0,
1,
0,
0,
1,
0,
2,
2,
2,
2
],
[
0,
0,
0,
0,
0,
0,
1,
0,
1,
0,
1,
2
],
[
0,
1,
0,
0,
0,
0,
1,
1,
2,
1,
1,
2
],
[
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
2
],
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
2
],
[
1,
1,
1,
1,
1,
0,
1,
1,
1,
1,
1,
2
],
[
0,
0,
0,
1,
0,
0,
1,
0,
0,
0,
0,
2
],
[
0,
2,
1,
2,
0,
0,
1,
0,
2,
2,
2,
2
],
[
0,
2,
0,
1,
0,
0,
1,
0,
2,
0,
0,
2
],
[
0,
2,
1,
1,
0,
0,
1,
0,
2,
0,
0,
2
],
[
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2
]
],
"rule_severities": {
"bus_definition_conflict": "error",
"bus_entry_needed": "error",
"bus_to_bus_conflict": "error",
"bus_to_net_conflict": "error",
"conflicting_netclasses": "error",
"different_unit_footprint": "error",
"different_unit_net": "error",
"duplicate_reference": "error",
"duplicate_sheet_names": "error",
"endpoint_off_grid": "warning",
"extra_units": "error",
"global_label_dangling": "warning",
"hier_label_mismatch": "error",
"label_dangling": "error",
"lib_symbol_issues": "warning",
"missing_bidi_pin": "warning",
"missing_input_pin": "warning",
"missing_power_pin": "error",
"missing_unit": "warning",
"multiple_net_names": "warning",
"net_not_bus_member": "warning",
"no_connect_connected": "warning",
"no_connect_dangling": "warning",
"pin_not_connected": "error",
"pin_not_driven": "error",
"pin_to_pin": "warning",
"power_pin_not_driven": "error",
"similar_labels": "warning",
"simulation_model_issue": "error",
"unannotated": "error",
"unit_value_mismatch": "error",
"unresolved_variable": "error",
"wire_dangling": "error"
}
},
"libraries": {
"pinned_footprint_libs": [],
"pinned_symbol_libs": []
},
"meta": {
"filename": "pcbdemo1.kicad_pro",
"version": 1
},
"net_settings": {
"classes": [
{
"bus_width": 12,
"clearance": 0.2,
"diff_pair_gap": 0.25,
"diff_pair_via_gap": 0.25,
"diff_pair_width": 0.2,
"line_style": 0,
"microvia_diameter": 0.3,
"microvia_drill": 0.1,
"name": "Default",
"pcb_color": "rgba(0, 0, 0, 0.000)",
"schematic_color": "rgba(0, 0, 0, 0.000)",
"track_width": 0.25,
"via_diameter": 0.8,
"via_drill": 0.4,
"wire_width": 6
}
],
"meta": {
"version": 3
},
"net_colors": null,
"netclass_assignments": null,
"netclass_patterns": []
},
"pcbnew": {
"last_paths": {
"gencad": "",
"idf": "",
"netlist": "",
"specctra_dsn": "",
"step": "",
"vrml": ""
},
"page_layout_descr_file": ""
},
"schematic": {
"annotate_start_num": 0,
"drawing": {
"dashed_lines_dash_length_ratio": 12.0,
"dashed_lines_gap_length_ratio": 3.0,
"default_line_thickness": 6.0,
"default_text_size": 50.0,
"field_names": [],
"intersheets_ref_own_page": false,
"intersheets_ref_prefix": "",
"intersheets_ref_short": false,
"intersheets_ref_show": false,
"intersheets_ref_suffix": "",
"junction_size_choice": 3,
"label_size_ratio": 0.375,
"pin_symbol_size": 25.0,
"text_offset_ratio": 0.15
},
"legacy_lib_dir": "",
"legacy_lib_list": [],
"meta": {
"version": 1
},
"net_format_name": "",
"page_layout_descr_file": "",
"plot_directory": "",
"spice_current_sheet_as_root": false,
"spice_external_command": "spice \"%I\"",
"spice_model_current_sheet_as_root": true,
"spice_save_all_currents": false,
"spice_save_all_voltages": false,
"subpart_first_id": 65,
"subpart_id_separator": 0
},
"sheets": [
[
"3507a88f-2a30-4cca-bb23-394cc5a92a57",
""
]
],
"text_variables": {}
}
File diff suppressed because it is too large Load Diff