描述
<div class="document">
<h3 class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;">1、项目介绍</h3>
<hr class="horizontal-splitline normal-bold-2">
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="color: #000000;"><span style="font-size: 14px;">事情还得从这个2.9寸墨水屏模块说起,对这种显示屏感觉非常新奇,当初买了在佳显买了这个屏幕模块和一个转接板,但是这个转接板非常小,脆弱的屏幕随时都会磕碎,于是开始接触硬件与立创EDA,先画了一个比2.9寸大一点的墨水屏转接板,然后写程序写驱动显示图片,但是有点束手束脚与意犹未尽,于是定了个目标做个墨水屏小说阅读器,充分利用这个墨水屏模块。</span></span></p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="color: #000000;"><span style="font-size: 14px;">这个墨水屏小说阅读器嘛,软件功能上首先是要充分开发出这个墨水屏的显示驱动;步骤则是先实现显示6x8的英文,再是能显示多行,显示多行呢后的需求呢,就是输入一段英文,能够自动换行显示;再者是显示中文,因为中文字库还是有些大,而且一搜诶有中文字库芯片,则买了(掉坑),它有16x16的中文和8x16的英文的字库,但是这个高通GT30L32S4W字库芯片,编程起来非常不友好,因为墨水屏的显示是从上往下,从左往右,显示字节从高位到低位排列,即竖置竖排,而这个字库芯片是横置横排,因此程序还涉及到数组转置,这个字库芯片的字库地址手册中还不说明,公司电话还打不通,垃圾差评(已经买了,只能哭着用了);英文为单字节表示,中文内码为双字节,中英文混显也是一个比较不好处理的地方,特别是小说还要记录阅读位置。然后就到小说阅读器的程序了,写各个部分驱动,写完SD卡驱动要移植FatFs系统,移植完系统之后设计阅读器逻辑,目前程序进度是上电后读取并显示SD卡目录,并且能上下选择文件,并翻页浏览未显示的,文件名过长的两行显示,按按钮打开TXT文件进行阅读,往后翻页,往前翻页,自动记录阅读进度,掉电也无影响,还有遇到bug显示乱码的修复功能。</span></span></p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="color: #000000;"><span style="font-size: 14px;">硬件上,首先是能插SD卡并读取,其次板子上有个512Kb的EEPROM,程序中暂时未规划,准备用来放UI的图片什么的,未来能用到。TYPEC接口,同时可以作为串口,带有串口一键下载电路,非常方便。预留SW调试接口。四个按钮,两个PWM调节亮度的小夜灯。采用HK32的主控芯片,引脚几乎全部占用,充分利用处理器,榨干它。TYPEC供电与AMS1117之间有自恢复保险丝,给电路加一层保护。2.9寸墨水屏,掉电也能保留画面,能同时显示144个中文字符。</span></span></p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="color: #000000;"><span style="font-size: 14px;">总结一下就是:</span></span></p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="color: #000000;"><span style="font-size: 14px;">1、墨水屏显示,</span></span><span style="color: #000000;"><span style="font-size: 14px;">降低阅读器的功耗,墨水屏屏幕只在刷新时耗电</span></span></p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="color: #000000;"><span style="font-size: 14px;">2、FatFs文件管理系统,能够选择SD卡中的TxT文件阅读</span></span></p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="color: #000000;"><span style="font-size: 14px;">3、前置PWM调节小夜灯</span></span></p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="color: #000000;"><span style="font-size: 14px;">4、TYPEC供电,带有串口一键下载电路,预留SW调试接口</span></span></p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="color: #000000;"><span style="font-size: 14px;">5、充分利用HK32F103CBT6资源</span></span></p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="color: #000000;"><span style="font-size: 14px;">6、外接EEPROM芯片</span></span></p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="color: #000000;"><span style="font-size: 14px;">7、带16x16中文点阵与8x16英文点阵等字库的字库芯片</span></span></p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="color: #000000;"><span style="font-size: 14px;">8、自动记录每个文件的阅读进度,实时保存进度,不限制阅读文件的大小</span></span></p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"> </p>
<h3 class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;">2、项目属性</h3>
<hr class="horizontal-splitline normal-bold-2">
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="color: #000000; font-size: 14px;">硬件首次公开在立创开源硬件平台,项目为原创。</span></p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"> </p>
<h3 class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;">3、开源协议</h3>
<hr class="horizontal-splitline normal-bold-2">
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="color: #000000; font-size: 14px;">GPL3.0</span></p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"> </p>
<h3 class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;">4、硬件部分</h3>
<hr class="horizontal-splitline normal-bold-2">
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;">硬件部分首先来个引脚分配吧,如下图:</p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//image.lceda.cn/pullimage/WRqiUdqxEsWgdoguaIV9AfUXfS9XahOGX9cd5Z0g.png"></p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;">各功能总结成表格如下所示:</p>
<table style="border-collapse: collapse; width: 96.7774%; height: 66px;">
<tr style="height: 22px;">
<td style="width: 91.257%; height: 22px; text-align: center;" colspan="6">墨水屏:IO模拟SPI驱动</td>
</tr>
<tr style="height: 22px;">
<td style="width: 15.2095%; height: 22px; text-align: center;">PA0</td>
<td style="width: 15.2095%; height: 22px; text-align: center;">PA1</td>
<td style="width: 15.2095%; height: 22px; text-align: center;">PA2</td>
<td style="width: 15.2095%; height: 22px; text-align: center;">PA3</td>
<td style="width: 15.2095%; height: 22px; text-align: center;">PA4</td>
<td style="width: 15.2095%; height: 22px; text-align: center;">PA5</td>
</tr>
<tr style="height: 22px;">
<td style="width: 15.2095%; height: 22px; text-align: center;">EP_SDI</td>
<td style="width: 15.2095%; height: 22px; text-align: center;">EP_SCLK</td>
<td style="width: 15.2095%; height: 22px; text-align: center;">EP_CS</td>
<td style="width: 15.2095%; height: 22px; text-align: center;">EP_D/C</td>
<td style="width: 15.2095%; height: 22px; text-align: center;">EP_RES</td>
<td style="width: 15.2095%; height: 22px; text-align: center;">EP_BUSY</td>
</tr>
</table>
<table style="border-collapse: collapse; width: 96.0445%; height: 66px;">
<tr style="height: 22px;">
<td style="width: 23.1853%; height: 22px; text-align: center;" colspan="4">SD卡:硬件SPI2驱动</td>
</tr>
<tr style="height: 22px;">
<td style="width: 23.1853%; height: 22px; text-align: center;">PB12</td>
<td style="width: 23.1853%; height: 22px; text-align: center;">PB13</td>
<td style="width: 23.1853%; height: 22px; text-align: center;">PB14</td>
<td style="width: 23.1853%; height: 22px; text-align: center;">PB15</td>
</tr>
<tr style="height: 22px;">
<td style="width: 23.1853%; height: 22px; text-align: center;">SD_CS</td>
<td style="width: 23.1853%; height: 22px; text-align: center;">SD_SCK</td>
<td style="width: 23.1853%; height: 22px; text-align: center;">SD_MISO</td>
<td style="width: 23.1853%; height: 22px; text-align: center;">SD_MOSI</td>
</tr>
</table>
<table style="border-collapse: collapse; width: 96.0445%; height: 66px;">
<tr style="height: 22px;">
<td style="width: 23.1853%; text-align: center; height: 22px;" colspan="4">字库芯片:IO模拟SPI驱动</td>
</tr>
<tr style="height: 22px;">
<td style="width: 23.1853%; text-align: center; height: 22px;">PB5</td>
<td style="width: 23.1853%; text-align: center; height: 22px;">PB6</td>
<td style="width: 23.1853%; text-align: center; height: 22px;">PB7</td>
<td style="width: 23.1853%; text-align: center; height: 22px;">PB8</td>
</tr>
<tr style="height: 22px;">
<td style="width: 23.1853%; text-align: center; height: 22px;">GT_CS</td>
<td style="width: 23.1853%; text-align: center; height: 22px;">GT_SO</td>
<td style="width: 23.1853%; text-align: center; height: 22px;">GT_SI</td>
<td style="width: 23.1853%; text-align: center; height: 22px;">GT_SCK</td>
</tr>
</table>
<table style="border-collapse: collapse; width: 96.0445%; height: 66px;">
<tr style="height: 22px;">
<td style="width: 92.7412%; text-align: center; height: 22px;" colspan="4">四个按键</td>
</tr>
<tr style="height: 22px;">
<td style="width: 23.1853%; text-align: center; height: 22px;">PA6</td>
<td style="width: 23.1853%; text-align: center; height: 22px;">PA7</td>
<td style="width: 23.1853%; text-align: center; height: 22px;">PA8</td>
<td style="width: 23.1853%; text-align: center; height: 22px;">PA9</td>
</tr>
<tr style="height: 22px;">
<td style="width: 23.1853%; text-align: center; height: 22px;">KEY1</td>
<td style="width: 23.1853%; text-align: center; height: 22px;">KEY2</td>
<td style="width: 23.1853%; text-align: center; height: 22px;">KEY3</td>
<td style="width: 23.1853%; text-align: center; height: 22px;">KEY4</td>
</tr>
</table>
<table style="border-collapse: collapse; width: 96.0445%; height: 66px;">
<tr style="height: 22px;">
<td style="width: 46.3706%; height: 22px; text-align: center;" colspan="2">EEPROM:IO模拟IIC驱动</td>
</tr>
<tr style="height: 22px;">
<td style="width: 23.1853%; height: 22px; text-align: center;">PA8</td>
<td style="width: 23.1853%; height: 22px; text-align: center;">PB9</td>
</tr>
<tr style="height: 22px;">
<td style="width: 23.1853%; height: 22px; text-align: center;">IIC_SDA</td>
<td style="width: 23.1853%; height: 22px; text-align: center;">IIC_SCL</td>
</tr>
</table>
<table style="border-collapse: collapse; width: 96.0445%; height: 66px;">
<tr style="height: 22px;">
<td style="width: 40.0029%; height: 22px; text-align: center;" colspan="2">LED0与LED1:支持PWM驱动亮度可调节</td>
<td style="width: 20.3366%; height: 22px; text-align: center;">冗余LED</td>
</tr>
<tr style="height: 22px;">
<td style="width: 20.2026%; height: 22px; text-align: center;">PB10(TIM2_CH3)</td>
<td style="width: 19.8003%; height: 22px; text-align: center;">PB11(TIM2_CH4)</td>
<td style="width: 20.3366%; height: 22px; text-align: center;">PC13</td>
</tr>
<tr style="height: 22px;">
<td style="width: 20.2026%; height: 22px; text-align: center;">LED0</td>
<td style="width: 19.8003%; height: 22px; text-align: center;">LED1</td>
<td style="width: 20.3366%; height: 22px; text-align: center;">PC13</td>
</tr>
</table>
<table style="border-collapse: collapse; width: 96.0445%; height: 66px;">
<tr style="height: 22px;">
<td style="text-align: center; width: 110.27%; height: 22px;" colspan="4">TYPEC接口:支持串口一键下载与USB</td>
</tr>
<tr style="height: 22px;">
<td style="width: 26.2779%; text-align: center; height: 22px;">PA9</td>
<td style="width: 23.597%; text-align: center; height: 22px;">PA10</td>
<td style="width: 24.7341%; text-align: center; height: 22px;">PA11</td>
<td style="width: 35.6613%; text-align: center; height: 22px;">PA12</td>
</tr>
<tr style="height: 22px;">
<td style="width: 26.2779%; text-align: center; height: 22px;">USART1_TX</td>
<td style="width: 23.597%; text-align: center; height: 22px;">USART1_RX</td>
<td style="width: 24.7341%; text-align: center; height: 22px;">USB_DN</td>
<td style="width: 35.6613%; text-align: center; height: 22px;">USB_DP</td>
</tr>
</table>
<p>1、MCU最小系统电路参考了手册《AN4206-Getting started with STM32F3 series hardware development.pdf》,因为HK32说是PinToPin对标STM32的嘛,然后我看STM32F302CxT6的也差不多,参考了一下,也参考了立创开源平台的电路设计,例如8MHz晶振那里的1MΩ电阻。</p>
<p>2、墨水屏模块转接SPI电路设计则是参考该模块的官方手册《GDEH029A1 V3.3 Specification.pdf》的参考电路设计的。</p>
<p>3、SD卡电路参考立创开源平台的开源电路设计。</p>
<p>4、串口一键下载电路参考了正点原子的电路设计。</p>
<p>5、其他部分如EEPROM和GT字库芯片的电路设计也是参考了数据手册。</p>
<p> </p>
<h3 class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;">5、软件部分</h3>
<hr class="horizontal-splitline normal-bold-2">
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;">如果获奖得小钱钱呢我就开源阅读器程序,目前能够上下翻页,存储进度什么的。</p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"> </p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="color: #95a5a6; font-size: 14px;">注:若您的项目涉及软件开发,请在附件上传对应的工程源码。这里可以详细说明您的软件流程图、功能模块框图、相关算法的解释或科普、源码结构、编译环境的搭建和配置、源码编译方法、程序烧录方法等。推荐图文并茂的形式向别人介绍您的想法。</span></p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt pap-left-indent-1.6em" style="line-height: 1.8;"> </p>
<h3 class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;">6、BOM清单</h3>
<hr class="horizontal-splitline normal-bold-2">
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><img src="//image.lceda.cn/pullimage/kaN6NNdzbZZ7BgPH0ltnk8afuRLmkHYR3KpI52tI.png"></p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"> </p>
<h3 class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;">7、大赛LOGO验证</h3>
<hr class="horizontal-splitline normal-bold-2">
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"> </p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><img src="//image.lceda.cn/pullimage/WrMPQovbx7NHxWn3OeHnvWtHZNxVUDi6QgoSjmCe.jpeg"></p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"> </p>
</div>
评论(3)