切换到宽版
爱科技/爱创意/爱折腾/爱极致;技术知识分享平台,点击进入新版数码之家网站
  • 3831阅读
  • 7回复

[其他]回报论坛,丰田RAV4车机拆机VFD屏arduino 驱动,国内第一例成功分享! [复制链接]

上一主题 下一主题
离线stategrid
 

发帖
36
M币
742
专家
-1
粉丝
6
只看楼主 倒序阅读 我要置顶 楼主  发表于: 2018-07-12



参考分析纯_金大神的代码,

http://bbs.mydigit.cn/read.php?tid=2370983
氢氟酸大神的代码

http://bbs.mydigit.cn/read.php?tid=1311983
接线参考
http://bbs.mydigit.cn/read.php?tid=1311983&page=11

门外汉,只略懂一点点arduino
在arduino 1.6.8下面编译通过无报错,但是无法显示,求各路大神指点
--------------------------------------------------------------
自己搞定了

----------------------------------------------------------------
-----------------------RAV4_VFD.cpp-----------------------------------
#include  <RAV4_VFD.h>
#include  <RAV4_VFD.h>

//内存数组,用来显示
uint8_t Display_ram[255][8];
//Arduino开发板 接口中MOSI, MISO,SCK为SPI接口
//sa为变量,spi的设置

//SPISettings settingA(40000000, MSBFIRST, SPI_MODE0);

const uint8_t  ascii_table_5x8[95][5]=
{
/*全体 ASCII 列表:5x8 点阵*/
0x00,0x00,0x00,0x00,0x00,//- - //space
0x00,0x00,0x4f,0x00,0x00,//-!-
0x00,0x07,0x00,0x07,0x00,//-"-
0x14,0x7f,0x14,0x7f,0x14,//-#-
0x24,0x2a,0x7f,0x2a,0x12,//-$-
0x23,0x13,0x08,0x64,0x62,//-%-
0x36,0x49,0x55,0x22,0x50,//-&-
0x00,0x05,0x07,0x00,0x00,//-'-
0x00,0x1c,0x22,0x41,0x00,//-(-
0x00,0x41,0x22,0x1c,0x00,//-)-
0x14,0x08,0x3e,0x08,0x14,//-*-
0x08,0x08,0x3e,0x08,0x08,//-+-
0x00,0x50,0x30,0x00,0x00,//-,-
0x08,0x08,0x08,0x08,0x08,//---
0x00,0x60,0x60,0x00,0x00,//-.-
0x20,0x10,0x08,0x04,0x02,//-/-
0x3e,0x51,0x49,0x45,0x3e,//-0-
0x00,0x42,0x7f,0x40,0x00,//-1-
0x42,0x61,0x51,0x49,0x46,//-2-
0x21,0x41,0x45,0x4b,0x31,//-3-
0x18,0x14,0x12,0x7f,0x10,//-4-
0x27,0x45,0x45,0x45,0x39,//-5-
0x3c,0x4a,0x49,0x49,0x30,//-6-
0x01,0x71,0x09,0x05,0x03,//-7-
0x36,0x49,0x49,0x49,0x36,//-8-
0x06,0x49,0x49,0x29,0x1e,//-9-
0x00,0x36,0x36,0x00,0x00,//-:-
0x00,0x56,0x36,0x00,0x00,//-;-
0x08,0x14,0x22,0x41,0x00,//-<-
0x14,0x14,0x14,0x14,0x14,//-=-
0x00,0x41,0x22,0x14,0x08,//->-
0x02,0x01,0x51,0x09,0x06,//-?-
0x32,0x49,0x79,0x41,0x3e,//-@-  
0x7e,0x11,0x11,0x11,0x7e,//-A-
0x7f,0x49,0x49,0x49,0x36,//-B-
0x3e,0x41,0x41,0x41,0x22,//-C-
0x7f,0x41,0x41,0x22,0x1c,//-D-
0x7f,0x49,0x49,0x49,0x41,//-E-
0x7f,0x09,0x09,0x09,0x01,//-F-
0x3e,0x41,0x49,0x49,0x7a,//-G-
0x7f,0x08,0x08,0x08,0x7f,//-H-
0x00,0x41,0x7f,0x41,0x00,//-I-
0x20,0x40,0x41,0x3f,0x01,//-J-
0x7f,0x08,0x14,0x22,0x41,//-K-
0x7f,0x40,0x40,0x40,0x40,//-L-
0x7f,0x02,0x0c,0x02,0x7f,//-M-
0x7f,0x04,0x08,0x10,0x7f,//-N-
0x3e,0x41,0x41,0x41,0x3e,//-O-
0x7f,0x09,0x09,0x09,0x06,//-P-
0x3e,0x41,0x51,0x21,0x5e,//-Q-
0x7f,0x09,0x19,0x29,0x46,//-R-
0x46,0x49,0x49,0x49,0x31,//-S-
0x01,0x01,0x7f,0x01,0x01,//-T-
0x3f,0x40,0x40,0x40,0x3f,//-U-
0x1f,0x20,0x40,0x20,0x1f,//-V-
0x3f,0x40,0x38,0x40,0x3f,//-W-
0x63,0x14,0x08,0x14,0x63,//-X-
0x07,0x08,0x70,0x08,0x07,//-Y-
0x61,0x51,0x49,0x45,0x43,//-Z-
0x00,0x7f,0x41,0x41,0x00,//-[-
0x02,0x04,0x08,0x10,0x20,//-\-
0x00,0x41,0x41,0x7f,0x00,//-]-
0x04,0x02,0x01,0x02,0x04,//-^-
0x40,0x40,0x40,0x40,0x40,//-_-
0x01,0x02,0x04,0x00,0x00,//-`-
0x20,0x54,0x54,0x54,0x78,//-a-
0x7f,0x48,0x48,0x48,0x30,//-b-
0x38,0x44,0x44,0x44,0x44,//-c-
0x30,0x48,0x48,0x48,0x7f,//-d-
0x38,0x54,0x54,0x54,0x58,//-e-
0x00,0x08,0x7e,0x09,0x02,//-f-
0x48,0x54,0x54,0x54,0x3c,//-g-
0x7f,0x08,0x08,0x08,0x70,//-h-
0x00,0x00,0x7a,0x00,0x00,//-i-
0x20,0x40,0x40,0x3d,0x00,//-j-
0x7f,0x20,0x28,0x44,0x00,//-k-
0x00,0x41,0x7f,0x40,0x00,//-l-
0x7c,0x04,0x38,0x04,0x7c,//-m-
0x7c,0x08,0x04,0x04,0x78,//-n-
0x38,0x44,0x44,0x44,0x38,//-o-
0x7c,0x14,0x14,0x14,0x08,//-p-
0x08,0x14,0x14,0x14,0x7c,//-q-
0x7c,0x08,0x04,0x04,0x08,//-r-
0x48,0x54,0x54,0x54,0x24,//-s-
0x04,0x04,0x3f,0x44,0x24,//-t-
0x3c,0x40,0x40,0x40,0x3c,//-u-
0x1c,0x20,0x40,0x20,0x1c,//-v-
0x3c,0x40,0x30,0x40,0x3c,//-w-
0x44,0x28,0x10,0x28,0x44,//-x-
0x04,0x48,0x30,0x08,0x04,//-y-
0x44,0x64,0x54,0x4c,0x44,//-z-
0x08,0x36,0x41,0x41,0x00,//-{-
0x00,0x00,0x77,0x00,0x00,//-|-
0x00,0x41,0x41,0x36,0x08,//-}-
0x04,0x02,0x02,0x02,0x01,//-~-
};

const uint8_t  ascii_table_8x16[95][16]=
{
//粗体 8x16 点阵的 ASCII 码的点阵数据,从"JLX-GB2312"型号的字库 IC 中读出来的国标的。
0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, //- -( 即“空格”)ASCII 码:0X20
0x00,0x00,0x38,0xFC, 0xFC,0x38,0x00,0x00, 0x00,0x00,0x00,0x0D, 0x0D,0x00,0x00,0x00, //-!-
0x00,0x0E,0x1E,0x00, 0x00,0x1E,0x0E,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, //-"-
0x20,0xF8,0xF8,0x20, 0xF8,0xF8,0x20,0x00, 0x02,0x0F,0x0F,0x02, 0x0F,0x0F,0x02,0x00, //-#-
0x38,0x7C,0x44,0x47, 0x47,0xCC,0x98,0x00, 0x06,0x0C,0x08,0x38, 0x38,0x0F,0x07,0x00, //-$-
0x30,0x30,0x00,0x80, 0xC0,0x60,0x30,0x00, 0x0C,0x06,0x03,0x01, 0x00,0x0C,0x0C,0x00, //-%-
0x80,0xD8,0x7C,0xE4, 0xBC,0xD8,0x40,0x00, 0x07,0x0F,0x08,0x08, 0x07,0x0F,0x08,0x00, //-&-
0x00,0x10,0x1E,0x0E, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, //-'-
0x00,0x00,0xF0,0xF8, 0x0C,0x04,0x00,0x00, 0x00,0x00,0x03,0x07, 0x0C,0x08,0x00,0x00, //-(-
0x00,0x00,0x04,0x0C, 0xF8,0xF0,0x00,0x00, 0x00,0x00,0x08,0x0C, 0x07,0x03,0x00,0x00, //-)-
0x80,0xA0,0xE0,0xC0, 0xC0,0xE0,0xA0,0x80, 0x00,0x02,0x03,0x01, 0x01,0x03,0x02,0x00, //-*-
0x00,0x80,0x80,0xE0, 0xE0,0x80,0x80,0x00, 0x00,0x00,0x00,0x03, 0x03,0x00,0x00,0x00, //-+-
0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x10,0x1E, 0x0E,0x00,0x00,0x00, //-,-
0x80,0x80,0x80,0x80, 0x80,0x80,0x80,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, //---
0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x0C, 0x0C,0x00,0x00,0x00, //-.-
0x00,0x00,0x00,0x80, 0xC0,0x60,0x30,0x00, 0x0C,0x06,0x03,0x01, 0x00,0x00,0x00,0x00, //-/-
0xF8,0xF8,0x0C,0xC4, 0x0C,0xF8,0xF0,0x00, 0x03,0x07,0x0C,0x08, 0x0C,0x07,0x03,0x00, //-0-
0x00,0x10,0x18,0xFC, 0xFC,0x00,0x00,0x00, 0x00,0x08,0x08,0x0F, 0x0F,0x08,0x08,0x00, //-1-
0x08,0x0C,0x84,0xC4, 0x64,0x3C,0x18,0x00, 0x0E,0x0F,0x09,0x08, 0x08,0x0C,0x0C,0x00, //-2-
0x08,0x0C,0x44,0x44, 0x44,0xFC,0xB8,0x00, 0x04,0x0C,0x08,0x08, 0x08,0x0F,0x07,0x00, //-3-
0xC0,0xE0,0xB0,0x98, 0xFC,0xFC,0x80,0x00, 0x00,0x00,0x00,0x08, 0x0F,0x0F,0x08,0x00, //-4-
0x7C,0x7C,0x44,0x44, 0x44,0xC4,0x84,0x00, 0x04,0x0C,0x08,0x08, 0x08,0x0F,0x07,0x00, //-5-
0xF0,0xF8,0x4C,0x44, 0x44,0xC0,0x80,0x00, 0x07,0x0F,0x08,0x08, 0x08,0x0F,0x07,0x00, //-6-
0x0C,0x0C,0x04,0x84, 0xC4,0x7C,0x3C,0x00, 0x00,0x00,0x0F,0x0F, 0x00,0x00,0x00,0x00, //-7-
0xB8,0xFC,0x44,0x44, 0x44,0xFC,0xB8,0x00, 0x07,0x0F,0x08,0x08, 0x08,0x0F,0x07,0x00, //-8-
0x38,0x7C,0x44,0x44, 0x44,0xFC,0xF8,0x00, 0x00,0x08,0x08,0x08, 0x0C,0x07,0x03,0x00, //-9-
0x00,0x00,0x00,0x30, 0x30,0x00,0x00,0x00, 0x00,0x00,0x00,0x06, 0x06,0x00,0x00,0x00, //-:-
0x00,0x00,0x00,0x30, 0x30,0x00,0x00,0x00, 0x00,0x00,0x08,0x0E, 0x06,0x00,0x00,0x00, //-;-
0x00,0x80,0xC0,0x60, 0x30,0x18,0x08,0x00, 0x00,0x00,0x01,0x03, 0x06,0x0C,0x08,0x00, //-<-
0x00,0x20,0x20,0x20, 0x20,0x20,0x20,0x00, 0x00,0x01,0x01,0x01, 0x01,0x01,0x01,0x00, //-=-
0x00,0x08,0x18,0x30, 0x60,0xC0,0x80,0x00, 0x00,0x08,0x0C,0x06, 0x03,0x01,0x00,0x00, //->-
0x18,0x1C,0x04,0xC4, 0xE4,0x3C,0x18,0x00, 0x00,0x00,0x00,0x0D, 0x0D,0x00,0x00,0x00, //-?-
0xF0,0xF0,0x08,0xC8, 0xC8,0xF8,0xF0,0x00, 0x07,0x0F,0x08,0x0B, 0x0B,0x0B,0x01,0x00, //-@-  
0xE0,0xF0,0x98,0x8C, 0x98,0xF0,0xE0,0x00, 0x0F,0x0F,0x00,0x00, 0x00,0x0F,0x0F,0x00, //-A-
0x04,0xFC,0xFC,0x44, 0x44,0xFC,0xB8,0x00, 0x08,0x0F,0x0F,0x08, 0x08,0x0F,0x07,0x00, //-B-
0xF0,0xF8,0x0C,0x04, 0x04,0x0C,0x18,0x00, 0x03,0x07,0x0C,0x08, 0x08,0x0C,0x06,0x00, //-C-
0x04,0xFC,0xFC,0x04, 0x0C,0xF8,0xF0,0x00, 0x08,0x0F,0x0F,0x08, 0x0C,0x07,0x03,0x00, //-D-
0x04,0xFC,0xFC,0x44, 0xE4,0x0C,0x1C,0x00, 0x08,0x0F,0x0F,0x08, 0x08,0x0C,0x0E,0x00, //-E-
0x04,0xFC,0xFC,0x44, 0xE4,0x0C,0x1C,0x00, 0x08,0x0F,0x0F,0x08, 0x00,0x00,0x00,0x00, //-F-
0xF0,0xF8,0x0C,0x84, 0x84,0x8C,0x98,0x00, 0x03,0x07,0x0C,0x08, 0x08,0x07,0x0F,0x00, //-G-
0xFC,0xFC,0x40,0x40, 0x40,0xFC,0xFC,0x00, 0x0F,0x0F,0x00,0x00, 0x00,0x0F,0x0F,0x00, //-H-
0x00,0x00,0x04,0xFC, 0xFC,0x04,0x00,0x00, 0x00,0x00,0x08,0x0F, 0x0F,0x08,0x00,0x00, //-I-
0x00,0x00,0x00,0x04, 0xFC,0xFC,0x04,0x00, 0x07,0x0F,0x08,0x08, 0x0F,0x07,0x00,0x00, //-J-
0x04,0xFC,0xFC,0xC0, 0xE0,0x3C,0x1C,0x00, 0x08,0x0F,0x0F,0x00, 0x01,0x0F,0x0E,0x00, //-K-
0x04,0xFC,0xFC,0x04, 0x00,0x00,0x00,0x00, 0x08,0x0F,0x0F,0x08, 0x08,0x0C,0x0E,0x00, //-L-
0xFC,0xFC,0x38,0x70, 0x38,0xFC,0xFC,0x00, 0x0F,0x0F,0x00,0x00, 0x00,0x0F,0x0F,0x00, //-M-
0xFC,0xFC,0x38,0x70, 0xE0,0xFC,0xFC,0x00, 0x0F,0x0F,0x00,0x00, 0x00,0x0F,0x0F,0x00, //-N-
0xF8,0xFC,0x04,0x04, 0x04,0xFC,0xF8,0x00, 0x07,0x0F,0x08,0x08, 0x08,0x0F,0x07,0x00, //-O-
0x04,0xFC,0xFC,0x44, 0x44,0x7C,0x38,0x00, 0x08,0x0F,0x0F,0x08, 0x00,0x00,0x00,0x00, //-P-
0xF8,0xFC,0x04,0x04, 0x04,0xFC,0xF8,0x00, 0x07,0x0F,0x08,0x0E, 0x3C,0x3F,0x27,0x00, //-Q-
0x04,0xFC,0xFC,0x44, 0xC4,0xFC,0x38,0x00, 0x08,0x0F,0x0F,0x00, 0x00,0x0F,0x0F,0x00, //-R-
0x18,0x3C,0x64,0x44, 0xC4,0x9C,0x18,0x00, 0x06,0x0E,0x08,0x08, 0x08,0x0F,0x07,0x00, //-S-
0x00,0x1C,0x0C,0xFC, 0xFC,0x0C,0x1C,0x00, 0x00,0x00,0x08,0x0F, 0x0F,0x08,0x00,0x00, //-T-
0xFC,0xFC,0x00,0x00, 0x00,0xFC,0xFC,0x00, 0x07,0x0F,0x08,0x08, 0x08,0x0F,0x07,0x00, //-U-
0xFC,0xFC,0x00,0x00, 0x00,0xFC,0xFC,0x00, 0x01,0x03,0x06,0x0C, 0x06,0x03,0x01,0x00, //-V-
0xFC,0xFC,0x00,0x00, 0x00,0xFC,0xFC,0x00, 0x07,0x0F,0x0E,0x03, 0x0E,0x0F,0x07,0x00, //-W-
0x0C,0x3C,0xF0,0xE0, 0xF0,0x3C,0x0C,0x00, 0x0C,0x0F,0x03,0x01, 0x03,0x0F,0x0C,0x00, //-X-
0x00,0x0C,0x7C,0xC0, 0xC0,0x7C,0x3C,0x00, 0x00,0x00,0x08,0x0F, 0x0F,0x08,0x00,0x00, //-Y-
0x1C,0x0C,0x84,0xC4, 0x64,0x3C,0x1C,0x00, 0x0E,0x0F,0x09,0x08, 0x08,0x0C,0x0E,0x00, //-Z-
0x00,0x00,0xFC,0xFC, 0x04,0x04,0x00,0x00, 0x00,0x00,0x0F,0x0F, 0x08,0x08,0x00,0x00, //-[-
0x38,0x70,0xE0,0xC0, 0x80,0x00,0x00,0x00, 0x00,0x00,0x00,0x01, 0x03,0x07,0x0E,0x00, //-\-
0x00,0x00,0x04,0x04, 0xFC,0xFC,0x00,0x00, 0x00,0x00,0x08,0x08, 0x0F,0x0F,0x00,0x00, //-]-
0x08,0x0C,0x06,0x03, 0x06,0x0C,0x08,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, //-^-
0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x20,0x20,0x20,0x20, 0x20,0x20,0x20,0x20, //-_-
0x00,0x00,0x03,0x07, 0x04,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, //-`-
0x00,0xA0,0xA0,0xA0, 0xE0,0xC0,0x00,0x00, 0x07,0x0F,0x08,0x08, 0x07,0x0F,0x08,0x00, //-a-
0x04,0xFC,0xFC,0x20, 0x60,0xC0,0x80,0x00, 0x00,0x0F,0x0F,0x08, 0x08,0x0F,0x07,0x00, //-b-
0xC0,0xE0,0x20,0x20, 0x20,0x60,0x40,0x00, 0x07,0x0F,0x08,0x08, 0x08,0x0C,0x04,0x00, //-c-
0x80,0xC0,0x60,0x24, 0xFC,0xFC,0x00,0x00, 0x07,0x0F,0x08,0x08, 0x07,0x0F,0x08,0x00, //-d-
0xC0,0xE0,0xA0,0xA0, 0xA0,0xE0,0xC0,0x00, 0x07,0x0F,0x08,0x08, 0x08,0x0C,0x04,0x00, //-e-
0x40,0xF8,0xFC,0x44, 0x0C,0x18,0x00,0x00, 0x08,0x0F,0x0F,0x08, 0x00,0x00,0x00,0x00, //-f-
0xC0,0xE0,0x20,0x20, 0xC0,0xE0,0x20,0x00, 0x27,0x6F,0x48,0x48, 0x7F,0x3F,0x00,0x00, //-g-
0x04,0xFC,0xFC,0x40, 0x20,0xE0,0xC0,0x00, 0x08,0x0F,0x0F,0x00, 0x00,0x0F,0x0F,0x00, //-h-
0x00,0x00,0x20,0xEC, 0xEC,0x00,0x00,0x00, 0x00,0x00,0x08,0x0F, 0x0F,0x08,0x00,0x00, //-i-
0x00,0x00,0x00,0x00, 0x20,0xEC,0xEC,0x00, 0x00,0x30,0x70,0x40, 0x40,0x7F,0x3F,0x00, //-j-
0x04,0xFC,0xFC,0x80, 0xC0,0x60,0x20,0x00, 0x08,0x0F,0x0F,0x01, 0x03,0x0E,0x0C,0x00, //-k-
0x00,0x00,0x04,0xFC, 0xFC,0x00,0x00,0x00, 0x00,0x00,0x08,0x0F, 0x0F,0x08,0x00,0x00, //-l-
0xE0,0xE0,0x60,0xC0, 0x60,0xE0,0xC0,0x00, 0x0F,0x0F,0x00,0x07, 0x00,0x0F,0x0F,0x00, //-m-
0x20,0xE0,0xC0,0x20, 0x20,0xE0,0xC0,0x00, 0x00,0x0F,0x0F,0x00, 0x00,0x0F,0x0F,0x00, //-n-
0xC0,0xE0,0x20,0x20, 0x20,0xE0,0xC0,0x00, 0x07,0x0F,0x08,0x08, 0x08,0x0F,0x07,0x00, //-o-
0x20,0xE0,0xC0,0x20, 0x20,0xE0,0xC0,0x00, 0x40,0x7F,0x7F,0x48, 0x08,0x0F,0x07,0x00, //-p-
0xC0,0xE0,0x20,0x20, 0xC0,0xE0,0x20,0x00, 0x07,0x0F,0x08,0x48, 0x7F,0x7F,0x40,0x00, //-q-
0x20,0xE0,0xC0,0x60, 0x20,0xE0,0xC0,0x00, 0x08,0x0F,0x0F,0x08, 0x00,0x00,0x00,0x00, //-r-
0x40,0xE0,0xA0,0x20, 0x20,0x60,0x40,0x00, 0x04,0x0C,0x09,0x09, 0x0B,0x0E,0x04,0x00, //-s-
0x20,0x20,0xF8,0xFC, 0x20,0x20,0x00,0x00, 0x00,0x00,0x07,0x0F, 0x08,0x0C,0x04,0x00, //-t-
0xE0,0xE0,0x00,0x00, 0xE0,0xE0,0x00,0x00, 0x07,0x0F,0x08,0x08, 0x07,0x0F,0x08,0x00, //-u-
0x00,0xE0,0xE0,0x00, 0x00,0xE0,0xE0,0x00, 0x00,0x03,0x07,0x0C, 0x0C,0x07,0x03,0x00, //-v-
0xE0,0xE0,0x00,0x80, 0x00,0xE0,0xE0,0x00, 0x07,0x0F,0x0C,0x07, 0x0C,0x0F,0x07,0x00, //-w-
0x20,0x60,0xC0,0x80, 0xC0,0x60,0x20,0x00, 0x08,0x0C,0x07,0x03, 0x07,0x0C,0x08,0x00, //-x-
0xE0,0xE0,0x00,0x00, 0x00,0xE0,0xE0,0x00, 0x47,0x4F,0x48,0x48, 0x68,0x3F,0x1F,0x00, //-y-
0x60,0x60,0x20,0xA0, 0xE0,0x60,0x20,0x00, 0x0C,0x0E,0x0B,0x09, 0x08,0x0C,0x0C,0x00, //-z-
0x00,0x40,0x40,0xF8, 0xBC,0x04,0x04,0x00, 0x00,0x00,0x00,0x07, 0x0F,0x08,0x08,0x00, //-{-
0x00,0x00,0x00,0xBC, 0xBC,0x00,0x00,0x00, 0x00,0x00,0x00,0x0F, 0x0F,0x00,0x00,0x00, //-|-
0x00,0x04,0x04,0xBC, 0xF8,0x40,0x40,0x00, 0x00,0x08,0x08,0x0F, 0x07,0x00,0x00,0x00, //-}-
0x08,0x0C,0x04,0x0C, 0x08,0x0C,0x04,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, //-~-
};
const uint8_t  test_d[][128]={
/*--  文字:  张  --*/
/*--  幼圆23;  此字体下对应的点阵为:宽x高=32x31   --*/
/*--  高度不是8的倍数,现调整为:宽度x高度=32x32  --*/
0x00,0x08,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1F,0x0F,0x0F,0x00,0x00,0x1F,0x1F,
0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x07,0x0F,0x0E,0x00,0x00,0x00,0x00,0x00,
0x00,0x07,0x0F,0x1F,0x1C,0x18,0x18,0x18,0x18,0xF8,0xF8,0xF0,0x01,0x01,0xFF,0xFF,
0xFF,0x0F,0x0F,0x1D,0x3D,0x79,0xF1,0xE1,0xC1,0x81,0x01,0x01,0x01,0x00,0x00,0x00,
0x00,0xE0,0xF0,0xF8,0x38,0x38,0x38,0x38,0x38,0x3F,0x1F,0x9F,0xC0,0xC0,0xFF,0xFF,
0xFF,0xC0,0xC0,0xC0,0xF0,0xFE,0xFF,0xCF,0xC1,0xC0,0xC0,0xC0,0xC0,0xC0,0x80,0x00,
0x00,0x00,0x0C,0x0C,0x0E,0x06,0x06,0x06,0x06,0xFE,0xFE,0xFC,0x00,0x00,0xFC,0xFE,
0xFE,0x06,0x0E,0x0E,0x1C,0x1C,0x98,0xE0,0xF0,0x78,0x3C,0x1E,0x0E,0x06,0x06,0x00,

/*--  文字:  广  --*/
/*--  幼圆23;  此字体下对应的点阵为:宽x高=32x31   --*/
/*--  高度不是8的倍数,现调整为:宽度x高度=32x32  --*/
0x00,0x00,0x00,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x13,0x3B,0x3F,
0x1F,0x07,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x02,0x00,0x00,
0x00,0x00,0x00,0xFF,0xFF,0xFF,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,0x00,
0x00,0x00,0x07,0xFF,0xFF,0xF0,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,0x00,
0x00,0x1E,0xFE,0xFE,0xE0,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,0x00,0x00,

/*--  文字:  政  --*/
/*--  幼圆23;  此字体下对应的点阵为:宽x高=32x31   --*/
/*--  高度不是8的倍数,现调整为:宽度x高度=32x32  --*/
0x00,0x06,0x06,0x06,0x06,0x06,0x06,0x07,0x07,0x07,0x06,0x06,0x06,0x06,0x06,0x02,
0x00,0x1F,0x1F,0x0F,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x01,0x00,0x00,
0x00,0x00,0x1F,0x1F,0x0F,0x00,0x00,0xFF,0xFF,0xFF,0x03,0x03,0x03,0x03,0x01,0x0F,
0xFF,0xFF,0xFF,0x81,0x80,0x80,0x80,0x81,0xFF,0xFF,0xFE,0x80,0x80,0x80,0x00,0x00,
0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x60,0xE0,0xE0,
0xC0,0xC0,0xF8,0xFC,0x3F,0x0F,0x1F,0xFF,0xF8,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,
0x06,0x0E,0xFC,0xFC,0xFC,0x1C,0x18,0xF8,0xF8,0xF0,0x72,0x66,0xE6,0xEE,0xDC,0x9C,
0x38,0x78,0x70,0xE0,0xC0,0xC0,0xC0,0xE0,0xF0,0x38,0x3C,0x1E,0x0E,0x06,0x02,0x00,
};
const uint8_t  Number_32x64[][256]={
/*--  文字:  0  --*/
/*--  幼圆48;  此字体下对应的点阵为:宽x高=32x64   --*/
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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x07,0x0F,0x1F,0x1F,0x3E,0x3C,0x38,0x30,
0x30,0x38,0x38,0x3C,0x1F,0x1F,0x0F,0x07,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x03,0x1F,0x7F,0xFF,0xFF,0xFF,0xFC,0xC0,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xC0,0xFC,0xFF,0xFF,0xFF,0x7F,0x1F,0x01,0x00,0x00,0x00,
0x00,0x00,0x1F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,
0x00,0x00,0xFC,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,
0x00,0x00,0x00,0xE0,0xFC,0xFF,0xFF,0xFF,0xFF,0x1F,0x01,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x01,0x3F,0xFF,0xFF,0xFF,0xFF,0xFC,0xC0,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0xE0,0xF0,0xF8,0xFC,0x7C,0x3E,0x0E,0x0E,0x06,
0x06,0x0E,0x0E,0x1E,0x7C,0xFC,0xF8,0xF0,0xE0,0xC0,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

/*--  文字:  1  --*/
/*--  幼圆48;  此字体下对应的点阵为:宽x高=32x64   --*/
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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x03,0x03,0x03,0x07,0x07,0x07,0x0F,0x1F,
0x3F,0x3F,0x3F,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,0x80,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,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,0x00,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,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,0x00,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,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,0x00,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x0C,0x0C,0x0C,0x0C,0x1C,0x1C,0xFC,0xFC,0xFC,
0xFC,0xFC,0xFC,0x3C,0x1C,0x1C,0x0C,0x0C,0x0C,0x0C,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

/*--  文字:  2  --*/
/*--  幼圆48;  此字体下对应的点阵为:宽x高=32x64   --*/
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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x03,0x07,0x0F,0x0F,0x1E,0x1C,0x38,0x38,0x38,0x30,0x30,
0x30,0x38,0x38,0x3C,0x3C,0x3F,0x1F,0x1F,0x0F,0x07,0x03,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x3E,0xFF,0xFF,0xFF,0xFF,0xFF,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x03,0x0F,0x3F,0xFF,0xFF,0xFE,0xF8,0xF0,0x80,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x07,0x0F,0x1F,
0x3E,0x7C,0xF8,0xF0,0xE0,0xC0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x01,0x03,0x07,0x0F,0x1E,0x7C,0xF8,0xF0,0xE0,0xC0,0x80,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0F,0x1F,0x1F,0x18,0x00,0x00,0x00,
0x00,0x00,0x1C,0x7C,0xFC,0xFC,0xFC,0xBC,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,
0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x7C,0xFC,0xFC,0xFC,0xFC,0xF0,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

/*--  文字:  3  --*/
/*--  幼圆48;  此字体下对应的点阵为:宽x高=32x64   --*/
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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x01,0x03,0x07,0x0F,0x1F,0x1C,0x38,0x38,0x38,0x30,0x30,0x30,
0x38,0x38,0x3C,0x3E,0x1F,0x1F,0x0F,0x07,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0xF8,0xFC,0xFC,0xFC,0xFC,0x3C,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x80,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x03,0x07,0x07,
0x07,0x0F,0x0F,0x1F,0x7D,0xFD,0xF8,0xF0,0xE0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,
0x80,0x80,0xC0,0xC0,0xE0,0xF0,0xFE,0x7F,0x7F,0x3F,0x0F,0x07,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x07,0x0F,0x1F,0x1F,0x1F,0x1F,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xFF,0xFF,0xFF,0xFF,0xFF,0xF8,0x00,0x00,0x00,
0x00,0x00,0x00,0x80,0xE0,0xF0,0xF8,0xFC,0xFC,0x1C,0x1E,0x0E,0x0E,0x06,0x06,0x06,
0x0E,0x0E,0x0E,0x1E,0x3C,0x7C,0xFC,0xF8,0xF0,0xE0,0xC0,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

/*--  文字:  4  --*/
/*--  幼圆48;  此字体下对应的点阵为:宽x高=32x64   --*/
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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x03,0x07,0x1F,0x3F,0x3F,0x3F,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x07,0x1F,0x3E,
0xFC,0xF0,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x07,0x1F,0x7E,0xFC,0xF0,0xC0,0x80,0x00,
0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x03,0x07,0x1F,0x7F,0xFD,0xF1,0xC1,0x81,0x01,0x01,0x01,0x01,0x01,0x01,
0x01,0x01,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00,
0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x0C,0x0C,0x0C,
0x0C,0x0C,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0x1C,0x0C,0x0C,0x0C,0x0C,0x0C,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

/*--  文字:  5  --*/
/*--  幼圆48;  此字体下对应的点阵为:宽x高=32x64   --*/
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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x1F,0x1F,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,
0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1C,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x0F,0xFF,0xFF,0xFF,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,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xF3,0x07,0x0F,0x0F,0x1E,0x1E,0x1E,0x1C,
0x1C,0x1E,0x1E,0x1E,0x1F,0x1F,0x0F,0x0F,0x07,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xE0,0xE0,0xE0,0xE0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xC0,0xF0,0xFF,0xFF,0xFF,0xFF,0x7F,0x07,0x00,0x00,0x00,
0x00,0x00,0x00,0x0F,0x3F,0x3F,0x3F,0x3F,0x3F,0x1E,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xFF,0xFF,0xFF,0xFF,0xFF,0xF0,0x00,0x00,0x00,
0x00,0x00,0x00,0x80,0xC0,0xF0,0xF0,0xF8,0xFC,0x1C,0x1E,0x0E,0x0E,0x0E,0x06,0x06,
0x06,0x0E,0x0E,0x1E,0x3E,0x7C,0xFC,0xF8,0xF0,0xE0,0xC0,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

/*--  文字:  6  --*/
/*--  幼圆48;  此字体下对应的点阵为:宽x高=32x64   --*/
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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x07,0x0F,0x1F,0x1E,0x1C,0x38,0x38,
0x38,0x30,0x30,0x38,0x38,0x3F,0x3F,0x1F,0x1F,0x0F,0x03,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x01,0x0F,0x3F,0xFF,0xFF,0xFF,0xF8,0xC0,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xE0,0xE0,0xE0,0xE0,0xE0,0xC0,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x07,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x07,0x0F,0x1F,0x1E,0x3C,0x3C,0x3C,
0x38,0x38,0x3C,0x3C,0x3E,0x3F,0x3F,0x1F,0x0F,0x0F,0x03,0x01,0x00,0x00,0x00,0x00,
0x00,0x00,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xE0,0x80,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xF0,0xFF,0xFF,0xFF,0xFF,0x3F,0x00,0x00,0x00,
0x00,0x00,0x00,0xF8,0xFE,0xFF,0xFF,0xFF,0xFF,0x07,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xFF,0xFF,0xFF,0xFF,0xFE,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x80,0xE0,0xF0,0xF8,0xFC,0xFC,0x7C,0x1E,0x1E,0x0E,0x0E,
0x06,0x06,0x0E,0x0E,0x1E,0x1C,0x7C,0xF8,0xF8,0xF0,0xC0,0x80,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

/*--  文字:  7  --*/
/*--  幼圆48;  此字体下对应的点阵为:宽x高=32x64   --*/
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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x03,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1E,0x1E,0x1E,0x1E,0x1E,
0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1F,0x1F,0x1F,0x1E,0x1C,0x00,0x00,0x00,
0x00,0x00,0x00,0x0C,0xFC,0xFC,0xF8,0xC0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x01,0x03,0x0F,0x3F,0xFE,0xF8,0xE0,0x80,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x03,0x1F,0x7F,0xFF,0xFC,0xE0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x07,0x3F,0xFF,
0xFF,0xFF,0xF0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,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,0xFC,0xFE,0xFE,0xFE,0xFE,
0xFE,0xFC,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,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

/*--  文字:  8  --*/
/*--  幼圆48;  此字体下对应的点阵为:宽x高=32x64   --*/
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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x01,0x03,0x07,0x0F,0x1F,0x1E,0x3C,0x38,0x38,0x38,0x30,0x30,
0x30,0x38,0x38,0x38,0x3C,0x1E,0x1F,0x0F,0x0F,0x07,0x03,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x7F,0xFF,0xFF,0xFF,0xFF,0x83,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0xC0,0xE0,0xF8,0xF8,0xFC,0xFF,0x7F,0x3F,0x1F,0x1F,0x0F,0x0F,
0x07,0x07,0x07,0x07,0x0F,0x1F,0x7C,0xFC,0xF8,0xF0,0xC0,0x80,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x07,0x0F,0x1F,0x3F,0x7F,0xF8,0xF0,0xE0,0xC0,0x80,0x80,0xC0,0xC0,
0xE0,0xE0,0xF0,0xF8,0xFC,0xFE,0xFF,0x7F,0x3F,0x1F,0x0F,0x03,0x00,0x00,0x00,0x00,
0x00,0x00,0xFE,0xFF,0xFF,0xFF,0xFF,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC1,0xFF,0xFF,0xFF,0xFF,0xFE,0x00,0x00,0x00,
0x00,0x00,0x00,0x80,0xC0,0xF0,0xF0,0xF8,0x7C,0x3C,0x1E,0x0E,0x0E,0x0E,0x06,0x06,
0x06,0x0E,0x0E,0x0E,0x1E,0x1C,0x7C,0xF8,0xF8,0xF0,0xE0,0x80,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

/*--  文字:  9  --*/
/*--  幼圆48;  此字体下对应的点阵为:宽x高=32x64   --*/
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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x01,0x03,0x07,0x0F,0x1F,0x1F,0x3C,0x3C,0x38,0x38,0x30,0x30,
0x30,0x38,0x38,0x3C,0x1E,0x1F,0x0F,0x07,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x0F,0x7F,0xFF,0xFF,0xFF,0xFF,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x80,0xF0,0xFF,0xFF,0xFF,0xFF,0x1F,0x03,0x00,0x00,0x00,
0x00,0x00,0xFC,0xFF,0xFF,0xFF,0xFF,0xFF,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x01,0x03,0x0F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,
0x00,0x00,0x00,0x80,0xC0,0xE0,0xF0,0xF8,0xF8,0xFC,0x7C,0x3C,0x3C,0x1C,0x1C,0x1C,
0x3C,0x3C,0x78,0xF8,0xF0,0xE0,0xC7,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x03,0x03,0x03,0x01,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x03,0x1F,0xFF,0xFF,0xFF,0xFE,0xF8,0xE0,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0xE0,0xF0,0xF8,0xFC,0xFE,0xFE,0xFE,0x0E,0x06,0x06,0x0E,0x0E,
0x0E,0x1E,0x3C,0xFC,0xF8,0xF0,0xE0,0xC0,0x80,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

};
const uint8_t  Number_16x32[][64]={
/*--  文字:  0  --*/
/*--  华文彩云22;  此字体下对应的点阵为:宽x高=16x30   --*/
/*--  高度不是8的倍数,现调整为:宽度x高度=16x32  --*/
0x01,0x07,0x0F,0x1C,0x38,0x30,0x30,0x20,0x20,0x30,0x30,0x38,0x1C,0x0F,0x07,0x00,
0xFF,0xFF,0x80,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x80,0xFF,0x00,
0xC0,0xF0,0xF8,0x1C,0x0E,0x06,0xC6,0xC2,0xC2,0xC6,0x06,0x0E,0x1C,0xF8,0xF0,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

/*--  文字:  1  --*/
/*--  华文彩云22;  此字体下对应的点阵为:宽x高=16x30   --*/
/*--  高度不是8的倍数,现调整为:宽度x高度=16x32  --*/
0x00,0x00,0x00,0x00,0x1F,0x1F,0x10,0x10,0x10,0x10,0x1F,0x1F,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0xFE,0xFE,0x02,0x02,0x02,0x02,0xFE,0xFE,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

/*--  文字:  2  --*/
/*--  华文彩云22;  此字体下对应的点阵为:宽x高=16x30   --*/
/*--  高度不是8的倍数,现调整为:宽度x高度=16x32  --*/
0x01,0x07,0x0F,0x1C,0x38,0x30,0x30,0x20,0x20,0x30,0x30,0x38,0x1C,0x0F,0x07,0x00,
0xF0,0xFC,0xFE,0x07,0x03,0x07,0x7F,0x7E,0x78,0x60,0x00,0x01,0x07,0xFF,0xFC,0x00,
0x00,0x06,0x1E,0x7E,0xF2,0xC2,0x02,0x02,0x02,0x02,0x02,0x82,0x82,0x82,0xFE,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

/*--  文字:  3  --*/
/*--  华文彩云22;  此字体下对应的点阵为:宽x高=16x30   --*/
/*--  高度不是8的倍数,现调整为:宽度x高度=16x32  --*/
0x00,0x1F,0x1F,0x1F,0x10,0x10,0x10,0x10,0x10,0x10,0x11,0x17,0x1F,0x1C,0x00,0x00,
0x00,0xC1,0xDF,0xFD,0x7F,0x47,0x07,0x03,0x00,0x20,0xF0,0xFC,0x9F,0x0F,0x00,0x00,
0x00,0xFC,0xFE,0xFE,0x86,0x82,0x82,0x06,0x06,0x06,0x0C,0x3C,0xF8,0xF0,0x00,0x40,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

/*--  文字:  4  --*/
/*--  华文彩云22;  此字体下对应的点阵为:宽x高=16x30   --*/
/*--  高度不是8的倍数,现调整为:宽度x高度=16x32  --*/
0x00,0x00,0x00,0x01,0x07,0x1F,0x1C,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x1F,0x00,
0x03,0x0F,0x3F,0xFC,0xE0,0x80,0x00,0x18,0x7F,0x7F,0x00,0x00,0x00,0x00,0xFF,0x00,
0xC0,0xC0,0x40,0x40,0x40,0x40,0x40,0x40,0xFE,0xFE,0x02,0x02,0x02,0x02,0xFE,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

/*--  文字:  5  --*/
/*--  华文彩云22;  此字体下对应的点阵为:宽x高=16x30   --*/
/*--  高度不是8的倍数,现调整为:宽度x高度=16x32  --*/
0x00,0x00,0x07,0x1F,0x1E,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x1F,0x1F,0x1F,0x00,
0x02,0x3F,0xFF,0xF4,0x04,0x06,0x07,0x43,0x41,0x60,0x70,0x78,0xFE,0xDF,0xC7,0x03,
0x00,0xFC,0xFE,0xC6,0xC6,0x46,0xC2,0xC2,0x86,0x06,0x0E,0x1C,0x78,0xF0,0xE0,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

/*--  文字:  6  --*/
/*--  华文彩云22;  此字体下对应的点阵为:宽x高=16x30   --*/
/*--  高度不是8的倍数,现调整为:宽度x高度=16x32  --*/
0x00,0x00,0x07,0x1F,0x3E,0x30,0x30,0x30,0x1B,0x1F,0x0F,0x08,0x00,0x00,0x00,0x00,
0x1F,0xFF,0xF8,0xC0,0x00,0x01,0x0F,0x7F,0xFB,0xE3,0xC0,0xE0,0xE0,0x78,0x3F,0x00,
0xE0,0xF0,0x3C,0x1C,0x0E,0x06,0x86,0x82,0x82,0x86,0x06,0x0E,0x0C,0x38,0xF0,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

/*--  文字:  7  --*/
/*--  华文彩云22;  此字体下对应的点阵为:宽x高=16x30   --*/
/*--  高度不是8的倍数,现调整为:宽度x高度=16x32  --*/
0x1F,0x1F,0x1F,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x11,0x1F,0x1F,0x00,
0xC0,0xC0,0xC0,0x40,0x47,0x7F,0x7E,0x70,0x00,0x00,0x03,0x1F,0xFF,0xF8,0xC0,0x00,
0x00,0x02,0x1E,0xFE,0xFA,0xC2,0x02,0x02,0x06,0x3E,0xFE,0xF0,0x80,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

/*--  文字:  8  --*/
/*--  华文彩云22;  此字体下对应的点阵为:宽x高=16x30   --*/
/*--  高度不是8的倍数,现调整为:宽度x高度=16x32  --*/
0x00,0x07,0x0F,0x1E,0x38,0x30,0x31,0x21,0x21,0x31,0x30,0x38,0x1F,0x0F,0x07,0x00,
0x07,0xFF,0xFE,0x70,0x00,0x01,0xC3,0xC3,0xC3,0xC3,0x01,0x00,0x70,0xFE,0xFF,0x20,
0xE0,0xF0,0x78,0x1C,0x0E,0x86,0xC6,0xC2,0xC2,0xC6,0x86,0x0E,0x1C,0x7C,0xF0,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

/*--  文字:  9  --*/
/*--  华文彩云22;  此字体下对应的点阵为:宽x高=16x30   --*/
/*--  高度不是8的倍数,现调整为:宽度x高度=16x32  --*/
0x03,0x07,0x0E,0x1C,0x38,0x30,0x30,0x20,0x20,0x30,0x30,0x38,0x1C,0x0E,0x07,0x03,
0xFC,0xFE,0x07,0x01,0x01,0x00,0xF1,0xF7,0xFF,0xF8,0x40,0x00,0x01,0x07,0xFF,0xFC,
0x00,0x00,0x00,0x80,0xC8,0xFC,0xFC,0xEE,0x06,0x06,0x07,0x3F,0xFE,0xF0,0x80,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};


/*

void RAV4_VFD::writebyte(uint8_t c)
{
//  delayns();
//  shiftOut(dataPin,clockPin,bitOrder,value) .
   shiftOut(_SDA, _SCL, MSBFIRST, c);
   }



void RAV4_VFD::writepic2(uint8_t c)
{

//  delayns();
   shiftOut(16, 5, MSBFIRST, c);

    }

*/
void RAV4_VFD::writebyte(unsigned char temp)//写数据
{
    uint8_t i;
    for(i=0;i<8;i++)   //8位,循环8次
{
digitalWrite(_SCL, LOW);
if(temp & 0x80)    ////等待发送完毕 SPIF = 1.取出最高位   这儿的 &0x01 原先没看懂
digitalWrite(_SDA, HIGH);
else
digitalWrite(_SDA, LOW);
digitalWrite(_SCL, LOW);
// 低1位移高1位后
//  左移至下一位
temp=temp<<=1;
digitalWrite(_SCL, HIGH);
}

}


//显示 32x32 点阵图像、汉字、生僻字或 32x32 点阵的其他图标
void RAV4_VFD::display_graphic_32x32(uint8_t page,uint8_t column,uint8_t *dp)
{
    uint8_t X,Y;

    for(Y=0;Y<4;Y++)
for(X=0;X<32;X++)
{
    Display_ram[X+column][Y+page]=*dp;
    dp++;
}
}
//显示 16x32 点阵图像、汉字、生僻字或 32x32 点阵的其他图标
void RAV4_VFD::display_graphic_16x32(uint8_t page,uint8_t column,uint8_t *dp)
{
    uint8_t X,Y;

    for(Y=0;Y<4;Y++)
for(X=0;X<16;X++)
{
    Display_ram[X+column][Y+page]=*dp;
    dp++;
}
}

//显示 32x64 点阵图像、汉字、生僻字或 32x64 点阵的其他图标
void RAV4_VFD::display_graphic_32x64(uint8_t page,uint8_t column,uint8_t *dp)
{
    uint8_t X,Y;

    for(Y=0;Y<8;Y++)
for(X=0;X<32;X++)
{
    Display_ram[X+column][Y+page]=*dp;
    dp++;
}
}

uint8_t RAV4_VFD::zjdx(uint8_t src)//字节倒序
{
    uint8_t des = 0;
    int i=0;
    for(;i<8;i++)
    {
        if(src & 0x1)
        des |= 1 << (7-i);
        else
        des &= ~(1 << (7-i));
        src >>= 1;
    }
    return des;
}

void RAV4_VFD::display_string_5x8(uint8_t page,uint8_t column,unsigned char *dp)
{
    uint16_t i=0,j,k;
while(dp>0x00)
{
    if((dp>=0x20)&&(dp<=0x7e))
    {
j=dp-0x20;
for(k=0;k<5;k++)
Display_ram[k+column][page]=zjdx(ascii_table_5x8[j][k]);
i++;
column+=6;
    }
    else
    i++;
}
}

void RAV4_VFD::display_string_8x16(uint8_t page,uint8_t column,unsigned char *dp)
{
    uint16_t i=0,j,k,n;
while(dp>0x00)
{
    if((dp>=0x20)&&(dp<=0x7e))
    {
j=dp-0x20;
for(n=0;n<2;n++)
{
for(k=0;k<8;k++)
Display_ram[k+column][n+page]=zjdx(ascii_table_8x16[j][k+8*n]);
}
i++;
column+=8;
    }
    else
    i++;
}
}

void RAV4_VFD::Display()

{

    Serial.println(digitalRead(_CS));
    Serial.println("displaying test");
    static int i=0;
    unsigned char x=0,y=0;
    display_graphic_32x32(0,0,(uint8_t *)test_d[0]);
    display_graphic_32x32(0,32,(uint8_t *)test_d[1]);
    display_graphic_32x32(0,64,(uint8_t *)test_d[2]);

    display_string_8x16(4,1,(uint8_t *)"0123456789 ~!@#$%^&*()_+{}:;|");
    display_string_5x8(6,1,(uint8_t *)"ABCDEFGHIJKLMNOPQRSTUVWXYZ");
//    {
//display_graphic_32x64(0,10+32*0,(uint8_t *)Number_32x64[(i/10000)%10]);
//display_graphic_32x64(0,10+32*1,(uint8_t *)Number_32x64[(i/1000)%10]);
//display_graphic_32x64(0,10+32*2,(uint8_t *)Number_32x64[(i/100)%10]);
//display_graphic_32x64(0,10+32*3,(uint8_t *)Number_32x64[(i/10)%10]);
//display_graphic_32x64(0,10+32*4,(uint8_t *)Number_32x64[i%10]);
//i++;
//    }
digitalWrite(_CS,LOW);
    writebyte(0x0f);
    writebyte(0x00);
    writebyte(0xff);
    writebyte(0xfc);  //开始
    for(x=0;x<255;x++)
for(y=0;y<8;y++)
    writebyte(Display_ram[x][y]);
digitalWrite(_CS, HIGH);
digitalWrite(_CS,LOW); //结束
    writebyte(0x01);
    writebyte(0x02);
digitalWrite(_CS, HIGH);

}



// 构造函数

RAV4_VFD::RAV4_VFD(byte SerailData, byte SerailClock,byte ChipSelect,byte Sleep,byte Reset)
{
    _SDA = SerailData;
    _SCL  = SerailClock;
    _CS  = ChipSelect;
    _SL  = Sleep;
    _RS = Reset;
    pinMode(_SDA, OUTPUT);
    pinMode(_SCL, OUTPUT);
    pinMode(_CS, OUTPUT);
    pinMode(_SL, OUTPUT);
    pinMode(_RS, OUTPUT);
    //init();
}

// set pin 10 as the slave select for the digital port

void RAV4_VFD::Init()
{

//RAV4_VFD RAV4_VFD(_SDA, _SCL,_CS,_SL,_RS);
/*
//Serial.println("vfd is initializing,sleep is");
Serial.println(digitalRead(_SL));

Serial.println("vfd is initializing,reset is");
Serial.println(digitalRead(_RS));

Serial.println("vfd is initializing,CS is");
Serial.println(digitalRead(_CS));
*/
//digitalWrite(RS, HIGH);        // VFD _RESET OFF
//digitalWrite(SL, HIGH); //     _CS
//     _CS
//CS为片选引脚


//先把sleep和reset拉高,使vfd芯片正常
//
digitalWrite(_SL, HIGH);
digitalWrite(_RS, HIGH);
//digitalWrite(_SCL, HIGH);
//Serial.println("vfd is step 2,sleep is");
//Serial.println(digitalRead(_SL));

//Serial.println("vfd is step 2,reset is");
//Serial.println(digitalRead(_RS));

delayMicroseconds(1);
//传输SPI前先拉低片选管脚,使能SPI设备。
digitalWrite(_CS,LOW);
Serial.println("vfd is step 2,CS is");
//Serial.println(digitalRead(_CS));
delayMicroseconds(1);
    writebyte(0x33);
Serial.println("write ok");
    writebyte(0x40);
    writebyte(0x00 );
    //结束传输SPI,拉高片选管脚,禁止SPI设备。
digitalWrite(_CS, HIGH);

delayMicroseconds(1);
digitalWrite(_CS,LOW);
    writebyte(0x07);
    writebyte(0x3f);
    writebyte(0x7c);
    writebyte(0x00);
    writebyte(0x04);
    writebyte(0x01);
    writebyte(0x01);
    writebyte(0x01);
digitalWrite(_CS, HIGH);
delayMicroseconds(1);
digitalWrite(_CS,LOW);
    writebyte(0x8d);
    writebyte(0x04);
    writebyte(0xfc);
    writebyte(0x00);
    writebyte(0x80);
digitalWrite(_CS, HIGH);
delayMicroseconds(1);
digitalWrite(_CS,LOW);
    writebyte(0x05);
    writebyte(0x00);
    writebyte(0x00);
digitalWrite(_CS, HIGH);
delayMicroseconds(1);
digitalWrite(_CS,LOW);
    writebyte(0x03);
    writebyte(0x00);
    writebyte(0x00);
digitalWrite(_CS, HIGH);
delayMicroseconds(1);
digitalWrite(_CS,LOW);
    writebyte(0x0b);
    writebyte(0x00);
    writebyte(0xff);
    writebyte(0x02);
digitalWrite(_CS, HIGH);
delayMicroseconds(1);
digitalWrite(_CS,LOW);
    writebyte(0x05);
    writebyte(0x30);
    writebyte(0xff);    //与亮度有关
digitalWrite(_CS, HIGH);
delayMicroseconds(1);
digitalWrite(_CS,LOW);

Serial.println("vfd is initialized,ready for data");
}

char light;  //亮度
void RAV4_VFD::light_set(unsigned char light)
{

digitalWrite(_CS,LOW);
writebyte(0xa0);        //亮度调节
writebyte(0x0c);
writebyte(light);       //亮度
digitalWrite(_CS,HIGH);

}


----------------------------------------------------------------
RAV4_VFD.h----------------------------------------------------------------
//导入arduino核心头文件
#if defined(ARDUINO) && ARDUINO >= 100
    #include "Arduino.h"
#else
    #include "WProgram.h"
#endif


#ifndef __RAV4_VFD_H_
#define __RAV4_VFD_H_

/*
#ifndef _stdint_H_
#define _stdint_H_
#endif
#ifndef _SPI_H_
#define _SPI_H_
#endif
#ifndef _inttypes_H_
#define _inttypes_H_
//#endif
*/
#include <stdint.h>
#include <inttypes.h>
#include <SPI.h>

class RAV4_VFD
{
private:
char _SDA;  //serial data
char _SCL; //serial clock
char _CS; //片选
char _SL; //sleep
char _RS; //reset
char _light; //亮度

public:
RAV4_VFD(byte SerailData, byte SerailClock,byte ChipSelect,byte Sleep,byte Reset);//构造函数
//RAV4_VFD::~RAV4_VFD(); //析构函数
void display_string_8x16(uint8_t page,uint8_t column,unsigned char *dp);
void display_string_5x8(uint8_t page,uint8_t column,unsigned char *dp);
uint8_t zjdx(uint8_t src);
void display_graphic_32x64(uint8_t page,uint8_t column,uint8_t *dp);
void display_graphic_16x32(uint8_t page,uint8_t column,uint8_t *dp);
void display_graphic_32x32(uint8_t page,uint8_t column,uint8_t *dp);
void writebyte(unsigned char temp);
void Init();  //初始化
void Display();      //显示
void light_set(unsigned char light); //亮度调节
};

#endif


----------------------------------------------------------------
----------------keywords.txt-----------------------------------
RAV4_VFD   KEYWORD1
Init   KEYWORD2
light_set KEYWORD3


[ 此帖被stategrid在2018-07-19 00:06重新编辑 ]
本帖最近打赏记录:共2条打赏M币+21
数码家园 M币 +13 - 2018-07-13
zidian M币 +8 謝謝分享 2018-07-13

发帖
16077
M币
7554
专家
263
粉丝
240
只看该作者 1楼 发表于: 2018-07-12
请登录后查看
离线stategrid

发帖
36
M币
742
专家
-1
粉丝
6
只看该作者 2楼 发表于: 2018-07-12
回 人艰不拆了 的帖子
请登录后查看
[ 此帖被stategrid在2018-07-13 02:02重新编辑 ]

发帖
16077
M币
7554
专家
263
粉丝
240
只看该作者 3楼 发表于: 2018-07-12
回 stategrid 的帖子
请登录后查看
离线stategrid

发帖
36
M币
742
专家
-1
粉丝
6
只看该作者 4楼 发表于: 2018-07-12
回 人艰不拆了 的帖子
请登录后查看

发帖
2106
M币
4476
专家
6
粉丝
59
只看该作者 5楼 发表于: 2018-07-12
请登录后查看
离线ifus

发帖
558
M币
1040
专家
0
粉丝
11
只看该作者 6楼 发表于: 2018-07-12
请登录后查看
离线stategrid

发帖
36
M币
742
专家
-1
粉丝
6
只看该作者 7楼 发表于: 2018-07-12
回 ifus 的帖子
请登录后查看
快速回复
限80 字节
如果您提交过一次失败了,可以用”恢复数据”来恢复帖子内容
 
上一个 下一个