TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Oldskool Demo on a 7 Segment Display

141 pointsby fourspaceover 8 years ago

9 comments

pdkl95over 8 years ago
&gt; Notice there’s a lot of pixels here that don’t map to any segments, 30% that will never be displayed.<p>Unfortunately this problem, the slant (italic) added by the hardware, and the bias introduced from mapping the horizontal lines (A, G) to the &quot;left&quot; pixels only, causes artifacts in the output. A good example is the left side of this[1] image, where the bottom of the 7-seg displaying &quot;F&quot; has a large jump rightward to the &quot;1&quot; below it.<p>To get around these problems, aalib[2] renders each glyph that it will use, and for each block of pixels to display calculates nearest glyph. This automatically provides anti-aliasing for any shape glyph. As you already have the error (remaining distance to nearest glyph) for each group of pixels, it is also easy to add dithering to distribute the error across the image.<p>[1] <a href="http:&#x2F;&#x2F;i1.wp.com&#x2F;www.plingboot.com&#x2F;wp-content&#x2F;uploads&#x2F;2017&#x2F;02&#x2F;cubez.jpg" rel="nofollow">http:&#x2F;&#x2F;i1.wp.com&#x2F;www.plingboot.com&#x2F;wp-content&#x2F;uploads&#x2F;2017&#x2F;0...</a><p>[2] <a href="http:&#x2F;&#x2F;aa-project.sourceforge.net&#x2F;aalib&#x2F;" rel="nofollow">http:&#x2F;&#x2F;aa-project.sourceforge.net&#x2F;aalib&#x2F;</a>
i336_over 8 years ago
This is ever so slightly thread-hijacking but I&#x27;ve been wondering something slightly related for a while now: what&#x27;s the downright cheapest way to get into really really big LED matrixes? Like the kind used for signs (of various sizes; let&#x27;s say I&#x27;m referring to around &lt;2ft sq).<p>The major issue I&#x27;m completely ignorant of is how to get enough I&#x2F;O that can drive the LEDs directly - I&#x27;m assuming something with lots of direct drive I&#x2F;O and no intermediary components would be the cheapest way to do it (?).<p>I understand multiplexing is the only way to survive at scale, but for small displays (say, 5x30 (= 150 LEDs)), what solutions would have enough I&#x2F;O to drive each LED emitter individually, without scanning? I&#x27;ve always wondered what a truly flickerless LED matrix would look like. *<p>(* Several years ago I had an odd incident where after using a scientific calculator I&#x27;d see weird swirling patterns overlaid on top of whatever I was looking at. The LCD itself was not faulty or damaged, and I couldn&#x27;t see any flickering at all. Considering LCDs run at 30-100Hz, the whole incident (it stopped after a while, I have some theories as to why) made me curious what a truly DC-driven LED matrix would look like.)
评论 #13672877 未加载
评论 #13672832 未加载
userbinatorover 8 years ago
<i>Now, I wonder if I can get an old calculator to play the accompanying 4 track MOD?</i><p>Add some music and the demosceners at pouet.net might get interested in seeing it; they have a &quot;wild&quot; category for hardware&#x2F;exotic demos like this.<p>I agree with the second comment there about replacing the verbose chain of if-statements with a single expression; my first thought upon seeing that was &quot;this really needs to be simplified&quot;; likewise, the second part with 7 nearly identical lines shifting left and then right by the same amount, then multiplying by 255(?!) can be simplified to a loop; the way it looked with lines for B and C having a slightly-different mask constant is misleading, since it looks like a copy-paste error. Here&#x27;s an (untested) attempt at simplifying the code:<p><pre><code> int yoffs[] = { 0, 1, 3, 4, 3, 1, 2 }; shift = 6 - ((digit&amp;3) &lt;&lt; 1); for(segs=0,i=0;i&lt;7;i++) segs |= !!(screen_buffer[bx+yoffs[i]][bx] &amp; 1 &lt;&lt; shift+(i&lt;1||i&gt;2) ) &lt;&lt; 6-i;</code></pre>
评论 #13674154 未加载
评论 #13679370 未加载
Renaudover 8 years ago
There was an art project done a few years ago using 7-segment displays and animations, looked quite cool too:<p><a href="http:&#x2F;&#x2F;hackaday.com&#x2F;2013&#x2F;11&#x2F;21&#x2F;7-segment-display-matrix-visualizes-more-than-numbers&#x2F;" rel="nofollow">http:&#x2F;&#x2F;hackaday.com&#x2F;2013&#x2F;11&#x2F;21&#x2F;7-segment-display-matrix-visu...</a>
gaiusover 8 years ago
From the name plingboot I detect an old-skool BBC Micro fan :-)
swernerover 8 years ago
Add some PWM for grayscale effects.
jackhammonsover 8 years ago
Very pretty. Nice effect!
lukasover 8 years ago
This is awesome. Thanks for sharing.
ajninover 8 years ago
It&#x27;s amusing but a bit underwhelming, he&#x27;s simply mapping a grid of pixels to segments, he&#x27;s not taking the shape and orientation of the segments into account at all.
评论 #13672839 未加载
评论 #13672974 未加载