TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Microcontroller LCD Initialization (2012)

52 点作者 hharnisch超过 6 年前

7 条评论

roland35超过 6 年前
One bug that I encounter many times in projects using similar displays is not giving enough time for commands to process. Often times what works while testing may work 99.99% of the time but that 0.01% it doesn&#x27;t work could end up as an incorrect character or even an invalid command!<p>A recent bug I figured out later was sending a certain graphical character matched the &quot;display off&quot; command, and the command bit was not being set quickly enough due to a long cable connection. Once the display off command was sent the screen would not turn back on...<p>The best way to solve this is to implement firmware to read the status flag of the display, if you are lucky enough to have one. I find this helps a lot with all types of sensors and other external interfaces, send the data and read it back. You will thank yourself that 0.01% of the time it didn&#x27;t work!
setquk超过 6 年前
Gah I hate these bloody awful displays. You find out regularly that the display&#x27;s memory isn&#x27;t organised how you think (linearly) because the early displays were tiny, so writing say a line out on a 40x4 display turns into a nightmare.<p>The positive bit is once you&#x27;ve hidden all the oddness behind an API (mine is lcd_init(), lcd_cls(), lcd_pos(x,y), lcd_write(str) ) then they&#x27;re totally fungible.
评论 #19094292 未加载
analog31超过 6 年前
It&#x27;s amazing that this weird architecture has endured for so many years. These displays continue to be cheap and handy.
评论 #19093609 未加载
评论 #19093300 未加载
评论 #19092721 未加载
joshvm超过 6 年前
My favourite el cheapo displays are the SSD1306 OLEDs. They&#x27;re tiny and work over I2C (or SPI). Cost about $3 from eBay from China. It&#x27;s a fun weekend job writing your own printf and plotting libraries, trying to figure out the various modes. I2C isn&#x27;t enough to do real-time refreshing of the entire display, but it&#x27;s perfectly reasonable to plot sensor readings when you&#x27;re just updating a few regions. You can also get libraries for the Raspberry Pi and Arduino (via Adafruit).<p>I remember years ago being quite proud of implementing a software variable-width font (since this wasn&#x27;t a character display). Quite slow on an AVR, but looked nice.
Nr7超过 6 年前
The 8-Bit Guy on Youtube made a great video series on character LCD screens and how to run them.<p>In the first video he shows how to drive one manually using just switches: <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=hZRL8luuPb8" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=hZRL8luuPb8</a><p>In parts 2 and 3 he shows two ways how to drive them with a C64: <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=vV8FbwobrKY" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=vV8FbwobrKY</a> <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=pQk3XgpuaJ4" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=pQk3XgpuaJ4</a>
rolph超过 6 年前
in other words power must turn on and ramp time to operating level must be somewhere between 100 micro seconds and 10 milliseconds. this is accomplished easily with power conditioning between hardware and supply voltage. My first digital project is still operating in niagara falls ontario up on the wall in 2 of the more popular museums. the record fastest drumbeat in the world was held by &quot;some guy&quot; and was around 127 beats per minute. the brains of the project was a microcode 16f84, and 17f84. the 16f drove the display and fed alphnumeric while the 17f counted beats on a piezo electric drum pad and compared to the &quot;record&quot; beat. the skin of the finished project was slick, the inside was a fibreglass bread board. $1500 pricetag at time of release for $150 in parts and some brainwork.
评论 #19093637 未加载
ChuckMcM超过 6 年前
Certainly clearer than the old HD4470 FAQ was. So its a handy reference if you&#x27;re coming across these for the first time. Many people I know end up writing one init routine and use it and reuse it again and again and again ...