<?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; Microcontroller books</title> <atom:link href="http://www.sulhansetiawan.com/tag/buku-mikrokontroler/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>The new look of “Easy and Fun Learning Microcontroller” book</title><link>http://www.sulhansetiawan.com/wajah-baru-buku-mudah-dan-menyenangkan-belajar-mikrokontroler</link> <comments>http://www.sulhansetiawan.com/wajah-baru-buku-mudah-dan-menyenangkan-belajar-mikrokontroler#comments</comments> <pubDate>Fri, 04 Sep 2009 11:30:36 +0000</pubDate> <dc:creator>Sexytaris</dc:creator> <category><![CDATA[Sulhan Setiawan's Books]]></category> <category><![CDATA[Microcontroller books]]></category> <category><![CDATA[All]]></category><guid isPermaLink="false">http://sulhansetiawan.com/?p=868</guid> <description><![CDATA[Now &#8220;Easy and Fun Learning Microcontroller&#8221; book is present with a new look. Don&#8217;t be fail in recognizing because in fact it&#8217;s more eye catching.]]></description> <content:encoded><![CDATA[<p>Now &#8220;Easy and Fun Learning Microcontroller&#8221; book is present with a new look. Don&#8217;t be fail in recognizing because in fact it&#8217;s more eye catching.</p><div class="wp-caption aligncenter" style="width: 155px"><a href="http://resource.sulhansetiawan.com/img/BukuBelajarMikrokontroler.jpg"><img title="Easy and Fun Learning Microcontroller" src="http://resource.sulhansetiawan.com/img/BukuBelajarMikrokontroler.jpg" alt="Easy and Fun Learning Microcontroller 2008 printing" width="145" height="217" /></a><p class="wp-caption-text">Easy and Fun Learning Microcontroller 2008 printing</p></div> ]]></content:encoded> <wfw:commentRss>http://www.sulhansetiawan.com/wajah-baru-buku-mudah-dan-menyenangkan-belajar-mikrokontroler/feed</wfw:commentRss> <slash:comments>16</slash:comments> </item> <item><title>Questions about &#8220;Mudah dan Menyenangkan Belajar Mikrokontroler&#8221; book</title><link>http://www.sulhansetiawan.com/pertanyaan-seputar-buku-mudah-dan-menyenangkan-belajar-mikrokontroler</link> <comments>http://www.sulhansetiawan.com/pertanyaan-seputar-buku-mudah-dan-menyenangkan-belajar-mikrokontroler#comments</comments> <pubDate>Sat, 31 Jan 2009 23:47:50 +0000</pubDate> <dc:creator>Sulhan</dc:creator> <category><![CDATA[Microcontroller books]]></category> <category><![CDATA[All]]></category> <category><![CDATA[Microcontroller Learning]]></category> <category><![CDATA[Microcontroller]]></category><guid isPermaLink="false">http://sulhansetiawan.com/?p=469</guid> <description><![CDATA[A book reader Mudah dan Menyenangkan Belajar Mikrokontroler asked as follows: In the program listing of digital clock with button (p. 91), please explain more about the use and calculation of Timer 0 Mode 2 so as to produce an accurate timer of 1 second. Please explain more about the workings of the listing of [...]]]></description> <content:encoded><![CDATA[<p style="text-align: center;"><a href="http://resource.sulhansetiawan.com/img/BkMdhMnynangknTnyKnp.jpg"><img class="aligncenter" title="BkMdhMnynangknTnyKnp" src="http://resource.sulhansetiawan.com/img/BkMdhMnynangknTnyKnp.jpg" alt="" width="73" height="97" /></a></p><p>A book reader <a title="Mudah dan Menyenangkan Belajar Mikrokontroler" href="http://www.sulhansetiawan.com/buku/mudah-dan-menyenangkan-belajar-mikrokontroler/">Mudah dan Menyenangkan Belajar Mikrokontroler</a> asked as follows:</p><p><a name="Top"></a></p><ol style="text-align: justify;"><li style="text-align: justify;"><a href="#1">In the program listing of digital clock with button (p. 91), please explain more about the use and calculation of Timer 0 Mode 2 so as to produce an accurate timer of 1 second.</a></li><li style="text-align: justify;"><a href="#2">Please explain more about the workings of the listing of button data retrieval (p. 119).</a></li><li style="text-align: justify;"><a href="#3">How do I use a variable declaration in listing with <span class='notrnaslate'>*.M51</span> extension such: <span class='notrnaslate'>~byte, ~bit, ~word, and ~array?</span></a></li><li style="text-align: justify;"><a href="#4">How to use the tool: <span class='notrnaslate'>Virtual LCD, Tombol, MXLED</span>, in the simulator?</a></li><li style="text-align: justify;"><a href="#5">Well, the next question may not relate to the book, but still about a microcontroller. How to make one button so it has two functions? For example we put the button at P3.0. If pressed once it will execute subprogram A and if pressed twice it will execute subprogram B.</a></li><li style="text-align: justify;"><a href="#6">Mas, I tried to make the clock circuit on PCB and I filled it with the &#8220;debouncing 2.HEX&#8221; program. The result was running perfectly. But when the minutes or hours modifier button was pressed, the value on 7 segment did not changed directly but wait until the program completing one minutes. How to make changes instantly?</a></li></ol><p>And here&#8217;s the answer:</p><ol><a name="1"></a></p><li style="text-align: justify;"><h4>Timer 1 sec accurate.</h4><p>Actually, the information in the book is clear enough. First, the crystal used was 11.0592 MHz. Thus the speed of the machine cycle is 921.6 KHz (11.0592 MHz/12). Second, TH0 filled #0, which means timer0 interrupt will be called every 256 cycles of the machine. Remember that TH=256-interval or interval=256-TH. Thus the calling interval is 256 machine cycles.</p><p>From both the data above we can calculate the speed of the calling of timer0 interrupt is 3600Hz (921.6 KHz/256). Now, to obtain a second, we must divide this interval again by 3600. So we do this in two steps, which is divided by 225 (3600/225 = 16), then we can simply divide the result by 16 to obtain a frequency of 1Hz. However, because we need to set the frequency to 2Hz to make the blink of the point, then we do not divide by 16 but by 8.</p><p>1Hz frequency is obtained with a flip-flop which is a 2 divider. Flip-flop is obtained by using the cpl command on a flag (Bendera1Detik). Hopefully quite clear.</p><p><a href="#Top">Back to top</a></li><p><a name="2"></a></p><li style="text-align: justify;"><h4>Techniques to retrieve button data by debouncing.</h4><p>Pieces of the program will retrieve multiple keys concurrently and has been carried out debouncing. So we can use any key and do not have to worry about bounce. How to use it is just call the procedure, ie &#8220;AmbilTombol&#8221;.</p><p>After a call to this procedure, Acc will contain the button data. For example, if the button mounted on the bit0 and bit1, then after calling this procedure, A will contain 0 if no keys are pressed, 1 if the button on bit0 is pressed, 2 if the button on bit1 is pressed, and 3 if both buttons are pressed.</p><p>Of course, the resulting value depends on where the buttons are mounted. Just look at the value of bits. Bit0 is 1 and bit1 is 2. About how it happens, try to look at the included flowchart. Learn the flowchart carefully. Hopefully quite clear.</p><p><a href="#Top">Back to top</a></li><p><a name="3"></a></p><li style="text-align: justify;"><h4>Memory allocation for variables with a technique that easy to make any modification.</h4><p><span class='notrnaslate'><b>~byte, ~bit, ~word,</b></span> and <span class='notrnaslate'><b>~array</b></span> variable are the relatively easy way to set the location of memory compared with the set of memory locations in a way such as:</p><pre class='notranslate'>  Buffer  <b>equ</b> 8  <i>;4 byte</i>
  Angka   <b>equ</b> 12
  Puluhan <b>equ</b> 13
  Satuan  <b>equ</b> 14</pre><p>It would be easier if we use:</p><pre class='notranslate'>  <b>~Array</b> 4 Buffer
  <b>~byte</b> Angka Puluhan Satuan</pre><p>With the second way, we will put the <span class='notrnaslate'>Buffer</span> at location 8, the <span class='notrnaslate'>Angka</span> at 12 locations, <span class='notrnaslate'>Puluhan</span> on the location 13, and <span class='notrnaslate'>Satuan</span> on the location 14. And automatically there will be a constant that holds the highest position of the memory location that is not used. In this position should be stored for stack initiation. The constant is named SaveStack. Thus, we can initiate the stack with:</p><pre class='notranslate'>  <b>mov SP</b>,#SaveStack</pre><p>and it would have the same meaning with:</p><pre class='notranslate'>  <b>mov SP</b>,#14</pre><p>because the highest location used is 14.</p><p>If we use the first way and we want to change the memory requirement for the buffer to be only 2 bytes, we will set it to:</p><pre class='notranslate'>  Buffer  <b>equ</b> 8
  Angka   <b>equ</b> 10
  Puluhan <b>equ</b> 11
  Satuan  <b>equ</b> 12</pre><p>and the stack initiation becomes:</p><pre class='notranslate'>  <b>mov SP</b>,#12</pre><p>Well, we have to change all the numbers in its memory location setting. But if we use the second way, then we simply replace the number 4 to 2 in the <b class='notrnaslate'>~array</b> declaration such as:</p><pre class='notranslate'>  <b>~Array</b> 2 Buffer
  <b>~byte</b> Angka Puluhan Satuan</pre><p>or because the Buffer only requires 2 bytes, then we can replace it with the <b class='notrnaslate'>~word</b> type such as:</p><pre class='notranslate'>  <b>~word</b> Buffer
  <b>~byte</b> Angka Puluhan Satuan</pre><p>Note that we only change the <span class='notrnaslate'>Buffer</span> declaration and no other parts that we change.</p><p>While the variable <b class='notrnaslate'>~bit</b> is a 1-bit variable that is placed on location 20H.0 to 3FH.7.</p><p>Placement of all these variables will always find a lowest location that is still unused starting from address 8 (the default) or can be moved to a specific position using <b class='notrnaslate'>~basequ</b>.</p><p>And the explanation about this is already in the appendix of the book. Hopefully quite clear.</p><p><a href="#Top">Back to top</a></li><p><a name="4"></a></p><li style="text-align: justify;"><h4>&#8220;Virtual LCD&#8221; (LCD simulation), &#8220;MXLED&#8221; (LED Matrix simulation), and <span class='notrnaslate'>&#8220;Tombol&#8221;</span> (Button simulation using keyboard).</h4><ul><li style="text-align: justify;">&#8220;Virtual LCD&#8221; can be used for experiments that require a lot of character display. This simulation can be linked with the real circuit using a serial connection. See Chapter 19 of &#8220;Easy and Fun Learning Microcontroller&#8221;. However, these simulations can also be used from the simulator with &#8220;Link Message&#8221;. To do this, select used Com to &#8220;Message&#8221;. If data about the keyboard keystrokes are sent to the simulator via the serial communication (received in SBUF), the &#8220;Message to send&#8221; must be filled by 1035. Whereas if the data desired to be received by the port, then the &#8220;Message to send&#8221; is 1034 and &#8220;lParam to send&#8221; filled with the port number, ie 0, 1, 2, or 3. Besides, &#8220;Handle&#8221; should point to the active simulator. We can use the &#8220;Capture Handle&#8221; then click on the window of the target simulator. In addition to settings on the &#8220;Virtual LCD&#8221;, simulator port must also be adjusted. If the simulator wants to send data to the &#8220;Virtual LCD&#8221; through a serial communication simulations, the Com should use the &#8220;Message&#8221; and set &#8220;Handle&#8221; to point to the desired &#8220;Virtual LCD&#8221; with &#8220;Message to send&#8221; in the form WM_USER (1024). Meanwhile, if the simulator was about to send its data through a port, then we have to set the port to use &#8220;Link Message&#8221; directed to the &#8220;Virtual LCD&#8221;.</li><li style="text-align: justify;">&#8220;MXLED&#8221; is a LED matrix simulation. This simulation also receive data through the &#8220;Link Message&#8221; from the port settings on the simulator. Because the explanation rather long, so I put in a separate post that is in the <a href="http://www.sulhansetiawan.com/mikrokontroler/experiment/menampilkan-gambar-pada-led-matriks-menggunakan-simulator/">Showing Images on LED Matrix using Simulator.</a></li><li style="text-align: justify;">For <span class='notrnaslate'>&#8220;Tombol&#8221;</span>, if the port settings on the simulator using the &#8220;Link Message&#8221;, then the keyboard keystrokes on the <span class='notrnaslate'>&#8220;Tombol&#8221;</span> will be sent to the simulator. <span class='notrnaslate'>&#8220;Tombol&#8221;</span> itself does not require setting, because automatically it will find the current simulator.</li></ul><p><a href="#Top">Back to top</a></li><p><a name="5"></a></p><li style="text-align: justify;"><h4>One button for many functions.</h4><p>Such buttons programming requires a fairly precission timing. The first is to check whether the button is pressed or not. If yes, then the process of button detection began.</p><p>The detection of this button is basically the same as other debouncing techniques, ie wait until the button is released again, but if the button has been released does not directly assume that the button has been released. There is a minimum time so that the button has been released is really considered to has been released. If time is not reached, then the next keystrokes will still be considered as part of previous keystrokes.</p><p>Now if the button is eligible to be considered to has been released, meaning that the minimum waiting time (timeout debouncing) exceeded. Program does not directly perform a certain action but simply increase the variable that stating the number of keystrokes, then wait the next keystroke again. This is done by creating a flag stating that the program is waiting for more key presses. This waiting period we now call the &#8220;next press timeout&#8221;. If the button is pressed again before the waiting time is exceeded, then the keystroke will only increase the calculation of the amount of keystrokes. The program will only process the button press data only when &#8220;next press timeout&#8221; is exceeded.</p><p>You can download the <a title="SatuTombol.zip 3,03KB" href="http://resource.sulhansetiawan.com/microsource/SatuTombol.zip">example program</a> which is a two-digit counter 0-99. Port0 used to transmit data segment, port1 to control digits, while Port3.0 used as a button. To increase the count, we must press the button once. As for decrease the count, we must press the button twice quickly. We can also directly reach a value of 99 by pressing the button four times quickly. As for the immediate return to 0, then we must press the button three times quickly.</p><p>From this example, we can use one button for a lot of actions. But remember, if you create a program and there is a function executed by pressing the button quickly to ten times, can certainly be uncomfortable in their use <img src='http://www.sulhansetiawan.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /></p><p><a href="#Top">Back to top</a></li><p><a name="6"></a></p><li style="text-align: justify;"><h4>Revised example program of digital clock with buttons with debouncing.</em></h4><p>After I recheck, there are something missing and some were wrong. Should the <span class='notrnaslate'>MainLoop</span> structure is like:</p><pre class='notranslate'>              <b>mov   R4</b>,#NoMode     <i>;R4 =status mode</i>
   MainLoop0: <b>acall</b> IsiBuffer
   MainLoop:  <b>acall</b> AmbilTombol</pre><p>And each finished making changes to the data either minutes or hours, then the jump is toward MainLoop0 and not to the <span class='notrnaslate'>MainLoop</span>. In addition, the constants for key presses should be:</p><pre class='notranslate'>   S1ditekan   <b>equ</b>   00010000b <i>;original =00001000b</i>
   S2ditekan   <b>equ</b>   00100000b <i>;original =00010000b</i>
   S1S2ditekan <b>equ</b>   00110000b <i>;original =00011000b</i></pre><p>And the button filtering on &#8220;AmbilTombol&#8221; should:</p><pre class='notranslate'>   AmbilTombol_:
               <b>mov   A</b>,P3
               <b>cpl   a</b>            <i>;data inversion</i>
               <b>anl   A</b>,#00110000b <i>;original =00011000b</i>
               <b>ret</b></pre><p>These errors resulted in a mistaken reading of the buttons because the buttons position are at P3.4 and P3.5 instead of P3.3 and P3.4. But I have made a revised version with a little addition so that when the status mode is on ModeJam, then the hours digit will be blinking. Similarly, when the status mode is on ModeMenit, then the minutes digit will also be blinking. Thus the user knows what will happen if the button is pressed. Revised program listing can be downloaded <a title="Debouncing2rev.zip 1,53KB" href="http://resource.sulhansetiawan.com/microsource/Debouncing2rev.zip">here</a>.</p><p><a href="#Top">Back to top</a></li></ol><p>Which can be downloaded from this post:</p><ol><li><a title="SatuTombol.zip 3,03KB" href="http://resource.sulhansetiawan.com/microsource/SatuTombol.zip">Examples of one button many function programs</a></li><li><a title="Debouncing2rev.zip 1,53KB" href="http://resource.sulhansetiawan.com/microsource/Debouncing2rev.zip">&#8220;Debouncing 2&#8243; program revision</a></li></ol> ]]></content:encoded> <wfw:commentRss>http://www.sulhansetiawan.com/pertanyaan-seputar-buku-mudah-dan-menyenangkan-belajar-mikrokontroler/feed</wfw:commentRss> <slash:comments>34</slash:comments> </item> <item><title>Easy and Fun Learning Microcontroller</title><link>http://www.sulhansetiawan.com/mudah-dan-menyenangkan-belajar-mikrokontroler</link> <comments>http://www.sulhansetiawan.com/mudah-dan-menyenangkan-belajar-mikrokontroler#comments</comments> <pubDate>Sat, 23 Aug 2008 07:46:59 +0000</pubDate> <dc:creator>Sexytaris</dc:creator> <category><![CDATA[Microcontroller books]]></category> <category><![CDATA[All]]></category> <category><![CDATA[Microcontroller Learning]]></category> <category><![CDATA[Microcontroller]]></category><guid isPermaLink="false">http://sulhansetiawan.com/?p=20</guid> <description><![CDATA[Title of book &#62;&#62; Easy and Fun Learning Microcontroller Author &#62;&#62; Sulhan Setiawan Publisher &#62;&#62; Andi, Yogyakarta ISBN &#62;&#62; 979-763-367-5 Dimension &#62;&#62; 14 x 21 cm, 247 pages. Printing &#62;&#62; 2006, 2008 CD included Books that will make your learning microcontroller event become as easy and enjoyable as making pop noodle. Enjoy the ready source [...]]]></description> <content:encoded><![CDATA[<p><div id="cetakan-2006" class="wp-caption aligncenter" style="width: 155px"><a href="http://resource.sulhansetiawan.com/img/BukuMudahMenyenangkan.jpg"><img title="Easy and Fun Learning Microcontroller" src="http://resource.sulhansetiawan.com/img/BukuMudahMenyenangkan.jpg" alt="Easy and Fun Learning Microcontroller printed on 2006" width="145" height="193" /></a><p class="wp-caption-text">Easy and Fun Learning Microcontroller printed on 2006</p></div><br /><div id="cetakan-2008" class="wp-caption aligncenter" style="width: 155px"><a href="http://resource.sulhansetiawan.com/img/BukuBelajarMikrokontroler.jpg"><img title="Easy and Fun Learning Microcontroller" src="http://resource.sulhansetiawan.com/img/BukuBelajarMikrokontroler.jpg" alt="Easy and Fun Learning Microcontroller printed on 2008" width="145" height="217" /></a><p class="wp-caption-text">Easy and Fun Learning Microcontroller printed on 2008</p></div></p><p>Title of book &gt;&gt; Easy and Fun Learning Microcontroller<br /> Author &gt;&gt; Sulhan Setiawan<br /> Publisher &gt;&gt; Andi, Yogyakarta<br /> ISBN &gt;&gt; 979-763-367-5<br /> Dimension &gt;&gt; 14 x 21 cm, 247 pages.<br /> Printing &gt;&gt; 2006, 2008<br /> CD included</p><blockquote><p>Books that will make your learning microcontroller event become as easy and enjoyable as making pop noodle. Enjoy the ready source code in assembly, complete with a blended seasoning explanation straightly so good for the digestion of the brain. Bonus! Freeware! IDE (Integrated Development Environment) to process the application microcontroller that you want; writing, downloading, debugging, even simulating.</p></blockquote><p>Desperate to learn microcontroller? Read the microcontroller book but taste read the datasheet? Read this: <em><strong>Easy and Fun Learning Microcontroller</strong></em>.</p><p>The story, the author is often asked to teach his friends microcontroller. The author wondered, why microcontrollers which are very pleasant but considered very difficult. From the author&#8217;s background then develop a step by step in order to learn microcontroller becomes easy and enjoyable.</p><p>Maybe all microcontroller books contents are merely theory that actually can be asked to Google. In turn on a real application, confused for the source code. Well, this book is abundant in the assembly source code and the explanation. This book also provides many ways to control the various components such as the seven segment, ADC, DAC, DC motors, LCD, and even computers.</p><p>May peek chapter list first..</p><p>01. Introduction<br /> 02. Running LED 1<br /> 03. Running LED 2<br /> 04. Running LED 3<br /> 05. Running LED 4<br /> 06. Running LED 5<br /> 07. Seven Segment 1<br /> 08. Seven Segment 2<br /> 09. Interruption<br /> 10. Using the Button 1<br /> 11. Using the Button 2<br /> 12. Using the Button 3<br /> 13. Creating tone<br /> 14. Measuring the rotational speed 1<br /> 15. Measuring the rotational speed 2<br /> 16. DAC<br /> 17. DC motor control system<br /> 18. Communication with other ICs or modules<br /> 19. Serial Communication</p><p>Click the these link to read the articles about <a title="Micocontroller IDE" href="http://www.sulhansetiawan.com/category/mikrokontroler/integrated-development-environment">Micocontroller IDE</a> or <a title="Simulator" href="http://www.sulhansetiawan.com/category/mikrokontroler/simulator-mikrokontroler">Simulator</a>.</p><p>This book is based on MCS-51 microcontroller. Ask why? Does not matter what microcontroller to use, but its programming techniques. So that was emphasized by Sulhan Setiawan, the author of this book. So if you are mastering its technique, and want to replace the type of microcontroller, no problem.</p><p>If you do not find this book at a conventional bookstore, please <a href="http://www.google.co.id/search?q=%22Sulhan+Setiawan%22+%22Mudah+dan+Menyenangkan+Belajar+Mikrokontroler%22" rel="nofollow"><blink><strong>search on websites of the online bookstore you trust.</strong></blink></a></p> ]]></content:encoded> <wfw:commentRss>http://www.sulhansetiawan.com/mudah-dan-menyenangkan-belajar-mikrokontroler/feed</wfw:commentRss> <slash:comments>85</slash:comments> </item> </channel> </rss>
