话说最近我最近新淘了一块SPI还带触摸的屏,我喜欢的不得了。这就好像给我的单片机生涯注入了一股子活力。让根来无屏的板板可以最大发挥作用。
我这个人比较“仇富”。有的显示屏要40根线,除了显示快之外,占用了很多管脚,让我十分恼火。所以我的板子,除非自带屏,都是没有屏地。
我比较喜欢SPI串口屏。
还有我的STM最小开发板在板子堆里也已经很久了。今天把它们凑一块,搞点事件。我用nucleo上的STLINK2为最小开发板下程序,运行效果如下:
程序么比较简单,不说了。在这里说一下取模软件。这次用的取模软件是PCtoLCD2020,取出的值带大括号。
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0xC0,0x01,0x00,0x00,0xC0,0x00,0x00},
{0x00,0xC0,0x00,0x00,0x00,0xC0,0x00,0x00,0x20,0xC0,0x00,0x01,0xE0,0xFF,0xFF,0x03,0x60,0xC0,0x00,0x03},
{0x60,0xC0,0x00,0x03,0x60,0xC0,0x00,0x03,0x60,0xC0,0x00,0x03,0x60,0xC0,0x00,0x03,0xE0,0xFF,0xFF,0x03},
{0x60,0xC0,0x00,0x03,0x60,0xC0,0x00,0x03,0x60,0xC0,0x00,0x03,0x60,0xC0,0x00,0x03,0x60,0xC0,0x00,0x03},
{0x60,0xC0,0x00,0x03,0xE0,0xFF,0xFF,0x03,0x60,0xC0,0x00,0x03,0x60,0xC0,0x00,0x10,0x00,0xC0,0x00,0x10},
{0x00,0xC0,0x00,0x10,0x00,0xC0,0x00,0x10,0x00,0xC0,0x00,0x18,0x00,0xC0,0xFF,0x3F,0x00,0x80,0xFF,0x1F},
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"电",0*/
我编译出现: excess elements inscalar initializer的错误。
后来我把大括号去掉编译通过了。我想这就是软件的BUG吧。
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0xC0,0x01,0x00,0x00,0xC0,0x00,0x00,
0x00,0xC0,0x00,0x00,0x00,0xC0,0x00,0x00,0x20,0xC0,0x00,0x01,0xE0,0xFF,0xFF,0x03,0x60,0xC0,0x00,0x03,
0x60,0xC0,0x00,0x03,0x60,0xC0,0x00,0x03,0x60,0xC0,0x00,0x03,0x60,0xC0,0x00,0x03,0xE0,0xFF,0xFF,0x03,
0x60,0xC0,0x00,0x03,0x60,0xC0,0x00,0x03,0x60,0xC0,0x00,0x03,0x60,0xC0,0x00,0x03,0x60,0xC0,0x00,0x03,
0x60,0xC0,0x00,0x03,0xE0,0xFF,0xFF,0x03,0x60,0xC0,0x00,0x03,0x60,0xC0,0x00,0x10,0x00,0xC0,0x00,0x10,
0x00,0xC0,0x00,0x10,0x00,0xC0,0x00,0x10,0x00,0xC0,0x00,0x18,0x00,0xC0,0xFF,0x3F,0x00,0x80,0xFF,0x1F,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"?",0*/
此内容由EEWORLD论坛网友ddllxxrr原创,如需转载或用于商业用途需征得作者同意并注明出处