<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6599454894873414377</id><updated>2012-01-02T07:56:28.873-08:00</updated><category term='Reference'/><category term='sbc'/><category term='Hardware'/><category term='Assembler'/><category term='Arduino'/><category term='A table of contents'/><category term='Emulators'/><category term='My attempts'/><category term='Hacks'/><category term='Tutorials'/><category term='Programming'/><title type='text'>Atomic Arm</title><subtitle type='html'>Android, Arduino and ARM</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://atomicarm.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://atomicarm.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Mike Hewitt</name><uri>http://www.blogger.com/profile/05181139924811433955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>65</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6599454894873414377.post-7963836203553700606</id><published>2020-03-05T09:18:00.000-08:00</published><updated>2012-01-02T07:33:04.037-08:00</updated><title type='text'>A beginners take on ARM programming</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;I have collected this material together as I have tried to figure out how to 'get started' with ARM.&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;ARM in this context means:-&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;A &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Acorn or Advanced, depending on who you talk to.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;R &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;RISC, &amp;nbsp;(Reduced Instruction Set Computing)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;M &amp;nbsp; &amp;nbsp; &amp;nbsp; Machine&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;/span&gt; &lt;/div&gt;Atomic: The Acorn Atom was my first computer, and the manual was called "Atomic theory and practice."&lt;a href="http://atomicarm.blogspot.com/2010/07/blog-post.html"&gt; Acorn Atom picture &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Acorn were the makers of the BBC micro which was widely used in schools in the UK in the '80's.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;The BBC had an 8 bit 6502 microprocessor, and it is said that this processor which had a comparatively small instruction set was the inspiration for the design of the first ARM RISC(Reduced Instruction Set Computing) chip.&amp;nbsp;&lt;a href="http://atomicarm.blogspot.com/2010/01/acorn-risc-machine.html"&gt;ARM - a brief history &lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Getting started will depend on what you are attempting to do or learn, and could perhaps be divided into two broad categories,&amp;nbsp;hardware and software.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Software:&lt;/b&gt;&lt;br /&gt;If you are interested in writing software/applications, then there is a multitude of options. Most Android 'phones are ARM based, and Google have made it free and easy to develop and get applications into the Android market. So easy in fact, that several virus/trojan applications have appeared.&lt;br /&gt;&lt;br /&gt;See our first attempt at an Android game &amp;nbsp;here :-&amp;nbsp;&lt;a href="https://market.android.com/details?id=com.davidhewitt.angrybeaks"&gt;Angry Beaks&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The Apple iphone is ARM based, and Apple have also released a free development environment, although a licence is needed to put your application in the Apple appstore.&lt;br /&gt;&lt;br /&gt;Microsoft intend to make Windows 8 available for ARM devices.&lt;br /&gt;&lt;br /&gt;As you can see, there is no shortage of devices to develop applications for, but at the moment, Android is the cheapest and easiest to get started with.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Hardware:&lt;/b&gt;&lt;br /&gt;There are also a multitude of development boards available if you want to get started with hardware.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Having only worked with assembler on the 6502 in the '80's, I thought 'getting started' with ARM would just be a case of learning the ARM assembler instructions and chip pinout as I had done with the 6502, but &amp;nbsp;this is not the case.&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;I soon discovered that there is a large number of ARM &amp;nbsp;devices, and that the devices can have different operating states and modes.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;So, where to start?&lt;br /&gt;Several years have passed, since I started this site, and I did not get started with ARM in the way I initially envisaged.&lt;br /&gt;Basically, I was a beginner, starting again, and the ARM devices were more complicated than I wanted. Instead I found the AVR range of devices, specifically in the Arduino platform, designed with beginners in &amp;nbsp;mind.&lt;br /&gt;Although not ARM, the Atmel AVR chips could be described as RISC, and the 8 bit version in the Arduino was just right as a starting point. The Arduino has a large community following, and the avrfreaks forum has answers to any AVR question you can think of. Did I mention that it is cheap too?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;iframe frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://rcm-uk.amazon.co.uk/e/cm?t=atoarm-21&amp;amp;o=2&amp;amp;p=8&amp;amp;l=as1&amp;amp;asins=B0046ANZ9S&amp;amp;ref=qf_sp_asin_til&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr" style="height: 240px; width: 120px;"&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6599454894873414377-7963836203553700606?l=atomicarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atomicarm.blogspot.com/feeds/7963836203553700606/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atomicarm.blogspot.com/2010/03/beginners-take-on-arm-programming.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/7963836203553700606'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/7963836203553700606'/><link rel='alternate' type='text/html' href='http://atomicarm.blogspot.com/2010/03/beginners-take-on-arm-programming.html' title='A beginners take on ARM programming'/><author><name>Mike Hewitt</name><uri>http://www.blogger.com/profile/05181139924811433955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6599454894873414377.post-3854905014303003372</id><published>2011-07-31T04:48:00.001-07:00</published><updated>2011-07-31T04:48:48.060-07:00</updated><title type='text'>Options</title><content type='html'>Initially, I am going to look at three options.&lt;br /&gt;&lt;br /&gt;1: Virtualization using Qemu.&lt;br /&gt;2: Development boards or single board computers. (sbc)&lt;br /&gt;3: Integrated development environments/ software development kits (ide/sdk)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Virtualization using Qemu&lt;/b&gt;&lt;br /&gt;Both Fedora and Debian Linux have ARM ports, which means Fedora and Debian can run on ARM hardware as well as the usual Intel hardware in a PC. Here is a link to the Fedora project howto:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;a href="http://fedoraproject.org/wiki/Architectures/ARM/HowToQemu"&gt;http://fedoraproject.org/wiki/Architectures/ARM/HowToQemu&lt;/a&gt;&lt;br /&gt;a link to the Debian ARM project:&lt;br /&gt;&lt;a href="http://www.debian.org/ports/arm/"&gt;http://www.debian.org/ports/arm/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;and the Debian howto:&lt;br /&gt;&lt;a href="http://www.aurel32.net/info/debian_arm_qemu.php"&gt;http://www.aurel32.net/info/debian_arm_qemu.php&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Link to Qemu: &lt;a href="http://wiki.qemu.org/Main_Page"&gt;http://wiki.qemu.org/Main_Page&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;and Gcc is a free compiler.&lt;br /&gt;&lt;a href="http://gcc.gnu.org/"&gt;http://gcc.gnu.org/&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;With an emulator set up, a first step is a couple of lines of code in c, containing one inline assembler instruction, compiled with gcc and prints 'hello' when run, screen shots here:-&lt;br /&gt;&lt;a href="http://atomicarm.blogspot.com/2010/03/fedora-arm-in-qemu.html"&gt;http://atomicarm.blogspot.com/2010/03/fedora-arm-in-qemu.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;A more in depth discussion about virtual development using the Qemu-arm integrator is here:-&lt;br /&gt;&amp;nbsp;&lt;a href="http://atomicarm.blogspot.com/2010/01/arm-development-on-virtual-platform.html"&gt;http://atomicarm.blogspot.com/2010/01/arm-development-on-virtual-platform.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;With a virtual development environment set up, ARM development work can begin.&lt;br /&gt;&lt;br /&gt;The next step will be to move on to real hardware.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Development boards or single board computers&lt;/b&gt;&lt;br /&gt;Because this is partly a nostalgia project for me, the propeller 6502 laptop project at parallax looks like a possible candidate:-&lt;br /&gt;&lt;a href="http://www.parallax.com/tabid/708/Default.aspx"&gt;http://www.parallax.com/tabid/708/Default.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The beagle board is another possibility:-&lt;a href="http://beagleboard.org/"&gt;http://beagleboard.org/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;More about development boards:&lt;br /&gt;&lt;a href="http://www.atomicarm.blogspot.com/2010/01/development-boards-sbc.html"&gt;http://www.atomicarm.blogspot.com/2010/01/development-boards-sbc.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://atomicarm.blogspot.com/search/label/Programming"&gt;Using a development board, step by step example&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Integrated development environments/ software development kits (ide/sdk)&lt;/b&gt;&lt;br /&gt;And finally moving on to an integrated development environment/ software development kit (ide/sdk) to develope for existing hardware, an Android phone, for example. The Google offering is here:&lt;br /&gt;&lt;a href="http://developer.android.com/sdk/index.html"&gt;http://developer.android.com/sdk/index.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://atomicarm.blogspot.com/2010/01/gnu-arm-assembler-guide-from-ibm.html"&gt;Putting code on an Android phone&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6599454894873414377-3854905014303003372?l=atomicarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atomicarm.blogspot.com/feeds/3854905014303003372/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atomicarm.blogspot.com/2011/07/options.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/3854905014303003372'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/3854905014303003372'/><link rel='alternate' type='text/html' href='http://atomicarm.blogspot.com/2011/07/options.html' title='Options'/><author><name>Mike Hewitt</name><uri>http://www.blogger.com/profile/05181139924811433955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6599454894873414377.post-5828209721681874389</id><published>2011-05-15T06:58:00.001-07:00</published><updated>2011-08-20T09:11:26.882-07:00</updated><title type='text'>Angstrom Linux Quick Installation Procedure for WindowsCE-ARM based devices</title><content type='html'>&lt;h1 id="Angstrom.3AQuickInstallationProcedureforWindowsCE-baseddevices" style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;&lt;span style="font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; font-weight: normal;"&gt;&lt;table border="0" cellpadding="0" cellspacing="0" style="width: 720px;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px;" width="10"&gt;&lt;img alt="" border="0" height="93" src="http://welcome.hp-ww.com/img/s.gif" width="10" /&gt;&lt;/td&gt;&lt;td align="left" style="font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px;" valign="top" width="536"&gt;&lt;span id="jsPageBreadcrumb"&gt;&amp;nbsp;&lt;/span&gt;ie.&lt;img alt="" height="6" src="http://welcome.hp-ww.com/img/s.gif" width="1" /&gt;&lt;br /&gt;&lt;h1 style="font-size: 25px; font-weight: normal; margin-bottom: 2px; margin-top: 2px;"&gt;&lt;span id="jsPageTitle"&gt;&amp;nbsp;&lt;/span&gt;iPAQ H3970 and H3975 Pocket PC ROM&amp;nbsp;&lt;/h1&gt;&lt;a href="http://www.angstrom-distribution.org/releases/2007.12/images/h3900/"&gt;http://www.angstrom-distribution.org/releases/2007.12/images/h3900/&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/span&gt;&lt;/h1&gt;&lt;span style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;&lt;span class="anchor" id="line-5"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;&lt;span class="anchor" id="line-6"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="line867" style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;&lt;em&gt;(c)2007-8 by Paul Sokolovsky&lt;/em&gt;&lt;span class="anchor" id="line-7"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="anchor" id="line-8"&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class="line862" style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;This document is licensed under&amp;nbsp;&lt;a class="http" href="http://creativecommons.org/licenses/by-nc-sa/3.0/" style="border: 0px initial initial; color: #0044b3; text-decoration: none;"&gt;Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported&lt;/a&gt;&amp;nbsp;license.&amp;nbsp;&lt;span class="anchor" id="line-9"&gt;&amp;nbsp;&lt;/span&gt;It is contributed to the documentation set of the Angstrom project.&lt;span class="anchor" id="line-10"&gt;&amp;nbsp;&lt;/span&gt;Image courtesy of&amp;nbsp;&lt;a class="http" href="http://free-electrons.com/" style="border: 0px initial initial; color: #0044b3; text-decoration: none;"&gt;Michael Opdenacker&lt;/a&gt;.&lt;span class="anchor" id="line-11"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="anchor" id="line-12"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="anchor" id="line-13"&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class="line862" style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;These instructions describe how to get started with Angstrom quickly on WindowsCE-based ARM devices, like PocketPCs and WindowsMobiles. This guide is intended for novice users, and thus does not describe all available options and omits technical details which are otherwise good to know. Make sure you read more comprehensive documentation once you get up to speed with Angstrom!&amp;nbsp;&lt;img alt=";-)" height="15" src="http://www.linuxtogo.org/moin_htdocs/modern/img/smile4.png" style="border: 0px initial initial;" title=";-)" width="15" /&gt;&lt;span class="anchor" id="line-14"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="anchor" id="line-15"&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class="line867" style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;&lt;/div&gt;&lt;hr style="background-color: #9c9c9c; border: 0px initial initial; font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px; height: 1pt;" /&gt;&lt;div class="line874" style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;&lt;span class="anchor" id="line-16"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="anchor" id="line-17"&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class="line867" style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;&lt;/div&gt;&lt;h2 id="Prerequisites" style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;1. Prerequisites&lt;/h2&gt;&lt;span style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;&lt;span class="anchor" id="line-18"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;&lt;span class="anchor" id="line-19"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="line867" style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;&lt;/div&gt;&lt;h3 id="HaRETsupport" style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;1.1. HaRET support&lt;/h3&gt;&lt;div class="line862" style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;To use tools described in this doc, your device must be supported and recognized by the Haret bootloader.By now, it includes support for many devices, including ones which have only alpha-quality Linux support. All devices supported by Angstrom are supported by HaRET, so if you have an image for your device, you're done. If you're a newcomer with an unsupported device, you're out of luck unless you're brave enough to become a device hacker. This is an exciting and knowledge-rich way, and the first and relatively easy thing you will want to do is to make HaRET recognize your device.&lt;span class="anchor" id="line-21"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="anchor" id="line-22"&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class="line867" style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;&lt;/div&gt;&lt;h3 id="Backup.2CBackup.2CBackup.21" style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;1.2. Backup, Backup, Backup!&lt;/h3&gt;&lt;span style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;&lt;span class="anchor" id="line-23"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;&lt;span class="anchor" id="line-24"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="line874" style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;Linux, once booted, uses the entire device RAM for its operation. That means that when booting, you lose all of the previous contents of the RAM. As pre-WinCE5 devices used RAM as kind of RAMdisk to store important settings and user data, they will be lost after booting Linux. Or in other words, booting Linux is the equivalent of hard resetting the device (and often to boot, you need to perform a hard reset first, as boot procedure requires some deal of free memory, which not every user has all the time). With post-WinCE5 devices, the situation is less clear: they store most of the data in flash; and still, they are known to keep at least some settings in RAM.&lt;span class="anchor" id="line-25"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="anchor" id="line-26"&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class="line862" style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;So, in either case, the golden rule of any computer user applies here too: "Backup!". Backup before doing any big change to the system, like trying Linux. Backup regularly anyway. Many PDAs include backup software preinstalled in their FlashROM (for example, most HP iPaqs have iPaq Backup); some ship it on accompanying CD; you may look for 3rd-party solutions on the net; finally, as a default solution, you can use the backup feature of ActiveSync - that's available for any device . [#activesync *]&lt;span class="anchor" id="line-27"&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class="line874" style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;So, we'll not return to this again, but: BACKUP YOUR DEVICE EACH TIME BEFORE YOU BOOT LINUX.&lt;/div&gt;&lt;div class="line867" style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;&lt;/div&gt;&lt;h3 id="KnowingOtherRisks" style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;1.3. Knowing Other Risks&lt;/h3&gt;&lt;span style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;&lt;/span&gt;&lt;span style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="line874" style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;If you do backups as described above, there is virtually zero chance of data loss. The procedures described in this document also pose near-zero risk of causing harm to device hardware or firmware ("brick" device).&amp;nbsp;Still, there always may be obscure bugs and circumstances leading to unpredictable results. So, as usual, PERFORM LINUX INSTALLATION AT YOUR OWN RISK. This applies to anything you do with your device, of course.&lt;/div&gt;&lt;div class="line874" style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;Make sure that you know well how to perform a *hard* reset of your device (many devices require obscure button combinations to be pressed together with the usual "peephole" or reset button).&lt;/div&gt;&lt;div class="line867" style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;&lt;/div&gt;&lt;hr style="background-color: #9c9c9c; border: 0px initial initial; font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px; height: 1pt;" /&gt;&lt;div class="line874" style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;&lt;/div&gt;&lt;div class="line867" style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;&lt;/div&gt;&lt;h2 id="PreviewFirst" style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;2. Preview First&lt;/h2&gt;&lt;span style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;&lt;/span&gt;&lt;span style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="line862" style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;Want to have a look at Angstrom? You don't need to install anything! Angstrom is a modern distribution offering all state-of-the-art features, including LiveCD. Well, we don't have CDs here, so the thing is called LiveRamdisk instead. It appears as a single big executable file; you download that file, put it somewhere so you can start it on the device, and do just that! Somewhere above is usually a memory card (doesn't matter if it's CF or SD), but users with big internal flash may also use the flash disk. Finally, users without a flashdisk and lacking a card can try to copy it to RAM with ActiveSync and start from there. Caveat: a LiveRamdisk is big, and requires as much big memory to startup. So, even 64Mb devices may have troubles running in such way (due to some under-functional OS taking control of that RAM, you guessed right&amp;nbsp;&lt;img alt=";-)" height="15" src="http://www.linuxtogo.org/moin_htdocs/modern/img/smile4.png" style="border: 0px initial initial;" title=";-)" width="15" /&gt;&amp;nbsp;).&lt;/div&gt;&lt;div class="line862" style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;Once you boot, you can preview all standard Angstrom features. You can access memory cards and change files on them. You can even install some small packages from the feeds; but the root filesystem of this setup is located on ramdisk, so all newly installed packages and configuration changes will be lost on reboot. LiveRamdisks as of now are more intended as a quick demo, not as a method to have production install. Don't expect the same results as you get in the latest Knoppix!&amp;nbsp;&lt;img alt=";-)" height="15" src="http://www.linuxtogo.org/moin_htdocs/modern/img/smile4.png" style="border: 0px initial initial;" title=";-)" width="15" /&gt;&lt;/div&gt;&lt;div class="line867" style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;&lt;a class="http" href="http://www.angstrom-distribution.org/releases/2007.12/images/" style="border: 0px initial initial; color: #0044b3; text-decoration: none;"&gt;Downloads&lt;/a&gt;:&lt;/div&gt;&lt;ul style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;&lt;li&gt;Select directory for your machine&lt;/li&gt;&lt;li&gt;&lt;div class="line862" style="margin-bottom: 0.25em; margin-left: 0px; margin-right: 0px; margin-top: 0.25em;"&gt;Download the file: Angstrom-x11-image-&lt;strong&gt;liveramdisk&lt;/strong&gt;-&amp;amp;lt;angstrom_version&amp;amp;gt;-&amp;amp;lt;machine&amp;amp;gt;.exe&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="line867" style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;&lt;/div&gt;&lt;hr style="background-color: #9c9c9c; border: 0px initial initial; font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px; height: 1pt;" /&gt;&lt;div class="line874" style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;&lt;/div&gt;&lt;div class="line867" style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;&lt;/div&gt;&lt;h2 id="InstallingusingaLoopbackImage" style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;3. Installing using a Loopback Image&lt;/h2&gt;&lt;span style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;&lt;/span&gt;&lt;span style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="line862" style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;To install Angstrom for everyday use, you would need to flash it to the internal FlashROM or create a dedicated partition on a memory card. Based on experiences, both options proved to be a headache for novice users like you!&amp;nbsp;&lt;img alt=";-)" height="15" src="http://www.linuxtogo.org/moin_htdocs/modern/img/smile4.png" style="border: 0px initial initial;" title=";-)" width="15" /&gt;&amp;nbsp;Besides, flash install is supported only for small subset of older devices (that's because developers are also afraid of bricking their devices&amp;nbsp;&lt;img alt=";-)" height="15" src="http://www.linuxtogo.org/moin_htdocs/modern/img/smile4.png" style="border: 0px initial initial;" title=";-)" width="15" /&gt;&amp;nbsp;). So, to the rescue comes installing using a loopback image. "Installing" is a strong way to say it, as the whole loopback image is prepared for you already. You download it, and uncompress on your card (to the root directory). You also download an Angstrom bootmanager, packaged as an .exe, and put it somewhere you can run it from (the easiest place to put it is the root of the card, too).&lt;/div&gt;&lt;div class="line874" style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;Then, you start the bootmanager, and in few seconds it shows you the menu of the boot locations available. You would only have a single, loopback source (ignore NFS and any other options you might have). Once you made your selection (cursor keys, then action button to confirm), Angstrom will start to boot.&lt;/div&gt;&lt;div class="line867" style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;&lt;a class="http" href="http://www.angstrom-distribution.org/releases/2007.12/images/" style="border: 0px initial initial; color: #0044b3; text-decoration: none;"&gt;Downloads&lt;/a&gt;:&lt;/div&gt;&lt;ul style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;&lt;li&gt;Select the directory for your machine&lt;/li&gt;&lt;li&gt;Download the following files:&lt;ul&gt;&lt;li&gt;&lt;div class="line862" style="margin-bottom: 0.25em; margin-left: 0px; margin-right: 0px; margin-top: 0.25em;"&gt;Angstrom-x11-image-glibc-ipk-&amp;amp;lt;angstrom_version&amp;amp;gt;-&amp;amp;lt;machine&amp;amp;gt;.rootfs&lt;strong&gt;.img.bz2&lt;/strong&gt;&amp;nbsp;- compressed ext2 filesystem image, needs uncompression before use&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div class="line862" style="margin-bottom: 0.25em; margin-left: 0px; margin-right: 0px; margin-top: 0.25em;"&gt;Angstrom-boot-&amp;amp;lt;kernel_version&amp;amp;gt;-&amp;amp;lt;machine&amp;amp;gt;.exe - bootmanager&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="line862" style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;If you don't know how to uncompress a bz2 file, use&amp;nbsp;&lt;a class="http" href="http://www.7-zip.org/" style="border: 0px initial initial; color: #0044b3; text-decoration: none;"&gt;7-zip&lt;/a&gt;.&lt;/div&gt;&lt;div class="line867" style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;&lt;/div&gt;&lt;hr style="background-color: #9c9c9c; border: 0px initial initial; font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px; height: 1pt;" /&gt;&lt;div class="line874" style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;&lt;/div&gt;&lt;div class="line867" style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;&lt;/div&gt;&lt;h2 id="AdditionalInfoandTroubleshooting" style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;4. Additional Info and Troubleshooting&lt;/h2&gt;&lt;span style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;&lt;/span&gt;&lt;span style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="line874" style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;To be able to solve problems with the processes above, we need to know a few basic facts about the Linux startup process. So, to have Linux booted, one needs 3 things:&lt;/div&gt;&lt;ul style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;&lt;li&gt;A bootloader&lt;/li&gt;&lt;li&gt;A kernel&lt;/li&gt;&lt;li&gt;A rootfs&lt;/li&gt;&lt;/ul&gt;&lt;div class="line867" style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;LiveRamdisks have all of bootloader, kernel and compressed rootfs packaged together into single executable file. So, zero chance of component mismatch, and the only expectable problems can be:&lt;/div&gt;&lt;ul style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;&lt;li&gt;Lack of free memory to load entire package into memory.&lt;/li&gt;&lt;li&gt;Lack of free memory to unpack internal components.&lt;/li&gt;&lt;li&gt;Issue with hardware support for particular device model or specific device instance that the user has.&lt;/li&gt;&lt;/ul&gt;&lt;div class="line862" style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;The first type of OOM (out-of-memory) error should be reported on the initial load stage. The second OOM error is more grave, and can lead to a silent lockup with a black screen during kernel startup. Fortunately, this can happen only if the LiveRamdisk is made too big, and the size parameter is under control of the developers.&lt;/div&gt;&lt;div class="line874" style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;Hardware support issues and incompatibilities are the most unpleasant issues: they can manifest in various, unpredictable ways, like for example, the touchscreen having calibration issues for a particular device or lockup during boot due to highly-unusual card inserted in the slot during boot. Fortunately, these issues are really rare. But if you face something like that, you should perform additional testing to figure out how to reproduce the issue, how frequently it happens, if there are ways to work around it, etc., and communicate it to the kernel maintainer of your device.&lt;/div&gt;&lt;div class="line874" style="font-family: Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;Proceeding to loopback install, here we split the rootfs out of the single package. So, the bootmanager exe actually contains bootloader and kernel, while rootfs lives in a separate file (and is uncompressed, so it can be writable). One important thing to know about such a setup is that the rootfs is dependent on the kernel: rootfs contains the kernel modules, and their version must match the actual kernel used. As the kernel resides in a bootmanager executable, that means that the bootmanager and rootfs must be built against the same kernel version. So, if you upgrade rootfs (i.e. install new RC), make sure that the download directory contains an updated bootmanager and if so, use the new version for the new rootfs - and the old bootmanager for the old rootfs. Failing to do so will still usually cause Angstrom to boot, but there will be issues with hardware, etc. support - for example, lack of sound, bluetooth, network support, various errors during booting, etc. Note that "same version" applies to the main kernel version ("2.6.21-hh20"), not a kernel package release ("-r2"). It is OK if a bootmanager with an older kernel revision is shipped with a zImage file of newer revision.&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6599454894873414377-5828209721681874389?l=atomicarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atomicarm.blogspot.com/feeds/5828209721681874389/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atomicarm.blogspot.com/2011/05/angstrom-quick-installation-procedure.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/5828209721681874389'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/5828209721681874389'/><link rel='alternate' type='text/html' href='http://atomicarm.blogspot.com/2011/05/angstrom-quick-installation-procedure.html' title='Angstrom Linux Quick Installation Procedure for WindowsCE-ARM based devices'/><author><name>Mike Hewitt</name><uri>http://www.blogger.com/profile/05181139924811433955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6599454894873414377.post-249356681853572863</id><published>2011-05-15T06:55:00.001-07:00</published><updated>2011-05-15T06:55:41.022-07:00</updated><title type='text'>Newbie's Guide to AVR Timers</title><content type='html'>&lt;p&gt;&lt;span style="font-family: 'Trebuchet MS', Helvetica, Verdana, Arial, sans-serif;"&gt;&lt;span style="font-size: 18px; line-height: normal;"&gt;&lt;span style="font-weight: bold;"&gt;Introduction - The AVR Timer&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 12px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;The timer systems on the AVR series of Microcontrollers are complex beasts. They have a myriad of uses ranging from simple delay intervals right up to complex PWM (more on this later) generation. However, despite the surface complexity, the function of the timer subsystem can be condensed into one obvious function: to time.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;We use timers every day - the most simple one can be found on your wrist. A simple clock will time the seconds, minutes and hours elapsed in a given day - or in the case of a twelve hour clock, since the last half-day. AVR timers do a similar job, measuring a given time interval.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;The AVR timers are very useful as they can run asynchronous to the main AVR core. This is a fancy way of saying that the timers are separate circuits on the AVR chip which can run independent of the main program, interacting via the control and count registers, and the timer interrupts. Timers can be configured to produce outputs directly to pre-determined pins, reducing the processing load on the AVR core.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;One thing that trips those new to the AVR timer is the clock source. Like all digital systems, the timer requires a clock in order to function. As each clock pulse increments the timer's counter by one, the timer measures intervals in periods of one on the input frequency:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;Timer Resolution = (1 / Input Frequency)&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;This means the smallest amount of time the timer can measure is one period of the incoming clock signal. For instance, if we supply a 100Hz signal to a timer, our period becomes:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;Timer Resolution = (1 / Input Frequency)&amp;nbsp;&lt;br /&gt;Timer Resolution = (1 / 100)&amp;nbsp;&lt;br /&gt;Timer Resolution = .01 seconds&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;For the above example, our period becomes .01 seconds - so our timer will measure in multiples of this. If we measure a delay to be 45 timer periods, then our total delay will be 45 times .01 seconds, or .45 seconds.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;For this tutorial, I will assume the target to be a MEGA16, running at at 1MHz clock. This is a nicely featured AVR containing certain timer functionality we'll need later on. As modern AVRs come running off their internal ~1MHz RC oscillator by default, you can use this without a problem (although do keep in mind the resultant timing measurements will be slightly incorrect due to the RC frequency tolerance).&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;In the sections dealing with toggling a LED, it is assumed to be connected to PORTB, bit 0 of your chosen AVR (pin 1 of DIP AVRMEGA16).&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;To start off, we will deal with basic timer functionality and move on from there.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 18px; line-height: normal;"&gt;&lt;span style="font-weight: bold;"&gt;Part One - Timers running at Fcpu&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 12px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;We'll start with a simple example. We'll create a simple program to flash a LED at about 20Hz. Simple, right?&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;First, let's look at the pseudo-code required to drive this example:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;Set up LED hardware&amp;nbsp;&lt;br /&gt;Set up timer&amp;nbsp;&lt;br /&gt;&lt;br /&gt;WHILE forever&amp;nbsp;&lt;br /&gt;&amp;nbsp; IF timer value IS EQUAL TO OR MORE THAN 1/20 sec THEN&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; Reset counter&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; Toggle LED&amp;nbsp;&lt;br /&gt;&amp;nbsp; END IF&amp;nbsp;&lt;br /&gt;END WHILE&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Very simple. We're just starting out, so we'll use the polled method of determining the elapsed time - we'll put in an IF statement in our code to check the current timer value, and act on it once it reaches (or exceeds) a certain value. Before we start on the timer stuff, let's create the skeleton of our project:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;// TODO: Set up LED hardware&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;// TODO: Set up timer&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;// TODO: Check timer value, reset and toggle LED when count matches 1/20 of a second&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Extremely simple. I'm going to assume you are familiar with the basics of setting up AVR ports as well as bit manipulation (if you're uncertain about the latter, refer to&amp;nbsp;&lt;/span&gt;&lt;a class="postlink" style="color: #566d91; text-decoration: none; font-size: 12px;" href="http://www.avrfreaks.net/index.php?name=PNphpBB2&amp;amp;file=viewtopic&amp;amp;t=37871" target="_blank"&gt;this excellent tutorial&lt;/a&gt;&lt;span style="font-size: 12px;"&gt;). With that in mind, I'll add in the LED-related code and add in the IF statement:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRB |= (1 &amp;lt;&amp;lt; 0); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;// TODO: Set up timer&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;// TODO: Check timer value in if statement, true when count matches 1/20 of a second&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;if ()&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;PORTB ^= (1 &amp;lt;&amp;lt; 0); // Toggle the LED&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;// TODO: Reset timer value&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Now we need to start dealing with the timer. We want to do nothing more than start it at 1MHz, then check its value later on to see how much time has elapsed. We need to deviate for a second and learn a little about how the timer works in its most basic mode.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;The AVR timer circuits come in two different widths, 8 and 16 bit. While the capabilities of the two timer types differ, at the most basic level (simple counting), the only difference is the maximum amount of time the timer can count to before overflowing and resetting back to zero. Those familiar with C will know that an unsigned eight bit value can store a value from 0 to (2^8 - 1), or 255, before running out of bits to use and becoming zero again. Similarly, an unsigned 16 bit value may store a value from 0 to (2^16 - 1), or 65535 before doing the same.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;As the name suggests, an 8 bit timer stores its value as an eight bit value in its count register, while the 16 bit timer stores its current count value in a pair of eight bit registers. Each advancement of the counter register for any AVR timer indicates that one timer period has elapsed.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Our project needs a fairly long delay, of 1/20 of a second. That's quite short to us humans, but to a microcontroller capable of millions of instructions per second it's a long time indeed!&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Our timer will be running at the same clock speed as the AVR core to start with, so we know that the frequency is 1MHz. One Megahertz is 1/1000000 of a second, so for each clock of the timer only one millionth of a second has elapsed! Our target is 1/20 of a second, so let's calculate the number of timer periods needed to reach this delay:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;Target Timer Count = (1 / Target Frequency) / (1 / Timer Clock Frequency) - 1&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= (1 / 20) / (1 / 1000000) - 1&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= .05 / 0.000001 - 1&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= 50000 - 1&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= 49999&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;So running at 1MHz, our timer needs to count to 49999 before 1/20th of a second has elapsed - the normal calculated value is decremented by one, as the 0th count of the timer still takes one tick. That's a very large value - too large for an 8 bit value! We'll need to use the 16 bit timer 1 instead.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Firstly, we need to start the timer at the top of our main routine, so that it will start counting. To do this, we need to supply the timer with a clock; as soon as it is clocked it will begin counting in parallel with the AVR's CPU core (this is called synchronous operation). To supply a clock of Fcpu to the timer 1 circuits we need to set the CS10 bit (which selects a Fcpu prescale of 1 - more on that later) in the TCCR1B, the Timer 1 Control Register B.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRB |= (1 &amp;lt;&amp;lt; 0); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= (1 &amp;lt;&amp;lt; CS10); // Set up timer&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;// TODO: Check timer value in if statement, true when count matches 1/20 of a second&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;if ()&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;PORTB ^= (1 &amp;lt;&amp;lt; 0); // Toggle the LED&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;// TODO: Reset timer value&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Now, with only one line of code, we've started the hardware timer 1 counting at 1MHz - the same speed as our AVR. It will now happily continue counting independently of our AVR. However, at the moment it isn't very useful, we still need to do something with it!&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;We want to check the timer's counter value to see if it reaches 1/20 of a second, or a value of 49999 at 1MHz as we previously calculated. The current timer value for timer 1 is available in the special 16-bit register, TCNT1. In actual fact, the value is in two 8-bit pair registers TCNT1H (for the high byte) and TCNT1L (for the low byte), however the C library implementation we're using helpfully hides this fact from us.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Let's now add in our check to our code - it's as simple as testing the value of TCNT1 and comparing against our wanted value, 49999. To prevent against missed compares (where the timer updates twice between checks so our code never sees the correct value), we use the equal to or more than operator, "&amp;gt;=".&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRB |= (1 &amp;lt;&amp;lt; 0); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= (1 &amp;lt;&amp;lt; CS10); // Set up timer&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;// Check timer value in if statement, true when count matches 1/20 of a second&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;if (TCNT1 &amp;gt;= 49999)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;PORTB ^= (1 &amp;lt;&amp;lt; 0); // Toggle the LED&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;// TODO: Reset timer value&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Great! We've only got one more line of code to write, to reset the timer value. We already know the current value is accessed via the TCNT1 register for Timer 1, and since this is a read/write register, we can just write the value 0 to it once our required value is reached to rest it.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRB |= (1 &amp;lt;&amp;lt; 0); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= (1 &amp;lt;&amp;lt; CS10); // Set up timer&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;// Check timer value in if statement, true when count matches 1/20 of a second&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;if (TCNT1 &amp;gt;= 49999)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;PORTB ^= (1 &amp;lt;&amp;lt; 0); // Toggle the LED&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;TCNT1 = 0; // Reset timer value&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;And there we have it! We've just created a very basic program that will toggle our LED every 1/20 of a second at a 1MHz clock. Testing it out on physical hardware should show the LED being dimmer than normal (due to it being pulsed quickly). Good eyesight might reveal the LED's very fast flickering.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Next, we'll learn about the prescaler so we can try to slow things down a bit.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 18px; line-height: normal;"&gt;&lt;span style="font-weight: bold;"&gt;Part Two - Prescaled Timers&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 12px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;In part one of this tutorial we learned how to set up our 16-bit timer 1 for a 1/20 second delay. This short (to us humans) delay is actually quite long to our AVR - 50,000 cycles in fact at 1MHz. Notice that Timer 1 can only hold a value of 0-65535 - and we've almost reached that! What do we do if we want a longer delay?&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;One of the easiest things we can do is to use the timer's prescaler, to trade resolution for duration. The timer prescaler is a piece of timer circuitry which allows us to divide up the incoming clock signal by a power of 2, reducing the resolution (as we can only count in 2^n cycle blocks) but giving us a longer timer range.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Let's try to prescale down our Fcpu clock so we can reduce the timer value and reduce our delay down to a nice 1Hz. The Timer 1 prescaler on the MEGA16 has divide values of 1, 8, 64, 256 and 1024 - so let's re-do our calculations and see if we can find an exact value.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Our calculations for our new timer value are exactly the same as before, except we now have a new prescaler term. We'll look at our minimum resolution for each first:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;Timer Resolution = (1 / (Input Frequency / Prescale))&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= (Prescale / Input Frequency)&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;For a 1MHz clock, we can construct a table of resolutions using the available prescaler values and a Fcpu of 1MHz.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;Prescaler Value | Resolution @ 1MHz&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 |&amp;nbsp; 1uS&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 8 |&amp;nbsp; 8uS&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;64 | 64uS&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 256 | 256uS&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1024 | 1024uS&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;If you recall our equation for calculating the timer value for a particular delay in part 1 of this tutorial, you'll remember it is the following:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;Target Timer Count = (1 / Target Frequency) / (1 / Timer Clock Frequency) - 1&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;However, as we've just altered the prescaler term, the latter half is now different. Substituting in our new resolution equation from above we get:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;Target Timer Count = (1 / Target Frequency) / (Prescale / Input Frequency) - 1&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Or rearranged:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;Target Timer Count = (Input Frequency / Prescale) / Target Frequency - 1&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Now, we want to see if there is a prescaler value which will give an *exact* delay of 1Hz. One Hertz is equal to one cycle per second, so we want our compare value to be one second long, or 1000000uS. Let's divide that by each of our resolutions and put the results in a different table:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;Prescaler Value | Target Timer Count&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 |&amp;nbsp; 999999&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 8 |&amp;nbsp; 125000&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;64 |&amp;nbsp; 15624&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 256 |&amp;nbsp; 3905.25&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1024 |&amp;nbsp; 975.5625&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;The results are interesting. Of the available prescaler values, we can immediately discount 256 and 1024 - they do not evenly divide into our wanted delay period. They are of course usable, but due to the rounding of the timer count value the resultant delay will be slightly over or under our needed delay. That leaves us with three possible prescales; 1, 8 and 64.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Our next task is to remove the values that aren't possible. On an 8-bit timer, that means discounting values of more than (( 2 ^ 8 ) - 1), or 255, as the value won't fit into the timer's 8-bit count register. For our 16-bit timer, we have a larger range of 0 to ((2 ^ 16) - 1), or 65535. Only one of our prescaler values satisfies this requirement - a prescale of 64 - as the other two possibilities require a timer count value of more bits than our largest 16-bit timer is capable of storing.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Let's go back to our original timer program and modify it to compare against our new value of 15624, which we've found to be 1 second at a prescale of 64 and a Fcpu of 1MHz:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRB |= (1 &amp;lt;&amp;lt; 0); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;// TODO: Set up timer at Fcpu/64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;// Check timer value in if statement, true when count matches 1 second&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;if (TCNT1 &amp;gt;= 15624)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;PORTB ^= (1 &amp;lt;&amp;lt; 0); // Toggle the LED&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;TCNT1 = 0; // Reset timer value&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Note I've removed the timer setup line, as it is no longer valid. We want to set up our timer to run at Fcpu/64 now. To do this, we need to look at the datasheet of the MEGA16 to see which bits need to be set in which control registers.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Checking indicates that we need to set both the CS10 and CS11 prescaler bits in TCCR1B, so let's add that to our program:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRB |= (1 &amp;lt;&amp;lt; 0); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= ((1 &amp;lt;&amp;lt; CS10) | (1 &amp;lt;&amp;lt; CS11)); // Set up timer at Fcpu/64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;// Check timer value in if statement, true when count matches 1 second&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;if (TCNT1 &amp;gt;= 15624)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;PORTB ^= (1 &amp;lt;&amp;lt; 0); // Toggle the LED&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;TCNT1 = 0; // Reset timer value&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Compile it, and we're done! Remembering that our timer runs as soon as it gets a clock source, our program will now work, flashing the LED at a frequency of 1Hz.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 18px; line-height: normal;"&gt;&lt;span style="font-weight: bold;"&gt;Part Three - Long Timer Delays in Firmware&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 12px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;So far, we've learned how to use the timers in their most basic counting mode to delay a specified duration. However, we've also discovered a limitation of the timers - their maximum duration that their timer count registers can hold. We've managed to get a 1Hz delay out of a prescaled 16-bit timer with a prescale, but what if we want a delay of a minute? An hour? A week or year?&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;The answer is to create a sort of prescaler of our own in software. By making the hardware timer count to a known delay - say the 1Hz we created earlier - we can increment a variable each time that period is reached, and only act after the counter is reached a certain value. Let's pseudocode this so we can get a better understanding of what we want to do:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;Set up LED hardware&amp;nbsp;&lt;br /&gt;Set up timer&amp;nbsp;&lt;br /&gt;Initialise counter to 0&amp;nbsp;&lt;br /&gt;&lt;br /&gt;WHILE forever&amp;nbsp;&lt;br /&gt;&amp;nbsp; IF timer value IS EQUAL TO 1 sec THEN&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; Increment counter&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; Reset timer&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; IF counter value IS EQUAL TO 60 seconds THEN&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Toggle LED&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; END IF&amp;nbsp;&lt;br /&gt;&amp;nbsp; END IF&amp;nbsp;&lt;br /&gt;END WHILE&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;The above pseudocode will build on our last experiment - a timer with a one second count - to produce a long delay of one minute (60 seconds). It's very simple to implement - all we need extra to our last example is an extra IF statement, and a few variable-related lines. First off, we'll re-cap with our complete code as it stands at the moment:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRB |= (1 &amp;lt;&amp;lt; 0); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= ((1 &amp;lt;&amp;lt; CS10) | (1 &amp;lt;&amp;lt; CS11)); // Set up timer at Fcpu/64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; // Check timer value in if statement, true when count matches 1 second&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if (TCNT1 &amp;gt;= 15624)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; {&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;PORTB ^= (1 &amp;lt;&amp;lt; 0); // Toggle the LED&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;TCNT1 = 0; // Reset timer value&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;We need some code to create and initialise a new counter variable to 0, then increment it when the counter reaches one second as our pseudocode states. We also need to add in a test to see if our new variable reaches the value of 60, indicating that one minute has elapsed.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;// TODO: Initialise a new counter variable to zero&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRB |= (1 &amp;lt;&amp;lt; 0); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= ((1 &amp;lt;&amp;lt; CS10) | (1 &amp;lt;&amp;lt; CS11)); // Set up timer at Fcpu/64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; // Check timer value in if statement, true when count matches 1 second&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if (TCNT1 &amp;gt;= 15625)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; {&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;TCNT1 = 0; // Reset timer value&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// TODO: Increment counter variable&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// TODO: Check here to see if new counter variable has reached 60&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if ()&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // TODO: Reset counter variable&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PORTB ^= (1 &amp;lt;&amp;lt; 0); // Toggle the LED&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Now that we have our new program's structure, replacing the TODOs becomes very simple. We want a target count of 60, which is well within the range of an unsigned integer variable, so we'll make our counter variable of type unsigned integer. The rest of the code is extremely simple, so I'll add it all in at once:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;unsigned char ElapsedSeconds = 0; // Make a new counter variable and initialise to zero&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRB |= (1 &amp;lt;&amp;lt; 0); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= ((1 &amp;lt;&amp;lt; CS10) | (1 &amp;lt;&amp;lt; CS11)); // Set up timer at Fcpu/64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; // Check timer value in if statement, true when count matches 1 second&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if (TCNT1 &amp;gt;= 15624)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; {&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;TCNT1 = 0; // Reset timer value&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ElapsedSeconds++;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (ElapsedSeconds == 60) // Check if one minute has elapsed&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ElapsedSeconds = 0; // Reset counter variable&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PORTB ^= (1 &amp;lt;&amp;lt; 0); // Toggle the LED&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Compile and run, and the LED should toggle once per minute. By extending this technique, we can produce delays of an arbitrary duration. One point of interest is to note that any timing errors compound - so if the timer input frequency is 1.1MHz rather than 1.0MHz our one minute timer will be sixty times that small error out in duration. For this reason it is important to ensure that the timer's clock is as accurate as possible, to reduce long-term errors as much as possible.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 18px; line-height: normal;"&gt;&lt;span style="font-weight: bold;"&gt;Part Four - The CTC Timer Mode&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 12px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Up until now, we've been dealing with the timers in a very basic way - starting them counting, then comparing in our main routine against a wanted value. This is rather inefficient - we waste cycles checking the timer's value every time the loop runs, and slightly inaccurate (as the timer may pass our wanted compare value slightly while processing the loop). What if there was a better way?&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Well, there is. The AVR timers usually incorporate a special function mode called "Clear on Timer Compare", or CTC for short. The CTC operating mode does in hardware what we've previously experimented in software; it compares in hardware the current timer value against the wanted value, and when the wanted value is reached a flag in a status register is set and the timer's value reset.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;This is extremely handy; because the comparing is done in hardware, all we have to worry about is checking the flag to determine when to execute our LED toggling - much faster than comparing bytes or (in the case of the 16-bit timer) several bytes.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;CTC mode is very straightforward. Before we look into the implementation, let's pseudocode what we want to do.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;Set up LED hardware&amp;nbsp;&lt;br /&gt;Set up timer in CTC mode&amp;nbsp;&lt;br /&gt;Set timer compare value to one second&amp;nbsp;&lt;br /&gt;&lt;br /&gt;WHILE forever&amp;nbsp;&lt;br /&gt;&amp;nbsp; IF CTC flag IS EQUAL TO 1 THEN&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; Toggle LED&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; Clear CTC flag&amp;nbsp;&lt;br /&gt;&amp;nbsp; END IF&amp;nbsp;&lt;br /&gt;END WHILE&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Very short, and very simple. Note that the name of the mode is&amp;nbsp;&lt;/span&gt;&lt;span style="font-style: italic; font-size: 12px;"&gt;Clear&lt;/span&gt;&lt;span style="font-size: 12px;"&gt;&amp;nbsp;on timer compare - the timer's value will automatically reset each time the compare value is reached, so we only need to clear the flag when the delay is reached. This set-and-forget system is very handy, as once the timer is configured and started we don't need to do anything other than check and clear its status registers.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Now then, we'll grab our previous example, modifying it to fit with our new pseudocode:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRB |= (1 &amp;lt;&amp;lt; 0); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;// TODO: Configure timer mode to CTC&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;// TODO: Set compare value for a compare rate of 1Hz&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= ((1 &amp;lt;&amp;lt; CS10) | (1 &amp;lt;&amp;lt; CS11)); // Start timer at Fcpu/64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if () // TODO: Check CTC flag&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; {&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PORTB ^= (1 &amp;lt;&amp;lt; 0); // Toggle the LED&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // TODO: Clear CTC flag&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Now, we need to flesh out the skeleton code we have. First up we need to configure our timer for CTC mode. As you might be able to guess, we want to configure our timer, thus the bits we want will be located in the timer's Control registers. The table to look for is the one titled "Waveform Generation Mode Bit Description", and is located in timer Control register descriptions for each timer. This table indicates all the possible timer modes, the bits required to set the timer to use those modes, and the conditions each mode reacts to.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;You should note that our previous examples have ignored this table altogether, allowing it to use its default value of all mode bits set to zero. Looking at the table we can see that this setup corresponds to the "Normal" timer mode. We want to use the CTC mode of the timer, so let's look for a combination of control bits that will give us this mode.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Interestingly, it seems that two different combinations in Timer 1 of the MEGA16 will give us the same CTC behaviour we desire. Looking to the right of the table, we can see that the "Top" value (that is, the maximum timer value for the mode, which corresponds to the compare value in CTC mode) uses different registers for each. Both modes behave in the same manner for our purposes and differ only by the register used to store the compare value, so we'll go with the first.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;The table says that for this mode, only bit WGM12 needs to be set. It also says that the register used for the compare value is named OCR1A.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Looking at the timer control registers (TCCR1A and TCCR1B) you should notice that the WGM1x bits - used to configure the timer's mode - are spread out over both registers. This is a small pain as you need to find out which bits are in which register, but once found setting up the timer becomes very easy. In fact, as we only have one bit to set - WGM12 - our task is even easier. The MEGA16's datasheet says that WGM12 is located in the TCCR1B register, so we need to set that.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRB |= (1 &amp;lt;&amp;lt; 0); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= (1 &amp;lt;&amp;lt; WGM12); // Configure timer 1 for CTC mode&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;// TODO: Set compare value for a compare rate of 1Hz&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= ((1 &amp;lt;&amp;lt; CS10) | (1 &amp;lt;&amp;lt; CS11)); // Start timer at Fcpu/64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if () // TODO: Check CTC flag&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; {&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PORTB ^= (1 &amp;lt;&amp;lt; 0); // Toggle the LED&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // TODO: Clear CTC flag&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;The second task for this experiment is to set the compare value - the value that will reset the timer and set the CTC flag when reached by the timer. We know from the datasheet that the register for this is OCR1A for the MEGA16 in the first CTC timer mode, so all we need is a compare value. From our previous experiment we calculated that 1Hz at 1MHz with a prescaler of 64 needs a compare value of 15624, so let's go with that.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRB |= (1 &amp;lt;&amp;lt; 0); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= (1 &amp;lt;&amp;lt; WGM12); // Configure timer 1 for CTC mode&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;OCR1A&amp;nbsp; &amp;nbsp;= 15624; // Set CTC compare value to 1Hz at 1MHz AVR clock, with a prescaler of 64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= ((1 &amp;lt;&amp;lt; CS10) | (1 &amp;lt;&amp;lt; CS11)); // Start timer at Fcpu/64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if () // TODO: Check CTC flag&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; {&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PORTB ^= (1 &amp;lt;&amp;lt; 0); // Toggle the LED&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // TODO: Clear CTC flag&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;There, almost done already! Last thing we need is a way of checking to see if the compare has occurred, and a way to clear the flag once its been set. The place to look for the compare flags is in the timer's Interrupt Flag register - an odd place it seems, but the reason will become clear in the next section dealing with timer interrupts. The MEGA16's Timer 1 interrupt flags are located in the combined register TIFR, and the flag we are interested in is the "Output Compare A Match" flag, OCF1A. Note the "A" on the end; Timer 1 on the MEGA16 has two CTC channels (named channel A and channel B), which can work independently. We're only using channel A for this experiment.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Checking for a CTC event involves checking the OCF1A flag in this register. That's easy - but what about clearing it? The datasheet includes an interesting note on the subject:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="quotetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Quote:&lt;/strong&gt;&lt;/div&gt;&lt;div class="quotecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;...OCF1A can be cleared by writing a logic 1 to its bit location&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Very strange indeed! In order to clear the CTC flag, we actually need to set it - even though it's already set. Due to some magic circuitry inside the AVR, writing a 1 to the flag when its set will actually cause it to clear itself. This is an interesting behaviour, and is the same across all the interrupt bits.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Despite that, we can now add in our last lines of code to get a working example:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRB |= (1 &amp;lt;&amp;lt; 0); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= (1 &amp;lt;&amp;lt; WGM12); // Configure timer 1 for CTC mode&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;OCR1A&amp;nbsp; &amp;nbsp;= 15624; // Set CTC compare value to 1Hz at 1MHz AVR clock, with a prescaler of 64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= ((1 &amp;lt;&amp;lt; CS10) | (1 &amp;lt;&amp;lt; CS11)); // Start timer at Fcpu/64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if (TIFR &amp;amp; (1 &amp;lt;&amp;lt; OCF1A))&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; {&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PORTB ^= (1 &amp;lt;&amp;lt; 0); // Toggle the LED&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TIFR = (1 &amp;lt;&amp;lt; OCF1A); // clear the CTC flag (writing a logic one to the set flag clears it)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Note that when clearing the OCF1A flag, we assign its value to the TIFR register. This is because it will assign a logic one to the flag's position (clearing it) but also because as writing zeros to the other flags won't affect them, we can go ahead and use the smaller (codesize-wise) direct assignment, rather than ORing the register to form a read/modify/write sequence. This is also beneficial because it prevents the compiler from writing logic one to the other flags if they were already set via the read/modify/write, which&amp;nbsp;&lt;/span&gt;&lt;span style="font-style: italic; font-size: 12px;"&gt;would&lt;/span&gt;&lt;span style="font-size: 12px;"&gt;&amp;nbsp;clear unwanted flags.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;And there we have it, a working 1Hz LED flasher using the CTC timer mode!&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 18px; line-height: normal;"&gt;&lt;span style="font-weight: bold;"&gt;Part Five - CTC Mode using Interrupts&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 12px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-size: 12px;"&gt;Important:&lt;/span&gt;&lt;span style="font-size: 12px;"&gt;&amp;nbsp;The interface for defining and working with Interrupts has changed in the more recent versions of WinAVR - please make sure you've updated your installation to the latest version if you encounter errors relating to the unknown macro "ISR".&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;For all our previous experiments, we've been using a looped test in our main code to determine when to execute the timer action code. That's fine - but what if we want to shift the responsibility of choosing when to execute the timer code to the AVR hardware instead? To do this, we need to look at the timer interrupts.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Interrupts are events that when enabled, cause the AVR to execute a special routine (called an Interrupt Service Routine, or ISR for short) when the interrupt conditions are met. These interrupts can happen at any time and when executing the main routine is paused while the ISR executes, the the main routine continues until the next interrupt. This is useful for us, as it means we can eliminate the need to keep checking the timer value and just respond to it's interrupt events instead.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;The AVR timers can have several different Interrupts - typically Overflow, Compare and Capture. Overflow occurs when the timer's value rolls past it's maximum and back to zero (for an 8 bit timer, that's when it counts past 11111111 in binary and resets back to 00000000). However, for this section we'll deal with the Compare interrupt, which occurs in CTC mode when the compare value is reached.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Again, we'll pseudocode this to start with:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;Set up LED hardware&amp;nbsp;&lt;br /&gt;Set up timer in CTC mode&amp;nbsp;&lt;br /&gt;Enable CTC interrupt&amp;nbsp;&lt;br /&gt;Enable global interrupts&amp;nbsp;&lt;br /&gt;Set timer compare value to one second&amp;nbsp;&lt;br /&gt;&lt;br /&gt;WHILE forever&amp;nbsp;&lt;br /&gt;END WHILE&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;ISR Timer Compare&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;Toggle LED&amp;nbsp;&lt;br /&gt;END ISR&amp;nbsp;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;We can start off this by working with our skeleton main code, used in previous examples. I'll skip the details on the parts already discussed in previous sections.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRB |= (1 &amp;lt;&amp;lt; 0); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= (1 &amp;lt;&amp;lt; WGM12); // Configure timer 1 for CTC mode&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;// TODO: Enable CTC interrupt&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;// TODO: Enable global interrupts&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;OCR1A&amp;nbsp; &amp;nbsp;= 15624; // Set CTC compare value to 1Hz at 1MHz AVR clock, with a prescaler of 64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= ((1 &amp;lt;&amp;lt; CS10) | (1 &amp;lt;&amp;lt; CS11)); // Start timer at Fcpu/64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&amp;nbsp;&lt;br /&gt;&lt;br /&gt;// TODO: Add compare ISR here&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Note how it's a modified version of the non-interrupt driven CTC example covered in the last section. All we need to do is tell the timer to run the compare ISR we define when it counts up to our compare value, rather then us polling the compare match flag in our main routine loop.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;We'll start with creating the ISR first, as that's quite simple. In AVR-GCC - specifically, the avr-libc Standard C Library that comes with it - the header file for dealing with interrupts is called (unsurprisingly) "interrupt.h" and is located in the "avr" subdirectory. We need to include this at the top of our program underneath our include to the IO header file. The top of our code should look like this:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;#include &amp;lt;avr/interrupt.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; ...&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;This gives us access to the API for dealing with interrupts. We want to create an ISR for the Timer 1 Compare Match event. The syntax for defining an ISR body in AVRGCC is:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;ISR(VectorName_vect)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;// Code to execute on ISR fire here&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Where "VectorName" is the name of the ISR vector which our defined ISR handles. The place to go to find this name is the "Interrupt" section of the datasheet, which lists the symbolic names for all the ISR vectors that the chosen AVR supports. When writing the vector name into GCC, replace all spaces with underscores, and append "_vect" to the end of the vector's name.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Like in part four we are still dealing with Channel A Compare of Timer 1, so we want the vector named "TIMER1 COMPA". In GCC this is called "TIMER1_COMPA_vect", after performing the transformations outlined in the last paragraph. Once the ISR is defined, we can go ahead and write out it's body, adding the LED toggling code.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;#include &amp;lt;avr/interrupt.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRB |= (1 &amp;lt;&amp;lt; 0); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= (1 &amp;lt;&amp;lt; WGM12); // Configure timer 1 for CTC mode&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;// TODO: Enable CTC interrupt&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;// TODO: Enable global interrupts&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;OCR1A&amp;nbsp; &amp;nbsp;= 15624; // Set CTC compare value to 1Hz at 1MHz AVR clock, with a prescaler of 64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= ((1 &amp;lt;&amp;lt; CS10) | (1 &amp;lt;&amp;lt; CS11)); // Start timer at Fcpu/64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&amp;nbsp;&lt;br /&gt;&lt;br /&gt;ISR(TIMER1_COMPA_vect)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;PORTB ^= (1 &amp;lt;&amp;lt; 0); // Toggle the LED&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Notice how we don't clear the CTC event flag like in part four - this is automatically cleared by the AVR hardware once the ISR fires. Neat, isn't it!&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Running the code so far won't yield any results. This is because although we have our ISR all ready to handle the CTC event, we haven't enabled it! We need to do two things; enable the "TIMER1 COMPA" interrupt specifically, and turn on interrupt handling on our AVR.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;The way to turn on our specific interrupt is to look into the second interrupt-related register for our timer, TIMSK. This is the Timer Interrupt Mask register, which turns on and off ISRs to handle specific timer events. Note that on the MEGA16 this single register contains the enable bits for all the timer interrupts for all the available timers. We're only interested in the Timer 1 Compare A Match interrupt enable bit, which we can see listed as being called OCIE1A (Output Compare Interrupt Enable, channel A).&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;By setting that bit we instruct the timer to execute our ISR upon compare match with our specified compare value. Let's put that line into our program's code and see how it all looks.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;#include &amp;lt;avr/interrupt.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRB |= (1 &amp;lt;&amp;lt; 0); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= (1 &amp;lt;&amp;lt; WGM12); // Configure timer 1 for CTC mode&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TIMSK |= (1 &amp;lt;&amp;lt; OCIE1A); // Enable CTC interrupt&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;// TODO: Enable global interrupts&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;OCR1A&amp;nbsp; &amp;nbsp;= 15624; // Set CTC compare value to 1Hz at 1MHz AVR clock, with a prescaler of 64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= ((1 &amp;lt;&amp;lt; CS10) | (1 &amp;lt;&amp;lt; CS11)); // Start timer at Fcpu/64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&amp;nbsp;&lt;br /&gt;&lt;br /&gt;ISR(TIMER1_COMPA_vect)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;PORTB ^= (1 &amp;lt;&amp;lt; 0); // Toggle the LED&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Only one more thing to do - enable global interrupts. The AVR microcontrollers have a single control bit which turns on and off interrupt handling functionality. This is used in pieces of code where interrupt handling is not desired, or to disable interrupts while an ISR is already being executed. The latter is done automatically for us, so all we need to do is turn on the bit at the start of our code, and our compare interrupt will start to work.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;The command to do this is called "sei" in the avr-libc library that ships with WinAVR, and is named to correspond with the assembly instruction which does the same for AVRs (the SEI instruction). That's irrelevant however, as we just need to call the command in our code.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;#include &amp;lt;avr/interrupt.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRB |= (1 &amp;lt;&amp;lt; 0); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= (1 &amp;lt;&amp;lt; WGM12); // Configure timer 1 for CTC mode&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TIMSK |= (1 &amp;lt;&amp;lt; OCIE1A); // Enable CTC interrupt&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;sei(); //&amp;nbsp; Enable global interrupts&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;OCR1A&amp;nbsp; &amp;nbsp;= 15624; // Set CTC compare value to 1Hz at 1MHz AVR clock, with a prescaler of 64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= ((1 &amp;lt;&amp;lt; CS10) | (1 &amp;lt;&amp;lt; CS11)); // Start timer at Fcpu/64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&amp;nbsp;&lt;br /&gt;&lt;br /&gt;ISR(TIMER1_COMPA_vect)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;PORTB ^= (1 &amp;lt;&amp;lt; 0); // Toggle the LED&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;And our example is finished! Running this will give a nice 1Hz LED flashing, using the timer's event interrupts. The nice thing is that the timer operation is now completely handled for us in hardware - once set up, we just need to react to the events we've configured. Notice that our main loop is now empty; if this is the case you may put sleep commands inside the main loop to save power between compares.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 18px; line-height: normal;"&gt;&lt;span style="font-weight: bold;"&gt;Part Six - Pure Hardware CTC&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 12px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;You probably think by now that we've improved our example as much as possible - after all, what more improvements are there to make? Well, it's time to finish of the CTC topic by looking at the hardware outputs.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;All AVRs' pins have alternative hardware functions. These functions (currently non re-routable) when activated interface the IO pins directly to the AVR's internal hardware - for instance the Tx/Rx alternative functions which are the direct interface to the AVR's USART subsystem. Alternative pin functions can be very useful; as they can be internally connected straight to a hardware subsystem, the maximum possible performance can be achieved.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;In this section, we'll be looking at the Compare Output settings of the AVR timer.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Looking at the timer 1 control registers, we can see a few pairs of bits we've previously ignored, called (for timer 1) COM1A1/COM1A0 and COM1B1/COM1B0. Bonus points to anyone who's linked the "A" and "B" parts of the bit names to the timer compare channels - you're spot on.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;These bits allow us to control the hardware behaviour when a compare occurs. Instead of firing an interrupt, the hardware can be configured to set, clear or toggle the OCxy (where "x" is the timer number, "y" is the channel letter for timers with more than one channel) hardware pins when a compare occurs. We can use the toggle function with our LED flasher, so that the hardware toggles the LED's state for us automatically, making it a true set-and-forget operation.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Before we do anything else, let's work out which pins of our MEGA16 are linked to the Compare Output hardware - we want the pins with alternative functions starting with "OC". On our PDIP package version, that maps to:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="quotetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Quote:&lt;/strong&gt;&lt;/div&gt;&lt;div class="quotecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;PB3 = OC0&amp;nbsp;&lt;br /&gt;PD4 = OC1B&amp;nbsp;&lt;br /&gt;PD5 = OC1A&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;So timer 0 has one Compare Output channel, while timer 1 has two (channels A and B) as we've already discovered. As always we'll just deal with Channel A in our example.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Now we have a problem. All the previous chapters have assumed the LED is attached to PORTB, bit 0 - but we'll have to move it for this chapter. As stated above the alternative functions cannot be moved to another pin, so we must move moses...I mean, our&amp;nbsp;&lt;/span&gt;&lt;span style="font-style: italic; font-size: 12px;"&gt;LED&lt;/span&gt;&lt;span style="font-size: 12px;"&gt;, to the pin with the required alternative function.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Timer 1 Channel A's Compare Output is located on PD5, so move the LED there for the rest of this example. Now, let's psudocode:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;Set up LED hardware&amp;nbsp;&lt;br /&gt;Set up timer in CTC mode&amp;nbsp;&lt;br /&gt;Enable timer 1 Compare Output channel A in toggle mode&amp;nbsp;&lt;br /&gt;Set timer compare value to one second&amp;nbsp;&lt;br /&gt;&lt;br /&gt;WHILE forever&amp;nbsp;&lt;br /&gt;END WHILE&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Amazing how simple it is, isn't it! Well, we can already fill in almost all of this:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;#include &amp;lt;avr/interrupt.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRD |= (1 &amp;lt;&amp;lt; 5); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= (1 &amp;lt;&amp;lt; WGM12); // Configure timer 1 for CTC mode&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;// TODO: Enable timer 1 Compare Output channel A in toggle mode&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;OCR1A&amp;nbsp; &amp;nbsp;= 15624; // Set CTC compare value to 1Hz at 1MHz AVR clock, with a prescaler of 64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= ((1 &amp;lt;&amp;lt; CS10) | (1 &amp;lt;&amp;lt; CS11)); // Start timer at Fcpu/64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;All we need is to configure the timer so that it'll toggle our channel A output each time the timer value is equal to our compare value. The datasheet has several descriptions for the functionality of the COM1Ax and COM1Bx bits, so we need to find the table corresponding to the mode we're using the timer in.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;CTC mode isn't listed - instead the appropriate table is listed as "Compare Output mode, Non PWM". PWM stands for "Pulse Width Modulation", and will be covered later on in this tutorial. For now, it is sufficient to know that the CTC mode is not a form of PWM and thus the non-PWM bit description table is the one we're looking for.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;To make the channel A Compare Output pin toggle on each compare, the datasheet says we need to set bit COM1A0 in TCCR1A. That's our missing line - let's add it in!&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;#include &amp;lt;avr/interrupt.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRD |= (1 &amp;lt;&amp;lt; 5); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= (1 &amp;lt;&amp;lt; WGM12); // Configure timer 1 for CTC mode&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1A |= (1 &amp;lt;&amp;lt; COM1A0); // Enable timer 1 Compare Output channel A in toggle mode&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;OCR1A&amp;nbsp; &amp;nbsp;= 15624; // Set CTC compare value to 1Hz at 1MHz AVR clock, with a prescaler of 64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= ((1 &amp;lt;&amp;lt; CS10) | (1 &amp;lt;&amp;lt; CS11)); // Start timer at Fcpu/64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Simple, isn't it! We've now created the simplest (code-wise) LED flasher possible using pure hardware functionality. Running this will cause the LED to flash at 1Hz, without any code other than the timer initialization!&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 18px; line-height: normal;"&gt;&lt;span style="font-weight: bold;"&gt;Part Seven - The Overflow Event&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 12px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Well, now that we've had fun creating a LED flasher via a variety of software and hardware CTC methods, we'll move on to one last LED flashing program. This time we'll be using a different Timer event to manage the toggling of the LED - the overflow.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;As previously stated, timers store their values into internal 8 or 16 bit registers, depending on the size of the timer being used. These registers can only store a finite number of values, resulting in the need to manage the timer (via prescaling, software extention, etc) so that the interval to be measured fits within the range of the chosen timer.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;However, what has not been discussed yet is what happens when the range of the timer is exceeded. Does the AVR explode? Does the application crash? Does the timer automatically stop?&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;The answer is simple, if rather boring. In the event of the timer register exceeding its capacity, it will automatically roll around back to zero and keep counting. When this occurs, we say that the timer has "overflowed".&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;When an overflow occurs, a bit is set in one of the timer status registers to indicate to the main application that the event has occured. Just like with the CTC hardware, there is also a corresponding bit which can enable an interrupt to be fired each time the timer resets back to zero.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;So why would we need the overflow interrupt? Well, I leave that as an excersize to the reader. However, we can demonstrate it here in this tutorial - via another LED flasher, of course.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Calculating the frequency of the flashing is a little different to our previous examples, as now we have to calculate in reverse (to find the frequency from the timer count and timer resolution rather than the timer count from a known frequency and timer resolution). We'll still be working with our 16-bit timer 1 for this example, to be consistent with previous chapters.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Let's go back to our one of the timer equations we used back in chapter 2:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;Target Timer Count = (1 / Target Frequency) / (Prescale / Input Frequency) - 1&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;We want to determine the Target Frequency from the other two variables, so let's rearrange:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;(Target Timer Count + 1) * (Prescale / Input Frequency) = (1 / Target Frequency)&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;And swap the left and right hand sides to get it into a conventional form:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;(1 / Target Frequency) = (Target Timer Count + 1) * (Prescale / Input Frequency)&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Since we know that for the overflow equation, the "Target Timer Count" becomes the maximum value that can be held by the timer's count register, plus one (as the overflow occurs after the count rolls over from the maximum back to zero). The formula for the maximum value that can be held in a number of bits is:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;Max Value = (2 ^ Bits) - 1&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;But we want one more than that to get the number of timer counts until an overflow occurs:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;Counts Until Overflow = (2 ^ Bits)&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Change "Max Value" to the more appropriate "Target Timer Count" in the first timer equation:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;(1 / Target Frequency) = Counts Until Overflow * (Prescale / Input Frequency)&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;And substitute in the formula for the counts until overflow to get the timer period equation. Since frequency is just the inverse of period, we can also work out the frequencies of each duration as well:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;Target Period = (1 / Target Frequency)&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;Target Period = ((2 ^ Bits) * (Prescale / Input Frequency)&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Which is a bit complex, but such is life. Now's the fun part - we can now work out the overflow frequencies and periods for our 16-bit Timer 1 running at different prescales of our AVR's 1MHz system clock:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;Target Period = ((2 ^ 16) * (Prescale / 1000000)&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;Prescaler Value | Overflow Frequency | Overflow period&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 |&amp;nbsp; 15.259 Hz&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&amp;nbsp; &amp;nbsp;65.5&amp;nbsp; ms&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 8 |&amp;nbsp; 1.907 Hz&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&amp;nbsp; &amp;nbsp;0.524 s&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;64 |&amp;nbsp; .2384 Hz&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&amp;nbsp; &amp;nbsp;4.195 s&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 256 |&amp;nbsp; .0596 Hz&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&amp;nbsp; &amp;nbsp;16.78 s&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1024 |&amp;nbsp; .0149 Hz&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&amp;nbsp; &amp;nbsp;67.11 s&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Note how our frequency decreases (and period increases) as our prescaler increases, as it should. Because we have a reasonably slow main system clock, and a large timer count register, we end up with frequencies that are easy to see with the naked eye (with the exception of the case where no prescaler is used). Unlike the CTC method however, we are limited to the frequencies above and cannot change them short of using a smaller timer, different prescaler or different system clock speed - we lose the precision control that the CTC modes give us.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;For this example, we'll use a prescaler of 8, to give a 1.8Hz flashing frequency, and a period of about half a second.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Almost time to get into the code implementation. But first, pseudocode! I'm going to extrapolate on the preceding chapters and jump straight into the ISR-powered example, rather than begin with a polled example. It works in the same manner as previous polled experiments, except for the testing of the overflow bit rather than the CTC bit.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;Set up LED hardware&amp;nbsp;&lt;br /&gt;Set up timer overflow ISR&amp;nbsp;&lt;br /&gt;Start timer with a prescale of 8&amp;nbsp;&lt;br /&gt;&lt;br /&gt;WHILE forever&amp;nbsp;&lt;br /&gt;END WHILE&amp;nbsp;&lt;br /&gt;&lt;br /&gt;ISR Timer Overflow&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;Toggle LED&amp;nbsp;&lt;br /&gt;END ISR&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Let's get started. As always, we'll begin with the skeleton program:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;#include &amp;lt;avr/interrupt.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRB |= (1 &amp;lt;&amp;lt; 0); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;// TODO: Enable overflow interrupt&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;// TODO: Enable global interrupts&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;// TODO: Start timer at Fcpu/8&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&amp;nbsp;&lt;br /&gt;&lt;br /&gt;// TODO: Add overflow ISR here&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Let's begin with filling in the bits we can already do. The ISR code is easy - we can use the same ISR as part five, except we'll be changing the compare vector to the overflow vector of timer 1.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Looking in the MEGA16 datasheet, the overflow interrupt for timer 1 is obvious - it's listed as "TIMER1 OVF" in the Interrupts chapter. Just like in part five, we need to replace the spaces in the vector name with underscores, and add the "_vect" suffix to the end.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;We can also fill in the "Enable global interrupts" line, as that is identical to previous chapters and is just the "sei()" command from the &amp;lt;avr/interrupt.h&amp;gt; header file.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;#include &amp;lt;avr/interrupt.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRB |= (1 &amp;lt;&amp;lt; 0); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;// TODO: Enable overflow interrupt&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;sei(); // Enable global interrupts&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;// TODO: Start timer at Fcpu/8&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&amp;nbsp;&lt;br /&gt;&lt;br /&gt;ISR(TIMER1_OVF_vect)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;PORTB ^= (1 &amp;lt;&amp;lt; 0); // Toggle the LED&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Next, we need to figure out how to enable the overflow vector, so that our ISR is run each timer the overflow occurs. The datasheet's 16-bit Timer/Counter section comes to our rescue again, indicating that it is the bit named "TOIE1" located in the Timer 1 Interrupt Mask register, TIMSK:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;#include &amp;lt;avr/interrupt.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRB |= (1 &amp;lt;&amp;lt; 0); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TIMSK |= (1 &amp;lt;&amp;lt; TOIE1); // Enable overflow interrupt&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;sei(); // Enable global interrupts&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;// TODO: Start timer at Fcpu/8&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&amp;nbsp;&lt;br /&gt;&lt;br /&gt;ISR(TIMER1_OVF_vect)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;PORTB ^= (1 &amp;lt;&amp;lt; 0); // Toggle the LED&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;The last thing we need to do, is start the timer with a prescaler of 8. This should be easy for you to do - if not, refer back to chapter 2.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;The MEGA16 Datasheet, Timer 1 section tells us that for a timer running with a prescaler of 8, we need to start it with the bit CS11 set in the control register TCCR1B. Adding that to our code finishes our simple program:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;#include &amp;lt;avr/interrupt.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRB |= (1 &amp;lt;&amp;lt; 0); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TIMSK |= (1 &amp;lt;&amp;lt; TOIE1); // Enable overflow interrupt&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;sei(); // Enable global interrupts&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= (1 &amp;lt;&amp;lt; CS11); // Start timer at Fcpu/8&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&amp;nbsp;&lt;br /&gt;&lt;br /&gt;ISR(TIMER1_OVF_vect)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;PORTB ^= (1 &amp;lt;&amp;lt; 0); // Toggle the LED&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;All done! This simple program will cause the LED to toggle each time the overflow occurs and serves as a practical use of the overflow interrupt.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 18px; line-height: normal;"&gt;&lt;span style="font-weight: bold;"&gt;Part Eight - Overflow as CTC&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 12px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;One neat application of the overflow event is for creating a CTC timer on AVRs which don't support true hardware CTC. It's not as neat as the pure hardware CTC discussed in part six, but faster than the pure software CTC discussed in part two.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;CTC works by having a fixed BOTTOM value - that's the timer's minimum value - of zero, and a variable TOP value, the value at which resets the timer and fires the event. However, with the overflow event we seemingly have a fixed BOTTOM of again zero, and a fixed TOP of the maximum timer's value. Not so - with a small trick we can adjust the BOTTOM value to give us the equivelent of a CTC implementation standing on it's head.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;This tecnique is called timer reloading. When configured, we preload the timer's count register (which is both readable and writeable) with a value above zero. This shortens the time interval before the next overflow event, although only for a single overflow. We can get around that by again reloading the timer's value to our non-zero value inside the overflow event for a hybrid software/hardware CTC.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Psuedocode time!&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;Set up LED hardware&amp;nbsp;&lt;br /&gt;Set up timer overflow ISR&amp;nbsp;&lt;br /&gt;Load timer count register with a precalculated value&amp;nbsp;&lt;br /&gt;Start timer with a prescale of 8&amp;nbsp;&lt;br /&gt;&lt;br /&gt;WHILE forever&amp;nbsp;&lt;br /&gt;END WHILE&amp;nbsp;&lt;br /&gt;&lt;br /&gt;ISR Timer Overflow&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;Toggle LED&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;Reload timer count register with same precalculated value&amp;nbsp;&lt;br /&gt;END ISR&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Let's examine the maths again. From part two, we know that the formula for determining the number of timer clock cycles needed for a given delay is:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;Target Timer Count = (Input Frequency / Prescale) / Target Frequency&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Which works for a fixed BOTTOM of zero, and a variable TOP. We've got the "upside-down" implementation of a fixed top of ((2 ^ Bits) - 1) and a variable BOTTOM. Our BOTTOM value becomes the TOP minus the number of clock cycles needed for the equivelent CTC value, so the formula becomes:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;Reload Timer Value = ((2 ^ Bits) - 1) - ((Input Frequency / Prescale) / Target Frequency)&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Let's go with the previous example in part two: a 1Hz flasher, using a 1MHz clock and a prescale of 64. We found the timer count to be 15625 for those conditions. Plugging it into the above Reload Timer Value formula gives:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;Reload Timer Value = ((2 ^ Bits) - 1) - 15624&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= ((2 ^ 16) - 1) - 15624&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= 65535 - 15624&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= 49911&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;So we need to preload and reload our overflow timer on each overflow with the value 49911 to get our desired 1Hz delay. Since we've already gone over the code for an interrupt-driven overflow example in part seven, we'll build upon that.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;#include &amp;lt;avr/interrupt.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRB |= (1 &amp;lt;&amp;lt; 0); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TIMSK |= (1 &amp;lt;&amp;lt; TOIE1); // Enable overflow interrupt&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;sei(); // Enable global interrupts&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;// TODO: Preload timer with precalculated value&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= ((1 &amp;lt;&amp;lt; CS10) | (1 &amp;lt;&amp;lt; CS11)); // Set up timer at Fcpu/64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&amp;nbsp;&lt;br /&gt;&lt;br /&gt;ISR(TIMER1_OVF_vect)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;PORTB ^= (1 &amp;lt;&amp;lt; 0); // Toggle the LED&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;// TODO: Reload timer with precalculated value&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;Both the reloading and preloading of the timer takes identical code - we just need to set the timer's count register to the precalculated value. The timer's current count value is avaliable in the TCNTx register, where "x" is the timer's number. We're using the 16-bit timer 1, so the count value is located in TCNT1.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;We'll now finish of the example, replacing the unfinished segments:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px; font-size: 12px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; font-size: 12px; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;#include &amp;lt;avr/interrupt.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRB |= (1 &amp;lt;&amp;lt; 0); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TIMSK |= (1 &amp;lt;&amp;lt; TOIE1); // Enable overflow interrupt&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;sei(); // Enable global interrupts&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCNT1 = 49911; // Preload timer with precalculated value&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= ((1 &amp;lt;&amp;lt; CS10) | (1 &amp;lt;&amp;lt; CS11)); // Set up timer at Fcpu/64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&amp;nbsp;&lt;br /&gt;&lt;br /&gt;ISR(TIMER1_OVF_vect)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;PORTB ^= (1 &amp;lt;&amp;lt; 0); // Toggle the LED&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCNT1&amp;nbsp; = 49911; // Reload timer with precalculated value&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 12px;"&gt;And done! This is less preferable to the pure hardware CTC mode, as it requires a tiny bit more work on both the programmer and the AVR to function. However, it will work just fine for AVRs lacking the complete CTC timer functionality.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;table class="forumline" style="background-color: #c8c7c7;" border="0" cellspacing="1" width="100%"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="row1" style="font-size: 12px; background-color: #fdfdfd; text-align: left; padding: 5px;"&gt;&lt;table cellspacing="0" cellpadding="5" width="100%"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="postbody" style="font-size: 12px; background-color: #fdfdfd; text-align: left;" valign="top"&gt;&lt;span style="font-size: 18px; line-height: normal;"&gt;&lt;span style="font-weight: bold;"&gt;Part Nine - Pulse Width Modulation (PWM)&amp;nbsp;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The previous sections of the timers tutorial have been dealing with a simple task - flashing a LED. We've managed to accomplish that task using a variety of methods which all center around the "Clear On Timer Compare" (or CTC) method of using the timer, in both software and hardware. But what if we want to dim the LED instead? Now we are getting into a new timer concept, that of Pulse Width Modulation, abbreviated to PWM for short.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Pulse Width Modulation allows us to interface our digital components with the analogue world. We can use PWM to adjust a motor's speed, a LED's brightness or a speaker's tone. PWM is a very important concept, which is used all throughout the world of digital electronics. It is a way of&amp;nbsp;&lt;span style="font-style: italic;"&gt;approximating&lt;/span&gt;&amp;nbsp;an analogue source, which with a little filtering can be used as a real analogue source (albeit with a few limitations).&amp;nbsp;&lt;br /&gt;&lt;br /&gt;It's important to note that PWM does not change our AVR's limitations; the signal sent out by the timer is still a true digital signal. However, by altering the on and off time of the signal at a given frequency, we can adjust the average on time to give an approximate analogue signal. This signal is good enough for immediate use in many applications - including motor speed control and LED dimming - without any extra filtering, or with the addition of a capacitor the output can be smoothed to a real analogue wave.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Let's start with a picture representing the different types of signals (modified from Wikipedia):&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;img style="max-width: 400px; border: initial none initial;" src="http://www.fourwalledcubicle.com/files/freaks/timerstutorial/Waves.png" border="0" alt="" /&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;The top waveform is a traditional analogue signal, varying smoothly from GND to VCC volts. The bottom waveform is a digital representation of the top, using PWM.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;PWM allows us to set an overall frequency, and then vary the on and off time (called the&amp;nbsp;&lt;span style="font-style: italic;"&gt;duty cycle&lt;/span&gt;) of the output within each timer cycle. A longer duty cycle gives a longer on time, resulting in an analogue representation closer to the VCC voltage. A duty cycle of 100% (on for the entire cycle) gives a VCC output, while a duty cycle of 0% (off for the entire cycle) gives a GND output.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;When we use the CTC timer mode, what we are actually doing is essentially PWM, but with a fixed duty cycle of 50%, and a variable frequency. For this example, we're using PWM and will conversely be using a fixed frequency and varying the duty cycle to dim our LED.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;There are several different PWM modes that the AVR timers can be initialized in, each with slightly different characteristics. These are as follows:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;1) Fast PWM (8, 9 or 10 bit)&amp;nbsp;&lt;br /&gt;2) Phase Correct PWM&amp;nbsp;&lt;br /&gt;3) Phase and Frequency Correct PWM&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Before we can explore the different modes, we need to understand a little of the timer terminology. Frequency, as we know, is the number of cycles per second that the timer runs at - a higher frequency gives us a faster timer. In the PWM world, having a faster PWM frequency gives us finer control over the output, as we can respond faster to new PWM duty cycles. This is especially important when using PWM to produce audio from digital samples; a faster PWM frequency is required to give the full output frequency range by varying the duty cycle.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Next, we have the BOTTOM value. This is the lowest value that the timer will reach in the current mode. In all timer modes on all AVRs, this will be zero. Accompanying BOTTOM is TOP, which is the maximum value that the timer will reach before either (depending on the mode) resetting back to 0x00 or begin counting in reverse back to BOTTOM. For the normal mode, TOP is equal to the maximum value the timer can reach. For CTC mode, TOP is user settable, which gives us our control over the timer period. We are now using PWM, thus TOP is now set to give the PWM frequency.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Finally, we have our PWM COMPARE value. This sets the duty cycle - when this value is reached the waveform is inverted from its current state. Varying the COMPARE value will give us our varying duty cycle.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Now, let's get down to business and go into the three PWM modes.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Fast PWM&lt;/span&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Fast PWM is useful for outputting PWM values quickly, at a loss of phase correctness - changes to the duty cycle will be reflected immediately, with the new signal being phase incorrect. When selected, the timer will count up from BOTTOM to TOP, with TOP being fixed at the bit-width of the fast PWM -- we are given a choice of 8, 9 or 10 bits depending on the timer bit width (8 bit timers will obviously not offer Fast PWM in more than 8-bits). The timer, when started, will count up continuously until TOP is reached, when it wraps back to BOTTOM and starts again. Inside this period when the counter reaches the COMPARE value, the output pin is set when the correct value is reached (and cleared when the timer wraps back from TOP to BOTTOM), so that varying COMPARE we get a PWM of a fixed frequency but a variable duty cycle.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;img style="max-width: 400px; border: initial none initial;" src="http://www.fourwalledcubicle.com/files/freaks/timerstutorial/Fast%20PWM.gif" border="0" alt="" /&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;This gives us the ability to change the duty cycle rapidly, in applications where the phase change does not matter. Applications such as motor control&amp;nbsp;&lt;span style="font-style: italic;"&gt;are&lt;/span&gt;&amp;nbsp;particular about the phase, so we need to use the Phase Correct PWM mode.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Phase Correct PWM&lt;/span&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Phase correct PWM gives phase-correct output as the duty cycle changes. The concept of phase is foregn to some, so we'll take a look graphically at how phase-incorrect (Fast PWM) and phase-correct PWM waveforms differ:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;img style="max-width: 400px; border: initial none initial;" src="http://www.fourwalledcubicle.com/files/freaks/timerstutorial/PWM%20Modes.gif" border="0" alt="" /&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Notice the difference? In the case of Fast PWM, the high points are always aligned to the start of each period, with a smaller duty cycle resulting in a shorter ON time. Phase Correct PWM by contrast aligns the high points to the center of each period, so that a smaller duty cycle results in a shorter ON time -- but the ON times of all signals are aligned. As inducated in the Fast PWM explanation, this mode is useful in applications where the phase of the signals should not change, even if the duty cycles do. Phase Correct is slower than Fast PWM (as the name of the latter implies) due to the way Phase Correct PWM works.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;When selected, the timer will count up from BOTTOM to TOP, and then start counting&amp;nbsp;&lt;span style="font-weight: bold;"&gt;downwards&lt;/span&gt;&amp;nbsp;back to BOTTOM before repeating. When upcounting, reaching COMPARE will turn on the output pin, while reaching the same value when downcounting will turn the output off. This results in the timer period being&amp;nbsp;&lt;span style="font-weight: bold;"&gt;twice&lt;/span&gt;&amp;nbsp;as long as Fast PWM mode (since the timer also has to count back to BOTTOM rather than just wrapping) but produces a phase-correct signal.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;img style="max-width: 400px; border: initial none initial;" src="http://www.fourwalledcubicle.com/files/freaks/timerstutorial/Phase%20Correct%20PWM.gif" border="0" alt="" /&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;In Phase Correct PWM, the TOP value is variable and so the mode supports a variable PWM frequency. For generating simple audio tones from a speaker it is common to use the variable frequence of this mode to change the note pitch, and use the duty cycle to change the volume; a higher duty cycle results in a longer ON timer for the speaker, and so produces a louder sound.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #008000;"&gt;&lt;strong&gt;&lt;span style="color: #000000; font-weight: normal;"&gt;&lt;span style="color: #00008b;"&gt;&lt;span style="font-size: 24px; line-height: normal;"&gt;Newbie's Guide to AVR Timers&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;(C) Dean Camera, 2007&lt;/span&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;At last! Yet another tutorial, this one covering a topic which is the main source of frustration to those new with AVRs; timers. What are they, and what can they do for us?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 18px; line-height: normal;"&gt;&lt;span style="font-weight: bold;"&gt;Introduction - The AVR Timer&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;The timer systems on the AVR series of Microcontrollers are complex beasts. They have a myriad of uses ranging from simple delay intervals right up to complex PWM (more on this later) generation. However, despite the surface complexity, the function of the timer subsystem can be condensed into one obvious function: to time.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;We use timers every day - the most simple one can be found on your wrist. A simple clock will time the seconds, minutes and hours elapsed in a given day - or in the case of a twelve hour clock, since the last half-day. AVR timers do a similar job, measuring a given time interval.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;The AVR timers are very useful as they can run asynchronous to the main AVR core. This is a fancy way of saying that the timers are separate circuits on the AVR chip which can run independent of the main program, interacting via the control and count registers, and the timer interrupts. Timers can be configured to produce outputs directly to pre-determined pins, reducing the processing load on the AVR core.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;One thing that trips those new to the AVR timer is the clock source. Like all digital systems, the timer requires a clock in order to function. As each clock pulse increments the timer's counter by one, the timer measures intervals in periods of one on the input frequency:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;Timer Resolution = (1 / Input Frequency)&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;This means the smallest amount of time the timer can measure is one period of the incoming clock signal. For instance, if we supply a 100Hz signal to a timer, our period becomes:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;Timer Resolution = (1 / Input Frequency)&amp;nbsp;&lt;br /&gt;Timer Resolution = (1 / 100)&amp;nbsp;&lt;br /&gt;Timer Resolution = .01 seconds&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;For the above example, our period becomes .01 seconds - so our timer will measure in multiples of this. If we measure a delay to be 45 timer periods, then our total delay will be 45 times .01 seconds, or .45 seconds.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;For this tutorial, I will assume the target to be a MEGA16, running at at 1MHz clock. This is a nicely featured AVR containing certain timer functionality we'll need later on. As modern AVRs come running off their internal ~1MHz RC oscillator by default, you can use this without a problem (although do keep in mind the resultant timing measurements will be slightly incorrect due to the RC frequency tolerance).&amp;nbsp;&lt;br /&gt;&lt;br /&gt;In the sections dealing with toggling a LED, it is assumed to be connected to PORTB, bit 0 of your chosen AVR (pin 1 of DIP AVRMEGA16).&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To start off, we will deal with basic timer functionality and move on from there.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 18px; line-height: normal;"&gt;&lt;span style="font-weight: bold;"&gt;Part One - Timers running at Fcpu&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;We'll start with a simple example. We'll create a simple program to flash a LED at about 20Hz. Simple, right?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;First, let's look at the pseudo-code required to drive this example:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;Set up LED hardware&amp;nbsp;&lt;br /&gt;Set up timer&amp;nbsp;&lt;br /&gt;&lt;br /&gt;WHILE forever&amp;nbsp;&lt;br /&gt;&amp;nbsp; IF timer value IS EQUAL TO OR MORE THAN 1/20 sec THEN&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; Reset counter&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; Toggle LED&amp;nbsp;&lt;br /&gt;&amp;nbsp; END IF&amp;nbsp;&lt;br /&gt;END WHILE&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Very simple. We're just starting out, so we'll use the polled method of determining the elapsed time - we'll put in an IF statement in our code to check the current timer value, and act on it once it reaches (or exceeds) a certain value. Before we start on the timer stuff, let's create the skeleton of our project:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;// TODO: Set up LED hardware&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;// TODO: Set up timer&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;// TODO: Check timer value, reset and toggle LED when count matches 1/20 of a second&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Extremely simple. I'm going to assume you are familiar with the basics of setting up AVR ports as well as bit manipulation (if you're uncertain about the latter, refer to&amp;nbsp;&lt;a class="postlink" style="color: #566d91; text-decoration: none;" href="http://www.avrfreaks.net/index.php?name=PNphpBB2&amp;amp;file=viewtopic&amp;amp;t=37871" target="_blank"&gt;this excellent tutorial&lt;/a&gt;). With that in mind, I'll add in the LED-related code and add in the IF statement:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRB |= (1 &amp;lt;&amp;lt; 0); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;// TODO: Set up timer&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;// TODO: Check timer value in if statement, true when count matches 1/20 of a second&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;if ()&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;PORTB ^= (1 &amp;lt;&amp;lt; 0); // Toggle the LED&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;// TODO: Reset timer value&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now we need to start dealing with the timer. We want to do nothing more than start it at 1MHz, then check its value later on to see how much time has elapsed. We need to deviate for a second and learn a little about how the timer works in its most basic mode.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The AVR timer circuits come in two different widths, 8 and 16 bit. While the capabilities of the two timer types differ, at the most basic level (simple counting), the only difference is the maximum amount of time the timer can count to before overflowing and resetting back to zero. Those familiar with C will know that an unsigned eight bit value can store a value from 0 to (2^8 - 1), or 255, before running out of bits to use and becoming zero again. Similarly, an unsigned 16 bit value may store a value from 0 to (2^16 - 1), or 65535 before doing the same.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;As the name suggests, an 8 bit timer stores its value as an eight bit value in its count register, while the 16 bit timer stores its current count value in a pair of eight bit registers. Each advancement of the counter register for any AVR timer indicates that one timer period has elapsed.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Our project needs a fairly long delay, of 1/20 of a second. That's quite short to us humans, but to a microcontroller capable of millions of instructions per second it's a long time indeed!&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Our timer will be running at the same clock speed as the AVR core to start with, so we know that the frequency is 1MHz. One Megahertz is 1/1000000 of a second, so for each clock of the timer only one millionth of a second has elapsed! Our target is 1/20 of a second, so let's calculate the number of timer periods needed to reach this delay:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;Target Timer Count = (1 / Target Frequency) / (1 / Timer Clock Frequency) - 1&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= (1 / 20) / (1 / 1000000) - 1&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= .05 / 0.000001 - 1&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= 50000 - 1&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= 49999&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;So running at 1MHz, our timer needs to count to 49999 before 1/20th of a second has elapsed - the normal calculated value is decremented by one, as the 0th count of the timer still takes one tick. That's a very large value - too large for an 8 bit value! We'll need to use the 16 bit timer 1 instead.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Firstly, we need to start the timer at the top of our main routine, so that it will start counting. To do this, we need to supply the timer with a clock; as soon as it is clocked it will begin counting in parallel with the AVR's CPU core (this is called synchronous operation). To supply a clock of Fcpu to the timer 1 circuits we need to set the CS10 bit (which selects a Fcpu prescale of 1 - more on that later) in the TCCR1B, the Timer 1 Control Register B.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRB |= (1 &amp;lt;&amp;lt; 0); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= (1 &amp;lt;&amp;lt; CS10); // Set up timer&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;// TODO: Check timer value in if statement, true when count matches 1/20 of a second&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;if ()&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;PORTB ^= (1 &amp;lt;&amp;lt; 0); // Toggle the LED&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;// TODO: Reset timer value&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Now, with only one line of code, we've started the hardware timer 1 counting at 1MHz - the same speed as our AVR. It will now happily continue counting independently of our AVR. However, at the moment it isn't very useful, we still need to do something with it!&amp;nbsp;&lt;br /&gt;&lt;br /&gt;We want to check the timer's counter value to see if it reaches 1/20 of a second, or a value of 49999 at 1MHz as we previously calculated. The current timer value for timer 1 is available in the special 16-bit register, TCNT1. In actual fact, the value is in two 8-bit pair registers TCNT1H (for the high byte) and TCNT1L (for the low byte), however the C library implementation we're using helpfully hides this fact from us.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Let's now add in our check to our code - it's as simple as testing the value of TCNT1 and comparing against our wanted value, 49999. To prevent against missed compares (where the timer updates twice between checks so our code never sees the correct value), we use the equal to or more than operator, "&amp;gt;=".&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRB |= (1 &amp;lt;&amp;lt; 0); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= (1 &amp;lt;&amp;lt; CS10); // Set up timer&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;// Check timer value in if statement, true when count matches 1/20 of a second&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;if (TCNT1 &amp;gt;= 49999)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;PORTB ^= (1 &amp;lt;&amp;lt; 0); // Toggle the LED&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;// TODO: Reset timer value&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Great! We've only got one more line of code to write, to reset the timer value. We already know the current value is accessed via the TCNT1 register for Timer 1, and since this is a read/write register, we can just write the value 0 to it once our required value is reached to rest it.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRB |= (1 &amp;lt;&amp;lt; 0); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= (1 &amp;lt;&amp;lt; CS10); // Set up timer&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;// Check timer value in if statement, true when count matches 1/20 of a second&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;if (TCNT1 &amp;gt;= 49999)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;PORTB ^= (1 &amp;lt;&amp;lt; 0); // Toggle the LED&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;TCNT1 = 0; // Reset timer value&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And there we have it! We've just created a very basic program that will toggle our LED every 1/20 of a second at a 1MHz clock. Testing it out on physical hardware should show the LED being dimmer than normal (due to it being pulsed quickly). Good eyesight might reveal the LED's very fast flickering.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Next, we'll learn about the prescaler so we can try to slow things down a bit.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 18px; line-height: normal;"&gt;&lt;span style="font-weight: bold;"&gt;Part Two - Prescaled Timers&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;In part one of this tutorial we learned how to set up our 16-bit timer 1 for a 1/20 second delay. This short (to us humans) delay is actually quite long to our AVR - 50,000 cycles in fact at 1MHz. Notice that Timer 1 can only hold a value of 0-65535 - and we've almost reached that! What do we do if we want a longer delay?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;One of the easiest things we can do is to use the timer's prescaler, to trade resolution for duration. The timer prescaler is a piece of timer circuitry which allows us to divide up the incoming clock signal by a power of 2, reducing the resolution (as we can only count in 2^n cycle blocks) but giving us a longer timer range.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Let's try to prescale down our Fcpu clock so we can reduce the timer value and reduce our delay down to a nice 1Hz. The Timer 1 prescaler on the MEGA16 has divide values of 1, 8, 64, 256 and 1024 - so let's re-do our calculations and see if we can find an exact value.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Our calculations for our new timer value are exactly the same as before, except we now have a new prescaler term. We'll look at our minimum resolution for each first:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;Timer Resolution = (1 / (Input Frequency / Prescale))&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= (Prescale / Input Frequency)&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;For a 1MHz clock, we can construct a table of resolutions using the available prescaler values and a Fcpu of 1MHz.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;Prescaler Value | Resolution @ 1MHz&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 |&amp;nbsp; 1uS&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 8 |&amp;nbsp; 8uS&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;64 | 64uS&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 256 | 256uS&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1024 | 1024uS&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;If you recall our equation for calculating the timer value for a particular delay in part 1 of this tutorial, you'll remember it is the following:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;Target Timer Count = (1 / Target Frequency) / (1 / Timer Clock Frequency) - 1&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;However, as we've just altered the prescaler term, the latter half is now different. Substituting in our new resolution equation from above we get:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;Target Timer Count = (1 / Target Frequency) / (Prescale / Input Frequency) - 1&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Or rearranged:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;Target Timer Count = (Input Frequency / Prescale) / Target Frequency - 1&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Now, we want to see if there is a prescaler value which will give an *exact* delay of 1Hz. One Hertz is equal to one cycle per second, so we want our compare value to be one second long, or 1000000uS. Let's divide that by each of our resolutions and put the results in a different table:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;Prescaler Value | Target Timer Count&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 |&amp;nbsp; 999999&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 8 |&amp;nbsp; 125000&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;64 |&amp;nbsp; 15624&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 256 |&amp;nbsp; 3905.25&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1024 |&amp;nbsp; 975.5625&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The results are interesting. Of the available prescaler values, we can immediately discount 256 and 1024 - they do not evenly divide into our wanted delay period. They are of course usable, but due to the rounding of the timer count value the resultant delay will be slightly over or under our needed delay. That leaves us with three possible prescales; 1, 8 and 64.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Our next task is to remove the values that aren't possible. On an 8-bit timer, that means discounting values of more than (( 2 ^ 8 ) - 1), or 255, as the value won't fit into the timer's 8-bit count register. For our 16-bit timer, we have a larger range of 0 to ((2 ^ 16) - 1), or 65535. Only one of our prescaler values satisfies this requirement - a prescale of 64 - as the other two possibilities require a timer count value of more bits than our largest 16-bit timer is capable of storing.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Let's go back to our original timer program and modify it to compare against our new value of 15624, which we've found to be 1 second at a prescale of 64 and a Fcpu of 1MHz:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRB |= (1 &amp;lt;&amp;lt; 0); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;// TODO: Set up timer at Fcpu/64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;// Check timer value in if statement, true when count matches 1 second&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;if (TCNT1 &amp;gt;= 15624)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;PORTB ^= (1 &amp;lt;&amp;lt; 0); // Toggle the LED&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;TCNT1 = 0; // Reset timer value&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Note I've removed the timer setup line, as it is no longer valid. We want to set up our timer to run at Fcpu/64 now. To do this, we need to look at the datasheet of the MEGA16 to see which bits need to be set in which control registers.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Checking indicates that we need to set both the CS10 and CS11 prescaler bits in TCCR1B, so let's add that to our program:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRB |= (1 &amp;lt;&amp;lt; 0); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= ((1 &amp;lt;&amp;lt; CS10) | (1 &amp;lt;&amp;lt; CS11)); // Set up timer at Fcpu/64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;// Check timer value in if statement, true when count matches 1 second&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;if (TCNT1 &amp;gt;= 15624)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;PORTB ^= (1 &amp;lt;&amp;lt; 0); // Toggle the LED&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;TCNT1 = 0; // Reset timer value&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Compile it, and we're done! Remembering that our timer runs as soon as it gets a clock source, our program will now work, flashing the LED at a frequency of 1Hz.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 18px; line-height: normal;"&gt;&lt;span style="font-weight: bold;"&gt;Part Three - Long Timer Delays in Firmware&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;So far, we've learned how to use the timers in their most basic counting mode to delay a specified duration. However, we've also discovered a limitation of the timers - their maximum duration that their timer count registers can hold. We've managed to get a 1Hz delay out of a prescaled 16-bit timer with a prescale, but what if we want a delay of a minute? An hour? A week or year?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;The answer is to create a sort of prescaler of our own in software. By making the hardware timer count to a known delay - say the 1Hz we created earlier - we can increment a variable each time that period is reached, and only act after the counter is reached a certain value. Let's pseudocode this so we can get a better understanding of what we want to do:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;Set up LED hardware&amp;nbsp;&lt;br /&gt;Set up timer&amp;nbsp;&lt;br /&gt;Initialise counter to 0&amp;nbsp;&lt;br /&gt;&lt;br /&gt;WHILE forever&amp;nbsp;&lt;br /&gt;&amp;nbsp; IF timer value IS EQUAL TO 1 sec THEN&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; Increment counter&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; Reset timer&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; IF counter value IS EQUAL TO 60 seconds THEN&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Toggle LED&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; END IF&amp;nbsp;&lt;br /&gt;&amp;nbsp; END IF&amp;nbsp;&lt;br /&gt;END WHILE&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The above pseudocode will build on our last experiment - a timer with a one second count - to produce a long delay of one minute (60 seconds). It's very simple to implement - all we need extra to our last example is an extra IF statement, and a few variable-related lines. First off, we'll re-cap with our complete code as it stands at the moment:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRB |= (1 &amp;lt;&amp;lt; 0); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= ((1 &amp;lt;&amp;lt; CS10) | (1 &amp;lt;&amp;lt; CS11)); // Set up timer at Fcpu/64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; // Check timer value in if statement, true when count matches 1 second&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if (TCNT1 &amp;gt;= 15624)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; {&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;PORTB ^= (1 &amp;lt;&amp;lt; 0); // Toggle the LED&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;TCNT1 = 0; // Reset timer value&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;We need some code to create and initialise a new counter variable to 0, then increment it when the counter reaches one second as our pseudocode states. We also need to add in a test to see if our new variable reaches the value of 60, indicating that one minute has elapsed.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;// TODO: Initialise a new counter variable to zero&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRB |= (1 &amp;lt;&amp;lt; 0); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= ((1 &amp;lt;&amp;lt; CS10) | (1 &amp;lt;&amp;lt; CS11)); // Set up timer at Fcpu/64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; // Check timer value in if statement, true when count matches 1 second&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if (TCNT1 &amp;gt;= 15625)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; {&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;TCNT1 = 0; // Reset timer value&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// TODO: Increment counter variable&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// TODO: Check here to see if new counter variable has reached 60&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if ()&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // TODO: Reset counter variable&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PORTB ^= (1 &amp;lt;&amp;lt; 0); // Toggle the LED&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Now that we have our new program's structure, replacing the TODOs becomes very simple. We want a target count of 60, which is well within the range of an unsigned integer variable, so we'll make our counter variable of type unsigned integer. The rest of the code is extremely simple, so I'll add it all in at once:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;unsigned char ElapsedSeconds = 0; // Make a new counter variable and initialise to zero&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRB |= (1 &amp;lt;&amp;lt; 0); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= ((1 &amp;lt;&amp;lt; CS10) | (1 &amp;lt;&amp;lt; CS11)); // Set up timer at Fcpu/64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; // Check timer value in if statement, true when count matches 1 second&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if (TCNT1 &amp;gt;= 15624)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; {&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;TCNT1 = 0; // Reset timer value&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ElapsedSeconds++;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (ElapsedSeconds == 60) // Check if one minute has elapsed&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ElapsedSeconds = 0; // Reset counter variable&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PORTB ^= (1 &amp;lt;&amp;lt; 0); // Toggle the LED&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Compile and run, and the LED should toggle once per minute. By extending this technique, we can produce delays of an arbitrary duration. One point of interest is to note that any timing errors compound - so if the timer input frequency is 1.1MHz rather than 1.0MHz our one minute timer will be sixty times that small error out in duration. For this reason it is important to ensure that the timer's clock is as accurate as possible, to reduce long-term errors as much as possible.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 18px; line-height: normal;"&gt;&lt;span style="font-weight: bold;"&gt;Part Four - The CTC Timer Mode&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Up until now, we've been dealing with the timers in a very basic way - starting them counting, then comparing in our main routine against a wanted value. This is rather inefficient - we waste cycles checking the timer's value every time the loop runs, and slightly inaccurate (as the timer may pass our wanted compare value slightly while processing the loop). What if there was a better way?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Well, there is. The AVR timers usually incorporate a special function mode called "Clear on Timer Compare", or CTC for short. The CTC operating mode does in hardware what we've previously experimented in software; it compares in hardware the current timer value against the wanted value, and when the wanted value is reached a flag in a status register is set and the timer's value reset.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;This is extremely handy; because the comparing is done in hardware, all we have to worry about is checking the flag to determine when to execute our LED toggling - much faster than comparing bytes or (in the case of the 16-bit timer) several bytes.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;CTC mode is very straightforward. Before we look into the implementation, let's pseudocode what we want to do.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;Set up LED hardware&amp;nbsp;&lt;br /&gt;Set up timer in CTC mode&amp;nbsp;&lt;br /&gt;Set timer compare value to one second&amp;nbsp;&lt;br /&gt;&lt;br /&gt;WHILE forever&amp;nbsp;&lt;br /&gt;&amp;nbsp; IF CTC flag IS EQUAL TO 1 THEN&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; Toggle LED&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; Clear CTC flag&amp;nbsp;&lt;br /&gt;&amp;nbsp; END IF&amp;nbsp;&lt;br /&gt;END WHILE&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Very short, and very simple. Note that the name of the mode is&amp;nbsp;&lt;span style="font-style: italic;"&gt;Clear&lt;/span&gt;&amp;nbsp;on timer compare - the timer's value will automatically reset each time the compare value is reached, so we only need to clear the flag when the delay is reached. This set-and-forget system is very handy, as once the timer is configured and started we don't need to do anything other than check and clear its status registers.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Now then, we'll grab our previous example, modifying it to fit with our new pseudocode:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRB |= (1 &amp;lt;&amp;lt; 0); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;// TODO: Configure timer mode to CTC&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;// TODO: Set compare value for a compare rate of 1Hz&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= ((1 &amp;lt;&amp;lt; CS10) | (1 &amp;lt;&amp;lt; CS11)); // Start timer at Fcpu/64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if () // TODO: Check CTC flag&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; {&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PORTB ^= (1 &amp;lt;&amp;lt; 0); // Toggle the LED&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // TODO: Clear CTC flag&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now, we need to flesh out the skeleton code we have. First up we need to configure our timer for CTC mode. As you might be able to guess, we want to configure our timer, thus the bits we want will be located in the timer's Control registers. The table to look for is the one titled "Waveform Generation Mode Bit Description", and is located in timer Control register descriptions for each timer. This table indicates all the possible timer modes, the bits required to set the timer to use those modes, and the conditions each mode reacts to.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;You should note that our previous examples have ignored this table altogether, allowing it to use its default value of all mode bits set to zero. Looking at the table we can see that this setup corresponds to the "Normal" timer mode. We want to use the CTC mode of the timer, so let's look for a combination of control bits that will give us this mode.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Interestingly, it seems that two different combinations in Timer 1 of the MEGA16 will give us the same CTC behaviour we desire. Looking to the right of the table, we can see that the "Top" value (that is, the maximum timer value for the mode, which corresponds to the compare value in CTC mode) uses different registers for each. Both modes behave in the same manner for our purposes and differ only by the register used to store the compare value, so we'll go with the first.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;The table says that for this mode, only bit WGM12 needs to be set. It also says that the register used for the compare value is named OCR1A.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Looking at the timer control registers (TCCR1A and TCCR1B) you should notice that the WGM1x bits - used to configure the timer's mode - are spread out over both registers. This is a small pain as you need to find out which bits are in which register, but once found setting up the timer becomes very easy. In fact, as we only have one bit to set - WGM12 - our task is even easier. The MEGA16's datasheet says that WGM12 is located in the TCCR1B register, so we need to set that.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRB |= (1 &amp;lt;&amp;lt; 0); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= (1 &amp;lt;&amp;lt; WGM12); // Configure timer 1 for CTC mode&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;// TODO: Set compare value for a compare rate of 1Hz&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= ((1 &amp;lt;&amp;lt; CS10) | (1 &amp;lt;&amp;lt; CS11)); // Start timer at Fcpu/64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if () // TODO: Check CTC flag&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; {&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PORTB ^= (1 &amp;lt;&amp;lt; 0); // Toggle the LED&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // TODO: Clear CTC flag&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The second task for this experiment is to set the compare value - the value that will reset the timer and set the CTC flag when reached by the timer. We know from the datasheet that the register for this is OCR1A for the MEGA16 in the first CTC timer mode, so all we need is a compare value. From our previous experiment we calculated that 1Hz at 1MHz with a prescaler of 64 needs a compare value of 15624, so let's go with that.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRB |= (1 &amp;lt;&amp;lt; 0); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= (1 &amp;lt;&amp;lt; WGM12); // Configure timer 1 for CTC mode&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;OCR1A&amp;nbsp; &amp;nbsp;= 15624; // Set CTC compare value to 1Hz at 1MHz AVR clock, with a prescaler of 64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= ((1 &amp;lt;&amp;lt; CS10) | (1 &amp;lt;&amp;lt; CS11)); // Start timer at Fcpu/64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if () // TODO: Check CTC flag&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; {&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PORTB ^= (1 &amp;lt;&amp;lt; 0); // Toggle the LED&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // TODO: Clear CTC flag&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;There, almost done already! Last thing we need is a way of checking to see if the compare has occurred, and a way to clear the flag once its been set. The place to look for the compare flags is in the timer's Interrupt Flag register - an odd place it seems, but the reason will become clear in the next section dealing with timer interrupts. The MEGA16's Timer 1 interrupt flags are located in the combined register TIFR, and the flag we are interested in is the "Output Compare A Match" flag, OCF1A. Note the "A" on the end; Timer 1 on the MEGA16 has two CTC channels (named channel A and channel B), which can work independently. We're only using channel A for this experiment.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Checking for a CTC event involves checking the OCF1A flag in this register. That's easy - but what about clearing it? The datasheet includes an interesting note on the subject:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="quotetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Quote:&lt;/strong&gt;&lt;/div&gt;&lt;div class="quotecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;...OCF1A can be cleared by writing a logic 1 to its bit location&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Very strange indeed! In order to clear the CTC flag, we actually need to set it - even though it's already set. Due to some magic circuitry inside the AVR, writing a 1 to the flag when its set will actually cause it to clear itself. This is an interesting behaviour, and is the same across all the interrupt bits.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Despite that, we can now add in our last lines of code to get a working example:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRB |= (1 &amp;lt;&amp;lt; 0); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= (1 &amp;lt;&amp;lt; WGM12); // Configure timer 1 for CTC mode&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;OCR1A&amp;nbsp; &amp;nbsp;= 15624; // Set CTC compare value to 1Hz at 1MHz AVR clock, with a prescaler of 64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= ((1 &amp;lt;&amp;lt; CS10) | (1 &amp;lt;&amp;lt; CS11)); // Start timer at Fcpu/64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if (TIFR &amp;amp; (1 &amp;lt;&amp;lt; OCF1A))&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; {&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PORTB ^= (1 &amp;lt;&amp;lt; 0); // Toggle the LED&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TIFR = (1 &amp;lt;&amp;lt; OCF1A); // clear the CTC flag (writing a logic one to the set flag clears it)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Note that when clearing the OCF1A flag, we assign its value to the TIFR register. This is because it will assign a logic one to the flag's position (clearing it) but also because as writing zeros to the other flags won't affect them, we can go ahead and use the smaller (codesize-wise) direct assignment, rather than ORing the register to form a read/modify/write sequence. This is also beneficial because it prevents the compiler from writing logic one to the other flags if they were already set via the read/modify/write, which&amp;nbsp;&lt;span style="font-style: italic;"&gt;would&lt;/span&gt;&amp;nbsp;clear unwanted flags.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And there we have it, a working 1Hz LED flasher using the CTC timer mode!&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 18px; line-height: normal;"&gt;&lt;span style="font-weight: bold;"&gt;Part Five - CTC Mode using Interrupts&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Important:&lt;/span&gt;&amp;nbsp;The interface for defining and working with Interrupts has changed in the more recent versions of WinAVR - please make sure you've updated your installation to the latest version if you encounter errors relating to the unknown macro "ISR".&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;For all our previous experiments, we've been using a looped test in our main code to determine when to execute the timer action code. That's fine - but what if we want to shift the responsibility of choosing when to execute the timer code to the AVR hardware instead? To do this, we need to look at the timer interrupts.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Interrupts are events that when enabled, cause the AVR to execute a special routine (called an Interrupt Service Routine, or ISR for short) when the interrupt conditions are met. These interrupts can happen at any time and when executing the main routine is paused while the ISR executes, the the main routine continues until the next interrupt. This is useful for us, as it means we can eliminate the need to keep checking the timer value and just respond to it's interrupt events instead.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;The AVR timers can have several different Interrupts - typically Overflow, Compare and Capture. Overflow occurs when the timer's value rolls past it's maximum and back to zero (for an 8 bit timer, that's when it counts past 11111111 in binary and resets back to 00000000). However, for this section we'll deal with the Compare interrupt, which occurs in CTC mode when the compare value is reached.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Again, we'll pseudocode this to start with:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;Set up LED hardware&amp;nbsp;&lt;br /&gt;Set up timer in CTC mode&amp;nbsp;&lt;br /&gt;Enable CTC interrupt&amp;nbsp;&lt;br /&gt;Enable global interrupts&amp;nbsp;&lt;br /&gt;Set timer compare value to one second&amp;nbsp;&lt;br /&gt;&lt;br /&gt;WHILE forever&amp;nbsp;&lt;br /&gt;END WHILE&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;ISR Timer Compare&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;Toggle LED&amp;nbsp;&lt;br /&gt;END ISR&amp;nbsp;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;We can start off this by working with our skeleton main code, used in previous examples. I'll skip the details on the parts already discussed in previous sections.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRB |= (1 &amp;lt;&amp;lt; 0); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= (1 &amp;lt;&amp;lt; WGM12); // Configure timer 1 for CTC mode&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;// TODO: Enable CTC interrupt&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;// TODO: Enable global interrupts&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;OCR1A&amp;nbsp; &amp;nbsp;= 15624; // Set CTC compare value to 1Hz at 1MHz AVR clock, with a prescaler of 64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= ((1 &amp;lt;&amp;lt; CS10) | (1 &amp;lt;&amp;lt; CS11)); // Start timer at Fcpu/64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&amp;nbsp;&lt;br /&gt;&lt;br /&gt;// TODO: Add compare ISR here&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Note how it's a modified version of the non-interrupt driven CTC example covered in the last section. All we need to do is tell the timer to run the compare ISR we define when it counts up to our compare value, rather then us polling the compare match flag in our main routine loop.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;We'll start with creating the ISR first, as that's quite simple. In AVR-GCC - specifically, the avr-libc Standard C Library that comes with it - the header file for dealing with interrupts is called (unsurprisingly) "interrupt.h" and is located in the "avr" subdirectory. We need to include this at the top of our program underneath our include to the IO header file. The top of our code should look like this:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;#include &amp;lt;avr/interrupt.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; ...&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This gives us access to the API for dealing with interrupts. We want to create an ISR for the Timer 1 Compare Match event. The syntax for defining an ISR body in AVRGCC is:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;ISR(VectorName_vect)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;// Code to execute on ISR fire here&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Where "VectorName" is the name of the ISR vector which our defined ISR handles. The place to go to find this name is the "Interrupt" section of the datasheet, which lists the symbolic names for all the ISR vectors that the chosen AVR supports. When writing the vector name into GCC, replace all spaces with underscores, and append "_vect" to the end of the vector's name.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Like in part four we are still dealing with Channel A Compare of Timer 1, so we want the vector named "TIMER1 COMPA". In GCC this is called "TIMER1_COMPA_vect", after performing the transformations outlined in the last paragraph. Once the ISR is defined, we can go ahead and write out it's body, adding the LED toggling code.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;#include &amp;lt;avr/interrupt.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRB |= (1 &amp;lt;&amp;lt; 0); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= (1 &amp;lt;&amp;lt; WGM12); // Configure timer 1 for CTC mode&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;// TODO: Enable CTC interrupt&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;// TODO: Enable global interrupts&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;OCR1A&amp;nbsp; &amp;nbsp;= 15624; // Set CTC compare value to 1Hz at 1MHz AVR clock, with a prescaler of 64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= ((1 &amp;lt;&amp;lt; CS10) | (1 &amp;lt;&amp;lt; CS11)); // Start timer at Fcpu/64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&amp;nbsp;&lt;br /&gt;&lt;br /&gt;ISR(TIMER1_COMPA_vect)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;PORTB ^= (1 &amp;lt;&amp;lt; 0); // Toggle the LED&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Notice how we don't clear the CTC event flag like in part four - this is automatically cleared by the AVR hardware once the ISR fires. Neat, isn't it!&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Running the code so far won't yield any results. This is because although we have our ISR all ready to handle the CTC event, we haven't enabled it! We need to do two things; enable the "TIMER1 COMPA" interrupt specifically, and turn on interrupt handling on our AVR.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;The way to turn on our specific interrupt is to look into the second interrupt-related register for our timer, TIMSK. This is the Timer Interrupt Mask register, which turns on and off ISRs to handle specific timer events. Note that on the MEGA16 this single register contains the enable bits for all the timer interrupts for all the available timers. We're only interested in the Timer 1 Compare A Match interrupt enable bit, which we can see listed as being called OCIE1A (Output Compare Interrupt Enable, channel A).&amp;nbsp;&lt;br /&gt;&lt;br /&gt;By setting that bit we instruct the timer to execute our ISR upon compare match with our specified compare value. Let's put that line into our program's code and see how it all looks.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;#include &amp;lt;avr/interrupt.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRB |= (1 &amp;lt;&amp;lt; 0); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= (1 &amp;lt;&amp;lt; WGM12); // Configure timer 1 for CTC mode&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TIMSK |= (1 &amp;lt;&amp;lt; OCIE1A); // Enable CTC interrupt&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;// TODO: Enable global interrupts&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;OCR1A&amp;nbsp; &amp;nbsp;= 15624; // Set CTC compare value to 1Hz at 1MHz AVR clock, with a prescaler of 64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= ((1 &amp;lt;&amp;lt; CS10) | (1 &amp;lt;&amp;lt; CS11)); // Start timer at Fcpu/64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&amp;nbsp;&lt;br /&gt;&lt;br /&gt;ISR(TIMER1_COMPA_vect)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;PORTB ^= (1 &amp;lt;&amp;lt; 0); // Toggle the LED&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Only one more thing to do - enable global interrupts. The AVR microcontrollers have a single control bit which turns on and off interrupt handling functionality. This is used in pieces of code where interrupt handling is not desired, or to disable interrupts while an ISR is already being executed. The latter is done automatically for us, so all we need to do is turn on the bit at the start of our code, and our compare interrupt will start to work.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;The command to do this is called "sei" in the avr-libc library that ships with WinAVR, and is named to correspond with the assembly instruction which does the same for AVRs (the SEI instruction). That's irrelevant however, as we just need to call the command in our code.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;#include &amp;lt;avr/interrupt.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRB |= (1 &amp;lt;&amp;lt; 0); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= (1 &amp;lt;&amp;lt; WGM12); // Configure timer 1 for CTC mode&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TIMSK |= (1 &amp;lt;&amp;lt; OCIE1A); // Enable CTC interrupt&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;sei(); //&amp;nbsp; Enable global interrupts&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;OCR1A&amp;nbsp; &amp;nbsp;= 15624; // Set CTC compare value to 1Hz at 1MHz AVR clock, with a prescaler of 64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= ((1 &amp;lt;&amp;lt; CS10) | (1 &amp;lt;&amp;lt; CS11)); // Start timer at Fcpu/64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&amp;nbsp;&lt;br /&gt;&lt;br /&gt;ISR(TIMER1_COMPA_vect)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;PORTB ^= (1 &amp;lt;&amp;lt; 0); // Toggle the LED&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And our example is finished! Running this will give a nice 1Hz LED flashing, using the timer's event interrupts. The nice thing is that the timer operation is now completely handled for us in hardware - once set up, we just need to react to the events we've configured. Notice that our main loop is now empty; if this is the case you may put sleep commands inside the main loop to save power between compares.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 18px; line-height: normal;"&gt;&lt;span style="font-weight: bold;"&gt;Part Six - Pure Hardware CTC&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;You probably think by now that we've improved our example as much as possible - after all, what more improvements are there to make? Well, it's time to finish of the CTC topic by looking at the hardware outputs.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;All AVRs' pins have alternative hardware functions. These functions (currently non re-routable) when activated interface the IO pins directly to the AVR's internal hardware - for instance the Tx/Rx alternative functions which are the direct interface to the AVR's USART subsystem. Alternative pin functions can be very useful; as they can be internally connected straight to a hardware subsystem, the maximum possible performance can be achieved.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;In this section, we'll be looking at the Compare Output settings of the AVR timer.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Looking at the timer 1 control registers, we can see a few pairs of bits we've previously ignored, called (for timer 1) COM1A1/COM1A0 and COM1B1/COM1B0. Bonus points to anyone who's linked the "A" and "B" parts of the bit names to the timer compare channels - you're spot on.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;These bits allow us to control the hardware behaviour when a compare occurs. Instead of firing an interrupt, the hardware can be configured to set, clear or toggle the OCxy (where "x" is the timer number, "y" is the channel letter for timers with more than one channel) hardware pins when a compare occurs. We can use the toggle function with our LED flasher, so that the hardware toggles the LED's state for us automatically, making it a true set-and-forget operation.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Before we do anything else, let's work out which pins of our MEGA16 are linked to the Compare Output hardware - we want the pins with alternative functions starting with "OC". On our PDIP package version, that maps to:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="quotetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Quote:&lt;/strong&gt;&lt;/div&gt;&lt;div class="quotecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;PB3 = OC0&amp;nbsp;&lt;br /&gt;PD4 = OC1B&amp;nbsp;&lt;br /&gt;PD5 = OC1A&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;So timer 0 has one Compare Output channel, while timer 1 has two (channels A and B) as we've already discovered. As always we'll just deal with Channel A in our example.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Now we have a problem. All the previous chapters have assumed the LED is attached to PORTB, bit 0 - but we'll have to move it for this chapter. As stated above the alternative functions cannot be moved to another pin, so we must move moses...I mean, our&amp;nbsp;&lt;span style="font-style: italic;"&gt;LED&lt;/span&gt;, to the pin with the required alternative function.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Timer 1 Channel A's Compare Output is located on PD5, so move the LED there for the rest of this example. Now, let's psudocode:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;Set up LED hardware&amp;nbsp;&lt;br /&gt;Set up timer in CTC mode&amp;nbsp;&lt;br /&gt;Enable timer 1 Compare Output channel A in toggle mode&amp;nbsp;&lt;br /&gt;Set timer compare value to one second&amp;nbsp;&lt;br /&gt;&lt;br /&gt;WHILE forever&amp;nbsp;&lt;br /&gt;END WHILE&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Amazing how simple it is, isn't it! Well, we can already fill in almost all of this:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;#include &amp;lt;avr/interrupt.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRD |= (1 &amp;lt;&amp;lt; 5); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= (1 &amp;lt;&amp;lt; WGM12); // Configure timer 1 for CTC mode&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;// TODO: Enable timer 1 Compare Output channel A in toggle mode&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;OCR1A&amp;nbsp; &amp;nbsp;= 15624; // Set CTC compare value to 1Hz at 1MHz AVR clock, with a prescaler of 64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= ((1 &amp;lt;&amp;lt; CS10) | (1 &amp;lt;&amp;lt; CS11)); // Start timer at Fcpu/64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;All we need is to configure the timer so that it'll toggle our channel A output each time the timer value is equal to our compare value. The datasheet has several descriptions for the functionality of the COM1Ax and COM1Bx bits, so we need to find the table corresponding to the mode we're using the timer in.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;CTC mode isn't listed - instead the appropriate table is listed as "Compare Output mode, Non PWM". PWM stands for "Pulse Width Modulation", and will be covered later on in this tutorial. For now, it is sufficient to know that the CTC mode is not a form of PWM and thus the non-PWM bit description table is the one we're looking for.&lt;br /&gt;&lt;br /&gt;To make the channel A Compare Output pin toggle on each compare, the datasheet says we need to set bit COM1A0 in TCCR1A. That's our missing line - let's add it in!&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;#include &amp;lt;avr/interrupt.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRD |= (1 &amp;lt;&amp;lt; 5); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= (1 &amp;lt;&amp;lt; WGM12); // Configure timer 1 for CTC mode&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1A |= (1 &amp;lt;&amp;lt; COM1A0); // Enable timer 1 Compare Output channel A in toggle mode&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;OCR1A&amp;nbsp; &amp;nbsp;= 15624; // Set CTC compare value to 1Hz at 1MHz AVR clock, with a prescaler of 64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= ((1 &amp;lt;&amp;lt; CS10) | (1 &amp;lt;&amp;lt; CS11)); // Start timer at Fcpu/64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Simple, isn't it! We've now created the simplest (code-wise) LED flasher possible using pure hardware functionality. Running this will cause the LED to flash at 1Hz, without any code other than the timer initialization!&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 18px; line-height: normal;"&gt;&lt;span style="font-weight: bold;"&gt;Part Seven - The Overflow Event&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Well, now that we've had fun creating a LED flasher via a variety of software and hardware CTC methods, we'll move on to one last LED flashing program. This time we'll be using a different Timer event to manage the toggling of the LED - the overflow.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;As previously stated, timers store their values into internal 8 or 16 bit registers, depending on the size of the timer being used. These registers can only store a finite number of values, resulting in the need to manage the timer (via prescaling, software extention, etc) so that the interval to be measured fits within the range of the chosen timer.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;However, what has not been discussed yet is what happens when the range of the timer is exceeded. Does the AVR explode? Does the application crash? Does the timer automatically stop?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;The answer is simple, if rather boring. In the event of the timer register exceeding its capacity, it will automatically roll around back to zero and keep counting. When this occurs, we say that the timer has "overflowed".&amp;nbsp;&lt;br /&gt;&lt;br /&gt;When an overflow occurs, a bit is set in one of the timer status registers to indicate to the main application that the event has occured. Just like with the CTC hardware, there is also a corresponding bit which can enable an interrupt to be fired each time the timer resets back to zero.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So why would we need the overflow interrupt? Well, I leave that as an excersize to the reader. However, we can demonstrate it here in this tutorial - via another LED flasher, of course.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Calculating the frequency of the flashing is a little different to our previous examples, as now we have to calculate in reverse (to find the frequency from the timer count and timer resolution rather than the timer count from a known frequency and timer resolution). We'll still be working with our 16-bit timer 1 for this example, to be consistent with previous chapters.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Let's go back to our one of the timer equations we used back in chapter 2:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;Target Timer Count = (1 / Target Frequency) / (Prescale / Input Frequency) - 1&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;We want to determine the Target Frequency from the other two variables, so let's rearrange:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;(Target Timer Count + 1) * (Prescale / Input Frequency) = (1 / Target Frequency)&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;And swap the left and right hand sides to get it into a conventional form:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;(1 / Target Frequency) = (Target Timer Count + 1) * (Prescale / Input Frequency)&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Since we know that for the overflow equation, the "Target Timer Count" becomes the maximum value that can be held by the timer's count register, plus one (as the overflow occurs after the count rolls over from the maximum back to zero). The formula for the maximum value that can be held in a number of bits is:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;Max Value = (2 ^ Bits) - 1&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;But we want one more than that to get the number of timer counts until an overflow occurs:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;Counts Until Overflow = (2 ^ Bits)&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Change "Max Value" to the more appropriate "Target Timer Count" in the first timer equation:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;(1 / Target Frequency) = Counts Until Overflow * (Prescale / Input Frequency)&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;And substitute in the formula for the counts until overflow to get the timer period equation. Since frequency is just the inverse of period, we can also work out the frequencies of each duration as well:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;Target Period = (1 / Target Frequency)&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;Target Period = ((2 ^ Bits) * (Prescale / Input Frequency)&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Which is a bit complex, but such is life. Now's the fun part - we can now work out the overflow frequencies and periods for our 16-bit Timer 1 running at different prescales of our AVR's 1MHz system clock:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;Target Period = ((2 ^ 16) * (Prescale / 1000000)&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;Prescaler Value | Overflow Frequency | Overflow period&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 |&amp;nbsp; 15.259 Hz&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&amp;nbsp; &amp;nbsp;65.5&amp;nbsp; ms&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 8 |&amp;nbsp; 1.907 Hz&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&amp;nbsp; &amp;nbsp;0.524 s&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;64 |&amp;nbsp; .2384 Hz&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&amp;nbsp; &amp;nbsp;4.195 s&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 256 |&amp;nbsp; .0596 Hz&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&amp;nbsp; &amp;nbsp;16.78 s&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1024 |&amp;nbsp; .0149 Hz&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&amp;nbsp; &amp;nbsp;67.11 s&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Note how our frequency decreases (and period increases) as our prescaler increases, as it should. Because we have a reasonably slow main system clock, and a large timer count register, we end up with frequencies that are easy to see with the naked eye (with the exception of the case where no prescaler is used). Unlike the CTC method however, we are limited to the frequencies above and cannot change them short of using a smaller timer, different prescaler or different system clock speed - we lose the precision control that the CTC modes give us.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;For this example, we'll use a prescaler of 8, to give a 1.8Hz flashing frequency, and a period of about half a second.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Almost time to get into the code implementation. But first, pseudocode! I'm going to extrapolate on the preceding chapters and jump straight into the ISR-powered example, rather than begin with a polled example. It works in the same manner as previous polled experiments, except for the testing of the overflow bit rather than the CTC bit.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;Set up LED hardware&amp;nbsp;&lt;br /&gt;Set up timer overflow ISR&amp;nbsp;&lt;br /&gt;Start timer with a prescale of 8&amp;nbsp;&lt;br /&gt;&lt;br /&gt;WHILE forever&amp;nbsp;&lt;br /&gt;END WHILE&amp;nbsp;&lt;br /&gt;&lt;br /&gt;ISR Timer Overflow&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;Toggle LED&amp;nbsp;&lt;br /&gt;END ISR&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Let's get started. As always, we'll begin with the skeleton program:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;#include &amp;lt;avr/interrupt.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRB |= (1 &amp;lt;&amp;lt; 0); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;// TODO: Enable overflow interrupt&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;// TODO: Enable global interrupts&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;// TODO: Start timer at Fcpu/8&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&amp;nbsp;&lt;br /&gt;&lt;br /&gt;// TODO: Add overflow ISR here&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Let's begin with filling in the bits we can already do. The ISR code is easy - we can use the same ISR as part five, except we'll be changing the compare vector to the overflow vector of timer 1.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Looking in the MEGA16 datasheet, the overflow interrupt for timer 1 is obvious - it's listed as "TIMER1 OVF" in the Interrupts chapter. Just like in part five, we need to replace the spaces in the vector name with underscores, and add the "_vect" suffix to the end.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;We can also fill in the "Enable global interrupts" line, as that is identical to previous chapters and is just the "sei()" command from the &amp;lt;avr/interrupt.h&amp;gt; header file.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;#include &amp;lt;avr/interrupt.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRB |= (1 &amp;lt;&amp;lt; 0); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;// TODO: Enable overflow interrupt&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;sei(); // Enable global interrupts&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;// TODO: Start timer at Fcpu/8&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&amp;nbsp;&lt;br /&gt;&lt;br /&gt;ISR(TIMER1_OVF_vect)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;PORTB ^= (1 &amp;lt;&amp;lt; 0); // Toggle the LED&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Next, we need to figure out how to enable the overflow vector, so that our ISR is run each timer the overflow occurs. The datasheet's 16-bit Timer/Counter section comes to our rescue again, indicating that it is the bit named "TOIE1" located in the Timer 1 Interrupt Mask register, TIMSK:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;#include &amp;lt;avr/interrupt.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRB |= (1 &amp;lt;&amp;lt; 0); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TIMSK |= (1 &amp;lt;&amp;lt; TOIE1); // Enable overflow interrupt&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;sei(); // Enable global interrupts&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;// TODO: Start timer at Fcpu/8&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&amp;nbsp;&lt;br /&gt;&lt;br /&gt;ISR(TIMER1_OVF_vect)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;PORTB ^= (1 &amp;lt;&amp;lt; 0); // Toggle the LED&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The last thing we need to do, is start the timer with a prescaler of 8. This should be easy for you to do - if not, refer back to chapter 2.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;The MEGA16 Datasheet, Timer 1 section tells us that for a timer running with a prescaler of 8, we need to start it with the bit CS11 set in the control register TCCR1B. Adding that to our code finishes our simple program:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;#include &amp;lt;avr/interrupt.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRB |= (1 &amp;lt;&amp;lt; 0); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TIMSK |= (1 &amp;lt;&amp;lt; TOIE1); // Enable overflow interrupt&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;sei(); // Enable global interrupts&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= (1 &amp;lt;&amp;lt; CS11); // Start timer at Fcpu/8&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&amp;nbsp;&lt;br /&gt;&lt;br /&gt;ISR(TIMER1_OVF_vect)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;PORTB ^= (1 &amp;lt;&amp;lt; 0); // Toggle the LED&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;All done! This simple program will cause the LED to toggle each time the overflow occurs and serves as a practical use of the overflow interrupt.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 18px; line-height: normal;"&gt;&lt;span style="font-weight: bold;"&gt;Part Eight - Overflow as CTC&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;One neat application of the overflow event is for creating a CTC timer on AVRs which don't support true hardware CTC. It's not as neat as the pure hardware CTC discussed in part six, but faster than the pure software CTC discussed in part two.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;CTC works by having a fixed BOTTOM value - that's the timer's minimum value - of zero, and a variable TOP value, the value at which resets the timer and fires the event. However, with the overflow event we seemingly have a fixed BOTTOM of again zero, and a fixed TOP of the maximum timer's value. Not so - with a small trick we can adjust the BOTTOM value to give us the equivelent of a CTC implementation standing on it's head.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;This tecnique is called timer reloading. When configured, we preload the timer's count register (which is both readable and writeable) with a value above zero. This shortens the time interval before the next overflow event, although only for a single overflow. We can get around that by again reloading the timer's value to our non-zero value inside the overflow event for a hybrid software/hardware CTC.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Psuedocode time!&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;Set up LED hardware&amp;nbsp;&lt;br /&gt;Set up timer overflow ISR&amp;nbsp;&lt;br /&gt;Load timer count register with a precalculated value&amp;nbsp;&lt;br /&gt;Start timer with a prescale of 8&amp;nbsp;&lt;br /&gt;&lt;br /&gt;WHILE forever&amp;nbsp;&lt;br /&gt;END WHILE&amp;nbsp;&lt;br /&gt;&lt;br /&gt;ISR Timer Overflow&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;Toggle LED&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;Reload timer count register with same precalculated value&amp;nbsp;&lt;br /&gt;END ISR&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Let's examine the maths again. From part two, we know that the formula for determining the number of timer clock cycles needed for a given delay is:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;Target Timer Count = (Input Frequency / Prescale) / Target Frequency&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Which works for a fixed BOTTOM of zero, and a variable TOP. We've got the "upside-down" implementation of a fixed top of ((2 ^ Bits) - 1) and a variable BOTTOM. Our BOTTOM value becomes the TOP minus the number of clock cycles needed for the equivelent CTC value, so the formula becomes:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;Reload Timer Value = ((2 ^ Bits) - 1) - ((Input Frequency / Prescale) / Target Frequency)&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Let's go with the previous example in part two: a 1Hz flasher, using a 1MHz clock and a prescale of 64. We found the timer count to be 15625 for those conditions. Plugging it into the above Reload Timer Value formula gives:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;Reload Timer Value = ((2 ^ Bits) - 1) - 15624&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= ((2 ^ 16) - 1) - 15624&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= 65535 - 15624&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= 49911&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;So we need to preload and reload our overflow timer on each overflow with the value 49911 to get our desired 1Hz delay. Since we've already gone over the code for an interrupt-driven overflow example in part seven, we'll build upon that.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;#include &amp;lt;avr/interrupt.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRB |= (1 &amp;lt;&amp;lt; 0); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TIMSK |= (1 &amp;lt;&amp;lt; TOIE1); // Enable overflow interrupt&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;sei(); // Enable global interrupts&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;// TODO: Preload timer with precalculated value&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= ((1 &amp;lt;&amp;lt; CS10) | (1 &amp;lt;&amp;lt; CS11)); // Set up timer at Fcpu/64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&amp;nbsp;&lt;br /&gt;&lt;br /&gt;ISR(TIMER1_OVF_vect)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;PORTB ^= (1 &amp;lt;&amp;lt; 0); // Toggle the LED&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;// TODO: Reload timer with precalculated value&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Both the reloading and preloading of the timer takes identical code - we just need to set the timer's count register to the precalculated value. The timer's current count value is avaliable in the TCNTx register, where "x" is the timer's number. We're using the 16-bit timer 1, so the count value is located in TCNT1.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;We'll now finish of the example, replacing the unfinished segments:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="codetitle" style="margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 10px;"&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/div&gt;&lt;div class="codecontent" style="margin-top: 0px; margin-right: 5px; margin-bottom: 10px; margin-left: 10px; font-family: 'Courier New', Courier, mono; color: green; background-color: #f4f5f7; padding: 5px; border: 1px solid #c8c7c7;"&gt;#include &amp;lt;avr/io.h&amp;gt;&amp;nbsp;&lt;br /&gt;#include &amp;lt;avr/interrupt.h&amp;gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;int main (void)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;DDRB |= (1 &amp;lt;&amp;lt; 0); // Set LED as output&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TIMSK |= (1 &amp;lt;&amp;lt; TOIE1); // Enable overflow interrupt&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;sei(); // Enable global interrupts&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCNT1 = 49911; // Preload timer with precalculated value&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCCR1B |= ((1 &amp;lt;&amp;lt; CS10) | (1 &amp;lt;&amp;lt; CS11)); // Set up timer at Fcpu/64&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (;;)&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;br /&gt;}&amp;nbsp;&lt;br /&gt;&lt;br /&gt;ISR(TIMER1_OVF_vect)&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;PORTB ^= (1 &amp;lt;&amp;lt; 0); // Toggle the LED&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;TCNT1&amp;nbsp; = 49911; // Reload timer with precalculated value&amp;nbsp;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And done! This is less preferable to the pure hardware CTC mode, as it requires a tiny bit more work on both the programmer and the AVR to function. However, it will work just fine for AVRs lacking the complete CTC timer functionality.&amp;nbsp;&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6599454894873414377-249356681853572863?l=atomicarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atomicarm.blogspot.com/feeds/249356681853572863/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atomicarm.blogspot.com/2011/05/newbie-guide-to-avr-timers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/249356681853572863'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/249356681853572863'/><link rel='alternate' type='text/html' href='http://atomicarm.blogspot.com/2011/05/newbie-guide-to-avr-timers.html' title='Newbie&amp;#39;s Guide to AVR Timers'/><author><name>Mike Hewitt</name><uri>http://www.blogger.com/profile/05181139924811433955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6599454894873414377.post-5451704658901074123</id><published>2011-04-30T00:36:00.001-07:00</published><updated>2011-04-30T00:46:15.642-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Hardware'/><category scheme='http://www.blogger.com/atom/ns#' term='Hacks'/><title type='text'>How to Convert a Computer ATX Power Supply to a Lab Power Supply</title><content type='html'>&lt;span style="color: #414141; font-family: Arial, Helvetica, sans-serif; font-size: 15px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div id="bodycontents" style="font-size: 1.1em; margin: 0px; padding: 0px;"&gt;&lt;div class="article_inner editable" style="margin: 0px; padding-bottom: 20px; padding-left: 23px; padding-right: 27px; padding-top: 0px;"&gt;&lt;div class="mwimg" style="margin: 0px; padding: 0px;"&gt;&lt;div class="floatright" style="float: right; margin-bottom: 1em; margin-left: 0.5em; margin-right: 0px; margin-top: 0px; padding: 0px;"&gt;&lt;div class="rounders" style="height: 339px; margin-bottom: 0.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding: 0px; position: relative; width: 420px;"&gt;&lt;span style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;a class="image" href="http://www.wikihow.com/Image:ATX-to-Lab-Supply-1.JPG" style="color: #336633; margin: 0px; padding: 0px; text-decoration: none;" title="Specs for an ATX PSU"&gt;&lt;br /&gt;&lt;img alt="Specs for an ATX PSU" border="0" class="mwimage101" height="339" src="http://pad1.whstatic.com/images/7/73/ATX-to-Lab-Supply-1.JPG" style="border: 0px initial initial; margin: 0px; padding: 0px;" width="420" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="line-height: 1.2em; margin: 0px; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Computer power supplies cost around US$30,but lab power supplies can run you $100 or more! By converting the cheap (free) ATX power supplies that can be found in any discarded computer, you can get a phenomenal lab power supply with huge current outputs, short circuit protection, and reasonably tight voltage regulation on the 5V line.&lt;/div&gt;&lt;div style="line-height: 1.2em; margin: 0px; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;On most PSUs, the other lines are unregulated, but 12v regulator could be added to the 12v line.&lt;/div&gt;&lt;div style="line-height: 1.2em; margin: 0px; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="editable" id="steps" style="margin: 0px; padding: 0px;"&gt;&lt;ol class="steps_list_2" style="list-style-image: initial; list-style-position: initial; list-style-type: none; margin: 0px; padding: 0px;"&gt;&lt;li style="border-bottom-color: #bfbfbf; border-bottom-style: dashed; border-bottom-width: 1px; clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 20px; padding-left: 80px; padding-right: 20px; padding-top: 20px;"&gt;&lt;div class="wh_ad" style="margin: 0px; padding: 0px;"&gt;&lt;div class="wh_ad_inner" style="margin: 0px; padding: 0px;"&gt;&lt;div class="adunit adunitp0" style="color: #414141; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 10px; padding: 0px;"&gt;&lt;div id="adunit1" style="margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 3px;"&gt;&lt;div class="ad1" style="color: #414141; margin-bottom: 12px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding: 0px;"&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="border-bottom-color: #bfbfbf; border-bottom-style: dashed; border-bottom-width: 1px; clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 20px; padding-left: 80px; padding-right: 20px; padding-top: 20px;"&gt;&lt;div class="step_num" style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://pad1.whstatic.com/skins/WikiHow/images/header.png); background-origin: initial; background-position: -220px -80px; background-repeat: no-repeat no-repeat; clear: right; color: white; float: left; font-size: 1.45em; height: 31px; line-height: 31px; margin-bottom: 0px; margin-left: -50px; margin-right: 20px; margin-top: 0px; padding: 0px; text-align: center; width: 31px;"&gt;2&lt;/div&gt;&lt;strong class="whb" style="margin: 0px; padding: 0px;"&gt;Remove the screws (typically 4) that attach the power supply to the computer case and remove the power supply&lt;/strong&gt;.&lt;/li&gt;&lt;li style="border-bottom-color: #bfbfbf; border-bottom-style: dashed; border-bottom-width: 1px; clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 20px; padding-left: 80px; padding-right: 20px; padding-top: 20px;"&gt;&lt;div class="step_num" style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://pad1.whstatic.com/skins/WikiHow/images/header.png); background-origin: initial; background-position: -220px -80px; background-repeat: no-repeat no-repeat; clear: right; color: white; float: left; font-size: 1.45em; height: 31px; line-height: 31px; margin-bottom: 0px; margin-left: -50px; margin-right: 20px; margin-top: 0px; padding: 0px; text-align: center; width: 31px;"&gt;3&lt;/div&gt;&lt;strong class="whb" style="margin: 0px; padding: 0px;"&gt;Cut off the connectors (leave a few inches of wire on the connectors so that you can use them later on for other projects)&lt;/strong&gt;.&lt;/li&gt;&lt;li style="border-bottom-color: #bfbfbf; border-bottom-style: dashed; border-bottom-width: 1px; clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 20px; padding-left: 80px; padding-right: 20px; padding-top: 20px;"&gt;&lt;div class="step_num" style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://pad1.whstatic.com/skins/WikiHow/images/header.png); background-origin: initial; background-position: -220px -80px; background-repeat: no-repeat no-repeat; clear: right; color: white; float: left; font-size: 1.45em; height: 31px; line-height: 31px; margin-bottom: 0px; margin-left: -50px; margin-right: 20px; margin-top: 0px; padding: 0px; text-align: center; width: 31px;"&gt;4&lt;/div&gt;&lt;strong class="whb" style="margin: 0px; padding: 0px;"&gt;Discharge the power supply by letting it sit unconnected for a few days&lt;/strong&gt;. Some people suggest attaching a 10 ohm resistor between a black and red wire (from the power cables on the output side), however this is only guaranteed to drain the low voltage capacitors on the output - which aren't dangerous to begin with! It could leave the high-voltage capacitors charged, resulting in a potentially dangerous - or even lethal - situation.&lt;/li&gt;&lt;li style="border-bottom-color: #bfbfbf; border-bottom-style: dashed; border-bottom-width: 1px; clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 20px; padding-left: 80px; padding-right: 20px; padding-top: 20px;"&gt;&lt;div class="step_num" style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://pad1.whstatic.com/skins/WikiHow/images/header.png); background-origin: initial; background-position: -220px -80px; background-repeat: no-repeat no-repeat; clear: right; color: white; float: left; font-size: 1.45em; height: 31px; line-height: 31px; margin-bottom: 0px; margin-left: -50px; margin-right: 20px; margin-top: 0px; padding: 0px; text-align: center; width: 31px;"&gt;5&lt;/div&gt;&lt;div class="mwimg" style="margin: 0px; padding: 0px;"&gt;&lt;div class="rounders" style="height: 353px; margin-bottom: 0.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding: 0px; position: relative; width: 420px;"&gt;&lt;a class="image" href="http://www.wikihow.com/Image:ATX-to-Lab-PSU-2.JPG" style="color: #336633; margin: 0px; padding: 0px; text-decoration: none;" title="Parts for the PSU conversion"&gt;&lt;img alt="Parts for the PSU conversion" border="0" class="mwimage101" height="353" src="http://pad2.whstatic.com/images/9/9d/ATX-to-Lab-PSU-2.JPG" style="border: 0px initial initial; margin: 0px; padding: 0px;" width="420" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;br style="margin: 0px; padding: 0px;" /&gt;&lt;br style="margin: 0px; padding: 0px;" /&gt;&lt;strong class="whb" style="margin: 0px; padding: 0px;"&gt;Gather the parts you need&lt;/strong&gt;: binding posts (terminals), a LED with a current-limiting resistor, a switch (optional), a power resistor (10 ohm, 10W or greater wattage, see Tips), and heat shrink tubing.&lt;/li&gt;&lt;li style="border-bottom-color: #bfbfbf; border-bottom-style: dashed; border-bottom-width: 1px; clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 20px; padding-left: 80px; padding-right: 20px; padding-top: 20px;"&gt;&lt;div class="step_num" style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://pad1.whstatic.com/skins/WikiHow/images/header.png); background-origin: initial; background-position: -220px -80px; background-repeat: no-repeat no-repeat; clear: right; color: white; float: left; font-size: 1.45em; height: 31px; line-height: 31px; margin-bottom: 0px; margin-left: -50px; margin-right: 20px; margin-top: 0px; padding: 0px; text-align: center; width: 31px;"&gt;6&lt;/div&gt;&lt;strong class="whb" style="margin: 0px; padding: 0px;"&gt;Open up the power supply unit by removing the screws connecting the top and the bottom of the PSU case&lt;/strong&gt;.&lt;/li&gt;&lt;li style="border-bottom-color: #bfbfbf; border-bottom-style: dashed; border-bottom-width: 1px; clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 20px; padding-left: 80px; padding-right: 20px; padding-top: 20px;"&gt;&lt;div class="step_num" style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://pad1.whstatic.com/skins/WikiHow/images/header.png); background-origin: initial; background-position: -220px -80px; background-repeat: no-repeat no-repeat; clear: right; color: white; float: left; font-size: 1.45em; height: 31px; line-height: 31px; margin-bottom: 0px; margin-left: -50px; margin-right: 20px; margin-top: 0px; padding: 0px; text-align: center; width: 31px;"&gt;7&lt;/div&gt;&lt;strong class="whb" style="margin: 0px; padding: 0px;"&gt;Bundle wires of the same colors together&lt;/strong&gt;. If you have wires not listed here (brown, etc), see the Tips.&lt;br style="margin: 0px; padding: 0px;" /&gt;&lt;br style="margin: 0px; padding: 0px;" /&gt;&lt;div class="mwimg" style="margin: 0px; padding: 0px;"&gt;&lt;div class="rounders" style="height: 372px; margin-bottom: 0.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding: 0px; position: relative; width: 420px;"&gt;&lt;a class="image" href="http://www.wikihow.com/Image:ATX-to-Lab-PSU-3.JPG" style="color: #336633; margin: 0px; padding: 0px; text-decoration: none;" title="bundle the wires"&gt;&lt;img alt="bundle the wires" border="0" class="mwimage101" height="372" src="http://pad1.whstatic.com/images/6/6d/ATX-to-Lab-PSU-3.JPG" style="border: 0px initial initial; margin: 0px; padding: 0px;" width="420" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;br style="margin: 0px; padding: 0px;" /&gt;&lt;br style="margin: 0px; padding: 0px;" /&gt;The color code for the wires is: Red = +5V, Black = Ground (0V), White = -5V, Yellow = +12V, Blue = -12V, Orange = +3.3V, Purple = +5V Standby (not used), Gray = power is on (output), and Green = Turn DC on (input).&lt;/li&gt;&lt;li style="border-bottom-color: #bfbfbf; border-bottom-style: dashed; border-bottom-width: 1px; clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 20px; padding-left: 80px; padding-right: 20px; padding-top: 20px;"&gt;&lt;div class="step_num" style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://pad1.whstatic.com/skins/WikiHow/images/header.png); background-origin: initial; background-position: -220px -80px; background-repeat: no-repeat no-repeat; clear: right; color: white; float: left; font-size: 1.45em; height: 31px; line-height: 31px; margin-bottom: 0px; margin-left: -50px; margin-right: 20px; margin-top: 0px; padding: 0px; text-align: center; width: 31px;"&gt;8&lt;/div&gt;&lt;div class="mwimg" style="margin: 0px; padding: 0px;"&gt;&lt;div class="rounders" style="height: 327px; margin-bottom: 0.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding: 0px; position: relative; width: 420px;"&gt;&lt;a class="image" href="http://www.wikihow.com/Image:ATX-to-Lab-PSU-4.JPG" style="color: #336633; margin: 0px; padding: 0px; text-decoration: none;" title="holes for binding posts"&gt;&lt;img alt="holes for binding posts" border="0" class="mwimage101" height="327" src="http://pad3.whstatic.com/images/e/eb/ATX-to-Lab-PSU-4.JPG" style="border: 0px initial initial; margin: 0px; padding: 0px;" width="420" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;br style="margin: 0px; padding: 0px;" /&gt;&lt;br style="margin: 0px; padding: 0px;" /&gt;&lt;strong class="whb" style="margin: 0px; padding: 0px;"&gt;Drill holes in a free area of the power supply case by marking the center of the holes with a nail and a tap from the hammer&lt;/strong&gt;. Use a Dremel to drill the starting holes followed by a hand reamer to enlarge the holes until they are the right size by test fitting the binding posts. Also, drill holes for the power ON LED and a Power switch (optional).&lt;/li&gt;&lt;li style="border-bottom-color: #bfbfbf; border-bottom-style: dashed; border-bottom-width: 1px; clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 20px; padding-left: 80px; padding-right: 20px; padding-top: 20px;"&gt;&lt;div class="step_num" style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://pad1.whstatic.com/skins/WikiHow/images/header.png); background-origin: initial; background-position: -220px -80px; background-repeat: no-repeat no-repeat; clear: right; color: white; float: left; font-size: 1.45em; height: 31px; line-height: 31px; margin-bottom: 0px; margin-left: -50px; margin-right: 20px; margin-top: 0px; padding: 0px; text-align: center; width: 31px;"&gt;9&lt;/div&gt;&lt;div class="mwimg" style="margin: 0px; padding: 0px;"&gt;&lt;div class="rounders" style="height: 269px; margin-bottom: 0.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding: 0px; position: relative; width: 494px;"&gt;&lt;a class="image" href="http://www.wikihow.com/Image:ATX-to-Lab-PSU-5.JPG" style="color: #336633; margin: 0px; padding: 0px; text-decoration: none;" title="attached binding posts"&gt;&lt;img alt="attached binding posts" border="0" class="mwimage101" height="269" src="http://pad3.whstatic.com/images/7/79/ATX-to-Lab-PSU-5.JPG" style="border: 0px initial initial; margin: 0px; padding: 0px;" width="494" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;br style="margin: 0px; padding: 0px;" /&gt;&lt;br style="margin: 0px; padding: 0px;" /&gt;&lt;strong class="whb" style="margin: 0px; padding: 0px;"&gt;Screw the binding posts into their corresponding holes and attach the nut on the back&lt;/strong&gt;.&lt;/li&gt;&lt;li style="border-bottom-color: #bfbfbf; border-bottom-style: dashed; border-bottom-width: 1px; clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 20px; padding-left: 80px; padding-right: 20px; padding-top: 20px;"&gt;&lt;div class="step_num" style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://pad1.whstatic.com/skins/WikiHow/images/header.png); background-origin: initial; background-position: -220px -80px; background-repeat: no-repeat no-repeat; clear: right; color: white; float: left; font-size: 1.45em; height: 31px; line-height: 31px; margin-bottom: 0px; margin-left: -50px; margin-right: 20px; margin-top: 0px; padding: 0px; text-align: center; width: 31px;"&gt;10&lt;/div&gt;&lt;strong class="whb" style="margin: 0px; padding: 0px;"&gt;Connect all the pieces together&lt;/strong&gt;.&lt;ul style="clear: both; list-style-image: url(data; list-style-position: outside; list-style-type: none; margin: 0px; padding-bottom: 0px; padding-left: 23px; padding-right: 0px; padding-top: 0px;"&gt;&lt;li style="border: 0px none initial; clear: none; line-height: 1.2em; margin: 0px; padding: 6px;"&gt;Connect one of the red wires to the power resistor, all the remaining red wires to the red binding posts;&lt;/li&gt;&lt;li style="border: 0px none initial; clear: none; line-height: 1.2em; margin: 0px; padding: 6px;"&gt;Connect one of the black wires to the other end of the power resistor, one black wire to a resistor (330 ohm) attached to the cathode (shorter lead) of the LED, one black wire to the DC-On switch, all the remaining black wires to the black binding post;&lt;/li&gt;&lt;li style="border: 0px none initial; clear: none; line-height: 1.2em; margin: 0px; padding: 6px;"&gt;Connect the white to the -5V binding post, yellow to the +12V binding post, the blue to the -12V binding post, the gray to the anode (longer lead) of the LED;&lt;/li&gt;&lt;li style="border: 0px none initial; clear: none; line-height: 1.2em; margin: 0px; padding: 6px;"&gt;&lt;div class="mwimg" style="margin: 0px; padding: 0px;"&gt;&lt;div class="rounders" style="height: 465px; margin-bottom: 0.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding: 0px; position: relative; width: 620px;"&gt;&lt;a class="image" href="http://www.wikihow.com/Image:ATX-to-Lab-PSU-6.JPG" style="color: #336633; margin: 0px; padding: 0px; text-decoration: none;" title="wiring diagram for the PSU"&gt;&lt;img alt="wiring diagram for the PSU" border="0" class="mwimage101" height="465" src="http://pad3.whstatic.com/images/c/c7/ATX-to-Lab-PSU-6.JPG" style="border: 0px initial initial; margin: 0px; padding: 0px;" width="620" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;br style="margin: 0px; padding: 0px;" /&gt;&lt;br style="margin: 0px; padding: 0px;" /&gt;Note that some power supplies may have either a gray or brown wire to represent "power good"/"power ok". (Most pSU's have a smaller orange wire that is used for sensing-- 3.3V- and this wire is usually paired at the connector to another orange wire. Make sure this wire is connected to the other orange wires, otherwise your lab power supply won't stay on.) This wire should be connected to either an orange wire (+3.3V) or a red wire (+5V) for the power supply to function. When in doubt, try the lower voltage first (+3.3V). If a power supply is non ATX or AT compliant, it may have its own color scheme. If yours looks different that the pictures shown here, make sure you reference the position of the wires attached to the AT/ATX connector rather than the colors.&lt;/li&gt;&lt;li style="border: 0px none initial; clear: none; line-height: 1.2em; margin: 0px; padding: 6px;"&gt;Connect the green wire to the other terminal on the switch.&lt;/li&gt;&lt;li style="border: 0px none initial; clear: none; line-height: 1.2em; margin: 0px; padding: 6px;"&gt;Make sure that the soldered ends are insulated in heatshrink tubing.&lt;/li&gt;&lt;li style="border: 0px none initial; clear: none; line-height: 1.2em; margin: 0px; padding: 6px;"&gt;Organize the wires with a electrical tape or zip-ties.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li style="border-bottom-color: #bfbfbf; border-bottom-style: dashed; border-bottom-width: 1px; clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 20px; padding-left: 80px; padding-right: 20px; padding-top: 20px;"&gt;&lt;div class="step_num" style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://pad1.whstatic.com/skins/WikiHow/images/header.png); background-origin: initial; background-position: -220px -80px; background-repeat: no-repeat no-repeat; clear: right; color: white; float: left; font-size: 1.45em; height: 31px; line-height: 31px; margin-bottom: 0px; margin-left: -50px; margin-right: 20px; margin-top: 0px; padding: 0px; text-align: center; width: 31px;"&gt;11&lt;/div&gt;&lt;div class="mwimg" style="margin: 0px; padding: 0px;"&gt;&lt;div class="rounders" style="height: 395px; margin-bottom: 0.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding: 0px; position: relative; width: 366px;"&gt;&lt;a class="image" href="http://www.wikihow.com/Image:ATX-to-Lab-PSU-7a.jpg" style="color: #336633; margin: 0px; padding: 0px; text-decoration: none;" title="Switch and LED connections"&gt;&lt;img alt="Switch and LED connections" border="0" class="mwimage101" height="395" src="http://pad1.whstatic.com/images/8/8f/ATX-to-Lab-PSU-7a.jpg" style="border: 0px initial initial; margin: 0px; padding: 0px;" width="366" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;br style="margin: 0px; padding: 0px;" /&gt;&lt;br style="margin: 0px; padding: 0px;" /&gt;&lt;strong class="whb" style="margin: 0px; padding: 0px;"&gt;Check for loose connections by gently tugging on them&lt;/strong&gt;. Inspect for bare wire, and cover it to prevent a short circuit. Put a drop of super-glue to stick the LED to its hole. Put the cover back on.&lt;/li&gt;&lt;li class="steps_li final_li" style="border-bottom-color: #bfbfbf; border-bottom-style: dashed; border: 0px initial initial; clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 20px; padding-left: 80px; padding-right: 20px; padding-top: 20px;"&gt;&lt;div class="step_num" style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://pad1.whstatic.com/skins/WikiHow/images/header.png); background-origin: initial; background-position: -220px -80px; background-repeat: no-repeat no-repeat; clear: right; color: white; float: left; font-size: 1.45em; height: 31px; line-height: 31px; margin-bottom: 0px; margin-left: -50px; margin-right: 20px; margin-top: 0px; padding: 0px; text-align: center; width: 31px;"&gt;12&lt;/div&gt;&lt;div class="mwimg" style="margin: 0px; padding: 0px;"&gt;&lt;div class="rounders" style="height: 280px; margin-bottom: 0.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding: 0px; position: relative; width: 420px;"&gt;&lt;a class="image" href="http://www.wikihow.com/Image:ATX-to-Lab-PSU-8.JPG" style="color: #336633; margin: 0px; padding: 0px; text-decoration: none;" title="christmas lights"&gt;&lt;img alt="christmas lights" border="0" class="mwimage101" height="280" src="http://pad1.whstatic.com/images/7/7e/ATX-to-Lab-PSU-8.JPG" style="border: 0px initial initial; margin: 0px; padding: 0px;" width="420" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;br style="margin: 0px; padding: 0px;" /&gt;&lt;br style="margin: 0px; padding: 0px;" /&gt;&lt;strong class="whb" style="margin: 0px; padding: 0px;"&gt;Plug the power cord into the back and into an AC socket&lt;/strong&gt;. Flip the main switch on the PSU. Check to see if the LED light comes on. If it has not, then power up by flipping the switch you placed on the front. Plug in a 12V bulb into the different sockets to see if the PSU works, also check with a digital voltmeter. It should look good and work like a charm!&lt;div class="wh_ad" style="margin: 0px; padding: 0px;"&gt;&lt;div class="wh_ad_inner" style="margin: 0px; padding: 0px;"&gt;&lt;div class="adunit adunitp1" style="color: #414141; margin-bottom: 0px; margin-left: 1px; margin-right: 0px; margin-top: 10px; padding: 0px;"&gt;&lt;div id="adunit1" style="margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 3px;"&gt;&lt;div style="font-size: 1em; line-height: 1.2em; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div id="bodycontents" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="article_inner editable" id="tips" style="font-size: 1.1em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 23px; padding-right: 27px; padding-top: 0px;"&gt;&lt;ul style="list-style-image: url(data; list-style-position: outside; list-style-type: none; margin: 0px; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 0px;"&gt;&lt;li style="clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1em;"&gt;Options: You don't need an additional switch, just connect the green and a black wire together. The PSU will be controlled by the rear switch, if there is one. You also don't need an LED, just ignore the gray wire. Cut it short and insulate it from the rest.&lt;/li&gt;&lt;li style="clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1em;"&gt;Some newer power supplies will have "voltage sense" wires that need to be connected to the actual voltage wires for proper operation. In the main power bundle (the one with 20 wires), you should have four red wires and three orange wires. If you only have two orange wires, you should also have a brown wire which must be connected with the orange. If you only have three red wires, another wire (sometimes pink) must be connected to them.&lt;/li&gt;&lt;li style="clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1em;"&gt;Also some power supplies need the grey and green to be connected together in order to run.&lt;/li&gt;&lt;li style="clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1em;"&gt;If the power supply does not work, that is, no LED light, check to see if the fan has come on. If the fan in the power supply is on, then the LED may have been wired wrong (the positive and negative leads of the LED may have been switched). Open the power supply case and flip the purple or gray wires on the LED around (make sure that you do not bypass the LED resistor).&lt;/li&gt;&lt;li style="clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1em;"&gt;If you are not sure of the power supply, test it in the computer before you harvest. Does the computer power on? Does the PSU fan come on? You can place your voltmeter leads into an extra plug (for disk drives). It should read close to 5V (between red and black wires). A supply that you have pulled may look dead because it does not have a load on its outputs and the enable output may not be grounded (green wire).&lt;/li&gt;&lt;li style="clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1em;"&gt;ATX power supplies are switched-mode power supplies (info at&lt;a class="external free" href="http://en.wikipedia.org/wiki/Switched_mode_power_supply" rel="nofollow" style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://pad1.whstatic.com/skins/common/images/external.png); background-origin: initial; background-position: 100% 50%; background-repeat: no-repeat no-repeat; color: #336633; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 13px; padding-top: 0px; text-decoration: none;" title="http://en.wikipedia.org/wiki/Switched_mode_power_supply"&gt;http://en.wikipedia.org/wiki/Switched_mode_power_supply&lt;/a&gt;); they must always have some load to operate properly. The power resistor is there to "waste" energy, which will give off heat; therefore it should be mounted on the metal wall for proper cooling (you can also pick up a heatsink to mount on your resistor, just make sure the heatsink doesn't short anything out). If you will always have something connected to the supply when it is on, you may leave out the power resistor. You can also consider using a lighted 12v switch, which will act as the load necessary to turn on the power supply.&lt;/li&gt;&lt;li style="clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1em;"&gt;Feel free to add some pizazz to the dull gray box.&lt;/li&gt;&lt;li style="clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1em;"&gt;You can also convert this to a variable power supply - but that is another article (hint: Uses a 317 IC with power transistor).&lt;/li&gt;&lt;li style="clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1em;"&gt;The voltages that can be output by this unit are 24v (+12, -12), 17v (+5, -12), 12v (+12, 0), 10v (+5, -5), 7v (+12, +5), 5v (+5, 0) which should be sufficient for most electrical testing. Many ATX power supplies with a 24-pin connector for motherboards will not supply the -5V lead. Look for ATX power supplies with a 20-pin connector, a 20+4-pin connector, or an AT power supply if you need -5V.&lt;/li&gt;&lt;li style="clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1em;"&gt;If you DO have a sense wire for the 3.3v. , connecting the the 3.3 v. part of the supply, using the 3.3v. voltage as a buck voltage against, say the 12v. to get 8.7v. will not work. You will see 8.7 v. with a volt meter but when you load that 8.7v. circuit the power supply may go into protective mode and shut the whole supply down.&lt;/li&gt;&lt;li style="clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1em;"&gt;You can add a 3.3 volt output (such as to power 3V battery-powered devices) to the supply by hooking the orange wires to a post (making sure the brown wire remains connected to an orange wire) but beware that they share the same power output as the 5 volt, and thus you must not exceed the total power output of these two outputs.&lt;/li&gt;&lt;li style="clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1em;"&gt;To get more room you can mount the fan on the outside of the PSU case&lt;/li&gt;&lt;li style="clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1em;"&gt;If you don't feel like soldering nine wires together to a binding post (as is the case with the ground wires) you can snip them at the PCB. 1-3 wires should be fine. This includes cutting any wires that you don't ever plan on using.&lt;/li&gt;&lt;li style="clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1em;"&gt;The +5VSB line is +5V standby (so the motherboard's power buttons, Wake on LAN, etc. work). This typically provides 500-1000 mA of current, even when the main DC outputs are "off". It might be useful to drive an LED from this as an indication that the mains are on.&lt;/li&gt;&lt;li style="clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1em;"&gt;The -5v rail was removed from the ATX specification and does not exist on all ATX power supplies.&lt;/li&gt;&lt;li style="clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1em;"&gt;The fan on a PS can be quite loud, its designed to cool a relatively heavily loaded PS as well as the computer. The is the possibility of just clipping the fan but is not a good idea. A work around is to cut the red wire going to the fan (12V) and connect it to a red wire going out of the PS (5V). Your fan will now be spinning significantly slower and thus quieter, but still provide some cooling. If you plan to draw a lot of current from the PS this might be a bad idea, be your own judge and see how hot the thing gets.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class="wh_ad" style="font-size: 1.1em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;div class="wh_ad_inner" style="margin: 0px; padding: 0px;"&gt;&lt;div class="adunit adunitp2" style="margin-bottom: 0px; margin-left: 35px; margin-right: 0px; margin-top: -34px; padding: 0px;"&gt;&lt;div id="adunit2" style="margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 3px;"&gt;&lt;div style="font-size: 1em; line-height: 1.2em; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="ad1" style="color: #414141; margin-bottom: 12px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding: 0px;"&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;h2 style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://pad2.whstatic.com/skins/WikiHow/images/module_caps.png); background-origin: initial; background-position: 0px -92px; background-repeat: no-repeat no-repeat; clear: both; color: #4a3c31; font-size: 1.45em; height: 53px; line-height: 42px; margin-bottom: 10px; margin-left: -20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 40px; padding-right: 0px; padding-top: 0px; position: relative; width: 647px;"&gt;&lt;a class="button button52 editsection" href="http://www.wikihow.com/index.php?title=Convert-a-Computer-ATX-Power-Supply-to-a-Lab-Power-Supply&amp;amp;action=edit&amp;amp;section=4" id="gatEditSection" style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://pad1.whstatic.com/skins/WikiHow/images/button_blue.png); background-origin: initial; background-position: -140px 0%; background-repeat: no-repeat no-repeat; color: white; display: block; float: right; font-size: 0.65em; font-weight: bold; height: 26px; letter-spacing: 0.01em; line-height: 25px; margin-bottom: 0px; margin-left: 0px; margin-right: 13px; margin-top: 8px; overflow-x: hidden; overflow-y: hidden; padding: 0px; text-align: center; text-decoration: none; width: 52px;" title="Edit section: Warnings"&gt;edit&lt;/a&gt;&lt;span style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Warnings&lt;/span&gt;&lt;/h2&gt;&lt;div class="article_inner editable" id="warnings" style="font-size: 1.1em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 23px; padding-right: 27px; padding-top: 0px;"&gt;&lt;ul style="list-style-image: url(data; list-style-position: outside; list-style-type: none; margin: 0px; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 0px;"&gt;&lt;li style="clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1em;"&gt;Line voltage can&amp;nbsp;&lt;strong style="margin: 0px; padding: 0px;"&gt;kill&lt;/strong&gt;&amp;nbsp;(anything above 30 milliamps/volts can kill you in a matter of time if it somehow penetrates your skin), and at the very least give you a painful shock. Make sure that you have removed the power cord before doing the conversion and have discharged the capacitors as described in the steps above. If in doubt,&amp;nbsp;&lt;a href="http://www.wikihow.com/Use-a-Multimeter" style="color: #336633; margin: 0px; padding: 0px; text-decoration: none;" title="Use a Multimeter"&gt;use a multimeter&lt;/a&gt;.&lt;/li&gt;&lt;li style="clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1em;"&gt;If you suspect the power supply is damaged,&amp;nbsp;&lt;strong style="margin: 0px; padding: 0px;"&gt;do not&lt;/strong&gt;&amp;nbsp;use it! If it is damaged, the protection circuitry may not work. Normally, a protection circuit will slowly discharge the high voltage capacitors - but if the supply was connected to 240V while set at 120V (for example), the protection circuits have probably been destroyed. If so, the power supply might not shut down when it is overloaded or when it begins to fail.&lt;/li&gt;&lt;li style="clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1em;"&gt;Do not touch any lines leading to capacitors. Capacitors are cylinders, wrapped in a thin plastic sheath, with exposed metal at the top with a + or K usually. Solid-state capacitors are shorter, a little wider in diameter, and do not have a plastic sheath. They retain a charge much like batteries do, but unlike batteries, they can discharge extremely fast. Even if you have discharged the unit, you should avoid touching any points on the board except where necessary. Use a probe to connect anything you might touch to ground before beginning any work.&lt;/li&gt;&lt;li style="clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1em;"&gt;Do not remove the circuit board unless you must. The traces and solder on the underside could still have high voltage on them if you didn't let the PSU sit long enough. If you must remove it, use a meter to check for voltage on the pins of the largest capacitors. When you replace the board, make sure that the plastic sheet goes back under the board.&lt;/li&gt;&lt;li style="clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1em;"&gt;When drilling the metal case, make sure no metal filings get inside the PSU. These could cause shorts, which in turn could cause a fire, extreme heat or dangerous electrical spikes on one of your outputs which will break your new lab power supply which you worked so hard on.&lt;/li&gt;&lt;li style="clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1em;"&gt;A computer power supply is fine for testing purposes, or for running simple electronics (eg battery chargers, soldering irons) but will never produce power like a good lab power supply, so if you intend on using your power supply for more than just testing, buy yourself a good lab supply. There is a reason they cost so much.&lt;/li&gt;&lt;li style="clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1em;"&gt;It is strongly recommended that you discharge the capacitors. Plug in the power supply, turn on the power (short the Power (green) wire to ground, then unplug the power supply until the fan stops spinning.&lt;/li&gt;&lt;li style="clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1em;"&gt;This will almost certainly void any warranty.&lt;/li&gt;&lt;li style="clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1em;"&gt;The resulting power supply will provide high output power. It might happen you create an electric arc at the low voltage outputs or fry the circuit you are working on, if you make any mistake. Lab PSUs have adjustable current limitation for a reason.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;h2 style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://pad2.whstatic.com/skins/WikiHow/images/module_caps.png); background-origin: initial; background-position: 0px -92px; background-repeat: no-repeat no-repeat; clear: both; color: #4a3c31; font-size: 1.45em; height: 53px; line-height: 42px; margin-bottom: 10px; margin-left: -20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 40px; padding-right: 0px; padding-top: 0px; position: relative; width: 647px;"&gt;&lt;a class="button button52 editsection" href="http://www.wikihow.com/index.php?title=Convert-a-Computer-ATX-Power-Supply-to-a-Lab-Power-Supply&amp;amp;action=edit&amp;amp;section=5" id="gatEditSection" style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://pad1.whstatic.com/skins/WikiHow/images/button_blue.png); background-origin: initial; background-position: -140px 0%; background-repeat: no-repeat no-repeat; color: white; display: block; float: right; font-size: 0.65em; font-weight: bold; height: 26px; letter-spacing: 0.01em; line-height: 25px; margin-bottom: 0px; margin-left: 0px; margin-right: 13px; margin-top: 8px; overflow-x: hidden; overflow-y: hidden; padding: 0px; text-align: center; text-decoration: none; width: 52px;" title="Edit section: Things You'll Need"&gt;edit&lt;/a&gt;&lt;span style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Things You'll Need&lt;/span&gt;&lt;/h2&gt;&lt;div class="article_inner editable" id="thingsyoullneed" style="font-size: 1.1em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 23px; padding-right: 27px; padding-top: 0px;"&gt;&lt;ul style="list-style-image: url(data; list-style-position: outside; list-style-type: none; margin: 0px; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 0px;"&gt;&lt;li style="clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 4px;"&gt;An ATX power supply of any rating above 150 Watt (can be found from an obsolete computer)&lt;/li&gt;&lt;li style="clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 4px;"&gt;Wire cutters&lt;/li&gt;&lt;li style="clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 4px;"&gt;Needle nose pliers&lt;/li&gt;&lt;li style="clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 4px;"&gt;Drill&lt;/li&gt;&lt;li style="clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 4px;"&gt;Reamer&lt;/li&gt;&lt;li style="clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 4px;"&gt;Soldering Iron &amp;amp; Solder&lt;/li&gt;&lt;li style="clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 4px;"&gt;Electrical Tape&lt;/li&gt;&lt;li style="clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 4px;"&gt;Heat Shrink Tubing &amp;amp; Heat Gun&lt;/li&gt;&lt;li style="clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 4px;"&gt;Binding posts&lt;/li&gt;&lt;li style="clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 4px;"&gt;LED&lt;/li&gt;&lt;li style="clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 4px;"&gt;Current limiting resistor for the LED (330 ohms)&lt;/li&gt;&lt;li style="clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 4px;"&gt;Power resistor to load the power supply&lt;/li&gt;&lt;li style="clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 4px;"&gt;Low Wattage Switch&lt;/li&gt;&lt;li style="clear: both; line-height: 1.2em; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 4px;"&gt;Computer Power Cord&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6599454894873414377-5451704658901074123?l=atomicarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atomicarm.blogspot.com/feeds/5451704658901074123/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atomicarm.blogspot.com/2011/04/how-to-convert-computer-atx-power.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/5451704658901074123'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/5451704658901074123'/><link rel='alternate' type='text/html' href='http://atomicarm.blogspot.com/2011/04/how-to-convert-computer-atx-power.html' title='How to Convert a Computer ATX Power Supply to a Lab Power Supply'/><author><name>Mike Hewitt</name><uri>http://www.blogger.com/profile/05181139924811433955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6599454894873414377.post-7558137558246061969</id><published>2011-03-07T23:28:00.001-08:00</published><updated>2011-03-08T12:31:24.764-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Emulators'/><title type='text'>Free ARM Emulators / Software ARM Device Emulators</title><content type='html'>&lt;p&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; line-height: 18px;"&gt;&lt;h1 style="font-size: 1.5em; line-height: 1.2em;"&gt;Free ARM Emulators&lt;/h1&gt;&lt;p&gt;ARM microprocessors are used in embedded devices as well as portable devices like PDAs and some phones. The software ARM emulators listed on this page allow you to run an emulated ARM device on your main computer system, be it&amp;nbsp;&lt;a style="color: blue; background-color: transparent;" href="http://www.thefreecountry.com/operating-systems/windows-clones.shtml" target="_top"&gt;Windows&lt;/a&gt;,&amp;nbsp;&lt;a style="color: blue; background-color: transparent;" href="http://www.thefreecountry.com/operating-systems/linux-distributions.shtml" target="_top"&gt;Linux&lt;/a&gt;&amp;nbsp;or some other&amp;nbsp;&lt;a style="color: blue; background-color: transparent;" href="http://www.thefreecountry.com/operating-systems/index.shtml" target="_top"&gt;operating system&lt;/a&gt;. This allows you to develop and test software using your desktop, and only move the software to a real device when it is more complete.&lt;/p&gt;&lt;h2 style="font-size: 1.3em; line-height: 1.2em;"&gt;Related Pages&lt;/h2&gt;&lt;ul class="listoflinks" style="margin-left: 0px; padding-left: 1.1em; list-style-type: disc;"&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px;"&gt;&lt;a style="color: blue; background-color: transparent;" href="http://www.thefreecountry.com/compilers/cpp-microcontrollers-pda.shtml" target="_top"&gt;Free C/C++ Compilers and Cross-Compilers for Microcontrollers, PDA, Calculators, Embedded Systems and Other Devices&lt;/a&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px;"&gt;&lt;a style="color: blue; background-color: transparent;" href="http://www.thefreecountry.com/emulators/pc.shtml" target="_top"&gt;Free x86 / PC Emulators and Virtual Machines&lt;/a&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px;"&gt;&lt;a style="color: blue; background-color: transparent;" href="http://www.thefreecountry.com/emulators/macintosh.shtml" target="_top"&gt;Free 68k and PowerPC Macintosh Emulators&lt;/a&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px;"&gt;&lt;a style="color: blue; background-color: transparent;" href="http://www.thefreecountry.com/emulators/amiga.shtml" target="_top"&gt;Free Amiga Emulators&lt;/a&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px;"&gt;&lt;a style="color: blue; background-color: transparent;" href="http://www.thefreecountry.com/emulators/apple-2.shtml" target="_top"&gt;Free Apple II Emulators&lt;/a&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px;"&gt;&lt;a style="color: blue; background-color: transparent;" href="http://www.thefreecountry.com/programming/3d-software-box-shot-makers.shtml" target="_top"&gt;Free 3D Software Box Image Makers&lt;/a&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px;"&gt;&lt;a style="color: blue; background-color: transparent;" href="http://www.thefreecountry.com/programming/disassemblers.shtml" target="_top"&gt;Free Disassemblers, Decompilers, Binary / Hex Editors and Viewers&lt;/a&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px;"&gt;&lt;a style="color: blue; background-color: transparent;" href="http://www.thefreecountry.com/utilities/dvdcdemulators.shtml" target="_top"&gt;Free DVD/CD Emulators, Free Virtual CD/DVD Drives&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 style="font-size: 1.3em; line-height: 1.2em;"&gt;Disclaimer&lt;/h2&gt;&lt;p&gt;The information provided on this page comes without any warranty whatsoever. Use it at your own risk. Just because a program, book, document or service is listed here or has a good review does not mean that I endorse or approve of the program or of any of its contents. All the other standard disclaimers also apply.&lt;/p&gt;&lt;h2 style="font-size: 1.3em; line-height: 1.2em;"&gt;Free ARM Emulators / Software ARM Device Emulators&lt;/h2&gt;&lt;dl&gt;&lt;dt&gt;&lt;a style="color: blue; background-color: transparent;" href="http://www.skyeye.org/"&gt;SkyEye&lt;/a&gt;&lt;/dt&gt;&lt;dd&gt;&lt;p&gt;SkyEye simulates embedded computer systems that run on the ARM microprocessors and the Blackfin DSP Processor, specifically, the ARM7TDMI, ARM720T, StrongARM, XScale, and the Blackfin CPU cores. Application CPUs simulated include the Atmel AT91X40/AT91RM9200, Cirrus Logic EP7312/EP9312 CS89712, Intel SA1100/SA1110 and PXA 25x/27x, Samsung 4510B/44B0/2410/2440, the Sharp LH7xxxx, NS9750, and the Philips LPC22xx, BF533. The emulator is also able to simulate chips like the timer, UART, NIC, LCD, touchscreen, and so on. Operating systems to run in SkyEye include uC/OS-II 2.x (ucos-ii), uClinux, ARM Linux, Nucleus, Rtems, Ecos, IwiP on uC/OSII, etc. The emulator works on Linux, Windows (with the help of Cygwin) and&lt;a style="color: blue; background-color: transparent;" href="http://www.thefreecountry.com/operating-systems/bsd-based.shtml" target="_top"&gt;FreeBSD&lt;/a&gt;. The program is licensed under the GNU General Public License, that is, it is open source and is distributed in source form.&lt;/p&gt;&lt;/dd&gt;&lt;dt&gt;&lt;a style="color: blue; background-color: transparent;" href="http://code.google.com/p/armware/"&gt;ARMware&lt;/a&gt;&lt;/dt&gt;&lt;dd&gt;&lt;p&gt;ARMware provies an emulation environment for the ARM platform. At the time this review was written, it is able to emulate StrongARM SA-110, although Intel Xscale support is currently being developed as well. The emulated environment is similar to that of the HP iPaq H3600. The emulator works on&amp;nbsp;&lt;a style="color: blue; background-color: transparent;" href="http://www.thefreecountry.com/operating-systems/linux-distributions.shtml" target="_top"&gt;Linux&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a style="color: blue; background-color: transparent;" href="http://www.thefreecountry.com/operating-systems/windows-clones.shtml" target="_top"&gt;Windows&lt;/a&gt;. The project is licensed under the GNU General Public License.&lt;/p&gt;&lt;/dd&gt;&lt;dt&gt;&lt;a style="color: blue; background-color: transparent;" href="http://www.microsoft.com/downloads/details.aspx?familyid=A6F6ADAF-12E3-4B2F-A394-356E2C2FB114&amp;amp;displaylang=en"&gt;Microsoft Device Emulator 3.0 (Standalone Release)&lt;/a&gt;&lt;/dt&gt;&lt;dd&gt;&lt;p&gt;The Microsoft Device Emulator standalone release emulates ARM-based devices, primarily so that you can develop and test your programs for portable devices in your Windows system. Also available are&amp;nbsp;&lt;a style="color: blue; background-color: transparent;" href="http://www.microsoft.com/downloads/details.aspx?familyid=3D6F581E-C093-4B15-AB0C-A2CE5BFFDB47&amp;amp;displaylang=en"&gt;Windows Mobile 6.1 emulator images&lt;/a&gt;&amp;nbsp;(both Windows Mobile 6.1 Professional and Windows Mobile 6.1 Standard) and&amp;nbsp;&lt;a style="color: blue; background-color: transparent;" href="http://www.microsoft.com/downloads/details.aspx?familyid=38C46AA8-1DD7-426F-A913-4F370A65A582&amp;amp;displaylang=en"&gt;Windows Mobile 6 localized emulator images&lt;/a&gt;&amp;nbsp;(again both Professional and Standard). If you want older Windows Mobile versions, you may want to check out the earlier version&amp;nbsp;&lt;a style="color: blue; background-color: transparent;" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=c62d54a5-183a-4a1e-a7e2-cc500ed1f19a&amp;amp;displaylang=en"&gt;Microsoft Device Emulator 1.0&lt;/a&gt;, which comes with Windows Mobile 5. The emulators are primarily designed for development with&amp;nbsp;&lt;a style="color: blue; background-color: transparent;" rel="nofollow" href="http://www.amazon.com/exec/obidos/ASIN/B000WM04HU/christopherheng"&gt;Microsoft Visual Studio&lt;/a&gt;&amp;nbsp;(see the&amp;nbsp;&lt;a style="color: blue; background-color: transparent;" href="http://www.thefreecountry.com/compilers/cpp.shtml" target="_top"&gt;Free C/C++ Compilers and Interpreters&lt;/a&gt;&amp;nbsp;page), so I'm not sure if it's usable with any other compiler.&lt;/p&gt;&lt;/dd&gt;&lt;dt&gt;&lt;a style="color: blue; background-color: transparent;" href="http://softgun.sourceforge.net/"&gt;Softgun - the Software ARM&lt;/a&gt;&lt;/dt&gt;&lt;dd&gt;&lt;p&gt;This software ARM runs Linux blob and u-boot for NS9750 Freescale i.MX21 and Atmel AT91RM9200. It emulates an ARM-9 with MMU (Memory Management Unit) and a variety of Netsilicon NS9750 peripherals, Flash, PCI, CAN-Bus and network (information obtained from the Sourceforge summary). The detailed list can be found on the site itself. The emulator runs on Linux and probably other POSIX systems as well.&lt;/p&gt;&lt;/dd&gt;&lt;dt&gt;&lt;a style="color: blue; background-color: transparent;" href="http://www.h7.dion.ne.jp/~qemu-win/"&gt;QEMU on Windows&lt;/a&gt;&lt;/dt&gt;&lt;dd&gt;&lt;p&gt;QEMU on Windows is an emulator for x86, ARM, SPARC and PowerPC (see elsewhere on&amp;nbsp;&lt;a style="color: blue; background-color: transparent;" href="http://www.thefreecountry.com/emulators/arm.shtml" target="_top"&gt;this page&lt;/a&gt;&amp;nbsp;for more information). This site contains a Windows port with downloadable binaries.&lt;/p&gt;&lt;/dd&gt;&lt;dt&gt;&lt;a style="color: blue; background-color: transparent;" href="http://fabrice.bellard.free.fr/qemu/"&gt;QEMU CPU Emulator&lt;/a&gt;&lt;/dt&gt;&lt;dd&gt;&lt;p&gt;QEMU supports the emulation of x86 processors, ARM, SPARC and PowerPC. Host CPUs (processors that can run the QEMU emulator) include x86, PowerPC, Alpha, Sparc32, ARM, S390, Sparc64, ia64, and m68k (some of these are still in development). When emulating a PC (x86), supported guest operating systems include MSDOS, FreeDOS, Windows 3.11, Windows 98SE, Windows 2000, Linux, SkyOS, ReactOS, NetBSD, Minix, etc. When emulating a PowerPC, currently tested guest OSes include Debian Linux.&lt;/p&gt;&lt;/dd&gt;&lt;/dl&gt;&lt;p style="padding-left: 8px;"&gt;&lt;ins style="display: inline-table; height: 280px; position: relative; visibility: visible; width: 336px; padding: 0px; margin: 0px; border: initial none initial;"&gt;&lt;/ins&gt;&lt;/p&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6599454894873414377-7558137558246061969?l=atomicarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atomicarm.blogspot.com/feeds/7558137558246061969/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atomicarm.blogspot.com/2011/03/free-arm-emulators-software-arm-device.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/7558137558246061969'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/7558137558246061969'/><link rel='alternate' type='text/html' href='http://atomicarm.blogspot.com/2011/03/free-arm-emulators-software-arm-device.html' title='Free ARM Emulators / Software ARM Device Emulators'/><author><name>Mike Hewitt</name><uri>http://www.blogger.com/profile/05181139924811433955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6599454894873414377.post-8217047824655740451</id><published>2010-08-29T14:31:00.000-07:00</published><updated>2010-08-29T07:57:45.846-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tutorials'/><title type='text'>ARM Programming tutorials</title><content type='html'>&lt;p&gt;&lt;/p&gt;When trying to get started with Single board computers (SBC), System on module (SOM) and system on Chip (SOC), I found it difficult to track down good resources or tutorials.&lt;br /&gt;&lt;br /&gt;Sites like this:- www.armtutorial.com/index.html seemed to hi-jack the search for arm tutorials and present adverts when you follow the link. So when I find a good tutorial, I put it here. If you find more, let me know in the comments.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Below is the list I have so far. The most authoritative must be ARM-UK themselves, so the first link is to a large repository of PDFs at their info centre. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Tutorials from the ARM-UK info centre.&lt;br /&gt;&lt;a href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.set.appnotes/index.html"&gt;http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.set.appnotes/index.html &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;ARM-GCC Inline Assembler programming.&lt;br /&gt;&lt;a href="http://www.ethernut.de/en/documents/arm-inline-asm.html"&gt; www.ethernut.de/en/documents/arm-inline-asm.htm &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Introduction to ARM-SOC, from a London University.&lt;br /&gt;&lt;a href="http://www.ee.ic.ac.uk/pcheung/teaching/ee2_computing/"&gt; www.ee.ic.ac.uk/pcheung/teaching/ee2_computing &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Programming AT92SAM7 ARM-SOC - An Introduction&lt;br /&gt;&lt;a href="http://www.triplespark.net/elec/pdev/arm/at91sam7.html"&gt;www.triplespark.net/elec/pdev/arm/at91sam7.htm &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Old but good ARM3 assembly language programming. (PDF)&lt;br /&gt;&lt;a href="http://www.peter-cockerell.net/aalp/html/frames.html"&gt; www.peter-cockerell.net/aalp/html/frames.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.coranac.com/tonc/text/asm.htm#sec-intro"&gt; Tour of ARM assembly language&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6599454894873414377-8217047824655740451?l=atomicarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atomicarm.blogspot.com/feeds/8217047824655740451/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atomicarm.blogspot.com/2010/08/arm-tutorials.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/8217047824655740451'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/8217047824655740451'/><link rel='alternate' type='text/html' href='http://atomicarm.blogspot.com/2010/08/arm-tutorials.html' title='ARM Programming tutorials'/><author><name>Mike Hewitt</name><uri>http://www.blogger.com/profile/05181139924811433955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6599454894873414377.post-5887696072916579526</id><published>2010-08-29T07:42:00.000-07:00</published><updated>2011-12-01T13:42:07.525-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='A table of contents'/><title type='text'>Table of contents</title><content type='html'>&lt;script src="http://abu-farhan.com/script/daftarisibloggerarchive/tocbyarchivemin.js"&gt;&lt;/script&gt;&lt;br /&gt;&lt;script src="http://atomicarm.blogspot.com/feeds/posts/default?max-results=500&amp;amp;alt=json-in-script&amp;amp;callback=loadtoc"&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6599454894873414377-5887696072916579526?l=atomicarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atomicarm.blogspot.com/feeds/5887696072916579526/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atomicarm.blogspot.com/2010/08/table-of-contents.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/5887696072916579526'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/5887696072916579526'/><link rel='alternate' type='text/html' href='http://atomicarm.blogspot.com/2010/08/table-of-contents.html' title='Table of contents'/><author><name>Mike Hewitt</name><uri>http://www.blogger.com/profile/05181139924811433955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6599454894873414377.post-7457901154327609962</id><published>2010-08-24T10:26:00.001-07:00</published><updated>2011-05-16T12:27:50.815-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sbc'/><title type='text'>Single board computers</title><content type='html'>&lt;a href="http://www.linuxdevices.com/news/NS3329009141.html" rel="nofollow" target="new"&gt;&lt;br /&gt;&lt;br /&gt;  &lt;img align="left" border="0" hspace="10" src="http://www.linuxdevices.com/files/misc/ampro_coremodule430-thm.jpg" vspace="5" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;ADlink CoreModule 430&lt;/u&gt;&lt;/b&gt;&lt;/a&gt;  -- &lt;i&gt;Mar. 10, 2009&lt;/i&gt; -- ADlink's latest PC/104 SBC is based on DMP Electronics's x86-compatible Vortex86SX SoC. The "CoreModule 430" includes 256MB of RAM, four serial ports, 10/100 Ethernet, two USB ports, and support for both CRT and TFT displays.&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;/br&gt;&lt;br /&gt;&lt;br /&gt;&lt;iframe align="left" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://rcm.amazon.com/e/cm?t=atoarm-20&amp;amp;o=1&amp;amp;p=8&amp;amp;l=bpl&amp;amp;asins=B004CG4CN4&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr" style="align: left; height: 245px; padding-right: 10px; padding-top: 5px; width: 131px;"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;/br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6599454894873414377-7457901154327609962?l=atomicarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atomicarm.blogspot.com/feeds/7457901154327609962/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atomicarm.blogspot.com/2010/08/d.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/7457901154327609962'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/7457901154327609962'/><link rel='alternate' type='text/html' href='http://atomicarm.blogspot.com/2010/08/d.html' title='Single board computers'/><author><name>Mike Hewitt</name><uri>http://www.blogger.com/profile/05181139924811433955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6599454894873414377.post-4544115500517551673</id><published>2010-08-24T10:24:00.001-07:00</published><updated>2010-08-24T10:24:46.002-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sbc'/><title type='text'>Aaeon NanoCOM-U15</title><content type='html'>&lt;a href="http://www.linuxdevices.com/news/NS5617190576.html" rel="nofollow" target="new"&gt;  &lt;img align="left" border="0" hspace="10" src="http://www.linuxdevices.com/files/misc/aaeon_nanocomu15-thm.jpg" vspace="5" /&gt;&lt;b&gt;&lt;u&gt;Aaeon NanoCOM-U15&lt;/u&gt;&lt;/b&gt;&lt;/a&gt;  -- &lt;i&gt;Mar. 09, 2009&lt;/i&gt; -- Aaeon's COM exploits the newly proposed "COM Express Ultra" standard. The 84 x 55mm NanoCOM-U15 includes an SDVO (serial digital video out) connector, an Intel Atom Z5xx-series CPU, and up to 4GB of SSD (solid state disk) storage.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6599454894873414377-4544115500517551673?l=atomicarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atomicarm.blogspot.com/feeds/4544115500517551673/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atomicarm.blogspot.com/2010/08/aaeon-nanocom-u15.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/4544115500517551673'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/4544115500517551673'/><link rel='alternate' type='text/html' href='http://atomicarm.blogspot.com/2010/08/aaeon-nanocom-u15.html' title='Aaeon NanoCOM-U15'/><author><name>Mike Hewitt</name><uri>http://www.blogger.com/profile/05181139924811433955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6599454894873414377.post-7788245427685476012</id><published>2010-08-24T10:23:00.001-07:00</published><updated>2010-08-24T10:23:42.772-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sbc'/><title type='text'>Kontron pITX-SP</title><content type='html'>&lt;a href="http://www.linuxdevices.com/news/NS6827510106.html" rel="nofollow" target="new"&gt;  &lt;img align="left" border="0" hspace="10" src="http://www.linuxdevices.com/files/misc/kontron_pitxsp-thm.jpg" vspace="5" /&gt;&lt;b&gt;&lt;u&gt;Kontron pITX-SP&lt;/u&gt;&lt;/b&gt;&lt;/a&gt;  -- &lt;i&gt;Mar. 10, 2009&lt;/i&gt; -- Kontron's first pico-ITX SBC is built around a 1.1GHz or 1.6GHz Intel Atom Z5xx CPU. Targeting small, multimedia-oriented devices, the "pITX-SP" offers gigabit Ethernet, two SATA II ports, a microSD slot, and a DVI port.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6599454894873414377-7788245427685476012?l=atomicarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atomicarm.blogspot.com/feeds/7788245427685476012/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atomicarm.blogspot.com/2010/08/kontron-pitx-sp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/7788245427685476012'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/7788245427685476012'/><link rel='alternate' type='text/html' href='http://atomicarm.blogspot.com/2010/08/kontron-pitx-sp.html' title='Kontron pITX-SP'/><author><name>Mike Hewitt</name><uri>http://www.blogger.com/profile/05181139924811433955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6599454894873414377.post-1831577537897001332</id><published>2010-08-24T10:17:00.001-07:00</published><updated>2010-08-24T10:17:31.061-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sbc'/><title type='text'>ARM9 Samsung S3C2443 SoC</title><content type='html'>&lt;a href="http://www.linuxdevices.com/news/NS2806493086.html" rel="nofollow" target="new"&gt;  &lt;img align="left" border="0" hspace="10" src="http://www.linuxdevices.com/files/misc/digi_connectcore_9m2443-thm.jpg" vspace="5" /&gt;&lt;b&gt;&lt;u&gt;Digi ConnectCore 9M 2443 and ConnectCore Wi-9M 2443&lt;/u&gt;&lt;/b&gt;&lt;/a&gt;  -- &lt;i&gt;Mar. 04, 2009&lt;/i&gt; -- Based on an ARM9 Samsung S3C2443 SoC, these two network-enabled embedded modules from Digi International target networked displays, medical devices, building access controls, energy management devices, time and attendance devices, and scales. The ConnectCore 9M 2443 and WiFi-enabled ConnectCore Wi-9M 2443 offer a variety of interfaces, including Ethernet, USB, serial, and camera support.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6599454894873414377-1831577537897001332?l=atomicarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atomicarm.blogspot.com/feeds/1831577537897001332/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atomicarm.blogspot.com/2010/08/arm9-samsung-s3c2443-soc.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/1831577537897001332'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/1831577537897001332'/><link rel='alternate' type='text/html' href='http://atomicarm.blogspot.com/2010/08/arm9-samsung-s3c2443-soc.html' title='ARM9 Samsung S3C2443 SoC'/><author><name>Mike Hewitt</name><uri>http://www.blogger.com/profile/05181139924811433955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6599454894873414377.post-9099637786717865500</id><published>2010-08-24T10:16:00.000-07:00</published><updated>2010-08-24T10:16:11.961-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sbc'/><title type='text'>Calao TNY-A9G20-C0x</title><content type='html'>&lt;a href="http://www.linuxdevices.com/news/NS5098057485.html" rel="nofollow" target="new"&gt;  &lt;img align="left" border="0" hspace="10" src="http://www.linuxdevices.com/files/misc/calao_tnya9g20c0x.gif" vspace="5" /&gt;&lt;b&gt;&lt;u&gt;Calao TNY-A9G20-C0x, TNY-A9260-C0x, and TNY-A9263-C0x&lt;/u&gt;&lt;/b&gt;&lt;/a&gt;  -- &lt;i&gt;Feb. 09, 2009&lt;/i&gt; -- Calao Systems's Linux-ready "TinyCore" SBC modules are offered with Atmel's ARM9-based processors, including the 400MHz AT91SAM9G20, 200MHz AT91SAM9263, and 180MHz AT91SAM9260. The TNY-A9G20-C0x, TNY-A9260-C0x, and TNY-A9263-C0x modules each measure a scant 1.4 x 1.6 inches, and ship with 64MB of SDRAM, 256MB of flash, micro-USB connections, serial debug interface, and other I/O.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6599454894873414377-9099637786717865500?l=atomicarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atomicarm.blogspot.com/feeds/9099637786717865500/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atomicarm.blogspot.com/2010/08/calao-tny-a9g20-c0x.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/9099637786717865500'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/9099637786717865500'/><link rel='alternate' type='text/html' href='http://atomicarm.blogspot.com/2010/08/calao-tny-a9g20-c0x.html' title='Calao TNY-A9G20-C0x'/><author><name>Mike Hewitt</name><uri>http://www.blogger.com/profile/05181139924811433955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6599454894873414377.post-1267417654164698955</id><published>2010-08-24T10:13:00.001-07:00</published><updated>2010-08-24T10:13:47.065-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sbc'/><title type='text'>Armadeus APF27</title><content type='html'>&lt;a href="http://www.linuxdevices.com/news/NS7219447476.html" rel="nofollow" target="new"&gt;  &lt;img align="left" border="0" hspace="10" src="http://www.linuxdevices.com/files/misc/armadeus_apf27-thm.gif" vspace="5" /&gt;&lt;b&gt;&lt;u&gt;Armadeus APF27&lt;/u&gt;&lt;/b&gt;&lt;/a&gt;  --  &lt;i&gt;Feb. 26, 2009&lt;/i&gt; -- Armadeus Systems's low-cost system-on-module (SOM) is available with a development board and a Linux community distribution. The "APF27" processor module is built around an ARM9 Freescale i.MX27 system-on-chip (SoC) and a Xilinx Spartan3A FPGA, and offers a variety of I/O.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6599454894873414377-1267417654164698955?l=atomicarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atomicarm.blogspot.com/feeds/1267417654164698955/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atomicarm.blogspot.com/2010/08/armadeus-apf27.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/1267417654164698955'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/1267417654164698955'/><link rel='alternate' type='text/html' href='http://atomicarm.blogspot.com/2010/08/armadeus-apf27.html' title='Armadeus APF27'/><author><name>Mike Hewitt</name><uri>http://www.blogger.com/profile/05181139924811433955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6599454894873414377.post-1153973901879450759</id><published>2010-08-24T10:11:00.001-07:00</published><updated>2010-08-24T10:11:37.313-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sbc'/><title type='text'>Icop VDX-635</title><content type='html'>&lt;a href="http://www.linuxdevices.com/news/NS3017672153.html" rel="nofollow" target="new"&gt;  &lt;img align="left" border="0" hspace="10" src="http://www.linuxdevices.com/files/misc/icop_vdx6354-thm.jpg" vspace="5" /&gt;&lt;b&gt;&lt;u&gt;Icop VDX-6354&lt;/u&gt;&lt;/b&gt;&lt;/a&gt;  -- &lt;i&gt;Jan. 13, 2009&lt;/i&gt; -- Icop's PC/104 computer module is based on a 32-bit, 800MHz x86-compatible SoC that is claimed to run Linux on under two Watts. The "VDX-6354" has 256MB of RAM, 4GB of flash, 10/100 Ethernet, audio, and an onboard VGA controller.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6599454894873414377-1153973901879450759?l=atomicarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atomicarm.blogspot.com/feeds/1153973901879450759/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atomicarm.blogspot.com/2010/08/icop-vdx-635.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/1153973901879450759'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/1153973901879450759'/><link rel='alternate' type='text/html' href='http://atomicarm.blogspot.com/2010/08/icop-vdx-635.html' title='Icop VDX-635'/><author><name>Mike Hewitt</name><uri>http://www.blogger.com/profile/05181139924811433955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6599454894873414377.post-7739378141715624998</id><published>2010-08-24T10:01:00.000-07:00</published><updated>2010-08-24T10:01:27.205-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sbc'/><title type='text'>gumstix overoearth2-sm</title><content type='html'>&lt;a href="http://www.linuxdevices.com/news/NS6027032354.html" rel="nofollow" target="new"&gt;  &lt;img align="left" border="0" hspace="10" src="http://www.linuxdevices.com/files/misc/gumstix_overoearth2-sm.jpg" vspace="5" /&gt;&lt;b&gt;&lt;u&gt;Gumstix Overo Earth&lt;/u&gt;&lt;/b&gt;&lt;/a&gt;  -- &lt;i&gt;Oct. 28, 2008&lt;/i&gt; -- Gumstix's heir to the popular Verdex SBC is another open-source, gumstick-shaped SBC, but with a more powerful ARM Cortex-A8-based Texas Instruments (TI) OMAP 3503. The Linux-based Overo Earth measures 0.7 x 2.3 x 0.2 inches, 40 percent smaller than the Verdex, and offers 256MB of DDR RAM, 256MB of flash, an on-board microSD adapter, a 24-pin flex ribbon connector for camera control, and dual 70-pin AVX 5602-14 connectors for various functional options.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6599454894873414377-7739378141715624998?l=atomicarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atomicarm.blogspot.com/feeds/7739378141715624998/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atomicarm.blogspot.com/2010/08/gumstix-overoearth2-sm.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/7739378141715624998'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/7739378141715624998'/><link rel='alternate' type='text/html' href='http://atomicarm.blogspot.com/2010/08/gumstix-overoearth2-sm.html' title='gumstix overoearth2-sm'/><author><name>Mike Hewitt</name><uri>http://www.blogger.com/profile/05181139924811433955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6599454894873414377.post-4040165172846094351</id><published>2010-08-24T09:56:00.001-07:00</published><updated>2010-08-24T09:56:24.902-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sbc'/><title type='text'>ARM9-based Cirrus EP9302 SoC</title><content type='html'>&lt;a href="http://www.linuxdevices.com/news/NS9461207470.html" rel="nofollow" target="new"&gt;  &lt;img align="left" border="0" hspace="10" src="http://www.linuxdevices.com/files/misc/emac_som9307m-thm.jpg" vspace="5" /&gt;&lt;b&gt;&lt;u&gt;Emac SoM-9307M&lt;/u&gt;&lt;/b&gt;&lt;/a&gt;  -- &lt;i&gt;Sep. 19, 2008&lt;/i&gt; -- Emac's SO-DIMM-sized processor module is built around an ARM9-based Cirrus EP9302 SoC. The SoM-9307M targets development of customized products and applications, and runs Linux, Windows CE 6.0, or the .NET Micro Framework.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6599454894873414377-4040165172846094351?l=atomicarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atomicarm.blogspot.com/feeds/4040165172846094351/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atomicarm.blogspot.com/2010/08/arm9-based-cirrus-ep9302-soc.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/4040165172846094351'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/4040165172846094351'/><link rel='alternate' type='text/html' href='http://atomicarm.blogspot.com/2010/08/arm9-based-cirrus-ep9302-soc.html' title='ARM9-based Cirrus EP9302 SoC'/><author><name>Mike Hewitt</name><uri>http://www.blogger.com/profile/05181139924811433955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6599454894873414377.post-1682215075615642218</id><published>2010-08-24T09:50:00.000-07:00</published><updated>2010-08-24T09:50:12.444-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sbc'/><title type='text'>Glomation GESBC-9260</title><content type='html'>&lt;a href="http://www.linuxdevices.com/news/NS8759784396.html" rel="nofollow" target="new"&gt;  &lt;img align="left" border="0" hspace="10" src="http://www.linuxdevices.com/files/misc/glomation_9260-thm.jpg" vspace="5" /&gt;&lt;b&gt;&lt;u&gt;Glomation GESBC-9260&lt;/u&gt;&lt;/b&gt;&lt;/a&gt;  -- &lt;i&gt;Aug. 06, 2008&lt;/i&gt; -- This ARM9-powered single-board computer (SBC) from Glomation runs Linux and costs just $69 in volume. The GESBC-9260 measures 3.75 x 3.5 inches, sports Atmel's 200MHz AT91SAM9260, and targets "highly connected image processing applications" such as Ethernet-based IP cameras, and bar code readers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6599454894873414377-1682215075615642218?l=atomicarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atomicarm.blogspot.com/feeds/1682215075615642218/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atomicarm.blogspot.com/2010/08/glomation-gesbc-9260.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/1682215075615642218'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/1682215075615642218'/><link rel='alternate' type='text/html' href='http://atomicarm.blogspot.com/2010/08/glomation-gesbc-9260.html' title='Glomation GESBC-9260'/><author><name>Mike Hewitt</name><uri>http://www.blogger.com/profile/05181139924811433955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6599454894873414377.post-2207447507943426984</id><published>2010-08-24T09:48:00.001-07:00</published><updated>2010-08-29T04:59:03.560-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sbc'/><title type='text'>Via P700</title><content type='html'>&lt;a href="http://www.linuxdevices.com/news/NS9886731599.html" rel="nofollow" target="new"&gt;  &lt;img align="left" border="0" hspace="10" src="http://www.linuxdevices.com/files/misc/via_epia-P700_angle-thm.jpg" vspace="5" /&gt;&lt;b&gt;&lt;u&gt;&lt;/u&gt;&lt;/b&gt;&lt;/a&gt;  -- &lt;i&gt;Jun. 30, 2008&lt;/i&gt; -- This Via Technologies motherboard uses its tiny 3.9 x 2.8 inch pico-ITX format, and is available with a 1GHz C7 or 500MHz Eden ULV processor. The P700 boasts an onboard DC-DC adapter, and comes with two daughterboards that add real-world I/O connectors.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The new Epia P700 pico-ITX is available with the 1GHz Via C7 processor as the Via Epia P700-10L, or with the fanless 500MHz Eden ULV as the Epia P700-05LE. Both models include an integrated power adapter, enabling them to accept 12VDC power directly -- and even power 5V SATA drives -- without an external power daughterboard. Compared to the older pico-ITX products, other improvements include gigabit Ethernet, and bundled companion boards with real-world connectors.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The Epia P700 pico-ITX comes with P700-A and P700-B "companion boards" that fit atop the linear pin headers located at the left and right of the main board, as seen below. The P700-A provides an RJ45 connector for gigabit Ethernet, a VGA port, and a COM port, while P-700B sports four USB ports and three audio jacks. Other connectors on the Epia P700 include a 44-pin IDE connector, and a SATA connector.&lt;br /&gt;&lt;br /&gt;Securely mounted, the P700's daughterboards can effectively be considered part of the main board. However, they do approximately double its width (overall system dimensions were not cited by Via). Alternatively, for installations where a small footprint is more important than overall system height, the companion boards could be mounted below the main board, given suitable cabling and mounting brackets.&lt;br /&gt;&lt;br /&gt;As mentioned, the Epia P700 pico-ITX is offered with a choice of CPUs, both supported by Via's VX700, a core-logic chip that integrates the company's VN800 northbridge and VT8237 southbridge functionality. Graphics capabilities include 2D/3D graphics acceleration, MPEG2 support, and dual monitor outputs. Meanwhile, a single SODIMM socket accommodates up to 1GB of DDR2 533 SDRAM memory.&lt;br /&gt;&lt;br /&gt;Via lists the following key features and specifications for the Epia P700 pico-ITX board:&lt;br /&gt;Processor/chipset:&lt;br /&gt;Via Eden ULV 500 clocked at 500MHz or 1.0GHz Via C7&lt;br /&gt;Via VX700 Unified Digital Media IGP chipset&lt;br /&gt;Memory -- DDR2 533MHz SODIMM socket for up to 1GB memory&lt;br /&gt;Display -- integrated Via UniChrome Pro II 3D/2D AGP graphics with MPEG-2/4 and WMV9 decoding acceleration&lt;br /&gt;Networking -- Via VT6122 gigabit Ethernet controller&lt;br /&gt;I/O:&lt;br /&gt;Pin connectors:&lt;br /&gt;1 x LAN&lt;br /&gt;1 x CRT/DVI&lt;br /&gt;1 x COM&lt;br /&gt;1 x CPU fan connector&lt;br /&gt;1 x audio pin connector for line out, line in, mic in&lt;br /&gt;4 x USB 2.0&lt;br /&gt;1 x PS/2 keyboard/mouse&lt;br /&gt;1 x LVDS&lt;br /&gt;1 x LPC/SM Bus/GPIO&lt;br /&gt;Real-world connectors (on companion boards):&lt;br /&gt;1 x RJ45 gigabit Ethernet&lt;br /&gt;1 x VGA&lt;br /&gt;1 x COM&lt;br /&gt;4 x USB 2.0&lt;br /&gt;3 x 3.5mm audio (line out, line in, mic in)&lt;br /&gt;Dimensions -- 3.9 x 2.8 inches (main board)&lt;br /&gt;Operating temperature -- 0 to 50 deg. C&lt;br /&gt;Dimensions -- 3.9 x 2.8 inches (100 x 72mm)&lt;br /&gt;Power consumption -- "under 13 watts"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6599454894873414377-2207447507943426984?l=atomicarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atomicarm.blogspot.com/feeds/2207447507943426984/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atomicarm.blogspot.com/2010/08/via-p700.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/2207447507943426984'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/2207447507943426984'/><link rel='alternate' type='text/html' href='http://atomicarm.blogspot.com/2010/08/via-p700.html' title='Via P700'/><author><name>Mike Hewitt</name><uri>http://www.blogger.com/profile/05181139924811433955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6599454894873414377.post-7561133022732677263</id><published>2010-08-24T09:47:00.001-07:00</published><updated>2010-08-24T09:47:21.761-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sbc'/><title type='text'>Embedian MXM-8310 and MXM-8110</title><content type='html'>&lt;a href="http://www.linuxdevices.com/news/NS4066089210.html" rel="nofollow" target="new"&gt;  &lt;img align="left" border="0" hspace="10" src="http://www.linuxdevices.com/files/misc/embedian_mxm8310-thm.jpg" vspace="5" /&gt;&lt;b&gt;&lt;u&gt;Embedian MXM-8310 and MXM-8110&lt;/u&gt;&lt;/b&gt;&lt;/a&gt;  -- &lt;i&gt;Jul. 10, 2008&lt;/i&gt; -- These two computer-on-modules (COMs) from Embedian are available with a baseboard that connects via an MXM (Mobile PCI Express Module) connector. The MXM-8310 and MXM-8110 run Debian on a PXA320 (Monahans-P) processor, and offer interfaces for Ethernet, USB, TFT LCD, RS232, CF, and IDE.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6599454894873414377-7561133022732677263?l=atomicarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atomicarm.blogspot.com/feeds/7561133022732677263/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atomicarm.blogspot.com/2010/08/embedian-mxm-8310-and-mxm-8110.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/7561133022732677263'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/7561133022732677263'/><link rel='alternate' type='text/html' href='http://atomicarm.blogspot.com/2010/08/embedian-mxm-8310-and-mxm-8110.html' title='Embedian MXM-8310 and MXM-8110'/><author><name>Mike Hewitt</name><uri>http://www.blogger.com/profile/05181139924811433955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6599454894873414377.post-2669406588403258116</id><published>2010-08-24T09:42:00.001-07:00</published><updated>2010-08-24T09:42:42.562-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sbc'/><title type='text'>Beagle Board -</title><content type='html'>&lt;a href="http://www.linuxdevices.com/news/NS5852740920.html" rel="nofollow" target="new"&gt;  &lt;img align="left" border="0" hspace="10" src="http://www.linuxdevices.com/files/misc/beagleboard_and_hand_kk-thm.jpg" vspace="5" /&gt;&lt;b&gt;&lt;u&gt;TI Beagle Board &lt;/u&gt;&lt;/b&gt;&lt;/a&gt;  -- &lt;i&gt;Jun. 09, 2008&lt;/i&gt; -- This $150 hobbyist board from Texas Instruments (TI) runs Linux on TI's 600MHz OMAP3530 processor, the fanciest of its ARM Cortex-A8 OMAP35xx SoCs. The 3-inch-square BeagleBoard offers 128MB of 166MHz DDR RAM and 256MB of NAND flash, powers up over USB, and offers multiple interfaces.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6599454894873414377-2669406588403258116?l=atomicarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atomicarm.blogspot.com/feeds/2669406588403258116/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atomicarm.blogspot.com/2010/08/beagle-board.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/2669406588403258116'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/2669406588403258116'/><link rel='alternate' type='text/html' href='http://atomicarm.blogspot.com/2010/08/beagle-board.html' title='Beagle Board -'/><author><name>Mike Hewitt</name><uri>http://www.blogger.com/profile/05181139924811433955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6599454894873414377.post-7597254321504766188</id><published>2010-08-24T09:33:00.001-07:00</published><updated>2010-08-24T09:33:50.089-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sbc'/><title type='text'>Cogent CSB737</title><content type='html'>&lt;a href="http://www.linuxdevices.com/news/NS6871975473.html" rel="nofollow" target="new"&gt;  &lt;img align="left" border="0" hspace="10" src="http://www.linuxdevices.com/files/misc/cogent_csb737-thm.jpg" vspace="5" /&gt;&lt;b&gt;&lt;u&gt;Cogent CSB737&lt;/u&gt;&lt;/b&gt;&lt;/a&gt;  -- &lt;i&gt;Apr. 24, 2008&lt;/i&gt; -- This SO-DIMM-sized (2.6 x 2.0 inches) computer module from Cogent Computer Systems targets "any size-restricted, low-power embedded system." Based on Atmel's AT91SAM9263 processor, the CSB737 runs Linux, and is available with a development kit and carrier board.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6599454894873414377-7597254321504766188?l=atomicarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atomicarm.blogspot.com/feeds/7597254321504766188/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atomicarm.blogspot.com/2010/08/cogent-csb737.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/7597254321504766188'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/7597254321504766188'/><link rel='alternate' type='text/html' href='http://atomicarm.blogspot.com/2010/08/cogent-csb737.html' title='Cogent CSB737'/><author><name>Mike Hewitt</name><uri>http://www.blogger.com/profile/05181139924811433955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6599454894873414377.post-5784427148600183198</id><published>2010-08-24T09:27:00.000-07:00</published><updated>2010-08-24T09:27:59.565-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sbc'/><title type='text'>Debian-based KB9260</title><content type='html'>&lt;a href="http://www.linuxdevices.com/news/NS5081452397.html" rel="nofollow" target="new"&gt;  &lt;img align="left" border="0" hspace="10" src="http://www.linuxdevices.com/files/misc/kwikbyte_kb9260-thm.jpg" vspace="5" /&gt;&lt;b&gt;&lt;u&gt;KwikByte KB9260&lt;/u&gt;&lt;/b&gt;&lt;/a&gt;  -- &lt;i&gt;Mar. 12, 2008&lt;/i&gt; -- KwikByte's 3.1 x 3.1-inch SBC targets general purpose computing, embedded controls, machine vision, remote monitoring, and database/web servers. The Debian-based KB9260 incorporates a 200MHz ARM9-based AT91SAM9260 processor, offers a variety of I/O interfaces, and costs only $80 in volume.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6599454894873414377-5784427148600183198?l=atomicarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atomicarm.blogspot.com/feeds/5784427148600183198/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atomicarm.blogspot.com/2010/08/debian-based-kb9260.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/5784427148600183198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/5784427148600183198'/><link rel='alternate' type='text/html' href='http://atomicarm.blogspot.com/2010/08/debian-based-kb9260.html' title='Debian-based KB9260'/><author><name>Mike Hewitt</name><uri>http://www.blogger.com/profile/05181139924811433955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6599454894873414377.post-1730706523437756718</id><published>2010-08-24T09:19:00.001-07:00</published><updated>2010-08-24T09:19:54.912-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sbc'/><title type='text'>Icop VSX-6115</title><content type='html'>&lt;a href="http://www.linuxdevices.com/news/NS6730175227.html" rel="nofollow" target="new"&gt;  &lt;img align="left" border="0" hspace="10" src="http://www.linuxdevices.com/files/misc/icop_vsx6115-thm.jpg" vspace="5" /&gt;&lt;b&gt;&lt;u&gt;Icop VSX-6115&lt;/u&gt;&lt;/b&gt;&lt;/a&gt;  -- &lt;i&gt;Dec. 18, 2007&lt;/i&gt; -- Icop Technology's "low-power embedded controller" is effectively a complete headless PC crammed onto a board measuring 4 x 2.6 inches. The VSX-6115 runs Linux on a 32-bit x86-compatible Vortex86SX SoC from DMP Electronics, clocked at 300MHz.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6599454894873414377-1730706523437756718?l=atomicarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atomicarm.blogspot.com/feeds/1730706523437756718/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atomicarm.blogspot.com/2010/08/icop-vsx-6115.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/1730706523437756718'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/1730706523437756718'/><link rel='alternate' type='text/html' href='http://atomicarm.blogspot.com/2010/08/icop-vsx-6115.html' title='Icop VSX-6115'/><author><name>Mike Hewitt</name><uri>http://www.blogger.com/profile/05181139924811433955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6599454894873414377.post-2260194650172314393</id><published>2010-08-24T06:08:00.000-07:00</published><updated>2010-08-29T04:00:18.629-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Emulators'/><title type='text'>ARM development on a virtual platform</title><content type='html'>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Cadence_CS_BlogDetail_BlogText" id="anormal_12"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Cadence_CS_BlogDetail_BlogText" id="anormal_12"&gt;This is an article related to what is commonly called the Virtual Platform or Virtual Prototype. There are probably many definitions of what this means. here it means the Virtual Platform as a software model of a hardware system, created for the purpose of running embedded software and verifying the hardware/software interaction. &lt;br /&gt;&lt;br /&gt;Here are some general characteristics to help clarify what the Virtual Platform is:&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;span class="Cadence_CS_BlogDetail_BlogText" id="anormal_12"&gt;&lt;li&gt;Runs unmodified target code&lt;/li&gt;&lt;li&gt;Uses instruction accurate models of processors&amp;nbsp;&lt;/li&gt;&lt;li&gt;Provides a full programmers view &lt;/li&gt;&lt;li&gt;Runs very fast (may be faster than the hardware it emulates)&lt;/li&gt;&lt;li&gt;Has excellent visibility and control (compared to physical hardware)&lt;/li&gt;&lt;li&gt;Is easy to distribute to many users&lt;/li&gt;&lt;/span&gt;&lt;/ul&gt;&lt;span class="Cadence_CS_BlogDetail_BlogText" id="anormal_12"&gt;&lt;br /&gt;&lt;br /&gt;Virtual Platforms have been available since somebody had the idea to make a software model of the hardware.&lt;br /&gt;&lt;br /&gt;I expect that many software engineers already understand the details about how to select operating systems, write device drivers, create and populate file systems, cross compile software, program flash memory, etc., but sometimes software engineers are not familiar with virtual systems since somebody else sets up all the infrastructure and they just "add code" in the right place. &lt;br /&gt;&lt;br /&gt;I'm sure that virtual platforms are (or will become) critical to verification engineers and people who have worked primarily with RTL simulation in the past and are making the transition to the next level of abstraction. &lt;br /&gt;Virtual Platforms can play a key role in system verification and delivery of high quality software sooner in the process.&lt;br /&gt;&lt;br /&gt;The hardware system to be virtualized is the &lt;a href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0159b/index.html" target="_blank"&gt;ARM Integrator CP board&lt;/a&gt;. It is an older board that was supplied by ARM and according to the &lt;a href="http://www.arm.com/products/DevTools/Hardware_Platforms.html" target="_blank"&gt;ARM website&lt;/a&gt; is no longer promoted because newer hardware platforms have been developed. &lt;br /&gt;&lt;br /&gt;Not being a state of the art board that means there is a lot of public information available as well as software. &lt;br /&gt;&lt;br /&gt;One of the benefits of the Virtual Platform becomes apparent immediately. First, a software company probably wouldn't understand the need to buy a board to develop embedded software. &lt;br /&gt;Next, if a physical board was needed I doubt any readers would buy the board to learn about how embedded software development and verification works.&lt;br /&gt;&lt;br /&gt;Since we have Virtual Platform technology nobody needs to buy any hardware and everybody can contribute. All that is needed is a computer, and the Qemu emulator. &lt;br /&gt;&lt;br /&gt;Instead of actually reading the User Guide, we can start with a quick overview of the Integrator board and its memory map:&lt;br /&gt;ARM926EJ-S CPU&lt;br /&gt;&lt;b&gt;Peripherals&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Base Address&lt;/b&gt;&lt;br /&gt;Primary Interrupt Controller&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x14000000&lt;br /&gt;Secondary Interrupt Controller&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0xca000000&lt;br /&gt;Counter / Timer&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x13000000&lt;br /&gt;Real time Clock&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x15000000&lt;br /&gt;UART 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0x16000000&lt;br /&gt;UART 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0x17000000 &lt;br /&gt;Control Registers&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0xcb000000&lt;br /&gt;Keyboard Controller&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x18000000&lt;br /&gt;Mouse Controller&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x19000000&lt;br /&gt;Multimedia Card&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x1c000000&lt;br /&gt;Ethernet Controller&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0xc8000000&lt;br /&gt;LCD Controller&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0xc0000000&lt;br /&gt;&lt;br /&gt;There are many uses for the Virtual Platform. A common one we can start with is to boot the operating system and run applications. Another one is to write device drivers and debug them.&lt;br /&gt;&lt;br /&gt;Linux will be used as the operating system to load on the virtual device. Again, there is a wealth of information available and Linux is becoming popular as an embedded operating system. &lt;br /&gt;&lt;br /&gt;To start,  download QEMU which will emulate the Integrator board and boot Linux.&lt;br /&gt;&lt;br /&gt;Get &lt;a href="http://wiki.qemu.org/Main_Page"&gt;QEMU here&lt;/a&gt;. QEMU is an open source processor emulator which is available to run on both Linux and MS Windows. &lt;br /&gt;&lt;br /&gt;If you have a Linux machine it may be installed already or can be installed using your package manager. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Once you have qemu installed it's time to get a Linux kernel and file system and boot it.&lt;br /&gt;&lt;br /&gt;There are Fedora and Debian howto links on the &lt;a href="http://atomicarm.blogspot.com/"&gt; home &lt;/a&gt; page with step by step guides.&lt;br /&gt;&lt;br /&gt;An easy starting point &lt;a href="http://wiki.qemu.org/download/arm-test-0.2.tar.gz" target="_blank"&gt;is to download the ARM Linux 2.6 kernel and ram disk file system image from the qemu website&lt;/a&gt;. Extract this file and go to the arm-test directory.&lt;br /&gt;As the README shows you can boot doing:&lt;br /&gt;% qemu-system-arm -kernel zImage.integrator -initrd arm_root.img&lt;br /&gt;&lt;br /&gt;If all goes well you will see a new window:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://s466.photobucket.com/albums/rr22/hamlake/?action=view&amp;amp;current=qemu-integrator.jpg" target="_blank"&gt;&lt;img alt="Photobucket" border="0" src="http://i466.photobucket.com/albums/rr22/hamlake/qemu-integrator.jpg" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;You can login as root with no password and you have a Linux system running on the ARM Integrator CP Board with the ARM926EJ-S processor. &lt;br /&gt;&lt;br /&gt;You can use &lt;br /&gt;Ctrl-Alt-2 to get to the qemu command prompt, type help to see the commands or type quit to exit. &lt;br /&gt;Ctrl-Alt-1 will get back to the console (this is actually the LCD controller). &lt;br /&gt;Ctrl-Alt-3 will get to UART&amp;nbsp;0 and allows another login window. &lt;br /&gt;Ctrl-Alt is the key to release the keyboard and mouse. &lt;br /&gt;&lt;br /&gt;Now try some networking:&lt;br /&gt;% wget http://www.google.com &lt;br /&gt;This will download index.html This is a ramdisk so next time you boot the file will be gone.&lt;br /&gt;To browse the web use the lynx browser: &lt;br /&gt;% lynx google.com&lt;br /&gt;&lt;br /&gt;Other than being pretty cool, this exercise raises many questions:&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;span class="Cadence_CS_BlogDetail_BlogText" id="anormal_12"&gt;&lt;li&gt;How is the Integrator Board modeled?&lt;/li&gt;&lt;li&gt;How does qemu know I want to run the Integrator board?&amp;nbsp; There was no configuration or arguments.&lt;/li&gt;&lt;li&gt;What's in the file zImage.integrator?&lt;/li&gt;&lt;li&gt;What's in the file arm_root.img&lt;/li&gt;&lt;li&gt;How is the Ethernet controller on the Integrator board able to access the Internet?&lt;/li&gt;&lt;li&gt;Can I debug code running on the Integrator board?&lt;/li&gt;&lt;li&gt;This is a minimalist system, how can I compile and add more programs to it?&lt;/li&gt;&lt;/span&gt;&lt;/ul&gt;&lt;span class="Cadence_CS_BlogDetail_BlogText" id="anormal_12"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="zemanta-pixie"&gt;&lt;img alt="" class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=19552fa6-4724-8134-b9d4-3ae2057f181b" /&gt;&lt;/div&gt;&lt;/div&gt;Original article:&lt;br /&gt;http://www.cadence.com/Community/blogs/sd/archive/2009/01/16/welcome-to-quot-understanding-the-virtual-platform-quot-series.aspx?postID=13987&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6599454894873414377-2260194650172314393?l=atomicarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atomicarm.blogspot.com/feeds/2260194650172314393/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atomicarm.blogspot.com/2010/01/arm-development-on-virtual-platform.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/2260194650172314393'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/2260194650172314393'/><link rel='alternate' type='text/html' href='http://atomicarm.blogspot.com/2010/01/arm-development-on-virtual-platform.html' title='ARM development on a virtual platform'/><author><name>Mike Hewitt</name><uri>http://www.blogger.com/profile/05181139924811433955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6599454894873414377.post-3087427752498154668</id><published>2010-07-27T00:55:00.001-07:00</published><updated>2010-07-27T01:02:34.262-07:00</updated><title type='text'>Acorn atom front view</title><content type='html'>&lt;p class="mobile-photo"&gt;&lt;a href="http://2.bp.blogspot.com/_X0w1RXq9I4E/TE6RDLcdLZI/AAAAAAAAAQs/-5V3fmv62tI/s1600/photo-756666.jpg"&gt;&lt;img src="http://2.bp.blogspot.com/_X0w1RXq9I4E/TE6RDLcdLZI/AAAAAAAAAQs/-5V3fmv62tI/s320/photo-756666.jpg"  border="0" alt="" id="BLOGGER_PHOTO_ID_5498491678863732114" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6599454894873414377-3087427752498154668?l=atomicarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atomicarm.blogspot.com/feeds/3087427752498154668/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atomicarm.blogspot.com/2010/07/blog-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/3087427752498154668'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/3087427752498154668'/><link rel='alternate' type='text/html' href='http://atomicarm.blogspot.com/2010/07/blog-post.html' title='Acorn atom front view'/><author><name>Mike Hewitt</name><uri>http://www.blogger.com/profile/05181139924811433955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_X0w1RXq9I4E/TE6RDLcdLZI/AAAAAAAAAQs/-5V3fmv62tI/s72-c/photo-756666.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6599454894873414377.post-424397081298180634</id><published>2010-07-27T00:54:00.000-07:00</published><updated>2010-07-27T00:55:43.849-07:00</updated><title type='text'>Acorn atom</title><content type='html'>&lt;p class="mobile-photo"&gt;&lt;a href="http://2.bp.blogspot.com/_X0w1RXq9I4E/TE6RAANRemI/AAAAAAAAAQk/xB15dDtha9E/s1600/photo-743850.jpg"&gt;&lt;img src="http://2.bp.blogspot.com/_X0w1RXq9I4E/TE6RAANRemI/AAAAAAAAAQk/xB15dDtha9E/s320/photo-743850.jpg"  border="0" alt="" id="BLOGGER_PHOTO_ID_5498491624307653218" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6599454894873414377-424397081298180634?l=atomicarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atomicarm.blogspot.com/feeds/424397081298180634/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atomicarm.blogspot.com/2010/07/acorn-atom.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/424397081298180634'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/424397081298180634'/><link rel='alternate' type='text/html' href='http://atomicarm.blogspot.com/2010/07/acorn-atom.html' title='Acorn atom'/><author><name>Mike Hewitt</name><uri>http://www.blogger.com/profile/05181139924811433955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_X0w1RXq9I4E/TE6RAANRemI/AAAAAAAAAQk/xB15dDtha9E/s72-c/photo-743850.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6599454894873414377.post-9005288397162021897</id><published>2010-07-25T01:49:00.000-07:00</published><updated>2012-01-02T07:52:00.968-08:00</updated><title type='text'>Tiny boards from 2006 and earlier, listed in alpha order</title><content type='html'>&lt;iframe frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://rcm-uk.amazon.co.uk/e/cm?t=atoarm-21&amp;amp;o=2&amp;amp;p=8&amp;amp;l=as1&amp;amp;asins=B0046ANZ9S&amp;amp;ref=qf_sp_asin_til&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr" style="height: 240px; width: 120px;"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;img align="left" hspace="10" src="http://www.linuxdevices.com/files/misc/xingu-thm.jpg" vspace="5" /&gt;&lt;b&gt;Acunia Zingu&lt;/b&gt; -- this 2.7 x 3.6 in. SBC is based on an Intel Xscale i80200 processor with up to 850 MIPS performance. Includes up to 128MB SDRAM and 32MB Flash, plus built-in controllers for video, UART, AC97 Audio codec, PCMCIA, and I2C. Power consumption is under 2.5W. &lt;a href="http://www.linuxdevices.com/products/PD7390927203.html" rel="nofollow" target="new"&gt;&lt;u&gt;details&lt;/u&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img align="left" hspace="10" src="http://www.linuxdevices.com/files/misc/bitsy-thm.jpg" vspace="5" /&gt;&lt;b&gt;ADS Bitsy&lt;/b&gt; -- this 3 x 4 in. SBC is based on a 206 MHz Intel StrongARM SA-1110 processor (plus SA-1111 companion chip) and consumes just 450 mW. Includes: serial, USB, audio, digital and analog I/O, a Type II PCMCIA slot, plus a 1024 x 1024 resolution color LCD controller. &lt;a href="http://www.linuxdevices.com/products/PD8165701151.html" rel="nofollow" target="new"&gt;&lt;u&gt;details&lt;/u&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img align="left" hspace="10" src="http://www.linuxdevices.com/files/misc/aleph1_balloon_board-thm.jpg" vspace="5" /&gt;&lt;b&gt;Aleph One "Balloon" board&lt;/b&gt; -- Aleph One is shipping a one-ounce, one-watt, 206MHz StrongARM-based single-board computer (SBC) that comes pre-installed with embedded Linux and features an "open source" hardware design. Aleph One encourages device designers to freely use the design, and contribute back implementation details useful to others. Aleph One says its "Balloon board" is ideal for use in contol systems, portable devices, wearable computers, instrumentation, and robotics. &lt;a href="http://www.linuxdevices.com/news/NS8608269433.html" rel="nofollow" target="new"&gt;&lt;u&gt;details&lt;/u&gt;&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img align="left" hspace="10" src="http://www.linuxdevices.com/files/misc/net-dimm-sm.jpg" vspace="5" /&gt;&lt;b&gt;AMC Technologies NETdimm&lt;/b&gt; -- the &lt;a href="http://www.linuxdevices.com/products/PD6271371681.html" rel="nofollow" target="new"&gt;&lt;u&gt;NETdimm&lt;/u&gt;&lt;/a&gt; SBC module in AMC's 5.25 x 1.5 in. &lt;a href="http://www.linuxdevices.com/articles/AT6621755899.html" rel="nofollow" target="new"&gt;&lt;u&gt;dimmPCI&lt;/u&gt;&lt;/a&gt; form-factor, based on a Motorola Dragonball processor equipped with up to 32MB SDRAM and up to 8MB Flash, and with built-in controllers for Ethernet, an LCD, 2 serial ports, and an SPI port. Runs uClinux. Other versions are available which replace the NETdimm's Ethernet and LCD functions with &lt;a href="http://www.linuxdevices.com/products/PD7160443727.html" rel="nofollow" target="new"&gt;&lt;u&gt;CANbus&lt;/u&gt;&lt;/a&gt; or &lt;a href="http://www.linuxdevices.com/products/PD2538975505.html" rel="nofollow" target="new"&gt;&lt;u&gt;digital and analog I/O&lt;/u&gt;&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img align="left" hspace="10" src="http://www.linuxdevices.com/files/misc/GX_SOM-144-thm.jpg" vspace="5" /&gt;&lt;b&gt;AMD GX SOM-144&lt;/b&gt; -- Based on a Geode GX 533@1.1W processor, the Geode GX SOM-144 comes with an RDK that includes Linux drivers. It measures 4 x 2.7 inches (100 x 68mm), and targets applications where power, size, performance, and reliability are critical, AMD says. &lt;a href="http://www.linuxdevices.com/news/NS4710320428.html" rel="nofollow" target="new"&gt;&lt;u&gt;details&lt;/u&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img align="left" hspace="10" src="http://www.linuxdevices.com/files/misc/ucdimm-hand-thm.jpg" vspace="5" /&gt;&lt;b&gt;Arcturus Networks uCdimm, uCsimm&lt;/b&gt; -- The soDIMM-sized (1.7 x 2.7 in.) &lt;b&gt;uCdimm&lt;/b&gt; (&lt;a href="http://www.linuxdevices.com/products/PD7713572550.html" rel="nofollow" target="new"&gt;&lt;u&gt;details&lt;/u&gt;&lt;/a&gt;), pictured here, is based on a Motorola DragonBallVZ and provides 2 SPI interfaces, 2 RS232 ports, 22 digital I/O's, up to 640x512 LCD control, and 10 Mbit Ethernet. The older "SIMM-sized" (3.5 x 1 in.) &lt;b&gt;uCsimm&lt;/b&gt; SBC (&lt;a href="http://www.linuxdevices.com/products/PD3378529215.html" rel="nofollow" target="new"&gt;&lt;u&gt;details&lt;/u&gt;&lt;/a&gt;) is based on a Motorola DragonBall 68EZ328 with 2.7 mips performance, and includes: 2MB Flash, 8MB DRAM, 21 digital I/O, serial, I&lt;sup&gt;2&lt;/sup&gt;C/SPI, 10 Mbit Ethernet, and a 640x480 LCD controller.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img align="left" hspace="10" src="http://www.linuxdevices.com/files/misc/axis-devboard-thm.jpg" vspace="5" /&gt;&lt;b&gt;Axis Developer Board&lt;/b&gt; -- a small form-factor SBC based on the 100 MHz Axis ETRAX 32-bit RISC system-on-chip processor. It is usable as either an ETRAX evaluation board or as a small embedded computer. Includes: 10/100 Mbit Ethernet, serial, parallel, RTC, 2MB Flash, 8MB DRAM, and 2KB EEPROM. &lt;a href="http://www.linuxdevices.com/products/PD8398994608.html" rel="nofollow" target="new"&gt;&lt;u&gt;details&lt;/u&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img align="left" hspace="10" src="http://www.linuxdevices.com/files/misc/cf-cpu-board-thm.jpg" vspace="5" /&gt;&lt;b&gt;C Data CompactFlash Computer&lt;/b&gt; -- this tiny Linux-based computer fits entirely on a Type II CompactFlash (CF) card which can be mixed and matched with third-party CF-cards to create miniscule, modular Linux systems based entirely on CF cards. The module is based on a 66MHz Freescale MPC5272 SoC and includes 32MB SDRAM and 8MB flash, and runs uClinux. Details &lt;a href="http://www.linuxdevices.com/news/NS2844504302.html" rel="nofollow" target="new"&gt;&lt;u&gt;here&lt;/u&gt;&lt;/a&gt; and &lt;a href="http://www.linuxdevices.com/news/NS5134014764.html" rel="nofollow" target="new"&gt;&lt;u&gt;here&lt;/u&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img align="left" hspace="10" src="http://www.linuxdevices.com/files/misc/cogent_csb637_top-thm.jpg" vspace="5" /&gt;&lt;b&gt;Cogent CSB637&lt;/b&gt; -- A tiny SBC that measures 1.75 x 2.5 (63.5 x 44.5mm), and is based on an Atmel AT91RM9200, a low-power SoC (system-on-chip) with an ARM920T core that Atmel says delivers 200 MIPS. The Cogent board supplements the Atmel microcontrollerï¿½s functionality, according to Direct Insight, offering interfaces that include 10/100 Ethernet MAC and PHY, USB, Dual SDIO, 4 UARTs, SSI, SPI, and CompactFlash Interfaces, an onboard LCD/CRT Controller. Also included are 64MB SDRAM and 8MB flash memory and an "efficient" 3.3V Regulator. &lt;a href="http://www.linuxdevices.com/news/NS7634317885.html" rel="nofollow" target="new"&gt;&lt;u&gt;details&lt;/u&gt;&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img align="left" hspace="10" src="http://www.linuxdevices.com/files/misc/compulab_armcore-top-m-thm.jpg" vspace="5" /&gt;&lt;b&gt;CompuLab ARMcore-GX&lt;/b&gt; -- A tiny low-cost processor module based on a 400MHz Intel PXA255. The ARMcore-GX measures 2.6 x 1.7 inches (66 x 44mm) and costs $51 in quantities of 1,000, and is available with a PC/104 carrier board. &lt;a href="http://www.linuxdevices.com/news/NS7626998820.html" rel="nofollow" target="new"&gt;&lt;u&gt;details&lt;/u&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img align="left" hspace="10" src="http://www.linuxdevices.com/files/misc/586core-thm.jpg" vspace="5" /&gt;&lt;b&gt;CompuLab 586CORE&lt;/b&gt; -- a tiny (3.1 x 2.4 in.) PC-compatible SBC based on the AMD Elan SC520. Includes: 16-64 MB DRAM, 1-136M Flash disk, 69000-based SVGA graphics, 10/100 Mbit Ethernet, USB, 2-4 serial ports, PS/2 keyboard/mouse, IrDA, 32 digital I/O, RTC, sound, IDE/floppy interfaces, plus ISA and PCI expansion buses. &lt;a href="http://www.linuxdevices.com/products/PD6762999735.html" rel="nofollow" target="new"&gt;&lt;u&gt;details&lt;/u&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img align="left" hspace="10" src="http://www.linuxdevices.com/files/misc/csp_dsp_stamp-thm.jpg" vspace="5" /&gt;&lt;b&gt;Cambridge Signal Processing (CSP) DSP Stamp&lt;/b&gt; -- A 1-inch-square module based on a digital signal processor (DSP) that runs uClinux natively. The DSP Stamp comes preinstalled with a serial bootloader and uClinux, and a development board is also available. A Bluetooth camera reference design is expected Q4, 2004 &lt;a href="http://www.linuxdevices.com/news/NS4405077268.html" rel="nofollow" target="new"&gt;&lt;u&gt;details&lt;/u&gt;&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img align="left" hspace="10" src="http://www.linuxdevices.com/files/misc/data_designs_linux_rocket_front-thm.jpg" vspace="5" /&gt;&lt;b&gt;DDC Linux Rocket&lt;/b&gt; -- Data Design Corp's claims its micro-miniature SBC provides a powerful Linux system on a truly tiny board. Based on a PowerPC 405GPr processor clocked up to 400MHz, the "Linux Rocket" includes DDC's custom PPC Linux kernel and flash filesystem, and targets kiosk, industrial monitoring and control, instrumentation, set-top-box, and vending machine applications. &lt;a href="http://www.linuxdevices.com/news/NS3092516722.html" rel="nofollow" target="new"&gt;&lt;u&gt;details&lt;/u&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img align="left" hspace="10" src="http://www.linuxdevices.com/files/misc/netsilicon_digiconnectme-thm.jpg" vspace="5" /&gt;&lt;b&gt;Digi International ConnectME/Picotux&lt;/b&gt; -- A network-enabled Linux system barely larger than a standard RJ-45 Ethernet jack, "Picotux" is based on the DigiConnect ME module from Digi International, along with a 2.4.27 uClinux port developed by Hans Kleinhenz. &lt;a href="http://www.linuxdevices.com/news/NS8386088053.html" rel="nofollow" target="new"&gt;&lt;u&gt;details&lt;/u&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img align="left" hspace="10" src="http://www.linuxdevices.com/files/misc/rpx-super-thm.jpg" vspace="5" /&gt;&lt;b&gt;Embedded Planet EP8260&lt;/b&gt; -- physically, this PowerQUICC II (MPC8260) based SBC matches the footprint of a PC/104 module (3.6 x 3.8 in.) is not considered a PC/104 module. Includes: up to 32MB Flash and 128MB SDRAM, 10/100 Ethernet, and a PCMCIA Type II slot. Expandable via the PowerPC expansion bus. &lt;a href="http://www.linuxdevices.com/products/PD1986855326.html" rel="nofollow" target="new"&gt;&lt;u&gt;details&lt;/u&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img align="left" hspace="10" src="http://www.linuxdevices.com/files/misc/rpx-super-thm.jpg" vspace="5" /&gt;&lt;b&gt;Embedded Planet RPX Super&lt;/b&gt; -- physically, this PowerQUICC II (MPC8260) based SBC matches the footprint of a PC/104 module (3.6 x 3.8 in.) is not considered a PC/104 module. Includes: up to 32MB Flash and 128MB SDRAM, 10/100 Ethernet, and a PCMCIA Type II slot. Expandable via the PowerPC expansion bus. &lt;a href="http://www.linuxdevices.com/products/PD5050547342.html" rel="nofollow" target="new"&gt;&lt;u&gt;details&lt;/u&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img align="left" hspace="10" src="http://www.linuxdevices.com/files/misc/esfia_m170s_top-thm.jpg" vspace="5" /&gt;&lt;b&gt;Esfia M170S&lt;/b&gt; -- A low-cost module for POS (point-of-sale/service) devices, RFID tunnel readers, biometric access control terminals, and other test, industrial, and medical applications, the ARM-based M170S measures 2.42 x 1.77 inches (61.5 x 45mm), costs $64, and is available with a wireless-enabled carrier board. &lt;a href="http://www.linuxdevices.com/news/NS8717355241.html" rel="nofollow" target="new"&gt;&lt;u&gt;details&lt;/u&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img align="left" hspace="10" src="http://www.linuxdevices.com/files/misc/esfia_M170P-thm.jpg" vspace="5" /&gt;&lt;b&gt;Esfia M170P&lt;/b&gt; -- A tiny ARM7-based SBC (single-board computer) that measures just 1.97 x 1.57 inches (50 x 40mm) and costs $64 in quantities of 5,000, the M170P targets rugged handheld devices, and is available with an evaluation kit that includes Linux. &lt;a href="http://www.linuxdevices.com/news/NS8680628207.html" rel="nofollow" target="new"&gt;&lt;u&gt;details&lt;/u&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img align="left" hspace="10" src="http://www.linuxdevices.com/files/misc/dimm-520-thm.jpg" vspace="5" /&gt;&lt;b&gt;Forth-Systeme DIMM-520, ModNET50&lt;/b&gt; -- the tiny "DIMM-sized" (2.7 x 2.0 in.) &lt;b&gt;DIMM-520&lt;/b&gt; (&lt;a href="http://www.linuxdevices.com/products/PD8437958536.html" rel="nofollow" target="new"&gt;&lt;u&gt;details&lt;/u&gt;&lt;/a&gt;), pictured here, is based on the 32-Bit 133 MHz AMD ElanSC520 x86 system-on-chip. It includes: 64MB SDRAM, 16M Flash, PCI bus interface, 2 serial and 1 parallel ports, 100 Mbit Ethernet, and PC motherboard core logic. The &lt;b&gt;ModNET50&lt;/b&gt; (&lt;a href="http://www.linuxdevices.com/products/PD5666863565.html" rel="nofollow" target="new"&gt;&lt;u&gt;details&lt;/u&gt;&lt;/a&gt;) uses NetSilicon's NET+ARM system-on-chip to integrate a RISC processor, 100 Mbit Ethernet, 2 serial ports, RAM, Flash, and other functions on a tiny SBC.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img align="left" hspace="10" src="http://www.linuxdevices.com/files/misc/gms_spider-thm.jpg" vspace="5" /&gt;&lt;b&gt; General Micro Systems Spider&lt;/b&gt; -- This standalone SBC measures 2.8 x 1.9 inches, boots from on-board flash, includes a DC-DC converter, and is based on an IBM PowerPC chip running either 400 or 800 MHz. A companion I/O card is available, with dual Ethernet ports and more. The Spider targets distributed control, telecom server blades, handhelds, and military/aerospace applications. &lt;a href="http://www.linuxdevices.com/news/NS6288674963.html" rel="nofollow" target="new"&gt;&lt;u&gt;details&lt;/u&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img align="left" hspace="10" src="http://www.linuxdevices.com/files/misc/gumstix_200f_basix-thm.jpg" vspace="5" /&gt;&lt;b&gt;Gumstix XM, BT, and Basix options&lt;/b&gt; -- Gumstix has added extended memory and on-board Bluetooth options to its line of tiny gumstick-shaped XScale SBCs (single-board computers). It has also launched a new low-cost model priced at $99. The company now offers nine "Connex" and "Basix" SBCs priced from $99 to $189. &lt;a href="http://www.linuxdevices.com/news/NS3967182515.html" rel="nofollow" target="new"&gt;&lt;u&gt;Details&lt;/u&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img align="left" hspace="10" src="http://www.linuxdevices.com/files/misc/gumstix-thm.jpg" vspace="5" /&gt;&lt;b&gt;Gumstix&lt;/b&gt; -- This unique SBC features an oblong shape 0.79- by 3.1 inches (20- x 80mm), targeting wearable devices such as collar PCs. It is based on an an Intel XScale PXA255 processor, and includes 4MB of Flash RAM, and 64MB of SDRAM. Expansion interfaces include MMC, SD, and SDIO. The board draws under 200mA, according to Gumstix, and can be powered by 3 AAA NiMH batteries. &lt;a href="http://www.linuxdevices.com/news/NS3112296807.html" rel="nofollow" target="new"&gt;&lt;u&gt;details&lt;/u&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img align="left" hspace="10" src="http://www.linuxdevices.com/files/misc/bluemod-sbc-thm.gif" vspace="5" /&gt;&lt;b&gt;HCV Wireless BlueMod&lt;/b&gt; -- this tiny (2.75 x 2.1 in.) SBC was specifically designed for Bluetooth wireless communication. It runs uClinux on a 32-bit 50 MIPS CPU with 8MB SDRAM and 2MB Flash. I/O includes serial, GPIO, USB (device), and connection to external adapters via a processor expansion bus. &lt;a href="http://www.linuxdevices.com/news/NS6081446944.html" rel="nofollow" target="new"&gt;&lt;u&gt;details&lt;/u&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img align="left" hspace="10" src="http://www.linuxdevices.com/files/misc/inhand-fingertip-thm.jpg" vspace="5" /&gt;&lt;b&gt;Inhand Fingertip, Elf&lt;/b&gt; -- the tiny (2.75 x 2.75 in.) &lt;b&gt;Fingertip&lt;/b&gt; "PDA platform" (&lt;a href="http://www.linuxdevices.com/products/PD3251835184.html" rel="nofollow" target="new"&gt;&lt;u&gt;details&lt;/u&gt;&lt;/a&gt;), pictured here, is based on a 200 MHz Intel StrongARM 1110 CPU; it also includes: up to 32M Flash, up to 16M SDRAM, audio, 3 serial ports, SPI port, USB, 12 digital I/O lines, 320x240 LCD display/touchscreen interface, battery support, and CompactFlash expansion socket. Also based on an SA-1110 processor, the slightly larger (12 square in.) &lt;b&gt;Elf&lt;/b&gt; (&lt;a href="http://www.linuxdevices.com/products/PD5393871012.html" rel="nofollow" target="new"&gt;&lt;u&gt;details&lt;/u&gt;&lt;/a&gt;) has a built-in PCMCIA slot, 16MB DRAM and up to 8MB Flash onboard memory, plus many of the same features as the Fingertip. InHand's &lt;b&gt;Fingertip3&lt;/b&gt; (&lt;a href="http://www.linuxdevices.com/news/NS8861288927.html" rel="nofollow" target="new"&gt;&lt;u&gt;details&lt;/u&gt;&lt;/a&gt;) is the company's first SBC based on an XScale processor.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img align="left" hspace="10" src="http://www.linuxdevices.com/files/misc/steroidmicros_wildfiremod-thm.jpg" vspace="5" /&gt;&lt;b&gt;Intec WildFireMod&lt;/b&gt; -- A tiny ColdFire-powered CPU module claimed to be the smallest Linux SBC (single-board computer) with Internet connectivity, a reasonable amount of memory, and "massive control functionality." The WildFireMod measures 1.9 x 1.7 inches (49 x 44mm), and targets data acquisition systems, communications, electric and internal combustion motor controllers, robotics, automotive, avionics, and industrial control. &lt;a href="http://www.linuxdevices.com/news/NS6270733703.html" rel="nofollow" target="new"&gt;&lt;u&gt;Details&lt;/u&gt;&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img align="left" hspace="10" src="http://www.linuxdevices.com/files/misc/cerfboard-thm.jpg" vspace="5" /&gt;&lt;b&gt;Intrynsic CerfBoard&lt;/b&gt; -- a tiny (2.2 x 2.4 in.) SBC based on a 133 or 206 MHz Intel StrongARM 1110 CPU. Also includes: up to 16MB Flash, up to 8MB SDRAM, 16 digital I/O lines, 10 Mbit Ethernet, USB, serial port, audio CODEC, LCD interface, and CompactFlash+ socket. &lt;a href="http://www.linuxdevices.com/products/PD2358115396.html" rel="nofollow" target="new"&gt;&lt;u&gt;details&lt;/u&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img align="left" hspace="10" src="http://www.linuxdevices.com/files/misc/dimm-pc586-thm.jpg" vspace="5" /&gt;&lt;b&gt;JUMPtec DIMM-PC&lt;/b&gt; -- a family of "DIMM form-factor" (2.7 x 1.6 in.) PC-compatible SBCs. The DIMM-PC/586 (pictured here) is based on a ZF Micro ZFx86 system-on-chip processor and includes: 32MB SDRAM and 32MB Flash memory, plus interfaces for 10/100 Mb/s Ethernet, USB, serial (2), parallel, keyboard, floppy, and IDE. Additional models are based on 486 and 386 processors. &lt;a href="http://www.linuxdevices.com/products/PD3842565571.html" rel="nofollow" target="new"&gt;&lt;u&gt;details&lt;/u&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img align="left" hspace="10" src="http://www.linuxdevices.com/files/misc/kontron_xboard_gp8_square-thm.jpg" vspace="5" /&gt;&lt;b&gt;Kontron X-board GP8&lt;/b&gt; -- A highly integrated device in the very compact 67 x 49-mm X-board COM (computer-on-module) form-factor. Dubbed the X-board GP8, the SBC is built around an Intel Xscale 80219 microprocessor and Silicon Motion SM501 chipset. &lt;a href="http://www.linuxdevices.com/news/NS4298724459.html" rel="nofollow" target="new"&gt;&lt;u&gt;details&lt;/u&gt;&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img align="left" hspace="10" src="http://www.linuxdevices.com/files/misc/kontron_e2brain_EB8540-thm.jpg" vspace="5" /&gt;&lt;b&gt;Kontron E2Brain EB8540&lt;/b&gt; -- A fanless 4.3 x 2.9-inch RISC-based "computer-on-module" designed to enable Linux and VxWorks device developers to concentrate on product design and application-specific software, rather than on implementing their own processor cores. The E2Brain is based on an 800MHz Freescale MPC8540 PowerQUICC III processor that delivers 1,850 DMIPS. It targets industrial automation, transportation, medical technology, and defense. &lt;a href="http://www.linuxdevices.com/news/NS8383137973.html" rel="nofollow" target="new"&gt;&lt;u&gt;details&lt;/u&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img align="left" hspace="10" src="http://www.linuxdevices.com/files/misc/kontron-eb425-thm.jpg" vspace="5" /&gt;&lt;b&gt;Kontron E2Brain EB425&lt;/b&gt; -- Claimed to be the first Computer-on-Module (COM) based on Intel's XScale IXP42x network processor, the EB425 "E2Brain" measures 2.95 by 4.33 inches (75 x 115 mm) and targets low-power real-time applications. It supports Linux and VxWorks. &lt;a href="http://www.linuxdevices.com/news/NS2622771244.html" rel="nofollow" target="new"&gt;&lt;u&gt;details&lt;/u&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img align="left" hspace="10" src="http://www.linuxdevices.com/files/misc/lart-in-hand-thm.jpg" vspace="5" /&gt;&lt;b&gt;LART&lt;/b&gt; -- an "open licensed" small SBC (4 x 3 in.) design from the Technical University of Delft (Netherlands). It is based on a 220 MHz Intel SA-1100 StrongARM and includes: 4MB Flash and 32MB DRAM memory, serial and parallel ports, and bus expansion. Expansion boards provide: Ethernet, USB, keyboard, mouse, touch input, and video. &lt;a href="http://www.linuxdevices.com/links/LK9764937601.html" rel="nofollow" target="new"&gt;&lt;u&gt;details&lt;/u&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img align="left" hspace="10" src="http://www.linuxdevices.com/files/misc/ucdimm-hand-thm.jpg" vspace="5" /&gt;&lt;b&gt;Lineo uCdimm, uCsimm&lt;/b&gt; -- The soDIMM-sized (1.7 x 2.7 in.) &lt;b&gt;uCdimm&lt;/b&gt; (&lt;a href="http://www.linuxdevices.com/products/PD7713572550.html" rel="nofollow" target="new"&gt;&lt;u&gt;details&lt;/u&gt;&lt;/a&gt;), pictured here, is based on a Motorola DragonBallVZ and provides 2 SPI interfaces, 2 RS232 ports, 22 digital I/O's, up to 640x512 LCD control, and 10 Mbit Ethernet. The older "SIMM-sized" (3.5 x 1 in.) &lt;b&gt;uCsimm&lt;/b&gt; SBC (&lt;a href="http://www.linuxdevices.com/products/PD3378529215.html" rel="nofollow" target="new"&gt;&lt;u&gt;details&lt;/u&gt;&lt;/a&gt;) is based on a Motorola DragonBall 68EZ328 with 2.7 mips performance, and includes: 2MB Flash, 8MB DRAM, 21 digital I/O, serial, I&lt;sup&gt;2&lt;/sup&gt;C/SPI, 10 Mbit Ethernet, and a 640x480 LCD controller.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img align="left" hspace="10" src="http://www.linuxdevices.com/files/misc/sharp-cardengine.jpg" vspace="5" /&gt;&lt;b&gt;Logic Card Engine&lt;/b&gt; -- a compact (2.37 x 2.67 in.) family of tiny Linux-supported SBCs which include features such as onboard Flash (up to 32MB) and SDRAM (up to 32MB) memory, integrated LCD controller, touch panel support, serial, audio codec, Ethernet, Compact Flash and more. Sharp and Renesas processors are currently supported, and the SBCs include "production quality" BSPs and bootloaders. &lt;a href="http://www.linuxdevices.com/products/PD8506505302.html" rel="nofollow" target="new"&gt;&lt;u&gt;details&lt;/u&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img align="left" hspace="10" src="http://www.linuxdevices.com/files/misc/qs850-thm.jpg" vspace="5" /&gt;&lt;b&gt;SNMC QS850&lt;/b&gt; -- a tiny (3.1 x 2.1 in.) networked PowerPC SBC based on a Motorola MPC850. Includes: 8-64 MB SDRAM, 2-16 MB Flash, up to 2 Ethernet ports, 3 serial ports, up to 64 channels HDLC, 49 digital I/O lines. Supported by SNMC's QSLinux Embedded Linux. &lt;a href="http://www.linuxdevices.com/products/PD3346671915.html" rel="nofollow" target="new"&gt;&lt;u&gt;details&lt;/u&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img align="left" hspace="10" src="http://www.linuxdevices.com/files/misc/pnp1110-thm.gif" vspace="5" /&gt;&lt;b&gt;SSV DIL/Net&lt;/b&gt; -- The DIL/Net 1110 (&lt;a href="http://www.linuxdevices.com/news/NS2794158122.html" rel="nofollow" target="new"&gt;&lt;u&gt;details&lt;/u&gt;&lt;/a&gt;) is based on a StrongARM 1110 processor, and is available with pre-installed GUI driven by a Linux-based X11 server supporting up to SVGA resolutions. A gum-stick form facter version (3.2 x 1.1 in.) &lt;a href="http://www.linuxdevices.com/products/PD5129700479.html" rel="nofollow" target="new"&gt;&lt;u&gt;details&lt;/u&gt;&lt;/a&gt; is also available, as is a gumstick version that runs on a Softcore processor, for Ethernet products with very long life cycles &lt;a href="http://www.linuxdevices.com/news/NS7669583305.html" rel="nofollow" target="new"&gt;&lt;u&gt;details&lt;/u&gt;&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img align="left" hspace="10" src="http://www.linuxdevices.com/files/misc/ssv_dilnet-pc_dnp5282-thm.jpg" vspace="5" /&gt;&lt;b&gt;SSV DIL-40 DNP/5282&lt;/b&gt; -- The first of a planned family of DIL-40 SBCs that measure 2.2 x 0.9 inches, matching the pin footprint of 40-pin "DIP" (dual-inline-package) ICs. The DNP/5282 is based on a 66MHz Freescale Coldfire processor, and comes preinstalled with uClinux. &lt;a href="http://www.linuxdevices.com/news/NS2666911013.html" rel="nofollow" target="new"&gt;&lt;u&gt;details&lt;/u&gt;&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img align="left" hspace="10" src="http://www.linuxdevices.com/files/misc/max-pc-thm.jpg" vspace="5" /&gt;&lt;b&gt;Strategic Test Max-PC&lt;/b&gt; -- a matchbox sized (2.3 x 1.2 in.) SBC based on a 100 MHz 486 processor, plus 16MB RAM and 16MB Flash. Onboard controllers handle VGA, RS232 serial, parallel port, timers, keyboard, iRDA, and PCMCIA. &lt;a href="http://www.linuxdevices.com/products/PD3188120584.html" rel="nofollow" target="new"&gt;&lt;u&gt;details&lt;/u&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img align="left" hspace="10" src="http://www.linuxdevices.com/files/misc/strategic_test_triton_eco_200-thm.jpg" vspace="5" /&gt;&lt;b&gt;Strategic Test Triton-Eco&lt;/b&gt; -- A tiny, inexpensive single board computer (SBC) based on a 400MHz PXA255, an Intel XScale processor popular in PDAs and smartphones. The Triton-Eco SBC comes with Linux 2.6 pre-installed, and costs $135/$99 in quantities of 10/1000. &lt;a href="http://www.linuxdevices.com/news/NS2710798964.html" rel="nofollow" target="new"&gt;&lt;u&gt;details&lt;/u&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img align="left" hspace="10" src="http://www.linuxdevices.com/files/misc/techsol-medallion-sm.jpg" vspace="5" /&gt;&lt;b&gt;Techsol Medallion&lt;/b&gt; -- a family of tiny (4 square inch) SBC modules. The HY7201 is based on a 60 MHz ARM-720T RISC processor, and includes 32MB of SDRAM and a 32MB DiskOnChip Flash disk, plus built-in controllers for 2 UARTs, CRT/LCD VGA, touchscreen, IrDA, USB (host and device), multimedia card, and GPIO. &lt;a href="http://www.linuxdevices.com/products/PD4926233151.html" rel="nofollow" target="new"&gt;&lt;u&gt;details&lt;/u&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img align="left" hspace="10" src="http://www.linuxdevices.com/files/misc/ToradexColibri-thm.jpg" vspace="5" /&gt;&lt;b&gt;Toradex Colibri&lt;/b&gt; -- An SODIMM format computer module based on the Intel XScale PXA270 processor. The Colibri is optionally available with Linux pre-installed. &lt;a href="http://www.linuxdevices.com/news/NS2762310245.html" rel="nofollow" target="new"&gt;&lt;u&gt;details&lt;/u&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img align="left" hspace="10" src="http://www.linuxdevices.com/files/misc/tqm860l-thm.jpg" vspace="5" /&gt;&lt;b&gt;TQ-Components TQM850&lt;/b&gt; -- a tiny (2.1 x 1.8 in.) SBC based on a 50 MHz Motorola PowerPC MPC850. Includes: up to 8MB Flash and up to 64MB SDRAM, plus dual-serial and dual-CAN (field bus) interfaces. Expands via 120-pin board-to-board connector on bottom. &lt;a href="http://www.linuxdevices.com/products/PD7079122171.html" rel="nofollow" target="new"&gt;&lt;u&gt;details&lt;/u&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6599454894873414377-9005288397162021897?l=atomicarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atomicarm.blogspot.com/feeds/9005288397162021897/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atomicarm.blogspot.com/2010/07/tiny-boards-from-2006-and-earlier.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/9005288397162021897'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/9005288397162021897'/><link rel='alternate' type='text/html' href='http://atomicarm.blogspot.com/2010/07/tiny-boards-from-2006-and-earlier.html' title='Tiny boards from 2006 and earlier, listed in alpha order'/><author><name>Mike Hewitt</name><uri>http://www.blogger.com/profile/05181139924811433955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6599454894873414377.post-260490234620543241</id><published>2010-06-01T07:56:00.000-07:00</published><updated>2010-06-01T08:02:30.207-07:00</updated><title type='text'>June update (2010)</title><content type='html'>This project has been stalled for a while, because:&lt;br /&gt;Once I had got as far as running the Fedora ARM port in Qemu, I realised how rusty my coding skill were.&lt;br /&gt;&lt;br /&gt;I also realised that although I enjoyed playing around with hardware, it is unlikely that I have the required ability now that Dual in Line (DIL) packages have disappeared and been replaced with surface mount devices that I can barely see let alone solder.&lt;br /&gt;&lt;br /&gt;As a result of the above realisation, I will probably start playing with the Android OS for PC, and maybe buy a pre-built development board later.&lt;br /&gt;Another option might be to buy and Android based phone and use that instead of a development board, as is demonstrated in this IBM guide:-&lt;br /&gt;&lt;a href="http://atomicarm.blogspot.com/2010/01/gnu-arm-assembler-guide-from-ibm.html"&gt;here&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Download and install instructions for Android&lt;br /&gt;&lt;a href="http://news.softpedia.com/news/Run-Android-for-Your-PC-132652.shtml"&gt;here&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Read is Android the 'top' Linux&amp;nbsp; &lt;br /&gt;&lt;a href="http://www.linuxjournal.com/article/10721?page=0,0"&gt;here&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6599454894873414377-260490234620543241?l=atomicarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atomicarm.blogspot.com/feeds/260490234620543241/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atomicarm.blogspot.com/2010/06/june-update-2010.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/260490234620543241'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/260490234620543241'/><link rel='alternate' type='text/html' href='http://atomicarm.blogspot.com/2010/06/june-update-2010.html' title='June update (2010)'/><author><name>Mike Hewitt</name><uri>http://www.blogger.com/profile/05181139924811433955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6599454894873414377.post-4096985401624887544</id><published>2010-03-04T14:09:00.000-08:00</published><updated>2010-03-07T03:19:35.567-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='My attempts'/><title type='text'>Fedora ARM in qemu</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: Arial;"&gt;&lt;span class="Apple-style-span"&gt;&lt;b&gt;First attempts with Fedora Arm running in qemu on Linux Mint 8.&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial;"&gt;&lt;span class="Apple-style-span"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial;"&gt;&lt;span class="Apple-style-span"&gt;The picture below (click to enlarge) shows a small c file in the Vi editor, with one line of inline ARM assembler (a NOP instruction) and a puts statement which puts hello on the screen so that you can see something has happened.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial;"&gt;&lt;span class="Apple-style-span"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial;"&gt;&lt;span class="Apple-style-span"&gt;Instructions on how to get Fedora ARM running in Qemu are here:-&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman';"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;a href="http://fedoraproject.org/wiki/Architectures/ARM/HowToQemu"&gt;http://fedoraproject.org/wiki/Architectures/ARM/HowToQemu&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_X0w1RXq9I4E/S5AstbIZA8I/AAAAAAAAANI/2v03m-5ffUc/s1600-h/vi-arm-hello.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_X0w1RXq9I4E/S5AstbIZA8I/AAAAAAAAANI/2v03m-5ffUc/s320/vi-arm-hello.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The file above is saved as test.c, and compiled with:-&amp;nbsp;&amp;nbsp;gcc test.c&lt;/div&gt;&lt;div&gt;the resulting file is called a.out,&amp;nbsp;run it with ./a.out to see 'hello' appear on the screen.&lt;br /&gt;There are numerous options which can be applied at compile time.&lt;br /&gt;If you do not want the output file to be called a.out, use gcc -o myoutputfile test.c&lt;br /&gt;the -g option will produce debugging information for the gdb debugger to use.&lt;br /&gt;See the gcc manual for all options. &amp;nbsp;&lt;a href="http://gcc.gnu.org/onlinedocs/"&gt;http://gcc.gnu.org/onlinedocs/&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;as you can see below, a.out does not run,&lt;br /&gt;./a.out is required.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_X0w1RXq9I4E/S5AsqPjpS1I/AAAAAAAAANA/nmGfbz8-hi8/s1600-h/arm-in+qemu.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_X0w1RXq9I4E/S5AsqPjpS1I/AAAAAAAAANA/nmGfbz8-hi8/s320/arm-in+qemu.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Below,&lt;br /&gt;using a terminal on the desktop and trying to compile test.c outside of the emulator. This causes an error indicating that ARM assembler instructions are not acceptable to the X86 compiler.&lt;br /&gt;This is expected behaviour. A cross compiler would be needed to compile for ARM on a PC.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_X0w1RXq9I4E/S5Ewf-qZgUI/AAAAAAAAANQ/_AiwQ1_RiFU/s1600-h/hello-on-x86.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="284" src="http://4.bp.blogspot.com/_X0w1RXq9I4E/S5Ewf-qZgUI/AAAAAAAAANQ/_AiwQ1_RiFU/s320/hello-on-x86.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6599454894873414377-4096985401624887544?l=atomicarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atomicarm.blogspot.com/feeds/4096985401624887544/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atomicarm.blogspot.com/2010/03/fedora-arm-in-qemu.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/4096985401624887544'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/4096985401624887544'/><link rel='alternate' type='text/html' href='http://atomicarm.blogspot.com/2010/03/fedora-arm-in-qemu.html' title='Fedora ARM in qemu'/><author><name>Mike Hewitt</name><uri>http://www.blogger.com/profile/05181139924811433955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_X0w1RXq9I4E/S5AstbIZA8I/AAAAAAAAANI/2v03m-5ffUc/s72-c/vi-arm-hello.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6599454894873414377.post-6886165795018085275</id><published>2010-03-03T14:03:00.000-08:00</published><updated>2010-08-29T07:29:23.777-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Reference'/><category scheme='http://www.blogger.com/atom/ns#' term='Tutorials'/><title type='text'>ARM (assembler) programming reference material</title><content type='html'>http://www.ethernut.de/en/documents/arm-inline-asm.html&lt;br /&gt;http://www.ee.ic.ac.uk/pcheung/teaching/ee2_computing/&lt;br /&gt;http://www.triplespark.net/elec/pdev/arm/at91sam7.html&lt;br /&gt;http://www.armtutorial.com/index.html&lt;br /&gt;http://www.peter-cockerell.net/aalp/html/frames.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6599454894873414377-6886165795018085275?l=atomicarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atomicarm.blogspot.com/feeds/6886165795018085275/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atomicarm.blogspot.com/2010/03/arm-programming-references.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/6886165795018085275'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/6886165795018085275'/><link rel='alternate' type='text/html' href='http://atomicarm.blogspot.com/2010/03/arm-programming-references.html' title='ARM (assembler) programming reference material'/><author><name>Mike Hewitt</name><uri>http://www.blogger.com/profile/05181139924811433955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6599454894873414377.post-2454483153168481883</id><published>2010-01-27T14:57:00.000-08:00</published><updated>2011-07-21T10:19:59.959-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Hacks'/><title type='text'>Elonex ONEt hacking</title><content type='html'>http://members.home.nl/janrinze/trendtac.html#Restoring_the_kernel_in_flash&lt;br /&gt;&lt;br /&gt;&lt;table cellpadding="5" cellspacing="0" style="table-layout: fixed;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td rowspan="2" style="overflow: hidden;" valign="top" width="16%"&gt;&lt;div class="smalltext"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;       &lt;td height="100%" valign="top" width="85%"&gt;&lt;table border="0"&gt;&lt;tbody&gt;&lt;tr&gt;         &lt;td valign="middle"&gt;&lt;a href="http://linuxlaptopforum.ark2webdesign.co.uk/index.php/topic,51.msg165.html#msg165"&gt;&lt;img alt="" border="0" src="http://linuxlaptopforum.ark2webdesign.co.uk/Themes/default/images/post/xx.gif" /&gt;&lt;/a&gt;&lt;/td&gt;         &lt;td valign="middle"&gt;&lt;div id="subject_165" style="font-weight: bold;"&gt;&lt;a href="http://linuxlaptopforum.ark2webdesign.co.uk/index.php/topic,51.msg165.html#msg165"&gt;MiniBook as sold by Maplin and Novatech &lt;/a&gt;          &lt;/div&gt;&lt;div class="smalltext"&gt;« &lt;b&gt; on:&lt;/b&gt; September 11, 2008, 10:43:40 PM »&lt;/div&gt;&lt;/td&gt;         &lt;td align="right" height="20" style="font-size: smaller;" valign="bottom"&gt;&lt;br /&gt;&lt;/td&gt;        &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;hr class="hrcolor" size="1" width="100%" /&gt;&lt;div class="post"&gt;I think this is the same device as the Elonex Onet&lt;br /&gt;&lt;br /&gt;Device manufacturer:&lt;br /&gt;&lt;a href="http://www.cnmlifestyle.com/" target="_blank"&gt;http://www.cnmlifestyle.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The site of a Dutch guy who's had some success in hacking software and hardware. This includes links to the Dutch importer's site that are also worth looking at:&lt;br /&gt;&lt;a href="http://members.home.nl/janrinze/trendtac.html" target="_blank"&gt;http://members.home.nl/janrinze/trendtac.html&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;      &lt;/tr&gt;&lt;tr&gt;       &lt;td class="smalltext" valign="bottom" width="85%"&gt;&lt;table border="0" style="table-layout: fixed;"&gt;&lt;tbody&gt;&lt;tr&gt;         &lt;td class="smalltext" colspan="2" width="100%"&gt;&lt;br /&gt;&lt;/td&gt;        &lt;/tr&gt;&lt;tr&gt;         &lt;td class="smalltext" id="modified_165" valign="bottom"&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6599454894873414377-2454483153168481883?l=atomicarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atomicarm.blogspot.com/feeds/2454483153168481883/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atomicarm.blogspot.com/2010/01/elonex-onet-hacking.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/2454483153168481883'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/2454483153168481883'/><link rel='alternate' type='text/html' href='http://atomicarm.blogspot.com/2010/01/elonex-onet-hacking.html' title='Elonex ONEt hacking'/><author><name>Mike Hewitt</name><uri>http://www.blogger.com/profile/05181139924811433955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6599454894873414377.post-3181327518717702678</id><published>2010-01-27T14:08:00.000-08:00</published><updated>2010-03-05T09:39:46.824-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Hacks'/><title type='text'>xterm on the Elonex ONE</title><content type='html'>&lt;h3 class="post-title entry-title"&gt;&lt;a href="http://elonexone.blogspot.com/2008/08/xterm-on-elonex-one.html"&gt;xterm on the Elonex ONE&lt;/a&gt; &lt;/h3&gt;Three of the members of our &lt;a href="http://groups.google.co.uk/group/elonexone"&gt;Google Group&lt;/a&gt; have pooled their ideas and come up with a way to get the "xterm" terminal console onto the ONE's menu.&lt;br /&gt;&lt;br /&gt;This is probably going to be a very useful thing to do, as I can imagine that lots of other Elonex ONE tips are going to start: "open up xterm and type the following commands..."&lt;br /&gt;&lt;br /&gt;Anyway this is what you have to do to get xterm on your menu:&lt;br /&gt;&lt;br /&gt;Pop up the virtual keyboard with alt-tab and hover over the xkbd logo.&lt;br /&gt;&lt;br /&gt;Hold down the left button and select 'manual' and miraculously xterm will appear, running as "root".&lt;br /&gt;type: cd /home/user&lt;br /&gt;type: vi .icewm/menu&lt;br /&gt;..then you're in the menu file. Find a suitable location for your menu entry, and type a line that says:&lt;br /&gt;prog    "xterm" xterm /bin/sh -c "xterm"&lt;br /&gt;Make sure it lines up like the other lines, then save and close the file. (If '-c' doesn't work, try '-x' instead.)&lt;br /&gt;Now hit the "One" button and see your new menu option.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6599454894873414377-3181327518717702678?l=atomicarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atomicarm.blogspot.com/feeds/3181327518717702678/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atomicarm.blogspot.com/2010/01/xterm-on-elonex-one.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/3181327518717702678'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/3181327518717702678'/><link rel='alternate' type='text/html' href='http://atomicarm.blogspot.com/2010/01/xterm-on-elonex-one.html' title='xterm on the Elonex ONE'/><author><name>Mike Hewitt</name><uri>http://www.blogger.com/profile/05181139924811433955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6599454894873414377.post-6886360475050705701</id><published>2010-01-27T14:00:00.000-08:00</published><updated>2011-07-21T10:36:25.950-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Hardware'/><category scheme='http://www.blogger.com/atom/ns#' term='Hacks'/><title type='text'>Elonex ONEt has ARM processor</title><content type='html'>Your best bet is the Dutch Trendtac user group... I have found that &lt;br /&gt;gang a very helpful bunch and with the most advanced "hacking" &lt;br /&gt;experience: &lt;br /&gt;&lt;a href="http://www.google.com/url?sa=D&amp;amp;q=http://trendtac.hyves.nl/&amp;amp;usg=AFQjCNEiu4D_J8fruta04yzwqwFvcQARZA" rel="nofollow" target="_blank"&gt;http://trendtac.hyves.nl/&lt;/a&gt; &lt;br /&gt;There are a couple of thread there, specifically "Apps" and "Games" &lt;br /&gt;which have a collection of interesting stuff, mainly for me VNC viewer &lt;br /&gt;and Doom (!) &lt;br /&gt;&lt;br /&gt;Your first port of call though should be this website which has a &lt;br /&gt;small collection of useful software: &lt;br /&gt;&lt;a href="http://www.google.com/url?sa=D&amp;amp;q=http://www.xs4all.nl/%7Ejostht/epc/&amp;amp;usg=AFQjCNEF2lLNsKZuLd-XDUcdSo00FpbGRA" rel="nofollow" target="_blank"&gt;http://www.xs4all.nl/~jostht/epc/&lt;/a&gt; &lt;br /&gt;Ultimately you can grab and convert Debian Lenny mipsel packages &lt;br /&gt;(&lt;a href="http://www.google.com/url?sa=D&amp;amp;q=http://www.debian.org/distrib/packages&amp;amp;usg=AFQjCNEQqKc-H170t3h_GLyGPGIuVI8KNw" rel="nofollow" target="_blank"&gt;http://www.debian.org/distrib/packages&lt;/a&gt;) to .xap format (the OneT's &lt;br /&gt;format) with "mkxap" script available at the URL above. In short the &lt;br /&gt;procedure is as follows on either a Linux box, through the OneT's &lt;br /&gt;xterm or root console or in a Cygwin prompt: &lt;br /&gt;&lt;br /&gt;1. go to a new directory, i.e. "mkdir temp", "cd temp" &lt;br /&gt;2. download the .deb package from the Debian website &lt;br /&gt;2. expand the .deb package with "ar -x &lt;package name=""&gt;.deb" &lt;br /&gt;3. uncompress the data.tar.gz file "tar zxvf &lt;package name=""&gt;.tar.gz" in &lt;br /&gt;its component directories &lt;br /&gt;4. repackage the file as a .xap "mkxap &lt;package name=""&gt; directories &lt;br /&gt;5. you can now go to the Software installer and install the .xap &lt;br /&gt;and .info files from the "temp" directory &lt;br /&gt;&lt;/package&gt;&lt;/package&gt;&lt;/package&gt;&lt;br /&gt;Please remember to check for dependancies for the Debian packages on &lt;br /&gt;download page as you may need to convert those too for the binaries to &lt;br /&gt;work. &lt;br /&gt;It's a clunky process but I have succesfully converted a couple of &lt;br /&gt;programs and it is a whole lot simpler than building a cross-compiler &lt;br /&gt;environment and make your own binaries! ;-) &lt;br /&gt;&lt;br /&gt;On the other hand there are a number of wiser people than me out there &lt;br /&gt;working at getting proper debian running on this low-spec gadget and &lt;br /&gt;that will make it a lot more useful. &lt;br /&gt;&lt;br /&gt;Bear in mind that run-of-the-mill techies are not enough for hacking &lt;br /&gt;this gadget... you'll need people with experience of building software &lt;br /&gt;on non-x86 cpu. Or just a lot of Googling and trial and error (I'm in &lt;br /&gt;this category)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: medium;"&gt;Sites with specialist Elonex ONEt software&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://freespace.virgin.net/hugh.satow/gtk/" rel="nofollow"&gt;http://freespace.virgin.net/hugh.satow/gtk/&lt;/a&gt; has some Card Games and some Puzzles and a quick note taking program - I particularly like the puzzles.&lt;br /&gt;&lt;br /&gt;Each of these additional programs use up one of the icon spaces on the Elonex ONEt desktop - you have 5 screens of 15 icons, 75 in total - and some of the icons only want to display in certain places, which can mean that sometimes you add a program and don't see an icon because it's hidden by one for another program. To solve this you need to edit the relevant .desktop file. The simplest way to do this is to use the "Nedit" program downloaded from  - launch the program, then select file open and type in the full path name of the file you want to edit - you discover the pathname by using the Bon Echo Internet Browser - type the address file:///share/applications into the Browser address bar (and, yes, you do need three "slashes" together - the pathname you want is: /share/applications/&lt;b&gt;programname&lt;/b&gt;.desktop - replace &lt;b&gt;programname&lt;/b&gt; by the actual name used for the file, when you edit the file the number on the line that starts Categories= determines which screen the icon appears on (numbered from 1 to 5) and the number on the line that starts ItemIndex= determines the position on the screen (numbered from 0 to 14) - a number of -1 means "place at the end" a # symbol at the beginning of a line makes it a comment so it's ignored - leaving out or commenting out the ItemIndex= line let's the Elonex place the icon at the earliest available position - if an icon cannot be placed at the requested position it will be placed at the next available later position (but never at an earlier position) - the actual places are determined by the order in which the files are read when the computer starts - so you won't see your changes until you restart the computer.&lt;br /&gt;&lt;br /&gt;You can now understand why I quite like Firefox Addons and Flash Games (they don't use up any of your icons) and Games and Puzzles where one icon launches a program giving you access to many games or puzzles (they give you a lot of value for each icon used).&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6599454894873414377-6886360475050705701?l=atomicarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atomicarm.blogspot.com/feeds/6886360475050705701/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atomicarm.blogspot.com/2010/01/elonex-onet-has-arm-processor.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/6886360475050705701'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/6886360475050705701'/><link rel='alternate' type='text/html' href='http://atomicarm.blogspot.com/2010/01/elonex-onet-has-arm-processor.html' title='Elonex ONEt has ARM processor'/><author><name>Mike Hewitt</name><uri>http://www.blogger.com/profile/05181139924811433955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6599454894873414377.post-7150723517445057265</id><published>2010-01-26T14:45:00.000-08:00</published><updated>2010-03-05T09:56:59.071-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Programming'/><category scheme='http://www.blogger.com/atom/ns#' term='Hardware'/><title type='text'>Building Bare-Metal ARM Systems with GNU</title><content type='html'>&lt;a href="http://www.embedded.com/design/opensource/200000632?_requestid=241171"&gt;Building Bare-Metal ARM Systems with GNU: 10 part series&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6599454894873414377-7150723517445057265?l=atomicarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atomicarm.blogspot.com/feeds/7150723517445057265/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atomicarm.blogspot.com/2010/01/building-bare-metal-arm-systems-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/7150723517445057265'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/7150723517445057265'/><link rel='alternate' type='text/html' href='http://atomicarm.blogspot.com/2010/01/building-bare-metal-arm-systems-with.html' title='Building Bare-Metal ARM Systems with GNU'/><author><name>Mike Hewitt</name><uri>http://www.blogger.com/profile/05181139924811433955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6599454894873414377.post-6110738182462939149</id><published>2010-01-26T14:38:00.000-08:00</published><updated>2010-06-01T07:21:54.617-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Programming'/><category scheme='http://www.blogger.com/atom/ns#' term='Reference'/><title type='text'>GNU ARM toolchain guide from IBM</title><content type='html'>&amp;nbsp;Extract:-&lt;br /&gt;&lt;br /&gt;The toolchain provides the ever-popular GDB for debugging low-level                 programs. When the program is targeted for a  single-board computer with a                 JTAG or ICE unit attached, you can use the Sourcery G++  Lite debugger                 (gdb) to debug the ARM code remotely.&lt;br /&gt;If you wish to test the code as I did—on the Android  Linux system                 running on a mobile phone—you need to attach the phone  to the                 workstation using the USB cable that came with it, then  use the Android                 software development kit's (SDK's) &lt;code&gt;adb push&lt;/code&gt;                 command to transfer the program to the phone. Once on  the phone, in a                 directory that can contain executable code  (/data/local/bin), make the                 program executable by issuing the &lt;code&gt;chmod 555 hw&lt;/code&gt;                 command. (The &lt;code&gt;chmod&lt;/code&gt; command on Android  doesn't                 use &lt;code&gt;+x&lt;/code&gt;, so &lt;code&gt;555&lt;/code&gt; is                 necessary, instead.)&lt;br /&gt;Finally, use the &lt;code&gt;adb shell&lt;/code&gt; command to  connect to                 the phone, use &lt;code&gt;cd&lt;/code&gt; to change to the correct                 directory, and run it with &lt;code&gt;./hw&lt;/code&gt;. If all  goes                 according to plan, the program should respond as it did  on my phone, by                 greeting you with "Hello Android!"&lt;br /&gt;&lt;br /&gt;Read more here:- &lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.ibm.com/developerworks/linux/library/l-arm-toolchain/index.html"&gt;GNU ARM toolchain guide from IBM&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6599454894873414377-6110738182462939149?l=atomicarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atomicarm.blogspot.com/feeds/6110738182462939149/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atomicarm.blogspot.com/2010/01/gnu-arm-assembler-guide-from-ibm.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/6110738182462939149'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/6110738182462939149'/><link rel='alternate' type='text/html' href='http://atomicarm.blogspot.com/2010/01/gnu-arm-assembler-guide-from-ibm.html' title='GNU ARM toolchain guide from IBM'/><author><name>Mike Hewitt</name><uri>http://www.blogger.com/profile/05181139924811433955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6599454894873414377.post-3753507377702147169</id><published>2010-01-26T12:55:00.000-08:00</published><updated>2010-08-29T07:30:06.931-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Programming'/><category scheme='http://www.blogger.com/atom/ns#' term='Tutorials'/><title type='text'>GNU ARM Assembler 3 page quick reference</title><content type='html'>&lt;a href="http://www.google.co.uk/url?sa=t&amp;amp;source=web&amp;amp;ct=res&amp;amp;cd=10&amp;amp;ved=0CDcQFjAJ&amp;amp;url=http%3A%2F%2Fmicrocross.com%2FGNU-ARM-Assy-Quick-Ref.pdf&amp;amp;ei=gVFfS4mkPMbKjAe5gOm2DA&amp;amp;usg=AFQjCNFPuj53rDmNIwbgSp44wCds0xhm-Q&amp;amp;sig2=kCER2c9hz5mbsiCOl5n6yA"&gt;Assembler Quick reference&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.google.co.uk/url?sa=t&amp;amp;source=web&amp;amp;ct=res&amp;amp;cd=17&amp;amp;ved=0CCMQFjAGOAo&amp;amp;url=ftp%3A%2F%2Fftp.cs.man.ac.uk%2Fpub%2Fapt%2Fpeve%2FPEVE05%2FSlides%2F02_ARMassembly.pdf&amp;amp;ei=6FZfS9-zFsTKjAf078y0DA&amp;amp;usg=AFQjCNHVk1Gfj9YoAbTmElrDL7PYmW6Ztw&amp;amp;sig2=GS7N2RRVVmKNQdgZSv6Ovw"&gt; Not so quick at 30+ pages&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.ethernut.de/en/documents/arm-inline-asm.html"&gt; ARM GCC inline assembly&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6599454894873414377-3753507377702147169?l=atomicarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atomicarm.blogspot.com/feeds/3753507377702147169/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atomicarm.blogspot.com/2010/01/gnu-arm-assembler-3-page-quick.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/3753507377702147169'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/3753507377702147169'/><link rel='alternate' type='text/html' href='http://atomicarm.blogspot.com/2010/01/gnu-arm-assembler-3-page-quick.html' title='GNU ARM Assembler 3 page quick reference'/><author><name>Mike Hewitt</name><uri>http://www.blogger.com/profile/05181139924811433955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6599454894873414377.post-4897119566947808215</id><published>2010-01-26T12:47:00.000-08:00</published><updated>2010-08-29T07:30:36.048-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Reference'/><category scheme='http://www.blogger.com/atom/ns#' term='Tutorials'/><title type='text'>Free ARM programming book</title><content type='html'>&lt;a href="http://www.arm.com/miscPDFs/9658.pdf"&gt; Free ARM programming book as PDF&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6599454894873414377-4897119566947808215?l=atomicarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atomicarm.blogspot.com/feeds/4897119566947808215/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atomicarm.blogspot.com/2010/01/free-arm-programming-book.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/4897119566947808215'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/4897119566947808215'/><link rel='alternate' type='text/html' href='http://atomicarm.blogspot.com/2010/01/free-arm-programming-book.html' title='Free ARM programming book'/><author><name>Mike Hewitt</name><uri>http://www.blogger.com/profile/05181139924811433955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6599454894873414377.post-1072234093820672015</id><published>2010-01-26T12:41:00.000-08:00</published><updated>2010-08-29T07:31:05.834-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Programming'/><category scheme='http://www.blogger.com/atom/ns#' term='Tutorials'/><category scheme='http://www.blogger.com/atom/ns#' term='Assembler'/><title type='text'>Whirlwind Tour of ARM Assembly</title><content type='html'>&lt;h1 id="ch-" title="ch-"&gt;23.   Whirlwind Tour of ARM Assembly&lt;/h1&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.coranac.com/tonc/text/asm.htm#sec-intro"&gt;Introduction&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.coranac.com/tonc/text/asm.htm#sec-asm"&gt;General assembly&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.coranac.com/tonc/text/asm.htm#sec-arm"&gt;ARM assembly&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.coranac.com/tonc/text/asm.htm#sec-thumb"&gt;THUMB assembly&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.coranac.com/tonc/text/asm.htm#sec-gas"&gt;GAS: the GNU assembler&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.coranac.com/tonc/text/asm.htm#sec-cpy"&gt;A real world example: fast 16/32-bit copiers&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;a href="http://www.coranac.com/tonc/text/asm.htm"&gt; Original source here&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6599454894873414377-1072234093820672015?l=atomicarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atomicarm.blogspot.com/feeds/1072234093820672015/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atomicarm.blogspot.com/2010/01/whirlwind-tour-of-arm-assembly.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/1072234093820672015'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/1072234093820672015'/><link rel='alternate' type='text/html' href='http://atomicarm.blogspot.com/2010/01/whirlwind-tour-of-arm-assembly.html' title='Whirlwind Tour of ARM Assembly'/><author><name>Mike Hewitt</name><uri>http://www.blogger.com/profile/05181139924811433955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6599454894873414377.post-4182607886418105141</id><published>2010-01-26T11:58:00.000-08:00</published><updated>2012-01-02T07:56:28.881-08:00</updated><title type='text'>Development tools and boards from Olimex</title><content type='html'>&lt;iframe frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://rcm-uk.amazon.co.uk/e/cm?t=atoarm-21&amp;amp;o=2&amp;amp;p=8&amp;amp;l=as1&amp;amp;asins=B0046ANZ9S&amp;amp;ref=qf_sp_asin_til&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr" style="height: 240px; width: 120px;"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;DOCUMENTS:&lt;/b&gt;&lt;br /&gt;&lt;ul type="disk"&gt;&lt;li&gt;&lt;a href="http://www.olimex.com/dev/pdf/arm-jtag.pdf" target="_blank"&gt;ARM-JTAG.pdf&lt;/a&gt;    &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.arm.com/miscPDFs/13610.pdf" target="_blank"&gt;ARM low      cost debuggind application note&lt;/a&gt; by ARM Inc.   &lt;/li&gt;&lt;li&gt;&lt;a href="http://infocenter.arm.com/help/topic/com.arm.doc.dai0167b/DAI0167_students_guide_to_building_a_low_cost_development_environment.pdf" target="_blank"&gt;Student's      guide for building low cost debugging environment&lt;/a&gt; by ARM Inc.   &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects/wiggler_intro/index.html" target="_blank"&gt;ARM      Jtag debugging with wiggler and OpenOCD&lt;/a&gt; by Martin Thomas    &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects/openocd_intro/index.html" target="_blank"&gt;Using      OpenOCD as Flash programming tool&lt;/a&gt; article written by Martin Thomas    &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects/" target="_blank"&gt;ARM      projects with OpenOCD&lt;/a&gt; by Martin Thomas    &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.atmel.com/dyn/resources/prod_documents/atmel_tutorial_source.zip" target="_blank"&gt;Using      Open Source Tools for AT91SAM7 Cross Development - Revision B&lt;/a&gt; guide by      Jim Lynch    &lt;/li&gt;&lt;li&gt;(the old) &lt;a href="http://gnuarm.alexthegeek.com/" target="_blank"&gt;ARM Cross      Development with Eclipse (10MB) REV-3&lt;/a&gt; very detailed tutorial by Jim Lynch      how to setup and works with the free GNUARM tools ARM-JTAG and LPC2106 board.      The sample codes for this tutorial is &lt;a href="http://www.olimex.com/dev/soft/arm/LPC/sourcecode.zip" target="_blank"&gt;here&lt;/a&gt;.    &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.olimex.com/dev/pdf/Spanish%20language%20Tutorial%20ARM%20rev2.zip" target="_blank"&gt;ARM      Cross Development with Eclipse in Spanish language (3MB) REV-1&lt;/a&gt; Paul Aguayo      did a great job translating to Spanish language Jim Lynch's tutorial. He also      shrink the size of the document without missing the quality of the pictures      and tutorial text.    &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.usbdip.de/en/armdev/index.html" target="_blank"&gt;GNU      toolchain setup with openOCD&lt;/a&gt; by Michael Fischer    &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.arm.com/miscPDFs/13610.pdf" target="_blank"&gt;ARM low      cost development guide&lt;/a&gt; - paper from ARM Inc.  &lt;/li&gt;&lt;/ul&gt;&lt;b&gt;HARDWARE:&lt;/b&gt; &lt;br /&gt;&lt;ul type="disk"&gt;&lt;li&gt;&lt;a href="http://www.olimex.com/dev/images/arm-jtag-layout.gif" target="_blank"&gt;ARM JTAG connector      (top view)&lt;/a&gt;  &lt;/li&gt;&lt;/ul&gt;&lt;b&gt;SOFTWARE:&lt;/b&gt; &lt;br /&gt;&lt;ul type="disk"&gt;&lt;li&gt;&lt;a href="http://www.hjtag.com/" target="_blank"&gt;H-JTAG&lt;/a&gt; freeware RDI151      server supports ARM-JTAG for every debugger/IDE which have RDI151 support.      The setup should be as on &lt;a href="http://www.olimex.com/dev/images/ARM/H-JTAG-settings.gif" target="_blank"&gt;this      picture&lt;/a&gt;.    &lt;/li&gt;&lt;li&gt; open      source debugger diplom project from Dominic Rath with target to replace OCDdeamon      for debugging with Insight/GDB.    &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.yagarto.de/" target="_blank"&gt;YAGARTO&lt;/a&gt; open source      Windows nad MACOS GCC setup   &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.iar.se/" target="_blank"&gt;EWARM&lt;/a&gt; professional C compiler      and debugger.There is free kickstart version which is with unlimited assembly      language and 32K limit for C code from IAR Systems AB Sweden. Tested to work      with H-JTAG RDI151 and our ARM-JTAG. The flash download to our LPC2138 board      show about 30% slower flash programming than the expensive USB J-Link adapter      from Segger. According to IAR Systems their &lt;a href="http://www.iar.com/p43943/p43943_eng.php" target="_blank"&gt;EW-ARM      is benchmark leader&lt;/a&gt;.    &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.rowley.co.uk/" target="_blank"&gt;CrossWork for ARM&lt;/a&gt;      IDE and debuger on top of GCC from Rowley Associates, this is the very first      package to support smoothly Wiggler and ARM-JTAG.    &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.macraigor.com/full_gnu.htm" target="_blank"&gt;OCDeamon&lt;/a&gt;      toolchain and debugger from Macraigor Systems. Quite unstabile software, when      it wants to work it works, when it doesn't want to work it doesn't. too dependand      of computer CPU speed, parallel port settings etc. Macraigor is the original      developer of Wiggler, but after the Wiggler clones flooded the internet they      don't support quite this product.    &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects/#winarm" target="_blank"&gt;WinARM&lt;/a&gt;      - easy to install open source GCC toolchain by Martin Thomas. Lots of examples      for our LPC boards are included in the installation. Simple tutorial how to      setup our ARM-JTAG you can find &lt;a href="http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects/wiggler_intro/index.html" target="_blank"&gt;here&lt;/a&gt;.    &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.gnuarm.com/" target="_blank"&gt;GNUARM&lt;/a&gt; another GCC      toolchain from Arius.    &lt;/li&gt;&lt;li&gt;&lt;a href="http://fabathome.org/wiki/index.php?title=Fab%40Home:Model_1_Firmware" target="_blank"&gt;Do-it-yourself      3D printer&lt;/a&gt; with LPC-H2148 as controller, contain also instructions how      to setup Eclipse and GCC as development environment    &lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6599454894873414377-4182607886418105141?l=atomicarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atomicarm.blogspot.com/feeds/4182607886418105141/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atomicarm.blogspot.com/2010/01/development-tools-and-boards-from-www.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/4182607886418105141'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/4182607886418105141'/><link rel='alternate' type='text/html' href='http://atomicarm.blogspot.com/2010/01/development-tools-and-boards-from-www.html' title='Development tools and boards from Olimex'/><author><name>Mike Hewitt</name><uri>http://www.blogger.com/profile/05181139924811433955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6599454894873414377.post-1009018565284994510</id><published>2010-01-26T11:43:00.000-08:00</published><updated>2010-08-29T07:31:33.597-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Reference'/><category scheme='http://www.blogger.com/atom/ns#' term='Tutorials'/><title type='text'>New to ARM development?</title><content type='html'>If you are very new to ARM microcomputers, there’s no better introductory book&lt;br /&gt;than “The Insider’s Guide to the Philips ARM7-Based Microcontrollers” by&lt;br /&gt;Trevor Martin. Martin is an executive of Hitex, a UK vendor of embedded&lt;br /&gt;microcomputer development software and hardware and he obviously understands&lt;br /&gt;his material.&lt;br /&gt;You must register first, then you can download this e-book for free from the Hitex web site.&lt;br /&gt;http://www.hitex.co.uk/arm/lpc2000book/index.html&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This is another excellent introduction to ARM Cross Development With Eclipse Components, the free open source system, available as a free download with no need to register:-&lt;br /&gt;http://gnuarm.alexthegeek.com/ARM_Cross_Development_With_Eclipse_Components_Revision3_March_17_2006.pdf&lt;br /&gt;Other resources are available at &lt;a href="http://gnuarm.alexthegeek.com/"&gt; Alex the Geek &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Snippet from the Hitex book:-&lt;br /&gt;&lt;br /&gt;1.6 The ARM 7 Instruction Set&lt;br /&gt;Now that we have an idea of the ARM7 architecture, programmers model and operating modes we need to take&lt;br /&gt;a look at its instruction set or rather sets. Since all our programming examples are written in C there is no need&lt;br /&gt;to be an expert ARM7 assembly programmer. However an understanding of the underlying machine code is&lt;br /&gt;very important in developing efficient programs. Before we start our overview of the ARM7 instructions it is&lt;br /&gt;important to set out a few technicalities. The ARM7 CPU has two instruction sets: the ARM instruction set which&lt;br /&gt;has 32-bit wide instructions and the THUMB instruction set which has 16-bit wide instructions. In the following&lt;br /&gt;section the use of the word ARM means the 32-bit instruction set and ARM7 refers to the CPU.&lt;br /&gt;The ARM7 is designed to operate as a big-endian or little-endian processor. That is, the MSB is located at the&lt;br /&gt;high order bit or the low order bit. You may be pleased to hear that the LPC2000 family fixes the endianess of&lt;br /&gt;the processor as little endian (i.e. MSB at highest bit address), which does make it a lot easier to work with.&lt;br /&gt;However the ARM7 compiler you are working with will be able to compile code as little endian or big endian.&lt;br /&gt;You must be sure you have it set correctly or the compiled code will be back to front.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6599454894873414377-1009018565284994510?l=atomicarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atomicarm.blogspot.com/feeds/1009018565284994510/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atomicarm.blogspot.com/2010/01/new-to-arm-development.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/1009018565284994510'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/1009018565284994510'/><link rel='alternate' type='text/html' href='http://atomicarm.blogspot.com/2010/01/new-to-arm-development.html' title='New to ARM development?'/><author><name>Mike Hewitt</name><uri>http://www.blogger.com/profile/05181139924811433955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6599454894873414377.post-3946859508730814113</id><published>2010-01-24T10:08:00.001-08:00</published><updated>2012-01-02T07:53:57.147-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Hardware'/><title type='text'>CM-X300 Computer-On-Module   $49</title><content type='html'>&lt;iframe frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://rcm-uk.amazon.co.uk/e/cm?t=atoarm-21&amp;amp;o=2&amp;amp;p=8&amp;amp;l=as1&amp;amp;asins=B0046ANZ9S&amp;amp;ref=qf_sp_asin_til&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr" style="height: 240px; width: 120px;"&gt;&lt;/iframe&gt;&lt;/ br&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;http://www.compulab.co.il/x300/html/x300-cm-datasheet.htm?gclid=CIXkl9DOvZ8CFVBd4wodlRH3zQ&lt;br /&gt;&lt;br /&gt;&lt;div align="left"&gt;&lt;span style="color: black; font-family: Verdana; font-size: medium;"&gt;&lt;span style="background-color: yellow;"&gt;&amp;nbsp;CM-X300            Computer-On-Module&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="background-color: #ffff5b;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="background-color: #ffff75;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="background-color: #ffff91;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="background-color: #ffffa6;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="background-color: #ffffbb;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="background-color: #ffffd2;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="background-color: #ffffe1;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;table border="0" cellspacing="0"&gt;&lt;tbody&gt;&lt;tr&gt;                &lt;td valign="top"&gt;&lt;div align="center"&gt;&lt;a href="http://www.compulab.co.il/x300/img/x300-cm-top-m.jpg"&gt;&lt;img border="0" height="144" src="http://www.compulab.co.il/x300/img/x300-cm-top-s.jpg" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;                &lt;td valign="top"&gt;&lt;div align="center"&gt;&lt;a href="http://www.compulab.co.il/x300/img/x300-cm-bot-m.jpg"&gt;&lt;img border="0" height="144" src="http://www.compulab.co.il/x300/img/x300-cm-bot-s.jpg" width="199" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;              &lt;/tr&gt;&lt;tr&gt;                &lt;td valign="top"&gt;&lt;div align="center"&gt;&lt;strong&gt;&lt;span style="font-family: Arial; font-size: xx-small;"&gt;CM-X300&amp;nbsp;                  Top&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;/td&gt;                &lt;td valign="top"&gt;&lt;div align="center"&gt;&lt;strong&gt;&lt;span style="font-family: Arial; font-size: xx-small;"&gt;CM-X300                  Bottom&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;/td&gt;              &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;table border="0" height="30" style="width: 20px;"&gt;&lt;tbody&gt;&lt;tr&gt;                &lt;td width="100%"&gt;&lt;br /&gt;&lt;/td&gt;              &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;table border="1" cellpadding="15" cellspacing="1"&gt;&lt;tbody&gt;&lt;tr&gt;        &lt;td colspan="2"&gt;&lt;span style="font-family: Arial; font-size: medium;"&gt;&lt;b&gt;CM-X300          Highlights&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;    &lt;/tr&gt;&lt;tr&gt;        &lt;td valign="top" width="50%"&gt;&lt;table border="0" cellpadding="5" cellspacing="0"&gt;&lt;tbody&gt;&lt;tr&gt;              &lt;td align="center" valign="top"&gt;&lt;img border="0" height="16" src="http://www.compulab.co.il/arrow.gif" width="11" /&gt;&lt;/td&gt;              &lt;td&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&lt;strong&gt;Full-featured              Computer-On-Module starting at $49 !              &lt;/strong&gt;&lt;/span&gt;&lt;/td&gt;            &lt;/tr&gt;&lt;tr&gt;              &lt;td align="center" valign="top"&gt;&lt;img border="0" height="16" src="http://www.compulab.co.il/arrow.gif" width="11" /&gt;&lt;/td&gt;              &lt;td&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&lt;strong&gt;XScale PXA300 / PXA310 /                PXA320 CPU, up to 624 MHz, 32+32 KB              cache, WMMX2&lt;/strong&gt;&lt;/span&gt;&lt;/td&gt;            &lt;/tr&gt;&lt;tr&gt;              &lt;td align="center" valign="top"&gt;&lt;img border="0" height="16" src="http://www.compulab.co.il/arrow.gif" width="11" /&gt;&lt;/td&gt;              &lt;td&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&lt;strong&gt;64 - 128 Mbyte DDR&lt;/strong&gt;&lt;/span&gt;&lt;/td&gt;            &lt;/tr&gt;&lt;tr&gt;              &lt;td align="center" valign="top"&gt;&lt;img border="0" height="16" src="http://www.compulab.co.il/arrow.gif" width="11" /&gt;&lt;/td&gt;              &lt;td&gt;&lt;span style="color: black; font-family: Arial; font-size: x-small;"&gt;&lt;b&gt;512 Mbyte Flash Disk,                including filesystem protection&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;            &lt;/tr&gt;&lt;tr&gt;              &lt;td align="center" bgcolor="#ffffff" style="background-color: #eaf2ff;" valign="top"&gt;&lt;img border="0" height="16" src="http://www.compulab.co.il/arrow.gif" width="11" /&gt;&lt;/td&gt;              &lt;td bgcolor="#ffffff" style="background-color: #eaf2ff;"&gt;&lt;b&gt;&lt;span style="color: black; font-family: Arial; font-size: x-small;"&gt;WLAN                / WiFi 802.1&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;1b/g                In&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black; font-family: Arial; font-size: x-small;"&gt;terface&lt;/span&gt;&lt;/b&gt;&lt;/td&gt;            &lt;/tr&gt;&lt;tr&gt;              &lt;td align="center" bgcolor="#ffffff" style="background-color: #eaf2ff;" valign="top"&gt;&lt;img border="0" height="16" src="http://www.compulab.co.il/arrow.gif" width="11" /&gt;&lt;/td&gt;              &lt;td bgcolor="#ffffff" style="background-color: #eaf2ff;"&gt;&lt;span style="color: black; font-family: Arial; font-size: x-small;"&gt;&lt;b&gt;Bluetooth                interface&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;            &lt;/tr&gt;&lt;tr&gt;              &lt;td align="center" valign="top"&gt;&lt;img border="0" height="16" src="http://www.compulab.co.il/arrow.gif" width="11" /&gt;&lt;/td&gt;              &lt;td&gt;&lt;b&gt;&lt;span style="color: black; font-family: Arial; font-size: x-small;"&gt;Graphics controller supporting &lt;/span&gt;&lt;/b&gt;&lt;strong&gt;&lt;span style="color: black; font-family: Arial; font-size: x-small;"&gt;STN              and TFT panels wit&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;h                800&lt;span style="letter-spacing: -1pt;"&gt; x&amp;nbsp; &lt;/span&gt;600 m&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black; font-family: Arial; font-size: x-small;"&gt;ax resolution&lt;br /&gt;&lt;a href="http://www.compulab.co.il/x300/html/x300-lcd.htm"&gt;see LCD panel support&lt;/a&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/td&gt;            &lt;/tr&gt;&lt;tr&gt;              &lt;td align="center" valign="top"&gt;&lt;img border="0" height="16" src="http://www.compulab.co.il/arrow.gif" width="11" /&gt;&lt;/td&gt;              &lt;td&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&lt;b&gt;H/W support for H.264, MPEG-4,                H.263, MPEG-2, RealVideo, WMV9 and other video codecs.&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;            &lt;/tr&gt;&lt;tr&gt;              &lt;td align="center" valign="top"&gt;&lt;img border="0" height="16" src="http://www.compulab.co.il/arrow.gif" width="11" /&gt;&lt;/td&gt;              &lt;td&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&lt;strong&gt;General              purpose bus&lt;/strong&gt;&lt;/span&gt;&lt;/td&gt;            &lt;/tr&gt;&lt;tr&gt;              &lt;td align="center" valign="top"&gt;&lt;img border="0" height="16" src="http://www.compulab.co.il/arrow.gif" width="11" /&gt;&lt;/td&gt;              &lt;td&gt;&lt;span style="color: black; font-family: Arial; font-size: x-small;"&gt;&lt;b&gt;AC97, SDIO /                MMC interfaces&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;            &lt;/tr&gt;&lt;tr&gt;              &lt;td align="center" valign="top"&gt;&lt;img border="0" height="16" src="http://www.compulab.co.il/arrow.gif" width="11" /&gt;&lt;/td&gt;              &lt;td&gt;&lt;span style="color: black; font-family: Arial; font-size: x-small;"&gt;&lt;b&gt;Camera                Interface port&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;            &lt;/tr&gt;&lt;tr&gt;              &lt;td align="center" valign="top"&gt;&lt;img border="0" height="16" src="http://www.compulab.co.il/arrow.gif" width="11" /&gt;&lt;/td&gt;              &lt;td&gt;&lt;span style="color: black;"&gt;&lt;strong&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;Sound codec with speaker and microphone support              &lt;/span&gt; &lt;/strong&gt;&lt;/span&gt;&lt;/td&gt;            &lt;/tr&gt;&lt;tr&gt;              &lt;td align="center" valign="top"&gt;&lt;img border="0" height="16" src="http://www.compulab.co.il/arrow.gif" width="11" /&gt;&lt;/td&gt;              &lt;td&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&lt;b&gt;Touchscreen              Controller&lt;/b&gt; &lt;/span&gt;&lt;/td&gt;            &lt;/tr&gt;&lt;tr&gt;              &lt;td align="center" valign="top"&gt;&lt;img border="0" height="16" src="http://www.compulab.co.il/arrow.gif" width="11" /&gt;&lt;/td&gt;              &lt;td&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&lt;strong&gt;USB Slave / Host / OTG                ports&lt;/strong&gt;&lt;/span&gt;&lt;/td&gt;            &lt;/tr&gt;&lt;tr&gt;              &lt;td align="center" valign="top"&gt;&lt;img border="0" height="16" src="http://www.compulab.co.il/arrow.gif" width="11" /&gt;&lt;/td&gt;              &lt;td&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&lt;strong&gt;Serial ports, GPIO&lt;/strong&gt;&lt;/span&gt;&lt;/td&gt;            &lt;/tr&gt;&lt;tr&gt;              &lt;td align="center" valign="top"&gt;&lt;img border="0" height="16" src="http://www.compulab.co.il/arrow.gif" width="11" /&gt;&lt;/td&gt;              &lt;td&gt;&lt;span style="color: black; font-family: Arial; font-size: x-small;"&gt;&lt;strong&gt;100              Mbps Ethernet port&lt;/strong&gt;&lt;/span&gt;&lt;/td&gt;            &lt;/tr&gt;&lt;tr&gt;              &lt;td align="center" valign="top"&gt;&lt;img border="0" height="16" src="http://www.compulab.co.il/arrow.gif" width="11" /&gt;&lt;/td&gt;              &lt;td&gt;&lt;span style="color: black; font-family: Arial; font-size: x-small;"&gt;&lt;strong&gt;Very              low standby and active power &lt;/strong&gt;&lt;b&gt; consumption&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;            &lt;/tr&gt;&lt;tr&gt;              &lt;td align="center" valign="top"&gt;&lt;img border="0" height="16" src="http://www.compulab.co.il/arrow.gif" width="11" /&gt;&lt;/td&gt;              &lt;td&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&lt;b&gt;Battery charger and management                support&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;            &lt;/tr&gt;&lt;tr&gt;              &lt;td align="center" valign="top"&gt;&lt;img border="0" height="16" src="http://www.compulab.co.il/arrow.gif" width="11" /&gt;&lt;/td&gt;              &lt;td&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&lt;b&gt;66 x 44 x 7 mm&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;            &lt;/tr&gt;&lt;tr&gt;              &lt;td align="center" valign="top"&gt;&lt;img border="0" height="16" src="http://www.compulab.co.il/arrow.gif" width="11" /&gt;&lt;/td&gt;              &lt;td&gt;&lt;span style="color: black; font-family: Arial; font-size: x-small;"&gt;&lt;b&gt;Interchangeable              with other modules&lt;/b&gt;&lt;strong&gt; via CAMI connectors&lt;/strong&gt;&lt;/span&gt;&lt;/td&gt;            &lt;/tr&gt;&lt;tr&gt;              &lt;td align="center" valign="top"&gt;&lt;img border="0" height="16" src="http://www.compulab.co.il/arrow.gif" width="11" /&gt;&lt;/td&gt;              &lt;td&gt;&lt;a href="http://www.compulab.co.il/x300/html/x300-sb-datasheet.htm"&gt;&lt;span style="color: blue; font-family: Arial; font-size: x-small;"&gt;&lt;strong&gt;&lt;u&gt;SB-X300&lt;/u&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&lt;strong&gt;   - turns the CM-X300 module into a                tiny single board computer&lt;/strong&gt;&lt;/span&gt;&lt;/td&gt;            &lt;/tr&gt;&lt;tr&gt;              &lt;td align="center" valign="top"&gt;&lt;br /&gt;&lt;/td&gt;              &lt;td&gt;&lt;/td&gt;            &lt;/tr&gt;&lt;tr&gt;              &lt;td align="left" colspan="2" valign="top"&gt;&lt;br /&gt;&lt;/td&gt;            &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/td&gt;        &lt;td valign="top" width="50%"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&lt;strong&gt;The CM-X300 &lt;/strong&gt;is a small Computer-on-Module board designed to serve as a building        block in embedded applications. The CM-X300 has all the components          required to run operating systems such as Linux and Windows CE. Ready packages for          these operating systems are available from        CompuLab.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;The small size and low          power consumption of the CM-X300          allows its integration into hand-held and mobile devices, while its low        price makes it an ideal selection for cost-sensitive        applications.&amp;nbsp; The CM-X300 delivers a price / performance ratio significantly better than that of any other platform.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;The feature set of the CM-X300 module combines a        32-bit CPU, DDR, Flash Disk and vital computing peripherals. For embedded        applications, the CM-X300 provides a general purpose local bus, 100Mbit Ethernet,        serial ports, I/O lines and        other essential functions.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;Targeting the handheld application market          as well, the module provides integrated WLAN (WiFi) and Bluetooth          interfaces to implement industry standard wireless connectivity.          Integrated battery charging and management enables easy integration in battery-powered          mobile devices.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;The standardized CAMI ("CompuLab's        Aggregated Module Interface") connectors of the CM-X300 module allow          interchangeability with        other Computer-On-Module's available from CompuLab, enabling the flexibility required in        a dynamic market where application requirements        can change rapidly.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt; &lt;a href="http://www.compulab.co.il/x300/html/x300-os-support.htm"&gt;See O/S Support Coverage Map&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;For more information, see&lt;br /&gt;&lt;a href="http://www.compulab.co.il/x300/html/x300-developer.py"&gt;Developer        Resources&lt;/a&gt; page&lt;/span&gt;&lt;/b&gt; &lt;/td&gt;    &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div align="left"&gt;&lt;b&gt;&lt;span style="font-family: Arial; font-size: medium;"&gt;Block Diagram&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;img border="0" height="894" src="http://www.compulab.co.il/x300/img/x300-cm-blk.jpg" width="700" /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;span style="font-family: Arial; font-size: medium;"&gt;&lt;strong&gt;CM-X300 Features&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;"Option" column            specifies the configuration code required to have the particular            feature.&lt;br /&gt;"+" means that the feature is always available.&lt;/span&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;CPU, Memory and Busses&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;table border="1" cellpadding="3" cellspacing="1"&gt;&lt;tbody&gt;&lt;tr&gt;        &lt;td align="center" valign="middle"&gt;&lt;b&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;Feature&lt;/span&gt;&lt;/b&gt;&lt;/td&gt;        &lt;td align="center" valign="middle"&gt;&lt;b&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;Specifications&lt;/span&gt;&lt;/b&gt;&lt;/td&gt;        &lt;td align="center" valign="middle"&gt;&lt;b&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;Option&lt;/span&gt;&lt;/b&gt;&lt;/td&gt;    &lt;/tr&gt;&lt;tr&gt;        &lt;td&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;CPU &lt;/span&gt;&lt;/td&gt;        &lt;td&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;Marvell XScale PXA300 / PXA310 / PXA320          CPU&lt;br /&gt;208 / 624 MHz, WMMX2,          2*128K internal SRAM&lt;br /&gt;32 KB I-cache and 32 KB D-cache, WB, 128 MB address space&lt;br /&gt;DMA and&amp;nbsp; Interrupt controllers,          Timers&lt;/span&gt;&lt;/td&gt;        &lt;td align="center"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;C&lt;/span&gt;&lt;/td&gt;    &lt;/tr&gt;&lt;tr&gt;        &lt;td&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;RAM&lt;/span&gt;&lt;/td&gt;        &lt;td&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;64 - 128 MB, DDR, 208 MHz, 16-bit&lt;/span&gt;&lt;/td&gt;        &lt;td align="center"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;D&lt;/span&gt;&lt;/td&gt;    &lt;/tr&gt;&lt;tr&gt;        &lt;td&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;NAND Flash Disk&lt;/span&gt;&lt;/td&gt;        &lt;td valign="top"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;512 Mbytes, bootable.&lt;/span&gt;&lt;/td&gt;        &lt;td align="center" valign="top"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;N&lt;/span&gt;&lt;/td&gt;    &lt;/tr&gt;&lt;tr&gt;        &lt;td&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;External local bus&lt;/span&gt;&lt;/td&gt;        &lt;td&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;16-bit,&amp;nbsp;          variable rate up to 52 MHz, 3.3V tolerance&lt;/span&gt;&lt;/td&gt;        &lt;td align="center"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;+&lt;/span&gt;&lt;/td&gt;    &lt;/tr&gt;&lt;tr&gt;        &lt;td&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;AC97 bus&lt;/span&gt;&lt;/td&gt;        &lt;td&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;AC97 / AMC97 Rev 2.1          compliant&lt;/span&gt;&lt;/td&gt;        &lt;td align="center"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;+&lt;/span&gt;&lt;/td&gt;    &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;b&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;Peripherals&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;table border="1" cellpadding="0" cellspacing="1" style="width: 98%;"&gt;&lt;tbody&gt;&lt;tr&gt;                &lt;td nowrap="nowrap" style="padding: 2.25pt;"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&lt;b&gt;Feature&lt;/b&gt;&amp;nbsp;&lt;/span&gt;                  &lt;/div&gt;&lt;/td&gt;                &lt;td style="padding: 2.25pt;"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&lt;b&gt;Specifications&lt;/b&gt;&lt;/span&gt;                  &lt;/div&gt;&lt;/td&gt;                &lt;td style="padding: 2.25pt;"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&lt;b&gt;Option&lt;/b&gt;&lt;/span&gt;                  &lt;/div&gt;&lt;/td&gt;              &lt;/tr&gt;&lt;tr&gt;                &lt;td nowrap="nowrap" style="padding: 2.25pt;"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;Graphics                  Controller&amp;nbsp;&lt;/span&gt;                  &lt;/div&gt;&lt;/td&gt;                &lt;td style="padding: 2.25pt;"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;8/16                  bit color, TFT / STN, frame                  buffer in CPU SRAM or system DDR&lt;br /&gt;Resolution: up to 800 x 480 x 16 without restrictions, and up                  to 1024 x 1024 with some restrictions about overlays, BPP and                  pixel clock.&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;                &lt;td style="padding: 2.25pt;"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;+&lt;/span&gt;                  &lt;/div&gt;&lt;/td&gt;              &lt;/tr&gt;&lt;tr&gt;                &lt;td nowrap="nowrap" style="padding: 2.25pt;"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;Camera                  Interface&amp;nbsp;&lt;/span&gt;                  &lt;/div&gt;&lt;/td&gt;                &lt;td style="padding: 2.25pt;"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;Direct                  camera sensor support, max resolution 2560 x 2048, pixel clock                  up to 52MHz. Available only with PXA310 CPU.&lt;/span&gt;                  &lt;/div&gt;&lt;/td&gt;                &lt;td style="padding: 2.25pt;"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;C624M&lt;/span&gt;                  &lt;/div&gt;&lt;/td&gt;              &lt;/tr&gt;&lt;tr&gt;                &lt;td nowrap="nowrap" style="padding: 2.25pt;"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;Hardware                  acceleration&lt;/span&gt;                  &lt;/div&gt;&lt;/td&gt;                &lt;td style="padding: 2.25pt;" valign="top"&gt;&lt;div align="left"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;Supports up to D1                  decode and encode performance for codecs including H.264,                  MPEG-4, H.263, MPEG-2, RealVideo and Microsoft WMV9.&lt;br /&gt;Hardware scaling, rotation and other raster graphics                  operations.&lt;br /&gt;* &lt;i&gt;Implemented by PXA310 CPU&lt;/i&gt;&lt;/span&gt;                &lt;/div&gt;&lt;/td&gt;                &lt;td style="padding: 2.25pt;"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;C624M&lt;/span&gt;                &lt;/td&gt;              &lt;/tr&gt;&lt;tr&gt;                &lt;td nowrap="nowrap" style="padding: 2.25pt;"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;USB&lt;/span&gt;                  &lt;/div&gt;&lt;/td&gt;                &lt;td style="padding: 2.25pt;" valign="top"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;Host/Slave                  (OTG) port, 12 Mbps, 23-endpoints (in slave mode), OHCI v1.0&lt;br /&gt;Host port (shared with Bluetooth, therefore not available with                  "W" option)&lt;/span&gt;                &lt;/div&gt;&lt;/td&gt;                &lt;td style="padding: 2.25pt;" valign="top"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;+&lt;br /&gt;&lt;strike&gt;W&lt;/strike&gt;&lt;/span&gt;                  &lt;/div&gt;&lt;/td&gt;              &lt;/tr&gt;&lt;tr&gt;                &lt;td nowrap="nowrap" style="padding: 2.25pt;"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;Serial                  Ports&lt;br /&gt;(UARTs)&lt;/span&gt;                  &lt;/div&gt;&lt;/td&gt;                &lt;td style="padding: 2.25pt;" valign="top"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;Up                  to 3 UART ports, 16550 compatible, max 921 kbps&lt;br /&gt;COM-A - RS232, Rx / Tx&lt;br /&gt;COM-C - TTL, full modem controls&lt;br /&gt;COM-D - TTL, partial modem controls&lt;/span&gt;                  &lt;/div&gt;&lt;/td&gt;                &lt;td style="padding: 2.25pt;" valign="top"&gt;&lt;div align="center" style="text-align: center;"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&lt;br /&gt;+&lt;br /&gt;+&lt;br /&gt;+&lt;/span&gt;                  &lt;/div&gt;&lt;/td&gt;              &lt;/tr&gt;&lt;tr&gt;                &lt;td nowrap="nowrap" style="padding: 2.25pt;"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;General                  Purpose I/O&lt;/span&gt;                  &lt;/div&gt;&lt;/td&gt;                &lt;td style="padding: 2.25pt;"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;42                  dedicated lines (32 I2C-controlled + 10 memory-mapped) plus                  additional lines shared with other functions. Can also be used                  as interrupt inputs.&lt;/span&gt;                  &lt;/div&gt;&lt;/td&gt;                &lt;td style="padding: 2.25pt;"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;+&lt;/span&gt;                  &lt;/div&gt;&lt;/td&gt;              &lt;/tr&gt;&lt;tr&gt;                &lt;td nowrap="nowrap" style="padding: 2.25pt;"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;Keyboard                  &amp;amp; mouse&lt;/span&gt;                  &lt;/div&gt;&lt;/td&gt;                &lt;td style="padding: 2.25pt;"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;USB,                  keypad or redirection from COM port&lt;/span&gt;                  &lt;/div&gt;&lt;/td&gt;                &lt;td style="padding: 2.25pt;"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;+&lt;/span&gt;                  &lt;/div&gt;&lt;/td&gt;              &lt;/tr&gt;&lt;tr&gt;                &lt;td nowrap="nowrap" style="padding: 2.25pt;"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;Ethernet&lt;/span&gt;                  &lt;/div&gt;&lt;/td&gt;                &lt;td style="padding: 2.25pt;"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;Davicom                  DM9000A MAC &amp;amp; PHY, 10/100BaseT, Activity LED's&lt;/span&gt;                  &lt;/div&gt;&lt;/td&gt;                &lt;td style="padding: 2.25pt;"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;E&lt;/span&gt;                  &lt;/div&gt;&lt;/td&gt;              &lt;/tr&gt;&lt;tr&gt;                &lt;td nowrap="nowrap" style="padding: 2.25pt;"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;Audio                  codec&lt;/span&gt;                  &lt;/div&gt;&lt;/td&gt;                &lt;td style="padding: 2.25pt;"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;Wolfson                  W9712L, AC97 interface, mono microphone input, stereo line                  input and 25 mW output for active speakers&lt;/span&gt;                  &lt;/div&gt;&lt;/td&gt;                &lt;td style="padding: 2.25pt;"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;AT&lt;/span&gt;                  &lt;/div&gt;&lt;/td&gt;              &lt;/tr&gt;&lt;tr&gt;                &lt;td nowrap="nowrap" style="padding: 2.25pt;"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;Touchscreen                  ctrl.&lt;/span&gt;                  &lt;/div&gt;&lt;/td&gt;                &lt;td style="padding: 2.25pt;"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;A                  part of the W9712L codec chip. Supports resistive touch                  panels.&lt;/span&gt;                  &lt;/div&gt;&lt;/td&gt;                &lt;td style="padding: 2.25pt;"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;AT&lt;/span&gt;                  &lt;/div&gt;&lt;/td&gt;              &lt;/tr&gt;&lt;tr&gt;                &lt;td style="padding: 2.25pt;"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&lt;span style="color: black;"&gt;RTC&lt;/span&gt;&lt;/span&gt;                  &lt;/div&gt;&lt;/td&gt;                &lt;td style="padding: 2.25pt;"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&lt;span style="color: black;"&gt;Real Time Clock, powered by external lithium battery&lt;/span&gt;&lt;/span&gt;                  &lt;/div&gt;&lt;/td&gt;                &lt;td style="padding: 2.25pt;"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&lt;span style="color: black;"&gt;+&lt;/span&gt;&lt;/span&gt;                  &lt;/div&gt;&lt;/td&gt;              &lt;/tr&gt;&lt;tr&gt;                &lt;td style="padding: 2.25pt;"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&lt;span style="color: black;"&gt;WiFi&lt;br /&gt;Interface&lt;/span&gt;&lt;/span&gt;                  &lt;/div&gt;&lt;/td&gt;                &lt;td style="padding: 2.25pt;"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&lt;span style="color: black;"&gt;Implements                  802.11b/g wireless connectivity standard&lt;br /&gt;Supports Node to Access Point and Multi-Node (w/o access                  point) methods of connection. (but cannot act as Access Point)&lt;br /&gt;&lt;/span&gt;Marvell                  88W8686 &lt;span style="color: black;"&gt;&amp;nbsp;802.11b/g chipset.&lt;br /&gt;&lt;/span&gt;On-board ceramic chip antenna and connector for                  external antenna.&lt;/span&gt;                &lt;/div&gt;&lt;/td&gt;                &lt;td style="padding: 2.25pt;"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&lt;span style="color: black;"&gt;W&lt;/span&gt;&lt;/span&gt;                  &lt;/div&gt;&lt;/td&gt;              &lt;/tr&gt;&lt;tr&gt;                &lt;td nowrap="nowrap" style="padding: 2.25pt;"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&lt;span style="color: black;"&gt;Bluetooth&lt;/span&gt;&lt;/span&gt;                  &lt;/div&gt;&lt;/td&gt;                &lt;td style="padding: 2.25pt;"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;Bluetooth                  V2.0+EDR system. CSR BlueCore4-ROM chipset, 2.4GHz band, up to                  3Mbps. On-board ceramic chip antenna and connector for                  external antenna.&lt;br /&gt;Bluetooth and WiFi interfaces are always assembled together,                  and therefore are specified by the same assembling option.&lt;/span&gt;                  &lt;/div&gt;&lt;/td&gt;                &lt;td style="padding: 2.25pt;"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&lt;span style="color: black;"&gt;W&lt;/span&gt;&lt;/span&gt;                  &lt;/div&gt;&lt;/td&gt;              &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;strong&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;Electrical,        Mechanical and Environmental Specifications&lt;/span&gt;        &lt;/strong&gt;&lt;br /&gt;&lt;table border="1" cellpadding="3" cellspacing="1"&gt;&lt;tbody&gt;&lt;tr&gt;        &lt;td&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;Supply        Voltage&lt;/span&gt;&lt;/td&gt;        &lt;td&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;Single 3.3V or 3.6V battery&lt;/span&gt;&lt;/td&gt;    &lt;/tr&gt;&lt;tr&gt;        &lt;td&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;Active power        consumption&lt;/span&gt;&lt;/td&gt;        &lt;td&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;0.2 - 2 W, depending on        configuration and CPU speed&lt;/span&gt;&lt;/td&gt;    &lt;/tr&gt;&lt;tr&gt;        &lt;td&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;Standby/Sleep        consumption&lt;/span&gt;&lt;/td&gt;        &lt;td&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;20 - 100 mW, depending on        configuration and mode&lt;/span&gt;&lt;/td&gt;    &lt;/tr&gt;&lt;tr&gt;        &lt;td&gt;&lt;span style="color: black; font-family: Arial; font-size: x-small;"&gt;Dimensions&lt;/span&gt;&lt;/td&gt;        &lt;td&gt;&lt;span style="color: black; font-family: Arial; font-size: x-small;"&gt; 66 x 44 x 7 mm&lt;/span&gt;&lt;/td&gt;    &lt;/tr&gt;&lt;tr&gt;        &lt;td&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;Weight&lt;/span&gt;&lt;/td&gt;        &lt;td&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt; 25 gram&lt;/span&gt;&lt;/td&gt;    &lt;/tr&gt;&lt;tr&gt;        &lt;td&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;MTBF&lt;/span&gt;&lt;/td&gt;        &lt;td&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&amp;gt; 100,000 hours&lt;/span&gt;&lt;/td&gt;    &lt;/tr&gt;&lt;tr&gt;        &lt;td&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;Operation        temperature (case)&lt;/span&gt;&lt;/td&gt;        &lt;td&gt;&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;&lt;tr&gt;              &lt;td nowrap="nowrap"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;Commercial:&lt;/span&gt;&lt;/td&gt;              &lt;td nowrap="nowrap"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp; 0&lt;sup&gt;o&lt;/sup&gt; to 70&lt;sup&gt;o&lt;/sup&gt; C&lt;/span&gt;&lt;/td&gt;            &lt;/tr&gt;&lt;tr&gt;              &lt;td nowrap="nowrap"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;Extended:&lt;/span&gt;&lt;/td&gt;              &lt;td nowrap="nowrap"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;-20&lt;sup&gt;o&lt;/sup&gt; to 70&lt;sup&gt;o&lt;/sup&gt;                 C&lt;/span&gt;&lt;/td&gt;            &lt;/tr&gt;&lt;tr&gt;              &lt;td nowrap="nowrap"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;Industrial:&lt;/span&gt;&lt;/td&gt;              &lt;td nowrap="nowrap"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;        -40&lt;sup&gt;o&lt;/sup&gt; to 85&lt;sup&gt;o&lt;/sup&gt; C. Click for &lt;a href="http://www.compulab.co.il/all-products/html/industrial-temp.htm"&gt;availability        note&lt;/a&gt;&lt;/span&gt;&lt;/td&gt;            &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/td&gt;    &lt;/tr&gt;&lt;tr&gt;        &lt;td&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;Storage        temperature&lt;/span&gt;&lt;/td&gt;        &lt;td&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;-40&lt;sup&gt;o&lt;/sup&gt; to 85&lt;sup&gt;o&lt;/sup&gt;        C&lt;/span&gt;&lt;/td&gt;    &lt;/tr&gt;&lt;tr&gt;        &lt;td&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;Relative        humidity&lt;/span&gt;&lt;/td&gt;        &lt;td&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;10% to 90% (operation)&lt;br /&gt;05% to 95% (storage)&lt;/span&gt;&lt;/td&gt;    &lt;/tr&gt;&lt;tr&gt;        &lt;td&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;Shock&lt;/span&gt;&lt;/td&gt;        &lt;td&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;50G / 20 ms&lt;/span&gt;&lt;/td&gt;    &lt;/tr&gt;&lt;tr&gt;        &lt;td&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;Vibration&lt;/span&gt;&lt;/td&gt;        &lt;td&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;20G / 0 - 600 Hz&lt;/span&gt;&lt;/td&gt;    &lt;/tr&gt;&lt;tr&gt;        &lt;td&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;Connectors&lt;/span&gt;&lt;/td&gt;        &lt;td&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;2 x 140 pin, 0.6 mm&lt;/span&gt;&lt;/td&gt;    &lt;/tr&gt;&lt;tr&gt;        &lt;td&gt;&lt;span style="color: black; font-family: Arial; font-size: x-small;"&gt;Connector        insertion / removal&lt;/span&gt;&lt;/td&gt;        &lt;td&gt;&lt;span style="color: black; font-family: Arial; font-size: x-small;"&gt;50 cycles&lt;/span&gt;&lt;/td&gt;    &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&lt;b&gt;For more information see:&lt;/b&gt;&lt;br /&gt;- &lt;a href="http://www.compulab.co.il/x300/download/x300-cm-man.pdf"&gt;CM-X300            Reference Guide&lt;/a&gt;&lt;br /&gt;- &lt;a href="http://www.compulab.co.il/x300/html/x300-developer.py"&gt;Developer Resources&lt;/a&gt;&lt;/span&gt;             &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="zemanta-pixie"&gt;&lt;img alt="" class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=46db2b97-fac2-83a7-822a-820703b94e31" /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6599454894873414377-3946859508730814113?l=atomicarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atomicarm.blogspot.com/feeds/3946859508730814113/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atomicarm.blogspot.com/2010/01/cm-x300-computer-on-module-49.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/3946859508730814113'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/3946859508730814113'/><link rel='alternate' type='text/html' href='http://atomicarm.blogspot.com/2010/01/cm-x300-computer-on-module-49.html' title='CM-X300 Computer-On-Module   $49'/><author><name>Mike Hewitt</name><uri>http://www.blogger.com/profile/05181139924811433955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6599454894873414377.post-246148211082274727</id><published>2010-01-24T09:49:00.000-08:00</published><updated>2010-03-05T10:18:53.937-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Hardware'/><title type='text'>$20 Development tool</title><content type='html'>The eZ430-F2013 is a complete MSP430 development tool including all the hardware and software to evaluate the MSP430F2013 and develop a complete project in a convenient USB stick form factor. The eZ430-F2013 supports the &lt;a href="http://focus.ti.com/docs/toolsw/folders/print/msp-cce430.html"&gt;Code Composer Essentials&lt;/a&gt; and &lt;a href="http://focus.ti.com/docs/toolsw/folders/print/iar-kickstart.html"&gt;IAR Embedded Workbench&lt;/a&gt; Integrated Development Environments to provide full emulation with the option of designing with a stand-alone system or detaching the removable target board to integrate into an existing design. The USB port provides enough power to operate the ultra-low-power MSP430 so no external power supply is required.&lt;br /&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=6599454894873414377&amp;amp;postID=246148211082274727" name="Features"&gt; &lt;/a&gt;&lt;br /&gt;&lt;h3 class="larger" id="Features"&gt;Features&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;eZ430-F2013 development tool       including a USB debugging interface and detachable &lt;a href="http://focus.ti.com/docs/prod/folders/print/msp430f2013.html"&gt;MSP430F2013&lt;/a&gt; target board&lt;/li&gt;&lt;li&gt;eZ430-F2013 target board&lt;/li&gt;&lt;ul type="circle"&gt;&lt;li&gt;LED indicator&lt;/li&gt;&lt;li&gt;14 user accessible        pins&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;eZ430 debugging and       programming interface&lt;/li&gt;&lt;ul type="circle"&gt;&lt;li&gt;Supports development        with all 2xx Spy Bi-Wire devices (MSP430F20xx, F21x2, F22xx) &lt;/li&gt;&lt;li&gt;Supports &lt;a href="http://focus.ti.com/docs/toolsw/folders/print/ez430-t2012.html"&gt;eZ430-T2012&lt;/a&gt; and &lt;a href="http://focus.ti.com/docs/toolsw/folders/print/ez430-rf2500t.html"&gt;eZ430-RF2500T&lt;/a&gt; target boards&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Removable USB stick enclosure&lt;/li&gt;&lt;li&gt;Includes &lt;a href="http://focus.ti.com/docs/toolsw/folders/print/iar-kickstart.html"&gt;IAR       Kickstart&lt;/a&gt; and &lt;a href="http://focus.ti.com/docs/toolsw/folders/print/msp-cce430.html"&gt;Code       Compose Essentials Core Edition&lt;/a&gt; which include an assembler, linker,       source-level debugger and limited C-compiler&lt;/li&gt;&lt;li&gt;Full documentation on CD-ROM&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=6599454894873414377&amp;amp;postID=246148211082274727" name="What's Included"&gt; &lt;/a&gt;&lt;br /&gt;&lt;h3 class="larger" id="What's Included"&gt;What's Included&lt;/h3&gt;&lt;ul class="bullet"&gt;&lt;li&gt;CD-ROM including software and documentation&lt;/li&gt;&lt;li&gt;IAR Embedded Workbench (Kickstart Version) IDE&lt;/li&gt;&lt;li&gt;eZ430-F2013 Development Tool&lt;/li&gt;&lt;/ul&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=6599454894873414377&amp;amp;postID=246148211082274727" name="Support Software"&gt; &lt;/a&gt;&lt;br /&gt;&lt;h3 class="larger" id="Support Software"&gt;Support Software&lt;/h3&gt;&lt;ul class="pdf"&gt;&lt;li class="abstract"&gt;&lt;b&gt;&lt;a href="http://www.ti.com/litv/zip/slac080g"&gt;MSP430F20xx Code Examples (Rev. G)&lt;/a&gt;&lt;/b&gt;&amp;nbsp;(zip 252 KB) 50301&amp;nbsp;views&lt;br /&gt;07 Dec 2009&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=6599454894873414377&amp;amp;postID=246148211082274727" name="Available Updates"&gt; &lt;/a&gt;   &lt;a href="http://www.blogger.com/post-edit.g?blogID=6599454894873414377&amp;amp;postID=246148211082274727" name="Order Options"&gt;&lt;/a&gt;&lt;br /&gt;&lt;h2 class="larger" id="Order Options"&gt;Order Options&lt;/h2&gt;&lt;table class="tblstandard"&gt;&lt;tbody&gt;&lt;tr class="tbl1"&gt;&lt;td class="tbln"&gt;&lt;/td&gt;&lt;td&gt;EZ430-F2013&lt;/td&gt;&lt;/tr&gt;&lt;tr class="tbl5"&gt;&lt;td valign="top"&gt;Name&amp;nbsp;&lt;/td&gt;&lt;td valign="top"&gt;MSP430 USB Stick Development Tool&lt;/td&gt;&lt;/tr&gt;&lt;tr class="tbl6"&gt;&lt;td valign="top"&gt;Status &amp;nbsp;&lt;/td&gt;&lt;td valign="top"&gt;ACTIVE&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;&lt;tr class="tbl5"&gt;&lt;td valign="top"&gt;Price (US$)&amp;nbsp;&lt;/td&gt;&lt;td valign="top"&gt;$20.00&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;&lt;tr class="tbl5"&gt;&lt;td valign="top"&gt;&lt;/td&gt;&lt;td valign="top"&gt;&lt;br /&gt;&lt;form action="http://www.ti-estore.com/Merchant2/merchant.mvc?Screen=PROD&amp;amp;Product_Code=EZ430-F2013" method="post" onsubmit="_hbLink('en_US_folder_ts_get_here_ord_opt_orderable_order_online')" target="_blank"&gt;&lt;input class="btn3" name="OrderOnline" type="submit" value="Order Online" /&gt;&lt;/form&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class="tbl6"&gt;&lt;td valign="top"&gt;Order&lt;/td&gt;&lt;td valign="top"&gt;Americas:&lt;br /&gt;&lt;a href="http://focus.ti.com/docs/general/distribregionresults.jhtml?regionId=1" name="&amp;amp;lid=en_US_folder_ts_get_here_ord_opt_orderable_contact"&gt;Contact Distributor&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Asia:&lt;br /&gt;&lt;a href="http://focus.ti.com/docs/general/distribregionresults.jhtml?regionId=2" name="&amp;amp;lid=en_US_folder_ts_get_here_ord_opt_orderable_contact"&gt;Contact Distributor&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Europe:&lt;br /&gt;&lt;a href="http://focus.ti.com/docs/general/distribregionresults.jhtml?regionId=3" name="&amp;amp;lid=en_US_folder_ts_get_here_ord_opt_orderable_contact"&gt;Contact Distributor&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Japan:&lt;br /&gt;&lt;a href="http://www.tij.co.jp/dist" name="&amp;amp;lid=en_US_folder_ts_get_here_ord_opt_orderable_contact"&gt;Contact Distributor&lt;/a&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=6599454894873414377&amp;amp;postID=246148211082274727" name="technicaldocuments"&gt;&lt;/a&gt;                      &lt;br /&gt;&lt;h2 class="larger" id="Technical Documents"&gt;Technical Documents                                      &lt;span class="tirecommends"&gt;                         &lt;img alt="TI Recommends - Technical Documentation" src="http://focus.ti.com/graphics/shared/css/ti-recommends.gif" /&gt;                         TI Recommends                     &lt;/span&gt;                              &lt;/h2&gt;Most useful technical documents for EZ430-F2013 &lt;a href="http://focus.ti.com/general/docs/gencontent.tsp?contentId=54910"&gt;&lt;img alt="Help" border="0" class="helpicon" src="http://focus.ti.com/graphics/shared/help-ico.gif" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;h3 id="Application Notes"&gt;Datasheet&lt;/h3&gt;&lt;div class="srchRsltsList"&gt;&lt;ul class="pdf"&gt;&lt;li&gt;&lt;b&gt;&lt;a href="http://www.ti.com/litv/pdf/slas491d" name="&amp;amp;lid=en_US_folder_ts_tech_docs_datasheets_action_link" target="_blank"&gt;MSP430x20x1, MSP430x20x2, MSP430x20x3 Mixed Signal Microcontroller (Rev. D)&lt;/a&gt;&lt;/b&gt;                                                                                                                                                                                                                                                                      &amp;nbsp;(PDF 2465&amp;nbsp;KB) &amp;nbsp;0&amp;nbsp;views                                         &lt;br /&gt;27 Sep 2007                                                                                                                                                                                                                                                                                                                                                                                                                                                              &lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;h3 id="Application Notes"&gt;User Guides&lt;/h3&gt;&lt;b&gt;&lt;a href="http://www.ti.com/litv/pdf/slau176b" name="&amp;amp;lid=en_US_folder_ts_tech_docs_user_guides_action_link" target="_blank"&gt;eZ430-F2013 Development Tool User's Guide (Rev. B)&lt;/a&gt;&lt;/b&gt;                                                                                                                           &amp;nbsp;(PDF 1277&amp;nbsp;KB) &amp;nbsp;49031&amp;nbsp;views                                         &lt;br /&gt;13 Dec 2006&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6599454894873414377-246148211082274727?l=atomicarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atomicarm.blogspot.com/feeds/246148211082274727/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atomicarm.blogspot.com/2010/01/20-development-tool.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/246148211082274727'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/246148211082274727'/><link rel='alternate' type='text/html' href='http://atomicarm.blogspot.com/2010/01/20-development-tool.html' title='$20 Development tool'/><author><name>Mike Hewitt</name><uri>http://www.blogger.com/profile/05181139924811433955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6599454894873414377.post-252365359526133420</id><published>2010-01-24T09:36:00.001-08:00</published><updated>2010-01-24T09:36:43.111-08:00</updated><title type='text'>Tools for ARM7, ARM9, ARM11, Cortex Devices</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;http://www.directinsight.co.uk/microcontroller/arm-tools.html&lt;br/&gt;&lt;br/&gt;    &lt;h3&gt;&lt;a href='http://www.directinsight.co.uk/microcontroller/index.html'&gt;Processors&lt;/a&gt;         - Direct Insight Tools for ARM7, ARM9,   ARM11, Cortex Devices&lt;/h3&gt; 	        &lt;p&gt;&lt;b&gt;Devices:&lt;/b&gt;&lt;br/&gt;        We offer comprehensive tool support for virtually all derivatives and          cores including:&lt;br/&gt;        ARM Cortex-A8, Cortex-R4, Cortex-M3, ARM11, ARM720T, ARM920T, ARM922T,        ARM926EJ-S, (F)-S, ARM7EJ-S, ARM7TDMI, ARM7TDMI-S, ARM946E-S, ARM966E-S,        ARM968E-S. We have separate pages dedicated to &lt;a href='http://www.directinsight.co.uk/microcontroller/xscale.html'&gt;&lt;u&gt;Intel        XScale&lt;/u&gt;&lt;/a&gt;, Marvell        &lt;a href='http://www.directinsight.co.uk/microcontroller/PXA270.html'&gt;&lt;u&gt;PXA270&lt;/u&gt;&lt;/a&gt;, &lt;a href='http://www.directinsight.co.uk/microcontroller/PXA310.html'&gt;&lt;u&gt;PXA310&lt;/u&gt;&lt;/a&gt;, &lt;a href='http://www.directinsight.co.uk/microcontroller/monahans-pxa320.html'&gt;&lt;u&gt;PXA320&lt;/u&gt;&lt;/a&gt; and &lt;a href='http://www.directinsight.co.uk/microcontroller/freescale-imx27.html'&gt;&lt;u&gt;i.MX27&lt;/u&gt;&lt;/a&gt;, &lt;a href='http://www.directinsight.co.uk/microcontroller/freescale-imx25.html'&gt;&lt;u&gt;i.MX25&lt;/u&gt;&lt;/a&gt; and &lt;a href='http://www.directinsight.co.uk/microcontroller/freescale-imx37.html'&gt;&lt;u&gt;i.MX37&lt;/u&gt;&lt;/a&gt; processors.&lt;/p&gt;      &lt;p&gt;&lt;strong&gt;Integrated Development Environment: &lt;a href='http://www.directinsight.co.uk/products/iar/iar-systems.html'&gt;&lt;u&gt;IAR Systems&lt;/u&gt;&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;      &lt;p&gt;IAR Embedded Workbench provides a completely integrated development environment including a project manager, editor, build tools and the C-SPY debugger. In a continuous workflow, you can create source files and projects, build applications and debug them in a simulator or on hardware. IAR Systems is well known for highly optimized compilers. Every C/C++ compiler contains both generic global optimizations as well as low-level chip-specific optimizations that take advantage of all the specific features of your selected device. &lt;br/&gt;        The optional &lt;a href='http://www.directinsight.co.uk/products/iar/powerpac.html'&gt;&lt;u&gt;PowerPAC&lt;/u&gt;&lt;/a&gt; RTOS adds an affordable real-time kernel, file   system, and optional USB and Ethernet support.      &lt;/p&gt;      &lt;p&gt; &lt;strong&gt;&lt;img hspace='5' height='153' border='0' align='right' width='210' vspace='0' id='kickstartImage' name='kickstartImage' alt='KickStart Development Board Image' src='http://www.directinsight.co.uk/images/products/iar-kickstart-devboard.jpg'/&gt;KickStart          Kits for NXP LPC, Atmel SAM7/SAM9, Luminary, STR7/9, STM32, Toshiba          TMPA9/M3: &lt;a href='http://www.directinsight.co.uk/products/iar/iar-systems.html'&gt;&lt;u&gt;IAR          Systems&lt;/u&gt;&lt;/a&gt;&lt;br/&gt;          &lt;/strong&gt;IAR          KickStart Kits contain everything you need to get started with development,          and to try out your application directly on the device. Each kit includes        code-size limited development system with C/C++ compiler and example        code, development board and- JTAG probe with flash programming&lt;/p&gt;      &lt;p&gt;&lt;strong&gt;JTAG          emulators and debuggers: &lt;a href='http://www.directinsight.co.uk/products/sophia/ej-sct.html'&gt;&lt;u&gt;Sophia&lt;/u&gt;&lt;/a&gt;&lt;/strong&gt; &lt;br/&gt;We offer a broad range of JTAG debuggers to cover every imaginable combination  of development environments, embedded OS and target device. &lt;/p&gt;&lt;p&gt;&lt;img height='71' align='right' width='200' alt='Sophia EJ-SCT ' src='http://www.directinsight.co.uk/images/products/ej-sct-sophia-px200.jpg'/&gt;Sophia's  EJ-SCT is a powerful, USB-powered probe with configurable support for all ARM  families. Most popular development boards are supported out of the box, and  the powerful Watchpoint debugger features optional interfaces to GDB for Linux  targets, and Microsoft Platform Builder for hardware-assisted debugging of  targets running Windows CE 6.0.  &lt;br/&gt;  The advanced EJ-Extreme supports up to 100Gig of ETM and RTP trace.  &lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;div class='zemanta-pixie'&gt;&lt;img src='http://img.zemanta.com/pixy.gif?x-id=9648455e-c1a2-8ea0-b98a-c13935cd44c8' alt='' class='zemanta-pixie-img'/&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6599454894873414377-252365359526133420?l=atomicarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atomicarm.blogspot.com/feeds/252365359526133420/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atomicarm.blogspot.com/2010/01/tools-for-arm7-arm9-arm11-cortex.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/252365359526133420'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6599454894873414377/posts/default/252365359526133420'/><link rel='al
