ddllxxrr 发表于 2020-3-8 18:00

“玩板”+点亮新淘的带触摸SPI屏

<div class='showpostmsg'><p>话说最近我最近新淘了一块SPI还带触摸的屏,我喜欢的不得了。这就好像给我的单片机生涯注入了一股子活力。让根来无屏的板板可以最大发挥作用。</p>

<p>&nbsp; &nbsp; &nbsp; &nbsp;我这个人比较&ldquo;仇富&rdquo;。有的显示屏要40根线,除了显示快之外,占用了很多管脚,让我十分恼火。所以我的板子,除非自带屏,都是没有屏地。</p>

<p>&nbsp; &nbsp; &nbsp; &nbsp;我比较喜欢SPI串口屏。</p>

<p>&nbsp; &nbsp; &nbsp; &nbsp;还有我的STM最小开发板在板子堆里也已经很久了。今天把它们凑一块,搞点事件。我用nucleo上的STLINK2为最小开发板下程序,运行效果如下:</p>

<p>&nbsp; &nbsp;</p>

<p>&nbsp; &nbsp; &nbsp;&nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p></p>

<p>程序么比较简单,不说了。在这里说一下取模软件。这次用的取模软件是PCtoLCD2020,取出的值带大括号。</p>

<pre>
<code>{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*/</code></pre>

<p>&nbsp;</p>

<p>我编译出现: excess elements inscalar initializer的错误。</p>

<p>&nbsp;</p>

<p>后来我把大括号去掉编译通过了。我想这就是软件的BUG吧。</p>

<p>&nbsp;</p>

<pre>
<code>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*/</code></pre>

<p><br />
<br />
<br />
<b><font color="#5E7384">此内容由EEWORLD论坛网友<font size="3">ddllxxrr</font>原创,如需转载或用于商业用途需征得作者同意并注明出处</font></b><br />
&nbsp;</p>
</div><script>                                        var loginstr = '<div class="locked">查看本帖全部内容,请<a href="javascript:;"   style="color:#e60000" class="loginf">登录</a>或者<a href="https://bbs.eeworld.com.cn/member.php?mod=register_eeworld.php&action=wechat" style="color:#e60000" target="_blank">注册</a></div>';
                                       
                                        if(parseInt(discuz_uid)==0){
                                                                                                (function($){
                                                        var postHeight = getTextHeight(400);
                                                        $(".showpostmsg").html($(".showpostmsg").html());
                                                        $(".showpostmsg").after(loginstr);
                                                        $(".showpostmsg").css({height:postHeight,overflow:"hidden"});
                                                })(jQuery);
                                        }                </script><script type="text/javascript">(function(d,c){var a=d.createElement("script"),m=d.getElementsByTagName("script"),eewurl="//counter.eeworld.com.cn/pv/count/";a.src=eewurl+c;m.parentNode.insertBefore(a,m)})(document,523)</script>

兰博 发表于 2020-3-9 09:29

<p><img height="50" src="https://bbs.eeworld.com.cn/static/editor/plugins/hkemoji/sticker/onion/Onion--12.gif" width="50" /></p>

<p>啥也不说了。</p>

wudianjun2001 发表于 2020-3-9 15:22

<p>软件参数里可以设置输出格式的,可以设置没有大括号的</p>
页: [1]
查看完整版本: “玩板”+点亮新淘的带触摸SPI屏