📄 lcddrive.c
字号:
#include "config.h"
#include "LCDDrive.h"
#include "ADCDeal.h"
#include "button.h"
#include "RealTime.h"
#include "UART0.h"
#include "SaveAndRead.h"
//typedef unsigned char int8;
///大字母11*8,小字母7*7,数字11*6
//#include "Font.h"
typedef struct
{
uint8 SetItemNumber[13];
uint8 SetItemFont[13][6];
uint8 SetItemParamsValue[13][12];
uint8 OrgItemParamsValue[13][12];
uint8 ParamDir[13];
} SetItemRangType ;
#define LCD_BackLamp PIN_C7 //p0.21 ///D7~d0 P2.23~p2.16
#define output_Low(tempdata) IO2CLR=(uint32)tempdata
#define output_High(tempdata) IO2SET=(uint32)tempdata
#define LCDIODataBus 0x0ff0000
extern uint8 IsSetTime;
extern uint8 SetTimeSelectedItem;
extern uint32 UART_BPS;
uint8 PrintSetAndBaudRatePageSlectedItem=1;
uint8 BaudRateValue=9;
uint8 IsPrintOn=1;
uint8 IsColorOn=1;
uint8 IsEnglish=1;
uint8 DispResultItem[12]={0,1,2,3,4,2,6,3,2,0,3};
uint16 ReflectRate[12]={0,1,2,3,4,2,6,3,2,0,3};
uint8 LampSetPageSelectedItem=1;
uint8 ResultDispPage=1;
uint8 ResultDispPageUnit=2;
uint8 PresntUsedUnit=0;
uint8 SetPresentRecondSlectedBit=0;
const uint8 byteAlph[]= //
{
0x000,0x000,0x0C0,0x038,0x0E0,0x000,0x000,0x000, //Row NO.1
0x020,0x03C,0x023,0x002,0x002,0x027,0x038,0x020, //Row NO.2 A 0
0x000,0x008,0x0F8,0x088,0x088,0x088,0x070,0x000, //Row NO.1
0x000,0x020,0x03F,0x020,0x020,0x020,0x011,0x00E, //Row NO.2 B 1
0x0C0,0x030,0x008,0x008,0x008,0x008,0x038,0x000, //Row NO.1
0x007,0x018,0x020,0x020,0x020,0x010,0x008,0x000, //Row NO.2 C 2
0x008,0x0F8,0x008,0x008,0x008,0x010,0x0E0,0x000, //Row NO.1
0x020,0x03F,0x020,0x020,0x020,0x010,0x00F,0x000, //Row NO.2 D 3
0x008,0x0F8,0x088,0x088,0x0E8,0x008,0x010,0x000, //Row NO.1
0x020,0x03F,0x020,0x020,0x023,0x020,0x018,0x000, //Row NO.2 E 4
0x008,0x0F8,0x088,0x088,0x0E8,0x008,0x010,0x000, //Row NO.1
0x020,0x03F,0x020,0x000,0x003,0x000,0x000,0x000, //Row NO.2 F 5
0x0C0,0x030,0x008,0x008,0x008,0x038,0x000,0x000, //Row NO.1
0x007,0x018,0x020,0x020,0x022,0x01E,0x002,0x000, //Row NO.2 G 6
0x008,0x0F8,0x008,0x000,0x000,0x008,0x0F8,0x008, //Row NO.1
0x020,0x03F,0x021,0x001,0x001,0x021,0x03F,0x020, //Row NO.2 H 7
0x000,0x008,0x008,0x0F8,0x008,0x008,0x000,0x000, //Row NO.1
0x000,0x020,0x020,0x03F,0x020,0x020,0x000,0x000, //Row NO.2 I 8
0x000,0x000,0x008,0x008,0x0F8,0x008,0x008,0x000, //Row NO.1
0x0C0,0x080,0x080,0x080,0x07F,0x000,0x000,0x000, //Row NO.2 J 9
0x008,0x0F8,0x088,0x0C0,0x028,0x018,0x008,0x000, //Row NO.1
0x020,0x03F,0x020,0x001,0x026,0x038,0x020,0x000, //Row NO.2 K 10
0x008,0x0F8,0x008,0x000,0x000,0x000,0x000,0x000, //Row NO.1
0x020,0x03F,0x020,0x020,0x020,0x020,0x030,0x000, //Row NO.2 L 11
0x008,0x0F8,0x0F8,0x000,0x0F8,0x0F8,0x008,0x000, //Row NO.1
0x020,0x03F,0x000,0x03F,0x000,0x03F,0x020,0x000, //Row NO.2 M 12
0x008,0x0F8,0x030,0x0C0,0x000,0x008,0x0F8,0x008, //Row NO.1
0x020,0x03F,0x020,0x000,0x007,0x018,0x03F,0x000, //Row NO.2 N 13
0x0E0,0x010,0x008,0x008,0x008,0x010,0x0E0,0x000, //Row NO.1
0x00F,0x010,0x020,0x020,0x020,0x010,0x00F,0x000, //Row NO.2 O 14
0x008,0x0F8,0x008,0x008,0x008,0x008,0x0F0,0x000, //Row NO.1 15
0x020,0x03F,0x021,0x001,0x001,0x001,0x000,0x000, //Row NO.2 P
0x0E0,0x010,0x008,0x008,0x008,0x010,0x0E0,0x000, //Row NO.1
0x00F,0x018,0x024,0x024,0x038,0x050,0x04F,0x000, //Row NO.2 Q 16
0x008,0x0F8,0x088,0x088,0x088,0x088,0x070,0x000, //Row NO.1
0x020,0x03F,0x020,0x000,0x003,0x00C,0x030,0x020, //Row NO.2 R 17
0x000,0x070,0x088,0x008,0x008,0x008,0x038,0x000, //Row NO.1 18
0x000,0x038,0x020,0x021,0x021,0x022,0x01C,0x000, //Row NO.2 S
0x018,0x008,0x008,0x0F8,0x008,0x008,0x018,0x000, //Row NO.1
0x000,0x000,0x020,0x03F,0x020,0x000,0x000,0x000, //Row NO.2 T 19
0x008,0x0F8,0x008,0x000,0x000,0x008,0x0F8,0x008, //Row NO.1 20
0x000,0x01F,0x020,0x020,0x020,0x020,0x01F,0x000, //Row NO.2 U
0x008,0x078,0x088,0x000,0x000,0x0C8,0x038,0x008, //Row NO.1
0x000,0x000,0x007,0x038,0x00E,0x001,0x000,0x000, //Row NO.2 V 21
0x0F8,0x008,0x000,0x0F8,0x000,0x008,0x0F8,0x000, //Row NO.1
0x003,0x03C,0x007,0x000,0x007,0x03C,0x003,0x000, //Row NO.2 W 22
0x008,0x018,0x068,0x080,0x080,0x068,0x018,0x008, //Row NO.1
0x020,0x030,0x02C,0x003,0x003,0x02C,0x030,0x020, //Row NO.2 X 23
0x008,0x038,0x0C8,0x000,0x0C8,0x038,0x008,0x000, //Row NO.1 24
0x000,0x000,0x020,0x03F,0x020,0x000,0x000,0x000, //Row NO.2 Y
0x010,0x008,0x008,0x008,0x0C8,0x038,0x008,0x000, //Row NO.1
0x020,0x038,0x026,0x021,0x020,0x020,0x018,0x000, //Row NO.2 Z 25
0x000,0x080,0x080,0x080,0x080,0x000,0x000,0x000, //Row NO.1
0x019,0x024,0x022,0x022,0x022,0x03F,0x020,0x000, //Row NO.2 a 26
0x008,0x0F8,0x000,0x080,0x080,0x000,0x000,0x000, //Row NO.1
0x000,0x03F,0x011,0x020,0x020,0x011,0x00E,0x000, //Row NO.2 b 27
0x000,0x000,0x000,0x080,0x080,0x080,0x000,0x000, //Row NO.1
0x000,0x00E,0x011,0x020,0x020,0x020,0x011,0x000, //Row NO.2 c 28
0x000,0x000,0x080,0x080,0x088,0x0F8,0x000,0x000, //Row NO.1
0x00E,0x011,0x020,0x020,0x010,0x03F,0x020,0x000, //Row NO.2 d 29
0x000,0x000,0x080,0x080,0x080,0x080,0x000,0x000, //Row NO.1
0x000,0x01F,0x022,0x022,0x022,0x022,0x013,0x000, //Row NO.2 e 30
0x080,0x080,0x0F0,0x088,0x088,0x088,0x018,0x000, //Row NO.1
0x020,0x020,0x03F,0x020,0x020,0x000,0x000,0x000, //Row NO.2 f 31
0x000,0x000,0x080,0x080,0x080,0x080,0x080,0x000, //Row NO.1
0x000,0x06B,0x094,0x094,0x094,0x093,0x060,0x000, //Row NO.2 g 32
0x008,0x0F8,0x000,0x080,0x080,0x080,0x000,0x000, //Row NO.1
0x020,0x03F,0x021,0x000,0x000,0x020,0x03F,0x020, //Row NO.2 h 33
0x000,0x080,0x098,0x098,0x000,0x000,0x000,0x000, //Row NO.1
0x000,0x020,0x020,0x03F,0x020,0x020,0x000,0x000, //Row NO.2 i 34
0x000,0x000,0x000,0x020,0x026,0x0E6,0x000,0x000, //Row NO.1
0x000,0x030,0x020,0x020,0x020,0x01F,0x000,0x000, //Row NO.2 j 35
0x008,0x0F8,0x000,0x000,0x080,0x080,0x080,0x000, //Row NO.1
0x020,0x03F,0x024,0x002,0x02D,0x030,0x020,0x000, //Row NO.2 k 36
0x000,0x008,0x008,0x0F8,0x000,0x000,0x000,0x000, //Row NO.1
0x000,0x020,0x020,0x03F,0x020,0x020,0x000,0x000, //Row NO.2 l 37
0x080,0x080,0x080,0x080,0x080,0x080,0x080,0x000, //Row NO.1
0x020,0x03F,0x020,0x000,0x03F,0x020,0x000,0x03F, //Row NO.2 m 38
0x080,0x080,0x000,0x080,0x080,0x080,0x000,0x000, //Row NO.1
0x020,0x03F,0x021,0x000,0x000,0x020,0x03F,0x020, //Row NO.2 n 39
0x000,0x000,0x080,0x080,0x080,0x080,0x000,0x000, //Row NO.1 40
0x000,0x01F,0x020,0x020,0x020,0x020,0x01F,0x000, //Row NO.2 o
0x080,0x080,0x000,0x080,0x080,0x000,0x000,0x000, //Row NO.1
0x080,0x0FF,0x0A1,0x020,0x020,0x011,0x00E,0x000, //Row NO.2 p 41
0x000,0x000,0x080,0x080,0x080,0x080,0x000,0x000, //Row NO.1
0x00E,0x011,0x020,0x020,0x0A0,0x0FF,0x080,0x000, //Row NO.2 q 42
0x080,0x080,0x080,0x000,0x080,0x080,0x080,0x000, //Row NO.1
0x020,0x020,0x03F,0x021,0x020,0x000,0x001,0x000, //Row NO.2 r 43
0x000,0x000,0x080,0x080,0x080,0x080,0x080,0x000, //Row NO.1
0x000,0x033,0x024,0x024,0x024,0x024,0x019,0x000, //Row NO.2 s 44
0x000,0x080,0x080,0x0E0,0x080,0x080,0x000,0x000, //Row NO.1
0x000,0x000,0x000,0x01F,0x020,0x020,0x000,0x000, //Row NO.2 t 45
0x080,0x080,0x000,0x000,0x000,0x080,0x080,0x000, //Row NO.1
0x000,0x01F,0x020,0x020,0x020,0x010,0x03F,0x020, //Row NO.2 u 46
0x080,0x080,0x080,0x000,0x000,0x080,0x080,0x080, //Row NO.1
0x000,0x001,0x00E,0x030,0x008,0x006,0x001,0x000, //Row NO.2 v 47
0x080,0x080,0x000,0x080,0x000,0x080,0x080,0x080, //Row NO.1
0x00F,0x030,0x00C,0x003,0x00C,0x030,0x00F,0x000, //Row NO.2 w 48
0x000,0x080,0x080,0x000,0x080,0x080,0x080,0x000, //Row NO.1 49
0x000,0x020,0x031,0x02E,0x00E,0x031,0x020,0x000, //Row NO.2 x
0x080,0x080,0x080,0x000,0x000,0x080,0x080,0x080, //Row NO.1
0x080,0x081,0x08E,0x070,0x018,0x006,0x001,0x000, //Row NO.2 y 50
0x000,0x080,0x080,0x080,0x080,0x080,0x080,0x000, //Row NO.1
0x000,0x021,0x030,0x02C,0x022,0x021,0x030,0x000, //Row NO.2 z 51
0x000,0x000,0x000,0x0E0,0x000,0x000,0x000,0x000, //Row NO.1
0x002,0x002,0x002,0x03F,0x002,0x002,0x002,0x000, //Row NO.2 + 52
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, //Row NO.1
0x002,0x002,0x002,0x002,0x002,0x002,0x002,0x002, //Row NO.2 - 53
0x000,0x000,0x000,0x0C0,0x000,0x000,0x000,0x000, //Row NO.1
0x009,0x009,0x006,0x03F,0x006,0x009,0x009,0x000, //Row NO.2 * 54
0x000,0x000,0x000,0x000,0x0C0,0x030,0x008,0x000, //Row NO.1
0x0C0,0x030,0x00C,0x003,0x000,0x000,0x000,0x000, //Row NO.2 / 55
0x000,0x0C0,0x020,0x0C0,0x000,0x080,0x060,0x000, //Row NO.1
0x000,0x003,0x084,0x073,0x00C,0x07B,0x084,0x078, //Row NO.2 % 56
0x040,0x040,0x040,0x040,0x040,0x040,0x040,0x000, //Row NO.1
0x004,0x004,0x004,0x004,0x004,0x004,0x004,0x000, //Row NO.2 = 57
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -