<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
><channel><title>SulhanSetiawan.com &#187; Seven Segment</title> <atom:link href="http://www.sulhansetiawan.com/tag/seven-segment/feed" rel="self" type="application/rss+xml" /><link>http://www.sulhansetiawan.com</link> <description></description> <lastBuildDate>Sun, 05 Feb 2012 17:08:53 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>Seven segment simulation for digital clock program with hours-minutes-seconds display</title><link>http://www.sulhansetiawan.com/simulasi-seven-segment-untuk-program-jam-digital-dengan-tampilan-jam-menit-detik</link> <comments>http://www.sulhansetiawan.com/simulasi-seven-segment-untuk-program-jam-digital-dengan-tampilan-jam-menit-detik#comments</comments> <pubDate>Mon, 22 Sep 2008 03:25:41 +0000</pubDate> <dc:creator>Sulhan</dc:creator> <category><![CDATA[Experiments]]></category> <category><![CDATA[All]]></category> <category><![CDATA[Microcontroller Learning]]></category> <category><![CDATA[Digital Clock]]></category> <category><![CDATA[Microcontroller]]></category> <category><![CDATA[Seven Segment]]></category> <category><![CDATA[Simulation]]></category><guid isPermaLink="false">http://sulhansetiawan.com/?p=222</guid> <description><![CDATA[Seven Segment is one of the most common components used primarily to display data in the form of numbers. For that, Microcontroller Project also provides a simulation for seven segment, namely SSLED.exe. Seven segment simulation provided by the SSLED.exe has eight-digit in multiplex manner. Multiplex technique is the most commonly used because of its compact [...]]]></description> <content:encoded><![CDATA[<p style="TEXT-ALIGN: center"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="339" height="159" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="menu" value="false" /><param name="quality" value="high" /><param name="scale" value="exactfit" /><param name="src" value="http://resource.sulhansetiawan.com/swf/SSLED.swf" /><embed type="application/x-shockwave-flash" width="339" height="159" src="http://resource.sulhansetiawan.com/swf/SSLED.swf" menu="false" scale="exactfit" quality="high"></embed></object></p><p>Seven Segment is one of the most common components used primarily to display data in the form of numbers. For that, <strong><a title="Micro Project Versi Terbaru" href="http://www.sulhansetiawan.com/microcontroller-project">Microcontroller Project</a></strong> also provides a simulation for seven segment, namely SSLED.exe.</p><p>Seven segment simulation provided by the SSLED.exe has eight-digit in multiplex manner. Multiplex technique is the most commonly used because of its compact wiring and requires only a few ports to control it. How to control the seven segment arranged in multiplex is by dividing two kinds of line, i.e. the data line and digits control line. Data line is used to determine which LED are lit, while the digits controller line is used to set which digits are lit.</p><p>Data line and digits control line of SSLED.exe received using window message as WM_USER. If lParam is 1, then the received signal will be considered as a signal for digits control line. Whereas if the lParam value is 2, then the received signal will be considered as a signal for the data line.</p><p>On the data line, bit 0 will be used for LED a, bit 1 to turn on the LED b, and so on until bit 6 to turn on the LED g. While the bit 7 is used to lit the decimal point LED. If a bit is 1, then the corresponding LED will lit. This would fit with the common cathode type. However, we can also reverse the data so that if the data sent value is FF, then the data would be considered 00. This capability is useful for adjustment with seven segment types to be used.</p><p>SSLED.exe provides two ways of controlling the digits, i.e. the parallel way and the counter way. In the parallel way, each digit can be individually activated depending on the bit of the line controller. Bit 0 in the line controller will control the rightmost digit and bit 7 will control the leftmost digit. If a bit is 1, then the corresponding digits will be active. And just as in the data line, the line controller digits can also be reversed.</p><p>In counter mode, only bit 0 and bit 1 in the line controller digit is used. Bit 0 is used to reset the counter, so the active digit will be the rightmost digit. While the bit 1 is used to shift the active digit to be the next left digit, or name it as raising the counter count. There are two kinds of how to raise the counter count, i.e. L to H transition or H to L transition. If we use the L to H transition, then the counter will be increased if bit 1 state changed from 0 to 1. Conversely, if the transition used are H to L, then counter would be raised if the bit condition changed from 1 to 0.</p><p>If the current digit is the leftmost digit and count raised, the active digit will return to the rightmost digit.</p><p>The picture above is an example of how simulation if operated for seven segment display digital clock program. Above program is actually a modification of the program on Interrupts chapter of the <a title="Mudah dan Menyenangkan Belajar Mikrokontroler" href="http://www.sulhansetiawan.com/buku/mudah-dan-menyenangkan-belajar-mikrokontroler/"><strong>Easy and Fun Learning Microcontroller</strong></a> book, ie on Timer.A51 program. But in the book we will try to program the actual seven segment, so we need to save money just by using four digits only. While in this simulation, we have simulated seven segment that provides eight digits. Therefore, we can show not only hours and minutes but also seconds. In fact we still have the remaining two digits. The remaining digits are used to separate hours to minutes and minutes to seconds, i.e. by displaying a (-) sign. Therefore, we need a little modification of the Timer.A51 program in order to display the seconds and the separation mark.</p><p><a title="Jam8Digit.zip" href="http://resource.sulhansetiawan.com/microsource/Jam8Digit.zip"><strong>The source code</strong></a> is written with the format of M51 and c where the data signal transmitted using P0, and the digit control signal using P1. Thus, we must set P0 to link by the Link Message with a WM_USER message, and lParam value is 2 and fill the Handle with the Handle of running SSLED.exe using Capture Handle button. Do this to P1 too. But in P1, lParam value is 1. And remember, remove the check mark on the <strong>Update Display</strong> menu on the simulator.</p><p>But keep in mind that the program is written to run on a microcontroller with a 11.592 MHz crystal. So the second change speed during the simulation may be is not correct. And its speed depends on the speed of the computer you use.</p><p>Well, interesting isn&#8217;t it? Happy trying <img src='http://www.sulhansetiawan.com/wp-includes/images/smilies/icon_exclaim.gif' alt=':!:' class='wp-smiley' /></p><div id="download" class="wp-caption aligncenter" style="width: 97px"><a href="http://resource.sulhansetiawan.com/microsource/Jam8Digit.zip"><img class="  " title="Source" src="http://resource.sulhansetiawan.com/img/download.gif" alt="Source" width="87" height="30" /></a><p class="wp-caption-text">Source</p></div> ]]></content:encoded> <wfw:commentRss>http://www.sulhansetiawan.com/simulasi-seven-segment-untuk-program-jam-digital-dengan-tampilan-jam-menit-detik/feed</wfw:commentRss> <slash:comments>98</slash:comments> </item> </channel> </rss>
