<?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-1154217537013373102</id><updated>2012-01-19T20:27:37.226+07:00</updated><category term='RTOS'/><category term='C Programming'/><category term='Interfacing'/><category term='Compilers'/><category term='Real Time Clock'/><category term='EEPROMs'/><category term='8051'/><category term='Software and Tools'/><category term='Chip Architecture'/><category term='sdcc'/><category term='I²C'/><category term='Projects'/><category term='8052'/><category term='Hardware'/><category term='ARM'/><category term='LCD'/><category term='Servo Motor'/><category term='Analog-to-Digital'/><category term='PIC'/><category term='Robotics'/><category term='Simulator'/><category term='Sensors'/><category term='Books'/><title type='text'>Embedded Microcontroller Programming</title><subtitle type='html'>µC - News, Resources and Tutorials &lt;br&gt;</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://mcu-programming.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://mcu-programming.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Doug</name><uri>http://www.blogger.com/profile/00580507341501269020</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>40</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1154217537013373102.post-1476747968069437695</id><published>2010-06-14T16:52:00.001+07:00</published><updated>2010-06-14T17:48:03.399+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Hardware'/><title type='text'>Understanding Processor Architecture: Machine and Assembly Language</title><content type='html'>The processor understands only the machine language, whose instructions consist of strings of 1s and 0s. Machine language is closely related to the assembly language. We prefer to use the assembly language rather than the machine language. Programming in the assembly language also requires knowledge about the processor architecture.&lt;br /&gt;&lt;br /&gt;Assembly language programming is referred to low-level programming because each assembly language instruction performs a much lower-level task compared to an instruction in a high-level language. Assembly language instructions are processor specification dependents. For example, a program written in the Intel assembly language cannot be executed on the PowerPC processor.&lt;br /&gt;&lt;br /&gt;Here are some IA-32 assembly language examples:&lt;br /&gt;&lt;pre lang="asm"&gt;&lt;br /&gt;inc result&lt;br /&gt;mov class_size, 45&lt;br /&gt;and mask1, 128&lt;br /&gt;add marks, 10&lt;/pre&gt;&lt;br /&gt;The first instruction increments the variable result. This assembly language instruction is equivalent to&lt;br /&gt;&lt;code&gt; &lt;/code&gt;&lt;br /&gt;&lt;pre lang="c"&gt;&lt;br /&gt;result++;&lt;/pre&gt;&lt;br /&gt;in C. The second instruction initializes &lt;code&gt;class_size&lt;/code&gt; to 45. The equivalent statement in C is&lt;br /&gt;&lt;code&gt; &lt;/code&gt;&lt;br /&gt;&lt;pre lang="c"&gt;&lt;br /&gt;class_size = 45;&lt;/pre&gt;&lt;br /&gt;The third instruction performs the bitwise and operation on &lt;code&gt;mask1&lt;/code&gt; and can be expressed in C as&lt;br /&gt;&lt;code&gt; &lt;/code&gt;&lt;br /&gt;&lt;pre lang="c"&gt;&lt;br /&gt;mask1 = mask1 &amp;amp; 128;&lt;/pre&gt;&lt;br /&gt;The last instruction updates marks by adding 10. In C, this is equivalent to&lt;br /&gt;&lt;code&gt; &lt;/code&gt;&lt;br /&gt;&lt;pre lang="c"&gt;&lt;br /&gt;marks = marks + 10;&lt;/pre&gt;&lt;br /&gt;We can translate the assembly language instructions to the equivalent machine language instructions. Machine language instructions are written in the hexadecimal number system. Here are some IA-32 machine language examples:&lt;br /&gt;&lt;table width="100%" border="0"&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td bgcolor="#cccccc"&gt;&lt;br /&gt;&lt;p align="center"&gt;Assembly&lt;/p&gt;&lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;td bgcolor="#cccccc"&gt;&lt;br /&gt;&lt;p align="center"&gt;Operation&lt;/p&gt;&lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;td bgcolor="#cccccc"&gt;&lt;br /&gt;&lt;p align="center"&gt;Machine language (in hex)&lt;/p&gt;&lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;&lt;br /&gt;&lt;pre lang="asm"&gt;nop&lt;/pre&gt;&lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;td&gt;No operation&lt;/td&gt;&lt;br /&gt;&lt;td&gt;90&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;&lt;br /&gt;&lt;pre lang="asm"&gt;inc result&lt;/pre&gt;&lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;td&gt;Increment&lt;/td&gt;&lt;br /&gt;&lt;td&gt;FF060A00&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;&lt;br /&gt;&lt;pre lang="asm"&gt;mov class_size, 45&lt;/pre&gt;&lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;td&gt;Copy&lt;/td&gt;&lt;br /&gt;&lt;td&gt;C7060C002D00&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;&lt;br /&gt;&lt;pre lang="asm"&gt;and mask, 128&lt;/pre&gt;&lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;td&gt;Logical and&lt;/td&gt;&lt;br /&gt;&lt;td&gt;80260E0080&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;&lt;br /&gt;&lt;pre lang="asm"&gt;add marks, 10&lt;/pre&gt;&lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;td&gt;Integer addition&lt;/td&gt;&lt;br /&gt;&lt;td&gt;83060F000A&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;References&lt;/strong&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;em&gt;Guide to RISC Processors for Programmers and Engineers&lt;/em&gt; by Sivarama P. Dandamudi, Springer (2005), ISBN 0-387-21017-2.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1154217537013373102-1476747968069437695?l=mcu-programming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mcu-programming.blogspot.com/feeds/1476747968069437695/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1154217537013373102&amp;postID=1476747968069437695' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/1476747968069437695'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/1476747968069437695'/><link rel='alternate' type='text/html' href='http://mcu-programming.blogspot.com/2010/06/understanding-processor-architecture.html' title='Understanding Processor Architecture: Machine and Assembly Language'/><author><name>Doug</name><uri>http://www.blogger.com/profile/00580507341501269020</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-1154217537013373102.post-5241067043496943381</id><published>2008-11-03T14:52:00.003+07:00</published><updated>2010-06-14T14:40:10.013+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='8051'/><title type='text'>P89V51 code SVN</title><content type='html'>I have decided to open my small project on SDCC c code for P89V51. This project is open source. It is distributed under &lt;a href="http://www.gnu.org/copyleft/gpl.html"&gt;GNU General Public License&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;How to download?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Use this command to anonymously check out the latest project source code&lt;br /&gt;&lt;br /&gt;&lt;code&gt;svn checkout http://p89v51-sdcc.googlecode.com/svn/trunk/ p89v51-sdcc-read-only&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Or, please find the compressed files (.zip, .gz) from the project page&lt;br /&gt;&lt;br /&gt;&lt;a href="http://p89v51-sdcc.googlecode.com/"&gt;http://p89v51-sdcc.googlecode.com&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If found bugs or got troubles, please feel free to report here.&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/1154217537013373102-5241067043496943381?l=mcu-programming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mcu-programming.blogspot.com/feeds/5241067043496943381/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1154217537013373102&amp;postID=5241067043496943381' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/5241067043496943381'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/5241067043496943381'/><link rel='alternate' type='text/html' href='http://mcu-programming.blogspot.com/2008/11/p89v51-code-svn_03.html' title='P89V51 code SVN'/><author><name>Doug</name><uri>http://www.blogger.com/profile/00580507341501269020</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-1154217537013373102.post-8177653142720027861</id><published>2007-04-22T16:34:00.003+07:00</published><updated>2010-06-14T12:12:27.955+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ARM'/><category scheme='http://www.blogger.com/atom/ns#' term='Software and Tools'/><title type='text'>Build Your Own ARM Cross Compiler Toolchain</title><content type='html'>&lt;a href="http://www.gnuarm.com/"&gt;GNUARM&lt;/a&gt; is a set of open source GNU compiler for ARM microcontroller. The toolchain consists of the GNU binutils, GCC compiler set, Newlib and Insight, the graphical user interface to GNU debugger for Windows and Linux. This article will guide the building process of GNUARM toolchain only for Linux users. For Windows users, there have the installer executable EXE files already. &lt;a href="http://www.scienceprog.com/gnuarm-for-arm-microcontrollers/"&gt;www.scienceprog.com&lt;/a&gt; has a tutorial on setting up this tool on Windows environment.&lt;br /&gt;&lt;br /&gt; &lt;strong&gt;Get the sources&lt;/strong&gt;&lt;br /&gt;I will demonstrate the building process for GCC-4.1 only. For the others version, you can find the &lt;a href="http://www.gnuarm.com/files.html"&gt;GNUARM distributions files from here&lt;/a&gt;. Here is the list of files that are required for the installation.&lt;br /&gt;&lt;ul&gt;&lt;br /&gt; &lt;li&gt;binutils-2.17.tar.bz2 [13.1MB]&lt;/li&gt;&lt;br /&gt; &lt;li&gt;gcc-4.1.1.tar.bz2 [37.3MB]&lt;/li&gt;&lt;br /&gt; &lt;li&gt;newlib-1.14.0.tar.gz [7.61MB]&lt;/li&gt;&lt;br /&gt; &lt;li&gt;insight-6.5.tar.bz2 [20.4MB]&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;I compiled the sources code with gcc-4.1.1 on Fedora Core 6 (kernel-2.6.18). Note that I built the toolchain as root. I also wanted the arm-target stuff separate from my Linux-native stuff, so I put the toolchain in /usr/local/gnuarm.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Building Instruction&lt;/strong&gt;&lt;br /&gt;&lt;pre lang="bash"&gt;[home]# tar xvf binutils-2.17.tar.bz2&lt;br /&gt;[home]# tar xvf gcc-4.1.1.tar.bz2&lt;br /&gt;[home]# tar xvf newlib-1.14.0.tar.gz&lt;br /&gt;[home]# tar xvf insight-6.5.tar.bz2&lt;br /&gt;[home]# cd binutils-2.17&lt;br /&gt;[binutils-2.17]# ./configure --target=arm-elf \&lt;br /&gt;--prefix=/usr/local/gnuarm --enable-interwork --enable-multilib&lt;br /&gt;[binutils-2.17]# make all install&lt;br /&gt;[binutils-2.17]# export PATH="$PATH:/usr/local/gnuarm/bin"&lt;br /&gt;[binutils-2.17]# cd ../gcc-4.1.1&lt;br /&gt;[gcc-4.1.1]# ./configure --target=arm-elf \&lt;br /&gt;--prefix=/usr/local/gnuarm --enable-interwork \&lt;br /&gt;--enable-multilib --enable-languages="c,c++" \&lt;br /&gt;--with-newlib --with-headers=../newlib-1.14.0/newlib/libc/include&lt;br /&gt;[gcc-4.1.1]# make all-gcc install-gcc&lt;br /&gt;[gcc-4.1.1]# cd ../newlib-1.14.0&lt;br /&gt;[newlib-1.14.0]# ./configure --target=arm-elf \&lt;br /&gt;--prefix=/usr/local/gnuarm --enable-interwork --enable-multilib&lt;br /&gt;[newlib-1.14.0]# make all install&lt;br /&gt;[newlib-1.14.0]# cd ../gcc-4.1.1&lt;br /&gt;[gcc-4.1.1]# make all install&lt;br /&gt;[gcc-4.1.1]# cd ../insight-6.5&lt;br /&gt;[insight-6.5]# ./configure --target=arm-elf \&lt;br /&gt;--prefix=/usr/local/gnuarm --enable-interwork --enable-multilib&lt;br /&gt;[insight-6.5]# make all install&lt;/pre&gt;&lt;br /&gt;Now, I hope everthing is done. You can test by running arm-elf-gcc command in the shell.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1154217537013373102-8177653142720027861?l=mcu-programming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mcu-programming.blogspot.com/feeds/8177653142720027861/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1154217537013373102&amp;postID=8177653142720027861' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/8177653142720027861'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/8177653142720027861'/><link rel='alternate' type='text/html' href='http://mcu-programming.blogspot.com/2007/04/build-your-own-arm-cross-compiler.html' title='Build Your Own ARM Cross Compiler Toolchain'/><author><name>Doug</name><uri>http://www.blogger.com/profile/00580507341501269020</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-1154217537013373102.post-6297270685231256019</id><published>2007-04-19T17:41:00.001+07:00</published><updated>2010-06-14T16:29:54.273+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='8051'/><category scheme='http://www.blogger.com/atom/ns#' term='Hardware'/><category scheme='http://www.blogger.com/atom/ns#' term='Chip Architecture'/><title type='text'>8051 mcu, von Neumann vs Harvard Architectures</title><content type='html'>We can classify computer architectures into two categories:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;von Neumann architecture:&lt;/strong&gt; computers has a single, common memory space in which both program instructions and data are stored. There is a single internal data bus that fetches both instructions and data. They can not be performed at the same time.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt; Harvard architecture:&lt;/strong&gt; computers have separate memory areas for program instructions and data. There are two or more internal data buses, which allow simultaneous access to both instructions and data. The CPU fetches program instructions on the program memory bus.&lt;br /&gt;&lt;br /&gt;The 8051 microcontrollers (MCS-51) have an 8-bit data bus. They can address 64K of external data memory and 64K of external program memory. These may be separate blocks of memory, so that up to 128K of memory can be attached to the microcontroller. Separate blocks of code and data memory are referred to as the &lt;strong&gt;Harvard architecture&lt;/strong&gt;. A single block of memory may be mapped to act as both data and program memory. This is referred to as the &lt;strong&gt;Von Neumann architecture&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;The 8051 has two separate read signals, RD# (P3.7) and PSEN#. The RD# (P3.7) is activated by clearing to logic level 0 when a byte is to be read from external data memory, PSEN#, from external program memory. All external code is fetched from external program memory. The bytes from external program memory may be read by special read instructions such as the MOVC. And there are separate instructions to read from external data memory, such as the MOVX instruction. In order to read from the same block using either the RD# signal or the PSEN# signal, the two signals are combined with a logic AND operation. This way, the output of the AND gate is low when either input is low.&lt;br /&gt;&lt;br /&gt;By adopting the Von Neumann architecture, code may be written to memory as data bytes, and then executed as program instructions.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Further Reading&lt;/strong&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt; &lt;li&gt;&lt;a href="http://www.keil.com/download/docs/192.asp"&gt;8051 von Neumann Memory Example Program (Keil)&lt;/a&gt;&lt;/li&gt;&lt;br /&gt; &lt;li&gt;&lt;a href="http://www.nabble.com/Harvard-vs-von-Neumann-t1853153.html"&gt;Harvard vs von Neumann (MSP430  Discussion)&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1154217537013373102-6297270685231256019?l=mcu-programming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mcu-programming.blogspot.com/feeds/6297270685231256019/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1154217537013373102&amp;postID=6297270685231256019' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/6297270685231256019'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/6297270685231256019'/><link rel='alternate' type='text/html' href='http://mcu-programming.blogspot.com/2007/04/8051-mcu-von-neumann-vs-harvard.html' title='8051 mcu, von Neumann vs Harvard Architectures'/><author><name>Doug</name><uri>http://www.blogger.com/profile/00580507341501269020</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-1154217537013373102.post-8853983061712215914</id><published>2007-04-12T22:35:00.002+07:00</published><updated>2010-06-14T16:32:07.184+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PIC'/><category scheme='http://www.blogger.com/atom/ns#' term='8051'/><category scheme='http://www.blogger.com/atom/ns#' term='Software and Tools'/><category scheme='http://www.blogger.com/atom/ns#' term='Projects'/><title type='text'>Microcontroller Programmer DIY</title><content type='html'>I search about this issue for a while, "Building programmer of our own designs". I found a few of open source programmer projects so that every body can use and contribute it. Here is an opportunity of learning the microcontroller programmer designs from that open schematics.&lt;br /&gt;&lt;br /&gt;Here is a list of Microcontroller Programmer, Do It Yourself (DIY).&lt;br /&gt;&lt;ul&gt; &lt;strong&gt;8051&lt;/strong&gt;&lt;br /&gt; &lt;li&gt;&lt;a href="http://chaokhun.kmitl.ac.th/~kswichit/pgm89_web/Pgm89.html"&gt;ATMEL 89C Series Flash Microcontroller Programmer Ver 1.1&lt;/a&gt; - This programmer was designed in view of to be flexible, economical and easy to built, the programmer hardware utilizes the standard TTL series parts and no special components are used. The programmer is interfaced with the PC parallel port and there is no special requirement for the PC parallel port, so the older computers can also be used with this programmer.&lt;/li&gt;&lt;br /&gt; &lt;li&gt;&lt;a href="http://www.pjrc.com/tech/8051/aicp-schematic.html"&gt;Atmel 89C2051 In-Circuit Programmer Schematic&lt;/a&gt; - The idea is to add this circuitry to a board with already has ram at 2000 and an 82C55 I/O chip to provide ports A, B and C. &lt;strong&gt;This is a "beta release" schematic. Use at your own risk&lt;/strong&gt;&lt;/li&gt;&lt;br /&gt; &lt;li&gt;&lt;a href="http://www.kmitl.ac.th/~kswichit/ISP-Pgm3v0/ISP-Pgm3v0.html"&gt;ISP Flash Microcontroller Programmer Ver 3.0&lt;/a&gt; - This ISP Programmer can be used either for  in-system  programming  or  as a  stand-alone spi programmer for  Atmel   ISP   programmable   devices.  The   programming   interface   is   compatible   to   STK200   ISP programmer hardware so  the users of STK200 can also use the software which can program both the 8051 and AVR series devices.&lt;/li&gt;&lt;br /&gt; &lt;li&gt;&lt;a href="http://sokrates.mimuw.edu.pl/~sebek/atmelprog/"&gt;Atmel AT89Cx051 programmer&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;strong&gt;PIC&lt;/strong&gt;&lt;br /&gt; &lt;li&gt;&lt;a href="http://pp06.sourceforge.net/"&gt;PP06 PIC Programmer Software&lt;/a&gt; - PP06 is an open-source Production programmer for Microchip's PIC micros. Specifically designed for use in factory in-circuit programming, and development of master/slave systems it supports many pics,and is easily extended to different hardware.&lt;/li&gt;&lt;br /&gt; &lt;li&gt;&lt;a href="http://www.bobblick.com/techref/projects/picprog/picprog.html"&gt;Classic PIC Programmer&lt;/a&gt; - The classic PIC 16C84/16F84 programmer. The design is originally by David Tait and modified by Bob Blick&lt;/li&gt;&lt;br /&gt;&lt;strong&gt;AVR&lt;/strong&gt;&lt;br /&gt; &lt;li&gt;&lt;a href="http://www.avrfreaks.net/index.php?module=Freaks%20Tools&amp;amp;func=viewItem&amp;amp;item_id=584&amp;amp;item_type=tool"&gt;AVR911: AVR Open-source Programmer&lt;/a&gt; - The AVR Open-source Programmer (AVROSP) is an AVR programmer application that replaces the AVRProg tool included in AVR Studio. It is a command-line tool, using the same syntax as the STK500 and JTAGICE command-line tools in AVR Studio.&lt;/li&gt;&lt;br /&gt; &lt;li&gt;&lt;a href="http://electrons.psychogenic.com/modules/arms/art/5/AVRInSystemProgrammer.php"&gt;AVR In-System Programmer&lt;/a&gt; - They provide details on our version of the Atmel AVR In-System Programmer (ISP). They provide schematics and printed circuit board (PCB) art to allow you to construct your own programmer.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1154217537013373102-8853983061712215914?l=mcu-programming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mcu-programming.blogspot.com/feeds/8853983061712215914/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1154217537013373102&amp;postID=8853983061712215914' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/8853983061712215914'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/8853983061712215914'/><link rel='alternate' type='text/html' href='http://mcu-programming.blogspot.com/2007/04/microcontroller-programmer-diy.html' title='Microcontroller Programmer DIY'/><author><name>Doug</name><uri>http://www.blogger.com/profile/00580507341501269020</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-1154217537013373102.post-1114455864375057499</id><published>2007-04-09T00:05:00.002+07:00</published><updated>2010-06-14T16:33:24.172+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ARM'/><category scheme='http://www.blogger.com/atom/ns#' term='Simulator'/><category scheme='http://www.blogger.com/atom/ns#' term='Software and Tools'/><title type='text'>Learn Embedded Linux with ARMulator</title><content type='html'>&lt;a href="http://www.uclinux.org/index.html"&gt;&lt;strong&gt;uClinux&lt;/strong&gt;&lt;/a&gt; is an excellent way to study the embedded operating systems for an engineer, student, hobbyist, Linux-enthusiast. I am interested in Embedded Linux for ARM microcontroller. Before buying a new mcu evaluation board, there is a smart way to study the Embedded Linux. That is studying it with the emulator called &lt;a href="http://www.uclinux.org/pub/uClinux/utilities/armulator/"&gt;ARMUlator&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I tested on &lt;a href="http://fedoraproject.org/"&gt;Fedora Core 6&lt;/a&gt; Linux with GCC 3.4.x (&lt;a href="http://www.mjmwired.net/resources/mjm-fedora-fc6.html#gcc3"&gt;how to install gcc 3.4 for FC6&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What you get&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Here are some files you can use to put together uClinux running in the GDB/ARMulator.&lt;br /&gt;&lt;ul&gt;&lt;br /&gt; &lt;li&gt;&lt;a href="http://www.uclinux.org/pub/uClinux/utilities/armulator/gdb-5.0.tar.bz2"&gt;gdb-5.0.tar.bz2&lt;/a&gt; - The orginal gdb-5.0 archive.&lt;/li&gt;&lt;br /&gt; &lt;li&gt;&lt;a href="http://www.uclinux.org/pub/uClinux/utilities/armulator/gdb-5.0-uclinux-armulator-20060104.patch.gz"&gt;gdb-5.0-uclinux-armulator-20060104.patch.gz&lt;/a&gt; - Patches against gdb-5.0 based heavily on the ARMulator changes from Ben Williamson &lt;benw@pobox.com&gt; with changes to behave like an Atmel AT91 device.&lt;/benw@pobox.com&gt;&lt;/li&gt;&lt;br /&gt; &lt;li&gt;&lt;a href="http://www.uclinux.org/pub/uClinux/utilities/armulator/linux.2.4.x.gz"&gt;linux.2.4.x.gz&lt;/a&gt; - A precompiled uClinux kernel binaries that you can run in the emulator.&lt;/li&gt;&lt;br /&gt; &lt;li&gt;&lt;a href="http://www.uclinux.org/pub/uClinux/utilities/armulator/romfs.2.4.x.gz"&gt;romfs.2.4.x.gz&lt;/a&gt; - romfs images to use with the above kernels.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;strong&gt;Building the Debugger/Emulator&lt;/strong&gt;&lt;br /&gt;&lt;pre lang="bash"&gt;&lt;br /&gt; tar xvf gdb-5.0.tar.bz2&lt;br /&gt; gunzip gdb-5.0-uclinux-armulator-20060104.patch.gz&lt;br /&gt;        patch -p0 &amp;lt; gdb-5.0-uclinux-armulator-20060104.patch&lt;br /&gt; cd gdb-5.0&lt;br /&gt;        export CC=gcc34&lt;br /&gt; ./configure --target=arm-elf&lt;br /&gt; make&lt;br /&gt; make install&lt;/pre&gt;&lt;br /&gt;&lt;strong&gt;Running the precompiled binaries&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The ARMulator expects the romfs to be in a file called "boot.rom". You must use the matching kernel/romfs combo's.&lt;br /&gt;&lt;pre lang="bash"&gt;&lt;br /&gt; gunzip romfs.2.4.x&lt;br /&gt; gunzip linux.2.4.x&lt;br /&gt; ln -s romfs.2.4.x boot.rom&lt;br /&gt; arm-elf-gdb linux-2.4.x&lt;br /&gt; ...&lt;br /&gt; gdb&amp;gt; target sim&lt;br /&gt; ...&lt;br /&gt; gdb&amp;gt; load&lt;br /&gt; ...&lt;br /&gt; gdb&amp;gt; run&lt;/pre&gt;&lt;br /&gt;Finally, you should get something like this:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://computingfreak.com/weblog/wp-content/uploads/2007/04/uclinux_armulator.gif" title="ucLinux"&gt;&lt;img src="http://computingfreak.com/weblog/wp-content/uploads/2007/04/uclinux_armulator.gif" alt="ucLinux" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1154217537013373102-1114455864375057499?l=mcu-programming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mcu-programming.blogspot.com/feeds/1114455864375057499/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1154217537013373102&amp;postID=1114455864375057499' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/1114455864375057499'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/1114455864375057499'/><link rel='alternate' type='text/html' href='http://mcu-programming.blogspot.com/2007/04/learn-embedded-linux-with-armulator.html' title='Learn Embedded Linux with ARMulator'/><author><name>Doug</name><uri>http://www.blogger.com/profile/00580507341501269020</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-1154217537013373102.post-3018534380875028158</id><published>2007-04-07T19:52:00.002+07:00</published><updated>2010-06-14T16:35:08.728+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Software and Tools'/><title type='text'>Microcontrollers and the GNU Public License (GPL)</title><content type='html'>Open Source software is released according to the terms of the GNU Public License, GPL. The GPL is intended to guarantee your rights to use, modify and copy the subject software. Along with the rights comes an obligation. If you modify and subsequently distribute software covered by the GPL, you are obligated to make available the modified source code. The changes become a “derivative work” which is also subject to the terms of the GPL. This allows other users to understand the software better and to make further changes if they wish.&lt;br /&gt;&lt;br /&gt;This works well for most software but there is at least one problem. Suppose, for example, that you write a clever application that you wish to keep proprietary. If you link it with a C library covered by the GPL, your application becomes a derivative work and thus you’re required to distribute your source code.&lt;br /&gt;&lt;br /&gt;To get around this, and therefore promote the development of Open Source libraries, the Free Software Foundation came up with the “Library GPL.” The distinction is that a program linked to a library covered by the LGPL is not considered a derivative work and so there’s no requirement to distribute the source, although you must still distribute the source to the library itself.&lt;br /&gt;Subsequently, the LGPL became known as the “Lesser GPL” because it offers less freedom to the user. So while the LGPL makes it possible to develop proprietary products using Open Source software, the FSF encourages developers to place their libraries under the GPL in the interest of maximizing openness.&lt;br /&gt;&lt;br /&gt;Here is a list of GPL software for microcontroller developers.&lt;br /&gt;&lt;ul&gt;&lt;br /&gt; &lt;li&gt;&lt;strong&gt;&lt;a href="http://sdcc.sourceforge.net/"&gt;SDCC&lt;/a&gt;&lt;/strong&gt;: a Freeware, retargettable, optimizing ANSI - C compiler that targets the Intel 8051, Maxim 80DS390, Zilog Z80 and the Motorola 68HC08 based MCUs (GPL)&lt;/li&gt;&lt;br /&gt; &lt;li&gt;&lt;strong&gt;&lt;a href="http://www.gnupic.org/"&gt;GNUPIC&lt;/a&gt;&lt;/strong&gt;: a collect of GNU software for PIC microcontrollers&lt;/li&gt;&lt;br /&gt; &lt;li&gt;&lt;strong&gt;&lt;a href="http://winavr.sourceforge.net/"&gt;WinAVR&lt;/a&gt;&lt;/strong&gt;: a suite of executable, open source software development tools for the Atmel AVR series on the Windows&lt;/li&gt;&lt;br /&gt; &lt;li&gt;&lt;strong&gt;&lt;a href="http://www.gnuarm.org/"&gt;GNUARM&lt;/a&gt;&lt;/strong&gt;: GNU toolchain ARM microcontrollers&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1154217537013373102-3018534380875028158?l=mcu-programming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mcu-programming.blogspot.com/feeds/3018534380875028158/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1154217537013373102&amp;postID=3018534380875028158' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/3018534380875028158'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/3018534380875028158'/><link rel='alternate' type='text/html' href='http://mcu-programming.blogspot.com/2007/04/microcontrollers-and-gnu-public-license.html' title='Microcontrollers and the GNU Public License (GPL)'/><author><name>Doug</name><uri>http://www.blogger.com/profile/00580507341501269020</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-1154217537013373102.post-8771983375716536772</id><published>2007-04-06T19:48:00.002+07:00</published><updated>2010-06-14T16:36:37.282+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Software and Tools'/><title type='text'>Linux for Embedded Systems</title><content type='html'>For a microcontroller learner, Embedded System is a challenge. Linux are used as an operating system for the modern embedded devices. I am a one who are trying to study Linux on an embedded microcontroller, i.e., 8051 mcu and ARM. Let's start together!&lt;br /&gt;&lt;br /&gt;This is a list of some sites that are of particular interest to embedded developers.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.kernel.org/"&gt;kernel.org&lt;/a&gt; – The Linux kernel archive. This is where you can download the latest kernel versions as well as virtually any previous version.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://sourceforge.net/"&gt;sourceforge.net&lt;/a&gt; – “World’s largest Open Source development website.” Provides free services to open source developers including project hosting and management, version control, bug and issue tracking, backups and archives, and communication and collaboration resources.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.linuxdevices.com/"&gt;linuxdevices.com&lt;/a&gt; – A news and portal site devoted to the entire range of issues surrounding embedded Linux.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.embedded-linux.org/"&gt;embedded-linux.org&lt;/a&gt; – The Embedded Linux Consortium, a nonprofit, vendor neutral trade association promoting Linux in the embedded space. Its major effort at present is the development of an embedded Linux platform specification.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.embedded.com/"&gt;embedded.com&lt;/a&gt; – The web site for Embedded Systems Programming magazine.&lt;br /&gt;This site is not specifically oriented to Linux, but is quite useful as a more general embedded information tool.&lt;br /&gt;&lt;br /&gt;&lt;!--adsense#banner--&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1154217537013373102-8771983375716536772?l=mcu-programming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mcu-programming.blogspot.com/feeds/8771983375716536772/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1154217537013373102&amp;postID=8771983375716536772' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/8771983375716536772'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/8771983375716536772'/><link rel='alternate' type='text/html' href='http://mcu-programming.blogspot.com/2007/04/linux-for-embedded-systems.html' title='Linux for Embedded Systems'/><author><name>Doug</name><uri>http://www.blogger.com/profile/00580507341501269020</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-1154217537013373102.post-7724102399187595640</id><published>2007-04-05T17:39:00.002+07:00</published><updated>2010-06-14T16:38:02.018+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Chip Architecture'/><title type='text'>Understanding Processor Architecture: RISC versus CISC</title><content type='html'>Popular processor designs can be broadly divided into two categories: Complex Instruction Set Computers (CISC) and Reduced Instruction Set Computers (RISC). The dominant processor in the PC market, Pentium, belongs to the CISC category. However, the recent trend is to use the RISC designs. Even Intel has moved from CISC to RISC design for their 64-bit processor.&lt;br /&gt;&lt;br /&gt;CISC systems use complex instructions. For example, adding two integers is considered a simple instruction. But, an instruction that copies an element from one array to another and automatically updates both array subscripts is considered a complex instruction. RISC systems use only simple instructions. Furthermore, RISC systems assume that the required operands are in the processor’s internal registers, not in the main memory. It turns out that characteristics like simple instructions and restrictions like register-based operands not only simplify the processor design but also result in a processor that provides improved application performance.&lt;br /&gt;&lt;br /&gt;Several factors contributed to the popularity of CISC in the 1970s. In those days, memory was very expensive and small in capacity. Even in the mid-1970s, the price of a small 16 KB memory was about $500. So there was a need to minimize the amount of memory required to store a program. An implication of this requirement is that each processor instruction must do more, leading to complex instruction set designs. Complex instructions meant complex hardware, which was also expensive. This was a problem processor designers grappled with until Wilkes proposed microprogrammed control in the early 1950s.&lt;br /&gt;&lt;br /&gt;&lt;center&gt;&lt;a href="http://computingfreak.com/weblog/wp-content/uploads/2007/04/mico_prog.gif" title="ISA-level"&gt;&lt;img src="http://computingfreak.com/weblog/wp-content/uploads/2007/04/mico_prog.gif" alt="ISA-level" /&gt;&lt;/a&gt;&lt;/center&gt;&lt;strong&gt;Figure 1&lt;/strong&gt;. The ISA-level architecture can be implemented either directly in hardware or through a microprogrammed control.&lt;br /&gt;&lt;br /&gt;A microprogram is a small run-time interpreter that takes the complex instruction and generates a sequence of simple instructions that can be executed by the hardware. Thus the hardware need not be complex. Once it became possible to design such complex processors by using microprogrammed control, designers went crazy and tried to close the semantic gap between the instructions of the processor and high-level languages. This semantic gap refers to the fact that each instruction in a high-level language specifies a lot more work than an instruction in the machine language. Think of a while loop statement in a high-level language such as C, for example. If we have a processor instruction with the while loop semantics, we could just use one machine language instruction. This explains why most CISC designs use microprogrammed control, as shown in Figure 1.&lt;br /&gt;&lt;br /&gt;RISC designs, on the other hand, eliminate the microprogram layer and use the hardware to directly execute instructions. Here is another reason why RISC processors can potentially give improved performance. One advantage of using microprogrammed control is that we can implement variations on the basic ISA architecture by simply modifying the microprogram; there is no need to change the underlying hardware. Thus it is possible to come up with cheaper versions as well as high-performance processors for the same family of processors.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;References&lt;/strong&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt; &lt;li&gt;&lt;em&gt;Guide to RISC Processors for Programmers and Engineers&lt;/em&gt; by Sivarama P. Dandamudi, Springer (2005), ISBN 0-387-21017-2.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;!--adsense#banner--&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1154217537013373102-7724102399187595640?l=mcu-programming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mcu-programming.blogspot.com/feeds/7724102399187595640/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1154217537013373102&amp;postID=7724102399187595640' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/7724102399187595640'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/7724102399187595640'/><link rel='alternate' type='text/html' href='http://mcu-programming.blogspot.com/2007/04/understanding-processor-architecture.html' title='Understanding Processor Architecture: RISC versus CISC'/><author><name>Doug</name><uri>http://www.blogger.com/profile/00580507341501269020</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-1154217537013373102.post-8953485544063647053</id><published>2007-04-03T14:36:00.002+07:00</published><updated>2010-06-14T16:39:44.767+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='8051'/><category scheme='http://www.blogger.com/atom/ns#' term='Software and Tools'/><category scheme='http://www.blogger.com/atom/ns#' term='Compilers'/><title type='text'>ASEM-51 step-by-step Installation on Windows XP</title><content type='html'>Last time I wrote &lt;a href="http://computingfreak.com/2007/04/01/learning-machine-code-with-8-bit-microcontrollers/"&gt;an installation for ASEM-51&lt;/a&gt;, a two-pass macro assembler for the Intel MCS-51 family of microcontrollers, using the batch file INSTALL.BAT. For someone who do not like anything that is running automatically, or things are not quite clear, here is an step-by-step installation guide for ASEM-51.&lt;br /&gt;&lt;br /&gt;The files we require are &lt;a href="http://plit.de/asem-51/asem5113.zip"&gt;ASEM-51 v1.3 for DOS/Windows&lt;/a&gt; (599 kB) and a collection of the latest &lt;a href="http://plit.de/asem-51/mcufiles.zip"&gt;MCU files&lt;/a&gt; (188 kB).&lt;br /&gt;&lt;br /&gt;1. Create a new directory on your harddisk, e.g. C:\ASEM51 and unpack all files of the ASEM-51 package into this directory (see Figure 1.).&lt;br /&gt;&lt;br /&gt;&lt;a href="http://computingfreak.com/weblog/wp-content/uploads/2007/04/asem51folder.gif" title="unpack ASEM-51"&gt;&lt;img src="http://computingfreak.com/weblog/wp-content/uploads/2007/04/asem51folder.gif" alt="unpack ASEM-51" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Figure 1.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;2. Unpack MCUFILES into a directory (see Figure 2). Move the *.MCU you want to C:\ASEM51\MCU (see Figure 3). Here I move the P89V51RD2.MCU only.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://computingfreak.com/weblog/wp-content/uploads/2007/04/mcufiles.gif" title="mcufiles"&gt;&lt;img src="http://computingfreak.com/weblog/wp-content/uploads/2007/04/mcufiles.gif" alt="mcufiles" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Figure 2.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://computingfreak.com/weblog/wp-content/uploads/2007/04/mcufiles2.gif" title="move mcufiles"&gt;&lt;img src="http://computingfreak.com/weblog/wp-content/uploads/2007/04/mcufiles2.gif" alt="move mcufiles" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Figure 3.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;3. Edit System Variable: Start--&amp;gt;right click on My Computer--&amp;gt;Properties. On System Properties click Advanced Tab then click Environment Variables. On System variables select Path then click Edit and append ;C:\ASEM51 in Variable value (see Figure 4).&lt;br /&gt;&lt;br /&gt;&lt;a href="http://computingfreak.com/weblog/wp-content/uploads/2007/04/sys_var.gif" title="edit System Variables"&gt;&lt;img src="http://computingfreak.com/weblog/wp-content/uploads/2007/04/sys_var.gif" alt="edit System Variables" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Figure 4.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;4. Define ASEM51INC environment variable: On System variables (from 3) click New the fill Variable name with ASEM51INC and Variable value with C:\ASEM51\MCU (see Figure 5).&lt;br /&gt;&lt;br /&gt;&lt;a href="http://computingfreak.com/weblog/wp-content/uploads/2007/04/sys_var1.gif" title="add new varible"&gt;&lt;img src="http://computingfreak.com/weblog/wp-content/uploads/2007/04/sys_var1.gif" alt="add new varible" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Figure 5.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;5. Click OK and close all windows.&lt;br /&gt;&lt;br /&gt;6. You can test by typing &lt;code&gt;asem&lt;/code&gt; in Command Shell (Start--&amp;gt;Run--&amp;gt;cmd). You should get something like this (see Figure 6).&lt;br /&gt;&lt;br /&gt;&lt;a href="http://computingfreak.com/weblog/wp-content/uploads/2007/04/cmd.gif" title="Test ASEM51"&gt;&lt;img src="http://computingfreak.com/weblog/wp-content/uploads/2007/04/cmd.gif" alt="Test ASEM51" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Figure 6.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;!--adsense#banner--&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1154217537013373102-8953485544063647053?l=mcu-programming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mcu-programming.blogspot.com/feeds/8953485544063647053/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1154217537013373102&amp;postID=8953485544063647053' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/8953485544063647053'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/8953485544063647053'/><link rel='alternate' type='text/html' href='http://mcu-programming.blogspot.com/2007/04/asem-51-step-by-step-installation-on.html' title='ASEM-51 step-by-step Installation on Windows XP'/><author><name>Doug</name><uri>http://www.blogger.com/profile/00580507341501269020</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>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1154217537013373102.post-5053334200935824912</id><published>2007-04-01T15:34:00.002+07:00</published><updated>2010-06-14T16:41:35.941+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='8051'/><category scheme='http://www.blogger.com/atom/ns#' term='Chip Architecture'/><title type='text'>Learning Machine Code with 8-bit Microcontrollers</title><content type='html'>To understand deeply in processor architecture, we have to learn the Machine Code. I decide to select the 8051 microcontroller as a microprocessor model. A microcontroller (or MCU) is a computer-on-a-chip. They integrate many modules on one chip such as RAM, Flash memory, EEPROM, serial ports (UARTs), I²C, Serial Peripheral Interface (SPI), analog-to-digital converters (ADC), clock generator (XTAL) and more.&lt;br /&gt;&lt;br /&gt;Humans almost never write programs directly in machine code. Instead, they use a programming language which is translated by the computer into machine code. The simplest kind of programming language is assembly language which usually has a one-to-one correspondence with the resulting machine code instructions but allows the use of mnemonics (ASCII strings) for the "op codes" (the part of the instruction which encodes the basic type of operation to perform) and names for locations in the program (branch labels) and for variables and constants.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Installing ASEM-51&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://plit.de/asem-51/introv13.htm"&gt;ASEM-51&lt;/a&gt; is a two-pass macro assembler for the Intel &lt;a href="http://developer.intel.com/design/mcs51/"&gt;MCS-51&lt;/a&gt; family of microcontrollers.  It is running on the PC under MS-DOS, Windows and Linux.  The &lt;strong&gt;ASEM-51&lt;/strong&gt; assembly language is based on the  standard &lt;strong&gt;Intel&lt;/strong&gt; syntax, and implements conditional assembly,  macros, and include file processing. The assembler can output object code in &lt;strong&gt;Intel-HEX&lt;/strong&gt; or Intel &lt;strong&gt;OMF-51&lt;/strong&gt; format as well as a detailed list file.  The &lt;strong&gt;ASEM-51&lt;/strong&gt; package includes support for more than 180 &lt;a href="http://developer.intel.com/design/mcs51/ov_51.htm" target="_blank"&gt;8051&lt;/a&gt; derivatives, a bootstrap program for MCS-51 target boards, and  documentation in ASCII and HTML format.  And it is free ...&lt;br /&gt;&lt;br /&gt;The simplest way of installing ASEM-51 is  copying all files of the package  to your working directory, and enjoy the benefits of true plug-and-play  compatibility!. Alternatively, I have set it up on Windows XP manually:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt; &lt;li&gt;Downloads the lastest &lt;a href="http://plit.de/asem-51/download.htm"&gt;ASEM-51 for DOS/Windows&lt;/a&gt; (currently v1.3)&lt;/li&gt;&lt;br /&gt; &lt;li&gt;Create a new, empty directory on your harddisk (C:\ASEM51).&lt;/li&gt;&lt;br /&gt; &lt;li&gt;Unpack your ASEM-51 distribution archive into this directory,  or copy all files of the ASEM-51 package into it.&lt;/li&gt;&lt;br /&gt; &lt;li&gt;Make the scratch directory default, run the batch file INSTALL.BAT provided, and follow the instructions.&lt;/li&gt;&lt;br /&gt; &lt;li&gt;Reboot your PC.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;You can update MPU file by downloading &lt;a href="http://plit.de/asem-51/mcufiles.zip"&gt;http://plit.de/asem-51/mcufiles.zip.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;References&lt;/strong&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt; &lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Microcontroller"&gt;Wikipedia&lt;/a&gt;&lt;/li&gt;&lt;br /&gt; &lt;li&gt;&lt;a href="http://foldoc.org/foldoc/foldoc.cgi?machine+code"&gt;machine code from FOLDOC&lt;/a&gt;&lt;/li&gt;&lt;br /&gt; &lt;li&gt;&lt;a href="http://mcu-programming.blogspot.com/2006/09/installing-mide-51-and-sdcc-and-for.html"&gt;Installing MIDE-51 and SDCC and for Win32&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;!--adsense#banner--&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1154217537013373102-5053334200935824912?l=mcu-programming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mcu-programming.blogspot.com/feeds/5053334200935824912/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1154217537013373102&amp;postID=5053334200935824912' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/5053334200935824912'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/5053334200935824912'/><link rel='alternate' type='text/html' href='http://mcu-programming.blogspot.com/2007/04/learning-machine-code-with-8-bit.html' title='Learning Machine Code with 8-bit Microcontrollers'/><author><name>Doug</name><uri>http://www.blogger.com/profile/00580507341501269020</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-1154217537013373102.post-5222348961442028064</id><published>2007-03-27T16:21:00.001+07:00</published><updated>2010-06-14T16:46:32.559+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Hardware'/><category scheme='http://www.blogger.com/atom/ns#' term='Chip Architecture'/><title type='text'>Understanding Processor Architecture: Simplify Computer Complexity</title><content type='html'>Computers are complex systems. We study computer systems by using layers of abstraction. We use a hierarchical structure to simplify the management. Each level of management filters out unnecessary details on the lower levels and presents only an abstracted version to the higher-level management.&lt;br /&gt;&lt;br /&gt;People can look at computer systems from several different perspectives depending on the type of their interaction. We use the concept of abstraction to look at only the details that are necessary from a particular viewpoint. For example, a computer user interacts with the system through an application program. Suppose you are interested in browsing the Internet. Your obvious choice is to interact with the system through a Web browser such as the Fire fox (FF) or Internet Explorer (IE). On the other hand, if you are a computer architect, you are interested in the internal details that do not interest a normal user of the system.&lt;br /&gt;&lt;br /&gt;From the programmer’s viewpoint, there exists a hierarchy from low-level languages to high-level languages (see Figure 1). At the lowest level, we have the machine language that is the language understood by the machine hardware. Because digital computers use 0 and 1 as their alphabet, machine language naturally uses 1s and 0s to encode the instructions. One level up, there is the assembly language as shown in Figure 1. Assembly language does not use 1s and 0s; instead, it uses mnemonics to express the instructions. Assembly language is closely related to the machine language.&lt;br /&gt;&lt;br /&gt;&lt;center&gt;&lt;a href="http://computingfreak.com/weblog/wp-content/uploads/2007/03/comp_abstract_layer.gif" title="computer abstraction layers"&gt;&lt;img src="http://computingfreak.com/weblog/wp-content/uploads/2007/03/comp_abstract_layer.gif" alt="computer abstraction layers" /&gt;&lt;/a&gt;Figure 1. Abstract layers of Computer Systems&lt;br /&gt;&lt;br /&gt;&lt;/center&gt;&lt;strong&gt;References&lt;/strong&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt; &lt;li&gt;&lt;em&gt;Guide to RISC Processors for Programmers and Engineers&lt;/em&gt; by Sivarama P. Dandamudi, Springer (2005), ISBN 0-387-21017-2.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;!--adsense#banner--&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1154217537013373102-5222348961442028064?l=mcu-programming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mcu-programming.blogspot.com/feeds/5222348961442028064/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1154217537013373102&amp;postID=5222348961442028064' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/5222348961442028064'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/5222348961442028064'/><link rel='alternate' type='text/html' href='http://mcu-programming.blogspot.com/2007/03/understanding-processor-architecture.html' title='Understanding Processor Architecture: Simplify Computer Complexity'/><author><name>Doug</name><uri>http://www.blogger.com/profile/00580507341501269020</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-1154217537013373102.post-412281874715693428</id><published>2007-03-26T16:59:00.001+07:00</published><updated>2010-06-14T16:50:31.827+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Chip Architecture'/><title type='text'>Understanding Processor Architecture: ISA</title><content type='html'>A programmer uses the Instruction Set Architecture (ISA) as an abstraction to understand the processor’s internal details. This abstraction suits us very well as we are interested in the logical details of the processor without getting bogged down by the myriad implementation details.&lt;br /&gt;&lt;br /&gt;The ISA specifies how a processor functions: what instructions it executes and what interpretation is given to these instructions. If these specifications are precise, they give freedom to various chip manufacturers to implement physical designs that look functionally the same at the ISA level. Thus, if we run the same program on these different implementations, we still get the same results. For example, the Intel 32-bit ISA (IA-32) has several implementations including the Pentium processors, cheaper Celeron processors, high-performance Xeon processors, and so on.&lt;br /&gt;&lt;br /&gt;The ISA-level abstraction provides a common platform to execute programs. If a program is written in C, a compiler translates it into the equivalent machine language program that can run on the ISA-level logical processor. Similarly, if you write your program in FORTRAN, use a FORTRAN compiler to generate code that can execute on the ISA-level logical processor.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;References&lt;/strong&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt; &lt;li&gt;&lt;em&gt;Guide to RISC Processors for Programmers and Engineers&lt;/em&gt; by Sivarama P. Dandamudi, Springer (2005), ISBN 0-387-21017-2.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;!--adsense#banner--&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1154217537013373102-412281874715693428?l=mcu-programming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mcu-programming.blogspot.com/feeds/412281874715693428/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1154217537013373102&amp;postID=412281874715693428' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/412281874715693428'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/412281874715693428'/><link rel='alternate' type='text/html' href='http://mcu-programming.blogspot.com/2007/03/understanding-processors-architecture.html' title='Understanding Processor Architecture: ISA'/><author><name>Doug</name><uri>http://www.blogger.com/profile/00580507341501269020</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-1154217537013373102.post-93843212409159671</id><published>2007-01-26T14:08:00.000+07:00</published><updated>2007-01-26T14:16:05.847+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Hardware'/><category scheme='http://www.blogger.com/atom/ns#' term='Software and Tools'/><category scheme='http://www.blogger.com/atom/ns#' term='Servo Motor'/><title type='text'>OpenServo</title><content type='html'>OpenServo is an open community-based project started by Mike Thompson with the goal of creating a low-cost digital servo for robotics. The hardware and software design of the OpenServo is free for anyone to use and modify to meet their particular needs. It is currently being developed by a small group of dedicated individuals striving to maintain the very best in free, open source software and standards. We hope that you will find the OpenServo project interesting and become a member of our community.&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://openservo.com/moin.cgi/FrontPage?action=AttachFile&amp;do=get&amp;amp;target=openservo.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 320px;" src="http://openservo.com/moin.cgi/FrontPage?action=AttachFile&amp;do=get&amp;amp;target=openservo.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;p&gt;The OpenServo is a combination of hardware and software meant to replace the original PCB internal to low-cost analog RC servos such as the &lt;a href="http://openservo.com/moin.cgi/Servo_Futaba_S3003"&gt; Futaba S3003&lt;/a&gt; or &lt;a href="http://openservo.com/moin.cgi/Servo_HiTec_HS-311"&gt;HiTec HS-311&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Some features of the OpenServo include: &lt;span id="line-2" class="anchor"&gt;&lt;/span&gt;&lt;/p&gt; &lt;ul&gt;&lt;li&gt;&lt;p&gt;High performance &lt;a class="http" href="http://www.atmel.com/products/avr/"&gt;AVR 8-bit microcontroller&lt;/a&gt; &lt;span id="line-3" class="anchor"&gt;&lt;/span&gt;&lt;/p&gt; &lt;/li&gt;&lt;li&gt;&lt;p&gt;Compact H-Bridge implemented with low-cost MOSFET drivers &lt;span id="line-4" class="anchor"&gt;&lt;/span&gt;&lt;/p&gt; &lt;/li&gt;&lt;li&gt;&lt;p&gt;I2C/TWI based interface for control and feedback &lt;span id="line-5" class="anchor"&gt;&lt;/span&gt;&lt;/p&gt; &lt;/li&gt;&lt;li&gt;&lt;p&gt;Control over servo position and speed &lt;span id="line-6" class="anchor"&gt;&lt;/span&gt;&lt;/p&gt; &lt;/li&gt;&lt;li&gt;&lt;p&gt;Feedback of servo position, speed, voltage and power consumption &lt;span id="line-7" class="anchor"&gt;&lt;/span&gt;&lt;/p&gt; &lt;/li&gt;&lt;li&gt;&lt;p&gt;EEPROM storage of servo configuration information &lt;span id="line-8" class="anchor"&gt;&lt;/span&gt;&lt;/p&gt; &lt;/li&gt;&lt;li&gt;&lt;p&gt;Software written in C using free development tools &lt;span id="line-9" class="anchor"&gt;&lt;/span&gt;&lt;/p&gt; &lt;/li&gt;&lt;li&gt;&lt;p&gt;I2C/TWI based bootloader and Windows GUI programmer &lt;span id="line-10" class="anchor"&gt;&lt;/span&gt;&lt;/p&gt; &lt;/li&gt;&lt;li&gt;&lt;p&gt;Total cost about $20 per servo in quantity ($10 servo hardware + $10 parts) &lt;span id="line-11" class="anchor"&gt;&lt;/span&gt;&lt;/p&gt; &lt;/li&gt;&lt;/ul&gt; &lt;span id="bottom_Include_Features" class="anchor"&gt;&lt;/span&gt;    &lt;p&gt;Information can be found on this site regarding &lt;a href="http://openservo.com/moin.cgi/Hardware"&gt;Hardware&lt;/a&gt;, &lt;a href="http://openservo.com/moin.cgi/Software"&gt;Software&lt;/a&gt; and &lt;a href="http://openservo.com/moin.cgi/Tools_%26_Utilities"&gt;Tools &amp;amp; Utilities&lt;/a&gt; to create your own OpenServo.&lt;br /&gt;&lt;/p&gt;Home page: &lt;a href="http://openservo.com/"&gt;http://openservo.com/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1154217537013373102-93843212409159671?l=mcu-programming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mcu-programming.blogspot.com/feeds/93843212409159671/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1154217537013373102&amp;postID=93843212409159671' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/93843212409159671'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/93843212409159671'/><link rel='alternate' type='text/html' href='http://mcu-programming.blogspot.com/2007/01/openservo.html' title='OpenServo'/><author><name>Doug</name><uri>http://www.blogger.com/profile/00580507341501269020</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>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1154217537013373102.post-4097501712162676486</id><published>2007-01-24T10:50:00.000+07:00</published><updated>2007-01-24T10:55:17.923+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PIC'/><category scheme='http://www.blogger.com/atom/ns#' term='Software and Tools'/><title type='text'>Piklab IDE for PIC and dsPIC microcontrollers</title><content type='html'>Piklab is an integrated development environment for applications based on Microchip &lt;a href="http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&amp;nodeId=74"&gt;PIC&lt;/a&gt; and &lt;a href="http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&amp;amp;nodeId=75"&gt;dsPIC&lt;/a&gt; microcontrollers similar to the &lt;a href="http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&amp;nodeId=1406&amp;amp;dDocName=en019469"&gt;MPLAB&lt;/a&gt; environment. Support for several compiler and assembler toolchains, programmers, debuggers and simulators is integrated. A command-line programmer and debugger is also available.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://piklab.sourceforge.net/screenshots/piklab_asm_view.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px;" src="http://piklab.sourceforge.net/screenshots/piklab_asm_view.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Piklab home: &lt;a href="http://piklab.sourceforge.net/index.php"&gt;http://piklab.sourceforge.net/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1154217537013373102-4097501712162676486?l=mcu-programming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mcu-programming.blogspot.com/feeds/4097501712162676486/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1154217537013373102&amp;postID=4097501712162676486' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/4097501712162676486'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/4097501712162676486'/><link rel='alternate' type='text/html' href='http://mcu-programming.blogspot.com/2007/01/piklab-ide-for-pic-and-dspic.html' title='Piklab IDE for PIC and dsPIC microcontrollers'/><author><name>Doug</name><uri>http://www.blogger.com/profile/00580507341501269020</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-1154217537013373102.post-7791398611466104554</id><published>2006-12-26T19:37:00.000+07:00</published><updated>2006-12-26T19:31:45.337+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Books'/><title type='text'>New book explains how to build Linux 2.6 kernels</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://oreilly.com/catalog/covers/0596100795_cat.gif"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 200px;" src="http://oreilly.com/catalog/covers/0596100795_cat.gif" alt="" border="0" /&gt;&lt;/a&gt;O'Reilly has published a book for Linux users interested in learning to build their own kernels. Linux Kernel in a Nutshell describes how to build and install Linux 2.6 kernels, starting with downloading the source. It was written by well-known kernel hacker Greg Kroah-Hartman.&lt;br /&gt;&lt;br /&gt;I think, this book is a starting point when you would like to learn the Embedded Linux for a Microcontroller, also the Real Time Operating System.&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;Source: &lt;a href="http://oreilly.com/emails/press/9780596100797.html"&gt;http://oreilly.com/emails/press/9780596100797.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Buy &lt;a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&amp;location=http%3A%2F%2Fwww.amazon.com%2FLinux-Kernel-Nutshell-OReilly%2Fdp%2F0596100795%2Fsr%3D8-1%2Fqid%3D1166365991%3Fie%3DUTF8%26s%3Dbooks&amp;amp;amp;amp;amp;amp;amp;tag=microcontroll-20&amp;linkCode=ur2&amp;amp;camp=1789&amp;creative=9325"&gt;Linux Kernel in a Nutshell&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=microcontroll-20&amp;amp;amp;amp;amp;amp;amp;amp;l=ur2&amp;o=1" alt="" style="border: medium none  ! important; margin: 0px ! important;" border="0" height="1" width="1" /&gt; from Amazon.com&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1154217537013373102-7791398611466104554?l=mcu-programming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mcu-programming.blogspot.com/feeds/7791398611466104554/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1154217537013373102&amp;postID=7791398611466104554' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/7791398611466104554'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/7791398611466104554'/><link rel='alternate' type='text/html' href='http://mcu-programming.blogspot.com/2006/12/new-book-explains-how-to-build-linux-26.html' title='New book explains how to build Linux 2.6 kernels'/><author><name>Doug</name><uri>http://www.blogger.com/profile/00580507341501269020</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-1154217537013373102.post-1979390357933445031</id><published>2006-12-17T21:21:00.000+07:00</published><updated>2006-12-17T21:39:15.346+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Software and Tools'/><category scheme='http://www.blogger.com/atom/ns#' term='sdcc'/><title type='text'>Eclipse for SDCC</title><content type='html'>Although I  use &lt;a href="http://www.opcube.com/home.html"&gt;MIDE-51&lt;/a&gt; as a major IDE, I still seek for the best (free) IDE for developing&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.eclipse.org/eclipse.org-common/themes/Phoenix/images/header_logo.gif"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 200px;" src="http://www.eclipse.org/eclipse.org-common/themes/Phoenix/images/header_logo.gif" alt="" border="0" /&gt;&lt;/a&gt;  Microcontroller Programming. The combination of &lt;a href="http://www.eclipse.org/"&gt;Eclipse&lt;/a&gt;, &lt;a href="http://www.eclipse.org/cdt/downloads.php"&gt; CDT&lt;/a&gt; and &lt;a href="http://eclipse-sdcc.sourceforge.net/"&gt;SDCC&lt;/a&gt; is an alternation tools for 8051 Microcontroller C Programming.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.eclipse.org/"&gt;Eclipse&lt;/a&gt; is an open source community whose projects are focused on building an open development platform comprised of extensible frameworks, tools and runtimes for building, deploying and managing software across the lifecycle. Eclipse is used for Enterprise Development, Embedded and Device Development, Rich Client Platform, Application Frameworks and Language IDE.&lt;br /&gt;&lt;br /&gt;The&lt;a href="http://www.eclipse.org/cdt/downloads.php"&gt; &lt;b&gt;CDT&lt;/b&gt;&lt;/a&gt; is &lt;b&gt;Eclipse's C/C++ Development Tooling&lt;/b&gt; project. It is an industrial strength C/C++ IDE that also serves as a platform for others to provide value added tooling for C/C++ developers.&lt;br /&gt;&lt;p&gt;The &lt;a href="http://eclipse-sdcc.sourceforge.net/"&gt;eclipseSDCC project&lt;/a&gt; aims to provide full support for the open source Small Device C Compiler (SDCC) from within the eclipse/CDT development environment. This allows embedded 'C' applications for 8051 and Z80 devices to be developed using the fully featured eclipse IDE. EclipseSDCC supports CDT managed make projects. In managed make projects CDT manages the build process by creating and maintaining the underlaying makefiles. CDT keeps track of source dependencies and can automatically rebuild the target when needed.&lt;/p&gt;&lt;p style="font-weight: bold;"&gt;To install (for Windows)&lt;/p&gt;&lt;ol&gt;&lt;li&gt;It requires &lt;a href="http://java.sun.com/j2se/1.4.2/download.html"&gt;Java Runtime Environment (JRE),&lt;/a&gt;  I download only JRE not SDK and install it.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Downlaod &lt;a href="http://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops/R-3.2.1-200609210945/eclipse-SDK-3.2.1-win32.zip"&gt;Eclipse SDK 3.2.1&lt;/a&gt; for Windows (120 MB) and extract it to c:/eclipse. In the directory it contains eclipse.exe which is an executable.&lt;/li&gt;&lt;li&gt;Download &lt;a href="http://download.eclipse.org/tools/cdt/releases/callisto/dist/3.1.1"&gt;CDT 3.1.1&lt;/a&gt; (September 29, 2006) and extract it c:/eclipse, this will prompt to replace plugins and features directory.&lt;/li&gt;&lt;li&gt;If you have already installed &lt;a href="http://sdcc.sourceforge.net/"&gt;SDCC&lt;/a&gt; for Window, skip this step. If you have no SDCC installed, &lt;a href="http://mcu-programming.blogspot.com/2006/09/installing-mide-51-and-sdcc-and-for.html"&gt;read this first&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;Download &lt;a href="http://sourceforge.net/project/showfiles.php?group_id=160896"&gt;eclipseSDCC-1.0.0&lt;/a&gt;, when you extract the file, it contains plugins and features directory. Copy the two direct to c:\eclipse.&lt;/li&gt;&lt;/ol&gt;Now the installation have been completed and you can find its manual in c:/eclipse/plugins/net.sourceforge.eclipsesdcc_1.0.0/help/index.html.&lt;br /&gt;&lt;br /&gt;Eclipse for SDCC is quite large when compared it MIDE-51. However, you can manage project in Eclipse whereas MIDE-51 still have no this feature in the present version. Here is a screen shot, you should see this dialog.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_Rp2aW7U_0tQ/RX_q0fpPhbI/AAAAAAAAACM/3bbkgaIEFW8/s1600-h/eclipseSDCC.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp1.blogger.com/_Rp2aW7U_0tQ/RX_q0fpPhbI/AAAAAAAAACM/3bbkgaIEFW8/s400/eclipseSDCC.gif" alt="" id="BLOGGER_PHOTO_ID_5007979498227860914" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;Related Links&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.cs.umanitoba.ca/%7Eeclipse/1-Install.pdf"&gt;Installing Eclipse (pdf)&lt;br /&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.cs.umd.edu/class/spring2006/cmsc132/EclipseTutorial/install.html"&gt;&lt;span style="text-decoration: underline;"&gt;http://www.cs.umd.edu/class/spring2006/cmsc132/EclipseTutorial/install.html&lt;/span&gt;&lt;/a&gt;&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/1154217537013373102-1979390357933445031?l=mcu-programming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mcu-programming.blogspot.com/feeds/1979390357933445031/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1154217537013373102&amp;postID=1979390357933445031' title='23 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/1979390357933445031'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/1979390357933445031'/><link rel='alternate' type='text/html' href='http://mcu-programming.blogspot.com/2006/12/eclipse-for-sdcc.html' title='Eclipse for SDCC'/><author><name>Doug</name><uri>http://www.blogger.com/profile/00580507341501269020</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://bp1.blogger.com/_Rp2aW7U_0tQ/RX_q0fpPhbI/AAAAAAAAACM/3bbkgaIEFW8/s72-c/eclipseSDCC.gif' height='72' width='72'/><thr:total>23</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1154217537013373102.post-672325161790520916</id><published>2006-12-01T16:04:00.000+07:00</published><updated>2006-12-01T18:41:18.415+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Software and Tools'/><category scheme='http://www.blogger.com/atom/ns#' term='sdcc'/><title type='text'>What's coming up, MIDE-51?</title><content type='html'>&lt;a href="http://www.opcube.com/home.html"&gt;MIDE-51&lt;/a&gt;, by Worapoht Kornkaewwattanakul, is an IDE for MCS-51 microcontroller. The toolchain supports by   &lt;a href="http://plit.de/asem-51/home.htm"&gt;ASEM-51&lt;/a&gt; assembler, SDCC : Small Device C Compiler, TS Controls 8051 Emulator and &lt;a href="http://home.arcor.de/jensaltmann/jsim-e.htm"&gt;JSIM-51&lt;/a&gt; Simulator (&lt;a href="http://mcu-programming.blogspot.com/2006/09/installing-mide-51-and-sdcc-and-for.html"&gt;see installation guide&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;The current version is 0.2.5.10. The author is working for next major version 0.3.0.0, which supports SDCC multiple files project style. Hopefully, he will finish this version soon.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1154217537013373102-672325161790520916?l=mcu-programming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mcu-programming.blogspot.com/feeds/672325161790520916/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1154217537013373102&amp;postID=672325161790520916' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/672325161790520916'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/672325161790520916'/><link rel='alternate' type='text/html' href='http://mcu-programming.blogspot.com/2006/12/whats-coming-up-mide-51.html' title='What&apos;s coming up, MIDE-51?'/><author><name>Doug</name><uri>http://www.blogger.com/profile/00580507341501269020</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-1154217537013373102.post-3561063467511697312</id><published>2006-11-29T19:18:00.000+07:00</published><updated>2006-11-30T14:12:36.327+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='8051'/><category scheme='http://www.blogger.com/atom/ns#' term='Hardware'/><title type='text'>128KB  Flash 8051  MCU from Atmel</title><content type='html'>AT89C51RE2, an 8051 based microcontroller with 128kbyte of flash, has been launched from &lt;a href="http://www.atmel.com/"&gt;Atmel&lt;/a&gt;. The device is an addition to the existing 16-, 32- and 64Kbyte &lt;a href="http://www.eetasia.com/search/keyword.php?keywords=8051&amp;ACTION_TYPE=SEARCH&amp;amp;operation=PHRASE&amp;search_mod=advanced&amp;amp;section=ALL&amp;encode=1&amp;amp;sub_form=quickform" target="_blank"&gt;8051&lt;/a&gt; flash family of AT89C51RB2/RC2/RD2/ED2 MCUs. This new chip offers 8kbyte of ram, two UARTs, watchdog timer, power&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.newelectronics.co.uk/articles/8092/atmel%20flash2.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 200px;" src="http://www.newelectronics.co.uk/articles/8092/atmel%20flash2.jpg" alt="" border="0" /&gt;&lt;/a&gt; on reset, power fail detector and up to 50 general purpose I/Os. Suited to industrial and consumer applications, the AT89C51RE2 can operate from 2.7 to 5.5V and achieves a 4MIPS throughput when running at 40MHz.&lt;br /&gt;&lt;br /&gt;A key feature is the on chip debug capability that enables low cost emulation. The hardware debug system with Windows IDE interface allows the user to access debugging functions built into the AT89C51RE2 resulting in faster development and verification of user code in real time.&lt;br /&gt;&lt;p&gt;The AT89C51RE2 is available in 44-pin PLCC and VQFP packages at $4.80 for 10,000 units. &lt;/p&gt;&lt;p&gt;Atmel offers the AT89STK-11, a starter kit for $99, to evaluate the AT89C51RE2; designers can either run the demonstration program or their own application. A new low-cost on-chip debug tool, AT89OCD-01 will be available by the end of November 2006.&lt;br /&gt;&lt;/p&gt;Source: &lt;a href="http://www.newelectronics.co.uk/article/index.aspx?articleid=dm7leIJx2YQXad3fKT6kjnowyzvkHye3Hirc9Te3MooA"&gt;www.newelectronics.co.uk &lt;/a&gt; and &lt;a href="http://www.eetasia.com/ART_8800443675_1034362_89b3843720061129.HTM?from=RSS"&gt;www.eetasia.com&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1154217537013373102-3561063467511697312?l=mcu-programming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mcu-programming.blogspot.com/feeds/3561063467511697312/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1154217537013373102&amp;postID=3561063467511697312' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/3561063467511697312'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/3561063467511697312'/><link rel='alternate' type='text/html' href='http://mcu-programming.blogspot.com/2006/11/128kb-flash8051-mcu-from-atmel.html' title='128KB  Flash 8051  MCU from Atmel'/><author><name>Doug</name><uri>http://www.blogger.com/profile/00580507341501269020</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-1154217537013373102.post-8201828919422079342</id><published>2006-11-28T14:28:00.000+07:00</published><updated>2006-11-28T14:27:34.878+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ARM'/><category scheme='http://www.blogger.com/atom/ns#' term='Hardware'/><title type='text'>Low-cost ARM7TDMI Evaluation Board based on STR730FZ2T6</title><content type='html'>&lt;span class="main"&gt;&lt;a href="http://www.armkits.com/product/STDV730F.asp"&gt;Embest&lt;/a&gt; announced the availablity of the STDV730F, a low-cost development board based on STR730FZ2T6, ARM7TDMI 32-BIT processor from STMicroelectronics.&lt;br /&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.armkits.com/product/images/stdv730.gif"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 260px;" src="http://www.armkits.com/product/images/stdv730.gif" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span class="main"&gt;&lt;span style="font-weight: bold;"&gt;Features&lt;/span&gt;&lt;/span&gt;&lt;span class="main"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="main"&gt;256 Kbytes of flash&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="main"&gt;16 Kbytes of RAM&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="main"&gt;up to 16-channel 10-bit ADC&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="main"&gt;20 timers&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="main"&gt;4xUARTs&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="main"&gt;3xCANs&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="main"&gt;SPI&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="main"&gt;I2C&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="main"&gt;DMA&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="main"&gt;RTC&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="main"&gt;PWM&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="main"&gt;112 GPIO&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span class="main"&gt;&lt;br /&gt;The board integrates a 2x16 LCD, LEDs, UART, CAN interface, buzzer, test buttons and Jtag interface to create a versatile stand-alone test platform. The board itself is provided with plenty of example&lt;/span&gt;&lt;span class="main"&gt; programs to help you startup with your design quickly.&lt;br /&gt;&lt;/span&gt;                  &lt;span style="font-family:verdana;"&gt; &lt;br /&gt; &lt;b&gt;Source: &lt;/b&gt;&lt;a href="http://www.embedded-computing.com/news/db/?4707"&gt;www.embedded-computing.com&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1154217537013373102-8201828919422079342?l=mcu-programming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mcu-programming.blogspot.com/feeds/8201828919422079342/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1154217537013373102&amp;postID=8201828919422079342' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/8201828919422079342'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/8201828919422079342'/><link rel='alternate' type='text/html' href='http://mcu-programming.blogspot.com/2006/11/low-cost-arm7tdmi-evaluation-board.html' title='Low-cost ARM7TDMI Evaluation Board based on STR730FZ2T6'/><author><name>Doug</name><uri>http://www.blogger.com/profile/00580507341501269020</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>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1154217537013373102.post-5808657707959356215</id><published>2006-11-27T17:25:00.000+07:00</published><updated>2006-11-27T17:35:18.972+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ARM'/><category scheme='http://www.blogger.com/atom/ns#' term='Software and Tools'/><title type='text'>ARM offers OpenMAX DL, free video codec software library</title><content type='html'>&lt;span class="noindex"&gt;&lt;span id="ArticleBody"&gt;ARM has made the source code for its sample implementation of OpenMAX DL (Development Layer) audio and video codec software library &lt;a href="http://www.arm.com/products/esd/openmax_home.html"&gt;freely available for download&lt;/a&gt; from the company’s website. &lt;/span&gt;&lt;/span&gt;&lt;span class="noindex"&gt;&lt;span id="ArticleBody"&gt;ARM’s sample OpenMAX DL software library provides source code written in C for easy platform portability and code readability.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;OpenMAX is a royalty-free, cross-platform API developed by the &lt;a class="inlinelink" href="http://www.khronos.org/"&gt;Khronos Group&lt;/a&gt; that provides a comprehensive media codec and application portability by enabling accelerated multimedia components to be                            developed, integrated and programmed across multiple operating systems and silicon platforms. &lt;a class="inlinelink" href="http://www.khronos.org/openmax/"&gt;[OpenMAX]&lt;/a&gt;&lt;br /&gt;&lt;span class="noindex"&gt;&lt;span id="ArticleBody"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="noindex"&gt;&lt;span id="ArticleBody"&gt;ARM said it plans to create a series of libraries including an implementation that will take full advantage of the ARMv6 architecture found in the ARM11 family and an implementation for the NEON signal processing technology found in the Cortex-A8 processor.&lt;br /&gt;&lt;br /&gt;Source: &lt;a href="http://www.electronicsweekly.com/Articles/2006/11/24/40231/arm-offers-video-codec-software-library-free-on-the-web.htm"&gt;www.electronicsweekly.com&lt;/a&gt;&lt;br /&gt;&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/1154217537013373102-5808657707959356215?l=mcu-programming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mcu-programming.blogspot.com/feeds/5808657707959356215/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1154217537013373102&amp;postID=5808657707959356215' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/5808657707959356215'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/5808657707959356215'/><link rel='alternate' type='text/html' href='http://mcu-programming.blogspot.com/2006/11/arm-offers-openmax-dl-free-video-codec.html' title='ARM offers OpenMAX DL, free video codec software library'/><author><name>Doug</name><uri>http://www.blogger.com/profile/00580507341501269020</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>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1154217537013373102.post-6342506866385403796</id><published>2006-11-26T12:29:00.000+07:00</published><updated>2006-11-28T14:30:56.214+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='8051'/><category scheme='http://www.blogger.com/atom/ns#' term='RTOS'/><category scheme='http://www.blogger.com/atom/ns#' term='sdcc'/><title type='text'>A Real-Time Operating System (RTOS) for the 8051</title><content type='html'>A &lt;b&gt;real-time operating system&lt;/b&gt; (&lt;b&gt;RTOS&lt;/b&gt;) is a class of &lt;a href="http://en.wikipedia.org/wiki/Operating_system" title="Operating system"&gt;operating system&lt;/a&gt; intended for &lt;a href="http://en.wikipedia.org/wiki/Real-time_computing" title="Real-time computing"&gt;real-time&lt;/a&gt; applications, including &lt;a href="http://en.wikipedia.org/wiki/Embedded_system" title="Embedded system"&gt;embedded systems&lt;/a&gt; (programmable thermostats, household appliance controllers, &lt;a href="http://en.wikipedia.org/wiki/Mobile_telephones" title="Mobile telephones"&gt;mobile telephones&lt;/a&gt;), industrial &lt;a href="http://en.wikipedia.org/wiki/Robot" title="Robot"&gt;robots&lt;/a&gt;, spacecraft, industrial control (see &lt;a href="http://en.wikipedia.org/wiki/SCADA" title="SCADA"&gt;SCADA&lt;/a&gt;), and scientific research equipment [&lt;a title="wikipedia" href="http://en.wikipedia.org/wiki/Real-time_operating_system"&gt;wikipedia&lt;/a&gt;]. It is an advance topic in Microcontroller and Embedded Systems.&lt;br /&gt;&lt;br /&gt;&lt;a title="FreeRTOS.org" href="http://www.freertos.org/"&gt;FreeRTOS.org&lt;/a&gt;&lt;small&gt;&lt;sup&gt;TM&lt;/sup&gt;&lt;/small&gt; is a portable, open source, mini Real Time Kernel - a free to download RTOS. It have been ported to support several microcontroller architectures - ARM7, ARM CORTEX M3, 8051, AVR (MegaAVR), x86, PIC18, PIC24, dsPIC, HCS12, H8S, RDC, ColdFire. FreeRTOS is licensed under a modified GPL and can be used in commercial applications under this license.&lt;br /&gt;&lt;br /&gt;For the 8051, this RTOS have been ported to Cygnal (Silicon Labs) 8051. This is the starting point for anyone who would like to study the Operating System and Embedded Design on  8051. The Cygnal port was developed on a &lt;a href="http://www2.silabs.com/tgwWebApp/appmanager/tgw/tgwHome;jsessionid=BFHyzNLJHjgvy4xYJRfsTXP5GptQvtG4DmPsvNQG1zndv1T2Jc9P%211832090486?_nfpb=true&amp;_pageLabel=GenericContentPage&amp;amp;contentObjectId=/public/web_content/products/Microcontrollers/en/C8051F120TB.htm"&gt;C8051F120-TB&lt;/a&gt;  prototyping board fitted with a &lt;a href="http://www2.silabs.com/public/documents/tpub_doc/dsheet/Microcontrollers/Precision_Mixed-Signal/en/C8051F12x-13x.pdf"&gt;8051F120&lt;/a&gt; microcontroller.   The freeware &lt;a href="http://sdcc.sourceforge.net/"&gt;SDCC&lt;/a&gt; compiler was used along with the Cygnal IDE.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Building and executing the RTOS demo application&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;After downloads the &lt;a title="freeRTOS source file" href="http://sourceforge.net/project/showfiles.php?group_id=111543&amp;amp;package_id=120544"&gt;freeRTOS source file&lt;/a&gt; (.exe or .zip), I extract the file to C:\FreeRTOS. The demo application for Cygnal 8051 is located in C:\FreeRTOS\Demo\Cygnal. To compiler this demo, it is require &lt;a href="http://sdcc.sourceforge.net/"&gt;SDCC&lt;/a&gt; (&lt;a title="see how to install" href="http://mcu-programming.blogspot.com/2006/09/installing-mide-51-and-sdcc-and-for.html"&gt;see how to install&lt;/a&gt;) and &lt;a title="GNU make" href="http://unxutils.sourceforge.net/"&gt;GNU make&lt;/a&gt;. For Gnu make, I download &lt;a href="http://unxutils.sourceforge.net/UnxUtils.zip"&gt;UnxUtils.zip&lt;/a&gt; then extract it to C:\UnxUtils and finally edit PATH to C:\UnxUtils\usr\local\wbin (&lt;a title="see how to edit path on 2000 and XP" href="http://www.computerhope.com/issues/ch000549.htm"&gt;see how to edit PATH on 2000 and XP&lt;/a&gt;). In DOS Command Shell, change directory (cd) to C:\FreeRTOS\Demo\Cygnal and type make, the final product is main.ihx which the demo real time application for Cygnal 8051. However. the size of this file is quiet big, 72k. I have succeed  compiling with SDCC 2.5.x but failed for SDCC 2.6.x.&lt;br /&gt;&lt;br /&gt;In the conclusion, The demo application of the opensource freeRTOS have been ported to Cygnal 8051 which contains the demonstration source code. This is an avenue to learn the Real Time Operating System for the others 8051 chip.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1154217537013373102-6342506866385403796?l=mcu-programming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mcu-programming.blogspot.com/feeds/6342506866385403796/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1154217537013373102&amp;postID=6342506866385403796' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/6342506866385403796'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/6342506866385403796'/><link rel='alternate' type='text/html' href='http://mcu-programming.blogspot.com/2006/11/real-time-operating-system-rtos-is.html' title='A Real-Time Operating System (RTOS) for the 8051'/><author><name>Doug</name><uri>http://www.blogger.com/profile/00580507341501269020</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-1154217537013373102.post-7980618552140056199</id><published>2006-11-21T18:24:00.000+07:00</published><updated>2006-11-22T12:15:50.590+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Simulator'/><category scheme='http://www.blogger.com/atom/ns#' term='Software and Tools'/><category scheme='http://www.blogger.com/atom/ns#' term='sdcc'/><title type='text'>A Simulator for P89V51RD2</title><content type='html'>The Philips' &lt;a href="http://mcu-programming.blogspot.com/2006/09/philips-p89v51rd2-microcontroller.html"&gt;P89V51RD2&lt;/a&gt; is a 80c51 microcontroller which provides a set of powerful features:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Timer/Counter 2&lt;/li&gt;&lt;li&gt;PCA (Programmable Counter Array)&lt;/li&gt;&lt;li&gt; Watchdog timer&lt;/li&gt;&lt;/ul&gt;&lt;a href="http://mcu-programming.blogspot.com/2006/11/ucsim-8051-simulator-for-sdcc.html"&gt;uCsim&lt;/a&gt;, the 8051 simulator  for  SDCC,  supports  various types of 8051 family and one of them is 89C51R. I think it close to the features of P89V51RD2 microcontroller as mentioned above.&lt;br /&gt;&lt;br /&gt;To use, enter this commands:&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;pre&gt;&lt;br /&gt;$s51 -t 89c51r&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;which prompt you to uCsim command shell. You can view  the  special  modules  supported by  uCsim  by enter this in the uCsim shell:&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;pre&gt;&lt;br /&gt;0&gt;conf&lt;br /&gt;ucsim version 0.5.4&lt;br /&gt;Type of microcontroller: 89C51R CMOS&lt;br /&gt;Controller has 13 hardware element(s).&lt;br /&gt;timer0[0]&lt;br /&gt;timer1[1]&lt;br /&gt;uart[0]&lt;br /&gt;port[0]&lt;br /&gt;port[1]&lt;br /&gt;port[2]&lt;br /&gt;port[3]&lt;br /&gt;irq[0]&lt;br /&gt;_51_dummy[0]&lt;br /&gt;timer2[2]&lt;br /&gt;wdt[0]&lt;br /&gt;pca[0]&lt;br /&gt;_89c51r_dummy[0]&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Although this simulator is based on command line, it is free and powerful for the modern 8051 chips.&lt;br /&gt;&lt;br /&gt;uCsim home:  &lt;a href="http://mazsola.iit.uni-miskolc.hu/%7Edrdani/embedded/s51/"&gt;http://mazsola.iit.uni-miskolc.hu/%7Edrdani/embedded/s51/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://mazsola.iit.uni-miskolc.hu/%7Edrdani/embedded/s51/"&gt; &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1154217537013373102-7980618552140056199?l=mcu-programming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mcu-programming.blogspot.com/feeds/7980618552140056199/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1154217537013373102&amp;postID=7980618552140056199' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/7980618552140056199'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/7980618552140056199'/><link rel='alternate' type='text/html' href='http://mcu-programming.blogspot.com/2006/11/simulator-for-p89v51rd2.html' title='A Simulator for P89V51RD2'/><author><name>Doug</name><uri>http://www.blogger.com/profile/00580507341501269020</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-1154217537013373102.post-8804234745041136361</id><published>2006-11-15T19:04:00.000+07:00</published><updated>2006-11-15T19:35:03.712+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C Programming'/><category scheme='http://www.blogger.com/atom/ns#' term='sdcc'/><title type='text'>Installing SDCC on Fedora Core 6</title><content type='html'>I have upgraded my Linux to the latest version &lt;a href="http://fedora.redhat.com/"&gt;Fedora Core 6&lt;/a&gt;. This version come with linux kernel 2.6.18 and gcc v4.1.1.  I don't hesitate to  install  the  SDCC  to  work  on  it.  After  I  downloaded  the  latest  of  &lt;a href="http://sdcc.sourceforge.net/snap.php#Source"&gt;SDCC  source&lt;/a&gt;,   sdcc-src-xxx-xxx.tar.bz2, I installed it with this command:&lt;br /&gt;&lt;pre&gt;$tar -xvfz sdcc-src-xxx-xxx.tar.bz2&lt;br /&gt;$cd sdcc&lt;br /&gt;$./configure --prefix=/usr&lt;br /&gt;$make&lt;br /&gt;$make install&lt;br /&gt;&lt;/pre&gt;If it succeed, you should have these directories:&lt;br /&gt;/usr/bin for execute files&lt;br /&gt;/usr/share/sdcc/doc for documentation&lt;br /&gt;/usr/share/sdcc/include for header files&lt;br /&gt;/usr/share/sdcc/lib for libraries&lt;br /&gt;&lt;br /&gt;I tested it with this simple code, I edited with gedit:&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;pre&gt;&lt;br /&gt;#include &lt;8051.h&gt;&lt;br /&gt;void min() {&lt;br /&gt;unsigned char var_1;&lt;br /&gt;var_1 = 0xFF;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;then saved it, let say test.c. To compile I use this command:&lt;pre&gt;$sdcc test.c&lt;br /&gt;&lt;/pre&gt;and I found the test.ihx file in that directory which is the expected output.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1154217537013373102-8804234745041136361?l=mcu-programming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mcu-programming.blogspot.com/feeds/8804234745041136361/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1154217537013373102&amp;postID=8804234745041136361' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/8804234745041136361'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/8804234745041136361'/><link rel='alternate' type='text/html' href='http://mcu-programming.blogspot.com/2006/11/installing-sdcc-on-fedora-core-6.html' title='Installing SDCC on Fedora Core 6'/><author><name>Doug</name><uri>http://www.blogger.com/profile/00580507341501269020</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-1154217537013373102.post-7890219397158551071</id><published>2006-11-10T15:25:00.000+07:00</published><updated>2006-11-10T17:35:53.179+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Simulator'/><category scheme='http://www.blogger.com/atom/ns#' term='8051'/><category scheme='http://www.blogger.com/atom/ns#' term='Software and Tools'/><category scheme='http://www.blogger.com/atom/ns#' term='8052'/><title type='text'>uCsim: the 8051 simulator for SDCC</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://mazsola.iit.uni-miskolc.hu/%7Edrdani/embedded/s51/UCsim.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 200px;" src="http://mazsola.iit.uni-miskolc.hu/%7Edrdani/embedded/s51/UCsim.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;a href="http://mazsola.iit.uni-miskolc.hu/%7Edrdani/embedded/s51/"&gt;uCsim&lt;/a&gt; is a microcontroller simulator for SDCC. It is free and opensource under GNU GPL. Currently it supports MCS51 family. AVR core, Z80, HC08 and XA are supported by UNIX version only.&lt;br /&gt;&lt;br /&gt;For  the  8051,  the recognized types are: 51, 8051, 8751, C51, 80C51, 87C51, 31, 8031, C31, 80C31, 52, 8052, 8752, C52, 80C52, 87C52, 32, 8032, C32, 80C32, 51R, 51RA, 51RB, 51RC, C51R, C51RA, C51RB, C51RC, 89C51R, 251, C251, DS390, DS390F.&lt;br /&gt;&lt;br /&gt;uCsim is available for two platforms: DOS (MCS51 only) and UNIX but DOS version is not supported any more. DOS version is not finished so I call it demo version and it is available in binary only. Limitations of DOS version are:  &lt;ul&gt;&lt;li&gt;There is no built in help available;  &lt;/li&gt;&lt;li&gt;Some of the utilities are not working, for example calculator, bit simulator;  &lt;/li&gt;&lt;li&gt;Serial line works in mode 1 independently of mode bits.&lt;/li&gt;&lt;/ul&gt;If you are using the latest version of SDCC on Windows, uCsim is already in your hand (C:\Program Files\SDCC\bin). If you have not installed it yet, &lt;a href="http://mcu-programming.blogspot.com/2006/09/installing-mide-51-and-sdcc-and-for.html"&gt;please see my installation guide&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;Starting the Simulator&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;There are separate programs to simulate different microcontroller families:  &lt;p&gt;MCS51 family is simulated by &lt;b&gt;s51&lt;/b&gt;&lt;br /&gt;AVR family is simulated by &lt;b&gt;savr&lt;/b&gt;&lt;br /&gt;Z80 processor is simulated by &lt;b&gt;sz80&lt;/b&gt;&lt;br /&gt;XA family is simulated by &lt;b&gt;sxa&lt;/b&gt;&lt;br /&gt;HC08 processor is simulated by &lt;b&gt;shc08&lt;/b&gt;  &lt;/p&gt;&lt;p&gt;The program can be started using following command:&lt;/p&gt;&lt;p&gt;&lt;tt&gt;C:\&gt; s51 [input file]&lt;/tt&gt;  &lt;/p&gt;Parameter is optional. If it specified it must be the name of an Intel hex file.&lt;br /&gt;&lt;br /&gt;For more details, &lt;a href="http://mazsola.iit.uni-miskolc.hu/%7Edrdani/embedded/s51/"&gt;please see its documentation&lt;/a&gt;. This is an overview and I will write about this simulator later.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1154217537013373102-7890219397158551071?l=mcu-programming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mcu-programming.blogspot.com/feeds/7890219397158551071/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1154217537013373102&amp;postID=7890219397158551071' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/7890219397158551071'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/7890219397158551071'/><link rel='alternate' type='text/html' href='http://mcu-programming.blogspot.com/2006/11/ucsim-8051-simulator-for-sdcc.html' title='uCsim: the 8051 simulator for SDCC'/><author><name>Doug</name><uri>http://www.blogger.com/profile/00580507341501269020</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-1154217537013373102.post-8628260325472727095</id><published>2006-11-09T13:15:00.000+07:00</published><updated>2006-11-09T15:42:24.943+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Software and Tools'/><title type='text'>Migrating from demo compilers to SDCC</title><content type='html'>I found these tips from SDCC &lt;a href="http://sdcc.sourceforge.net/doc/sdccman.html/node140.html"&gt;manual pages&lt;/a&gt; and though that it should be useful. If you would like to migrate from a demo C Compiler with the limitation of code size, such as Keil C51 and Raisonance RIDE-51, to SDCC, please consider to port your present code to SDCC by following these instructions.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;check whether endianness of the compilers differs and adapt where needed.  &lt;/li&gt;&lt;li&gt;check the device specific header files&lt;a name="2840"&gt;&lt;/a&gt;&lt;a name="2841"&gt;&lt;/a&gt; for  compiler specific syntax. Eventually include the file &lt;compiler.h&gt;&lt;a name="2842"&gt;&lt;/a&gt;&gt; to allow using common header files. (&lt;a href="http://svn.sourceforge.net/viewvc/sdcc/trunk/sdcc/device/include/mcs51/P89c51RD2.h?view=markup"&gt;see f.e. cc2510fx.h&lt;/a&gt;).   &lt;/compiler.h&gt;&lt;/li&gt;&lt;li&gt;check whether the startup code contains the correct initialization  (watchdog, peripherals).  &lt;/li&gt;&lt;li&gt;check whether the sizes of short, int, long match.  &lt;/li&gt;&lt;li&gt;check if some 16 or 32 bit hardware registers require a specific addressing  order (least significant or most significant byte first) and adapt if needed  (&lt;i&gt;first&lt;/i&gt; and &lt;i&gt;last&lt;/i&gt; relate to time and not to lower/upper memory  location here, so this is &lt;i&gt;not&lt;/i&gt; the same as endianness).  &lt;/li&gt;&lt;li&gt;check whether the keyword &lt;i&gt;volatile&lt;/i&gt; is used where needed. The  compilers might differ in their optimization characteristics (as different  versions of the same compiler might also use more clever optimizations this is  good idea anyway). See &lt;a href="http://sdcc.sourceforge.net/doc/sdccman.html/node65.html#sub:Common-interrupt-pitfall-volatile"&gt;Common interrupt pitfall: variable not declared volatile&lt;/a&gt;.  &lt;/li&gt;&lt;li&gt;check that the compilers are not told to supress warnings.  &lt;/li&gt;&lt;li&gt;check and convert compiler specific extensions (interrupts, memory areas,  pragmas etc.).  &lt;/li&gt;&lt;li&gt;check for differences in type promotion. Especially check for math  operations on &lt;tt&gt;char&lt;/tt&gt; or &lt;tt&gt;unsigned char&lt;/tt&gt; variables. For the sake of  C99 compatibility SDCC will probably promote these to &lt;tt&gt;int&lt;/tt&gt; more often  than other compilers. Eventually insert explicit casts to &lt;tt&gt;(char)&lt;/tt&gt; or  &lt;tt&gt;(unsigned char)&lt;/tt&gt;. Also check that the ~ operator&lt;a name="2855"&gt;&lt;/a&gt; is not  used on &lt;tt&gt;bit&lt;a name="2856"&gt;&lt;/a&gt;&lt;/tt&gt; variables, use the ! operator instead. See  sections &lt;a href="http://sdcc.sourceforge.net/doc/sdccman.html/node139.html#type_promotion"&gt;TIPS&lt;/a&gt; and &lt;a href="http://sdcc.sourceforge.net/doc/sdccman.html/node6.html#sec:Compatibility-with-previous"&gt;Compatibility with previous versions&lt;/a&gt;.  &lt;/li&gt;&lt;li&gt;check the assembly code generated for interrupt routines (f.e. for calls to  possibly non-reentrant library functions).  &lt;/li&gt;&lt;li&gt;check whether timing loops result in proper timing (or preferably consider a  rewrite of the code with timer based delays instead).  &lt;/li&gt;&lt;li&gt;check for differences in printf parameters (some compilers push (va_arg&lt;a name="2859"&gt;&lt;/a&gt;) char variables as &lt;tt&gt;int&lt;/tt&gt; others push them as  &lt;tt&gt;char&lt;/tt&gt;. See section &lt;a href="http://sdcc.sourceforge.net/doc/sdccman.html/node6.html#sec:Compatibility-with-previous"&gt;Compatibility with previous versions&lt;/a&gt;).  &lt;/li&gt;&lt;li&gt;check the resulting memory map&lt;a name="2863"&gt;&lt;/a&gt;. Usage of different memory  spaces: code, stack, data (for mcs51/ds390 additionally idata, pdata, xdata).  Eventually check if unexpected library functions are included. &lt;/li&gt;&lt;/ul&gt;Using Opensource tools like SDCC should be the advantage  for study propose specially for the beginner and the hobbyist. However, for the serious  engineering  projects,  the  SDCC  may  not  be  the  solution. The instructs above can also turn SDCC code to others compiler.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1154217537013373102-8628260325472727095?l=mcu-programming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mcu-programming.blogspot.com/feeds/8628260325472727095/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1154217537013373102&amp;postID=8628260325472727095' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/8628260325472727095'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/8628260325472727095'/><link rel='alternate' type='text/html' href='http://mcu-programming.blogspot.com/2006/11/migrating-from-demo-compilers-to-sdcc.html' title='Migrating from demo compilers to SDCC'/><author><name>Doug</name><uri>http://www.blogger.com/profile/00580507341501269020</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>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1154217537013373102.post-6106623786936997230</id><published>2006-10-20T18:03:00.001+07:00</published><updated>2006-10-30T09:42:28.588+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Robotics'/><title type='text'>Robot technology running fast in Japan</title><content type='html'>Robot technology has been moving really fast in Japan right now. Here is a demonstration: two Manoi-AT01 humanoid robots racing against each other.&lt;br /&gt;&lt;br /&gt;&lt;embed style="width:400px; height:326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=-4037097963582769818&amp;hl=en"&gt; &lt;/embed&gt;&lt;br /&gt;&lt;br /&gt;MANOI (humanoid robot) is a product of &lt;a href="http://www.kyosho.co.jp"&gt;KYOSHO&lt;/a&gt;. Please see the &lt;a href="http://www.kyosho.co.jp/web/race/race_event/event/2005_prshow/robot02-e.html"&gt;Design, Mechanism and Playing Events Innovation&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1154217537013373102-6106623786936997230?l=mcu-programming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mcu-programming.blogspot.com/feeds/6106623786936997230/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1154217537013373102&amp;postID=6106623786936997230' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/6106623786936997230'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/6106623786936997230'/><link rel='alternate' type='text/html' href='http://mcu-programming.blogspot.com/2006/10/robot-technology-running-fast-in-japan_20.html' title='Robot technology running fast in Japan'/><author><name>Doug</name><uri>http://www.blogger.com/profile/00580507341501269020</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>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1154217537013373102.post-6029846129992445183</id><published>2006-10-15T21:58:00.000+07:00</published><updated>2006-10-30T09:43:23.019+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Robotics'/><title type='text'>High performance driving of the Remote control Segway (a self balancing robot).</title><content type='html'>&lt;embed style="width: 400px; height: 326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=6668088695854313598&amp;hl=en"&gt;       &lt;br /&gt;&lt;/embed&gt;&lt;br /&gt;&lt;br /&gt;This video shows the self-balancing robot spinning as it drives.  All that the user needs to do is use the remote control to command direction and turning direction.  The microcontroller does the rest.&lt;br /&gt;&lt;br /&gt;This is a remote control Segway (a mini self balancing robot), named the Teetering Buffalo, built at Georgia Tech by graduate students Adam Cardi, Aaron Enes, and Matt Wagner.&lt;br /&gt;&lt;br /&gt;Aaron Enes at Georgia Tech&lt;br /&gt;21 sec  -  Jan 13, 2006&lt;br /&gt;&lt;a style="color: green;" href="http://www.prism.gatech.edu/%7Egth856d/buffalo/" target="_blank"&gt; www.prism.gatech.edu&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1154217537013373102-6029846129992445183?l=mcu-programming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mcu-programming.blogspot.com/feeds/6029846129992445183/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1154217537013373102&amp;postID=6029846129992445183' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/6029846129992445183'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/6029846129992445183'/><link rel='alternate' type='text/html' href='http://mcu-programming.blogspot.com/2006/10/high-performance-driving-of-remote.html' title='High performance driving of the Remote control Segway (a self balancing robot).'/><author><name>Doug</name><uri>http://www.blogger.com/profile/00580507341501269020</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-1154217537013373102.post-6137675228839320551</id><published>2006-09-20T09:35:00.000+07:00</published><updated>2006-09-20T09:46:15.286+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='8051'/><category scheme='http://www.blogger.com/atom/ns#' term='Chip Architecture'/><title type='text'>P89LPC9381; 8-bit microcontroller with accelerated two-clock 80C51 core 4 kB 3 V byte-erasable flash with 10-bit ADC</title><content type='html'>&lt;p&gt; The P89LPC9381 is a single-chip microcontroller, available in low-cost packages, based    on a high performance processor architecture that executes instructions in two to four    clocks, six times the rate of standard 80C51 devices. Many system-level functions have    been incorporated into the P89LPC9381 in order to reduce component count, board    space, and system cost.&lt;/p&gt;&lt;br /&gt;&lt;ul&gt;&lt;b&gt;Principal features&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;4 kB byte-erasable flash code memory organized into 1 kB sectors and 64 B pages.    Single-byte erasing allows any byte(s) to be used as non-volatile data storage.&lt;/li&gt;&lt;br /&gt;          &lt;li&gt;256 B RAM data memory on-chip RAM.&lt;/li&gt;&lt;br /&gt;          &lt;li&gt;8-input multiplexed 10-bit ADC. Two analog comparators with selectable inputs and    reference source.&lt;/li&gt;&lt;br /&gt;          &lt;li&gt;Two 16-bit counter/timers (each may be configured to toggle a port output upon timer    overflow or to become a PWM output) and a 23-bit system timer that can also be used    as a RTC.&lt;/li&gt;&lt;br /&gt;          &lt;li&gt;Enhanced UART with fractional baud rate generator, break detect, framing error    detection, and automatic address detection; 400 kHz byte-wide I2C-bus    communication port and SPI communication port.&lt;/li&gt;&lt;br /&gt;          &lt;li&gt;High-accuracy internal RC oscillator option allows operation without external oscillator    components. The RC oscillator option is selectable and fine tunable.&lt;/li&gt;&lt;br /&gt;          &lt;li&gt;2.4 V to 3.6 V VDD operating range. I/O pins are 5 V tolerant (may be pulled up or    driven to 5.5 V).&lt;/li&gt;&lt;br /&gt;          &lt;li&gt;28-pin TSSOP package with 23 I/O pins minimum and up to 26 I/O pins while using    on-chip oscillator and reset options.&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Additional features&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;          &lt;li&gt;A high performance 80C51 CPU provides instruction cycle times of 111 ns to 222 ns    for all instructions except multiply and divide when executing at 18 MHz. This is six    times the performance of the standard 80C51 running at the same clock frequency. A    lower clock frequency for the same performance results in power savings and reduced    EMI.&lt;/li&gt;&lt;br /&gt;          &lt;li&gt;Serial flash ICP allows simple production coding with commercial EPROM    programmers. Flash security bits prevent reading of sensitive application programs.&lt;/li&gt;&lt;br /&gt;          &lt;li&gt;Serial flash ISP allows coding while the device is mounted in the end application.&lt;/li&gt;&lt;br /&gt;          &lt;li&gt;In-Application Programming of the flash code memory. This allows changing the code    in a running application.&lt;/li&gt;&lt;br /&gt;          &lt;li&gt;Watchdog timer with separate on-chip oscillator, requiring no external components.    The watchdog prescaler is selectable from eight values.&lt;/li&gt;&lt;br /&gt;          &lt;li&gt;Low voltage reset (brownout detect) allows a graceful system shutdown when power    fails. May optionally be configured as an interrupt.&lt;/li&gt;&lt;br /&gt;          &lt;li&gt;Idle and two different power-down reduced power modes. Improved wake-up from    Power-down mode (a LOW interrupt input starts execution). Typical power-down    current is 1 uA (total power-down with voltage comparators disabled).&lt;/li&gt;&lt;br /&gt;          &lt;li&gt;Active-LOW reset. On-chip power-on reset allows operation without external reset    components. A reset counter and reset glitch suppression circuitry prevent spurious    and incomplete resets. A software reset function is also available.&lt;/li&gt;&lt;br /&gt;          &lt;li&gt;Configurable on-chip oscillator with frequency range options selected by user    programmed flash configuration bits. Oscillator options support frequencies from    20 kHz to the maximum operating frequency of 18 MHz.&lt;/li&gt;&lt;br /&gt;          &lt;li&gt;Oscillator fail detect. The watchdog timer has a separate fully on-chip oscillator    allowing it to perform an oscillator fail detect function.&lt;/li&gt;&lt;br /&gt;          &lt;li&gt;Programmable port output configuration options: quasi-bidirectional, open-drain,    push-pull, input-only.&lt;/li&gt;&lt;br /&gt;          &lt;li&gt;Port 'input pattern match' detect. Port 0 may generate an interrupt when the value of    the pins match or do not match a programmable pattern. &lt;/li&gt;&lt;br /&gt;          &lt;li&gt;LED drive capability (20 mA) on all port pins. A maximum limit is specified for the    entire chip.&lt;/li&gt;&lt;br /&gt;          &lt;li&gt;Controlled slew rate port outputs to reduce EMI. Outputs have approximately 10 ns    minimum ramp times.&lt;/li&gt;&lt;br /&gt;          &lt;li&gt;Only power and ground connections are required to operate the P89LPC9381 when    internal reset option is selected.&lt;/li&gt;&lt;br /&gt;          &lt;li&gt;Four interrupt priority levels.&lt;/li&gt;&lt;br /&gt;          &lt;li&gt;Eight keypad interrupt inputs, plus two additional external interrupt inputs.&lt;/li&gt;&lt;br /&gt;          &lt;li&gt;Schmitt trigger port inputs.&lt;/li&gt;&lt;br /&gt;          &lt;li&gt;Second data pointer.&lt;/li&gt;&lt;br /&gt;          &lt;li&gt;Emulation support.&lt;/li&gt;&lt;br /&gt;        &lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1154217537013373102-6137675228839320551?l=mcu-programming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mcu-programming.blogspot.com/feeds/6137675228839320551/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1154217537013373102&amp;postID=6137675228839320551' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/6137675228839320551'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/6137675228839320551'/><link rel='alternate' type='text/html' href='http://mcu-programming.blogspot.com/2006/09/p89lpc9381-8-bit-microcontroller-with.html' title='P89LPC9381; 8-bit microcontroller with accelerated two-clock 80C51 core 4 kB 3 V byte-erasable flash with 10-bit ADC'/><author><name>Doug</name><uri>http://www.blogger.com/profile/00580507341501269020</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-1154217537013373102.post-1369491228415262432</id><published>2006-09-16T10:50:00.000+07:00</published><updated>2006-12-03T11:13:36.429+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C Programming'/><category scheme='http://www.blogger.com/atom/ns#' term='8051'/><category scheme='http://www.blogger.com/atom/ns#' term='Sensors'/><title type='text'>Distance Measurement Sensor</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_Rp2aW7U_0tQ/RXJJwJ3eMzI/AAAAAAAAAAc/5dFj2vz8g7M/s1600-h/GP2Y0A21YK.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://bp2.blogger.com/_Rp2aW7U_0tQ/RXJJwJ3eMzI/AAAAAAAAAAc/5dFj2vz8g7M/s320/GP2Y0A21YK.jpg" alt="" id="BLOGGER_PHOTO_ID_5004143227593175858" border="0" /&gt;&lt;/a&gt;GP2Y0A21YK is General Purpose Type Distance Measuring Sensors from Sharp.  &lt;a href="http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&amp;nodeId=1335&amp;amp;dDocName=en010828" target="_blank"&gt;(see the&lt;/a&gt;&lt;a href="http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&amp;nodeId=1335&amp;amp;dDocName=en010828" target="_blank"&gt; product page)&lt;/a&gt;. Sharp Infrared (IR) radiation Distance Measuring Sensor use Infrared signal to measure object distance from 10 to 80 cm with analog output.&lt;br /&gt;&lt;p&gt;&lt;strong&gt;Featu&lt;/strong&gt;&lt;strong&gt;res&lt;/strong&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Less influence on the color of reflective objects, reflectivity &lt;/li&gt;&lt;br /&gt;&lt;li&gt;Line-up of distance output/distance judgement type&lt;br /&gt;&lt;br /&gt;Distance output type (analog voltage) : GP2Y0A21YK&lt;br /&gt;&lt;br /&gt;Detecting distance : 10 to 80cm&lt;br /&gt;&lt;br /&gt;Distance judgement type : GP2Y0D21YK&lt;br /&gt;&lt;br /&gt;Judgement distance : 24cm&lt;br /&gt;&lt;br /&gt;(Adjustable within the range of 10 to 80cm [Optionally available]) &lt;/li&gt;&lt;br /&gt;&lt;li&gt; External control circuit is unnecessary &lt;/li&gt;&lt;br /&gt;&lt;li&gt;Low cost&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;strong&gt;Applications&lt;/strong&gt;&lt;br /&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;TVs &lt;/li&gt;&lt;br /&gt;&lt;li&gt;Personal computers &lt;/li&gt;&lt;br /&gt;&lt;li&gt;Cars &lt;/li&gt;&lt;br /&gt;&lt;li&gt;Copiers &lt;/li&gt;&lt;br /&gt;&lt;li&gt;Robots&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;The output of this sensor is analog therefore it need Analog to Digital Converter (ADC) to interface the 8051. I use ads7841 as ADC (&lt;a href="http://mcu-programming.blogspot.com/2006/09/adc-interfacing.html"&gt;see this article&lt;/a&gt;).&lt;br /&gt;&lt;/p&gt;&lt;p&gt;The graph of Analog voltage output versus distance to reflective object are shown in Fig.1. When I plot Analog voltage output versus inverse number distance, I found the linear relation shown in Fig.2.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/6318/140895695436202/1600/characteristics_curve.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/6318/140895695436202/400/characteristics_curve.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="text-align: center;"&gt;Fig. 1 Analog voltage output (V) versus distance to reflective object (cm).&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/6318/140895695436202/1600/inverse_fitting.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/6318/140895695436202/400/inverse_fitting.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="text-align: center;"&gt;Fig. 2 Analog voltage output (V) versus inverse number distance (1/cm).&lt;/p&gt;&lt;p&gt;The linear equation is y = 20.99x + 0.19, where y is voltage output and x invert distance. Notice that the voltage output I can trust are about 0.4 to 2.8 V.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;This is an example code how to interface the distance sensor to 8051. I use SDCC as C Compiler.&lt;br /&gt;&lt;/p&gt;&lt;pre&gt;&lt;br /&gt;&lt;p&gt;  #include &amp;lt;8051.h&amp;gt;&lt;br /&gt;&lt;br /&gt; #include "ads7841.h"&lt;/p&gt;&lt;br /&gt;&lt;p&gt;  void main()&lt;br /&gt;&lt;br /&gt; {&lt;br /&gt;&lt;br /&gt;     float x,y; // Distance and Analog voltage output&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;     y = analog(0); // Read volt out if the sensor connect to channel 0 of ADS7841&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;     y = 0.00122*y; // Convert BCD to DEC by multiply voltage by 5/4096&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;     if ( (y &amp;gt; 0.4) &amp;amp;&amp; (y &amp;lt; 2.8) ) {&lt;br /&gt;&lt;br /&gt;        x = (y-0.19)/20.99; // Solve the linear equation&lt;br /&gt;&lt;br /&gt;        x = 1/x; // Inverse back get distance in cm.&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Source:&lt;/span&gt;&lt;br /&gt;&lt;a href="http://www.freewebs.com/80x51/source/IRSensor/test_irsensor.c"&gt;test_irsensor.c&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.freewebs.com/80x51/source/IRSensor/characteristc.txt"&gt;characteristic.txt&lt;/a&gt; (For plot with Spreadsheet)&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Related Links&lt;/span&gt;&lt;br /&gt;&lt;a href="http://www.sparkfun.com/datasheets/Components/GP2Y0A21YK.pdf"&gt;GP2Y0A21YK/GP2Y0D21YK Datasheet&lt;/a&gt;&lt;br /&gt;&lt;a href="http://mcu-programming.blogspot.com/2006/09/adc-interfacing.html"&gt;Analog to Digital (ADS7841) Interfacing&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1154217537013373102-1369491228415262432?l=mcu-programming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mcu-programming.blogspot.com/feeds/1369491228415262432/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1154217537013373102&amp;postID=1369491228415262432' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/1369491228415262432'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/1369491228415262432'/><link rel='alternate' type='text/html' href='http://mcu-programming.blogspot.com/2006/09/distance-measurement-sensor.html' title='Distance Measurement Sensor'/><author><name>Doug</name><uri>http://www.blogger.com/profile/00580507341501269020</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://bp2.blogger.com/_Rp2aW7U_0tQ/RXJJwJ3eMzI/AAAAAAAAAAc/5dFj2vz8g7M/s72-c/GP2Y0A21YK.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1154217537013373102.post-8851441478537263043</id><published>2006-09-16T10:41:00.001+07:00</published><updated>2009-05-20T12:17:06.449+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C Programming'/><category scheme='http://www.blogger.com/atom/ns#' term='8051'/><category scheme='http://www.blogger.com/atom/ns#' term='Servo Motor'/><title type='text'>Servo Motor Control</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/6318/140895695436202/1600/servo_motor.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://photos1.blogger.com/blogger2/6318/140895695436202/200/servo_motor.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;strong&gt;Servos&lt;/strong&gt;&lt;br /&gt;&lt;p&gt;Servos are DC motors with built in gearing and feedback control loop circuitry.  And no motor drivers required. They are extremely popular with robot, RC plane, and RC boat builders.  Most servo motors can rotate about 90 to 180 degrees. Some rotate through a full 360 degrees or more.&lt;br /&gt;&lt;br /&gt;However, servos are unable to continually rotate, meaning they can't be used for driving wheels, unless they are modified  (&lt;a href="http://www.societyofrobots.com/actuators_modifyservo.shtml"&gt;how to modify&lt;/a&gt;),  but their precision positioning makes them ideal for robot legs and arms, rack and pinion steering, and sensor scanners  to name a few. Since servos are fully self contained, the velocity and angle control loops are  very easy to impliment, while prices remain very affordable. To use a servo, simply connect the black  wire to ground, the red to a 4.8-6V source, and the yellow/white wire to a signal generator (such as  from your microcontroller).  Vary the square wave pulse width from 1-2 ms and your servo is now position/velocity controlled.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;PWM&lt;/strong&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Pulse width modulation (PWM) is a powerful technique for controlling analog circuits with a processor's digital outputs. PWM is employed in a wide variety of applications, ranging from measurement and communications to power control and conversion. The general concept is to simply send an ordinary logic square wave to your servo at a specific wave length, and your servo goes to a particular angle  (or velocity if your servo is modified). The wavelength directly maps to servo angle.The standard time vs angle is represented in this chart:&lt;br /&gt;&lt;/p&gt;&lt;p align="center"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/6318/140895695436202/1600/servo_pwm.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/6318/140895695436202/400/servo_pwm.gif" alt="" border="0" /&gt;&lt;/a&gt;Figure: Pulse for controlling a Servo motor&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Programmable Counter Array (PCA)&lt;/strong&gt;&lt;br /&gt;&lt;/p&gt;The PCA is a special modules in Philips P89V51RD2 which includes a special 16-bit Timer that has five 16-bit capture/compare modules associated with it. Each of the modules can be programmed to operate in one of four modes: rising and/or falling edge capture, software timer, high-speed output, or pulse width modulator. Each module has a pin associated with it in port 1.&lt;br /&gt;Module 0 is connected to P1.3 (CEX0), module 1 to P1.4 (CEX1), etc. Registers CH and CL contain current value of the free running up counting 16-bit PCA timer. The PCA timer is a common time base for all five modules and can be programmed to run at: 1/6 the oscillator frequency, 1/2 the oscillator frequency, the Timer 0 overflow, or the input on the ECI pin (P1.2). The timer count source is determined from the CPS1 and CPS0 bits in the CMOD SFR.&lt;br /&gt;&lt;br /&gt;In the CMOD SFR there are three additional bits associated with the PCA. They are CIDL which allows the PCA to stop during idle mode, WDTE which enables or disables the Watchdog function on module 4, and ECF which when set causes an interrupt and the PCA overflow flag CF (in the CCON SFR) to be set when the PCA timer overflows. The Watchdog timer function is implemented in module 4 of PCA. Here, we are interested only PWM mode.&lt;p&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;8051 Pulse width modulator mode&lt;/strong&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;All of the PCA modules can be used as PWM outputs. Output frequency depends on the source for the PCA timer. All of the modules will have the same frequency of output because they all share one and only PCA timer. The duty cycle of each module is independently variable using the module's capture register CCAPnL.When the value of the PCA CL SFR is less than the value in the module's CCAPnL SFR the output will be low, when it is equal to or greater than the output will be high. When CL overflows from FF to 00, CCAPnL is reloaded with the value in CCAPnH. this allows updating the PWM without glitches. The PWM and ECOM bits in the module's CCAPMn register must be set to enable the PWM mode. For more details see P89V51RD2 datasheet.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;This is an example how to control servos with 8051 by using PWM. The schematic is shown below. I use P1.4 (CEX1) to control the left servo and P1.2 (CEX2) to control the right servo. Here, I use GWS servo motor model S03T STD. I need three states of duty cycle:&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt; 20 ms to Stop the servo&lt;/li&gt;&lt;br /&gt;&lt;li&gt; 1 ms to Rotate Clockwise&lt;/li&gt;&lt;br /&gt;&lt;li&gt;2 ms to Rotate Counter-clockwise&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Calculation for duty cycle (for XTAL 18.432 MHz with 6 Clock/Machine cycle)&lt;/strong&gt;&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Initial PWM Period = 20mS (18.432MHz /6-Cycle Mode) &lt;/li&gt;&lt;br /&gt;&lt;li&gt;Initial PCA Count From Timer0 Overflow &lt;/li&gt;&lt;br /&gt;&lt;li&gt;1 Cycle of Timer0 = (1/18.432MHz)x6 = 0.326 uS &lt;/li&gt;&lt;br /&gt;&lt;li&gt;Timer0 AutoReload = 240 Cycle = 78.125 uS &lt;/li&gt;&lt;br /&gt;&lt;li&gt;1 Cycle PCA = [(1/18.432MHz)x6]x240 = 78.125 uS &lt;/li&gt;&lt;br /&gt;&lt;li&gt;Period 20mS of PCA = 20ms/78.125us = 256 (CL Reload) &lt;/li&gt;&lt;br /&gt;&lt;li&gt;CL (20mS) = 256 Cycle Auto Reload &lt;/li&gt;&lt;br /&gt;&lt;li&gt;Load CCAPxH (1.0mS) = 256-13 = 243 (243,244,...,255 = 13 Cycle) &lt;/li&gt;&lt;br /&gt;&lt;li&gt;Load CCAPxH (2.0mS) = 255-26 = 230 (230,231,...,255 = 26 Cycle)&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p align="center"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/6318/140895695436202/1600/servos_schem.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/6318/140895695436202/400/servos_schem.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="text-align: center;"&gt;Schematic: Control RC Servos motors with 8051 PWM&lt;br /&gt; &lt;/div&gt;&lt;p&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Datasheet&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;- P89V51RD2 &lt;a href="http://www.semiconductors.philips.com/pip/P89V51RD2FA.html" target="_blank"&gt; [pdf]&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Source Code (For SDCC) &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt; - &lt;a href="http://p89v51-sdcc.googlecode.com/svn/trunk/p89v51-sdcc/servo/pwm_servos.h" target="_blank"&gt; pwm_servos.h&lt;/a&gt;&lt;br /&gt;&lt;br /&gt; - &lt;a href="http://p89v51-sdcc.googlecode.com/svn/trunk/p89v51-sdcc/servo/test_servos.c" target="_blank"&gt; test_servos.c&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Related Links&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt; - &lt;a href="http://www.seattlerobotics.org/guide/servos.html" target="_blank"&gt; What is a Servo?&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;- &lt;a href="http://www.societyofrobots.com/actuators_modifyservo.shtml" target="_blank"&gt;Tutorial on how to modify a servo for full 360 degree rotation&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;- &lt;a href="http://www.societyofrobots.com/actuators_servos.shtml" target="_blank"&gt;Servo Tutorial for Robotics&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;- &lt;a href="http://en.wikipedia.org/wiki/Pulse-width_modulation" target="_blank"&gt;Pulse-width modulation (Wiki)&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;- &lt;a href="http://www.netrino.com/Publications/Glossary/PWM.html" target="_blank"&gt;Introduction to Pulse Width Modulation (PWM)&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/1154217537013373102-8851441478537263043?l=mcu-programming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mcu-programming.blogspot.com/feeds/8851441478537263043/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1154217537013373102&amp;postID=8851441478537263043' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/8851441478537263043'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/8851441478537263043'/><link rel='alternate' type='text/html' href='http://mcu-programming.blogspot.com/2006/09/servo-motor-control.html' title='Servo Motor Control'/><author><name>Doug</name><uri>http://www.blogger.com/profile/00580507341501269020</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>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1154217537013373102.post-7937261819701655197</id><published>2006-09-16T10:34:00.001+07:00</published><updated>2009-05-20T12:15:55.430+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C Programming'/><category scheme='http://www.blogger.com/atom/ns#' term='EEPROMs'/><category scheme='http://www.blogger.com/atom/ns#' term='8051'/><category scheme='http://www.blogger.com/atom/ns#' term='Interfacing'/><title type='text'>EEPROMs Interfacing</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_Rp2aW7U_0tQ/RXJUC53eM2I/AAAAAAAAABI/6y-MOG4-Cww/s1600-h/24LC512.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp1.blogger.com/_Rp2aW7U_0tQ/RXJUC53eM2I/AAAAAAAAABI/6y-MOG4-Cww/s320/24LC512.jpg" alt="" id="BLOGGER_PHOTO_ID_5004154544832000866" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;24LC512 is a 64K x 8 (512 Kbit) Serial Electrically Erasable PROM (EEPROMs), from Microchip Technology Inc.  &lt;a href="http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&amp;nodeId=1335&amp;amp;dDocName=en010828" target="_blank"&gt;(see the product page)&lt;/a&gt;. It has been developed for advanced, low-power applications such as personal communications and data acquisition. This device also has a page write capability of up to 128 bytes of data.&lt;br /&gt;&lt;p&gt;This device is capable of both random and sequential reads up to the 512K boundary. Functional address lines allow up to eight devices on the same bus, for up to 4 Mbit address space.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;This is an example how to interface 24XXX EEPROMs with 8051. I use SDCC as C Compiler. My schematic is shown below.&lt;/p&gt;&lt;p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/6318/140895695436202/1600/eeprom.0.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/6318/140895695436202/320/eeprom.png" alt="" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;   &lt;p align="center"&gt;Schematic: 8051 interface to 24XXX EEPROMs&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Datasheet&lt;/strong&gt;&lt;br /&gt;- 24LC512 &lt;a href="http://ww1.microchip.com/downloads/en/DeviceDoc/21754G.pdf" target="_blank"&gt;[pdf]&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Source Code (For SDCC) &lt;/strong&gt;&lt;br /&gt;- &lt;a href="http://p89v51-sdcc.googlecode.com/svn/trunk/p89v51-sdcc/EEPROM/24xx512.h" target="_blank"&gt; 24xx512.h&lt;/a&gt;&lt;br /&gt;- &lt;a href="http://p89v51-sdcc.googlecode.com/svn/trunk/p89v51-sdcc/EEPROM/test_eeprom.c" target="_blank"&gt; test_eeprom.c&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; require &lt;a href="http://p89v51-sdcc.googlecode.com/svn/trunk/p89v51-sdcc/LCD/lcd.h" target="_blank"&gt;lcd.h&lt;/a&gt; and &lt;a href="http://p89v51-sdcc.googlecode.com/svn/trunk/p89v51-sdcc/I2C/i2c.h" target="_blank"&gt;i2c.h&lt;/a&gt;  &lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;Related Links&lt;br /&gt;&lt;/strong&gt;-&lt;a href="http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&amp;nodeId=1335&amp;amp;dDocName=en010828" target="_blank"&gt;24LC512 Products Page&lt;/a&gt;&lt;br /&gt;-&lt;a href="http://www.sixca.com/micro/mcs51/i2c_eeprom/index.html"&gt;Interfacing I2C EEPROM (24LC256) with MCS-51&lt;/a&gt; (KEIL C51)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1154217537013373102-7937261819701655197?l=mcu-programming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mcu-programming.blogspot.com/feeds/7937261819701655197/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1154217537013373102&amp;postID=7937261819701655197' title='12 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/7937261819701655197'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/7937261819701655197'/><link rel='alternate' type='text/html' href='http://mcu-programming.blogspot.com/2006/09/eeproms-interfacing.html' title='EEPROMs Interfacing'/><author><name>Doug</name><uri>http://www.blogger.com/profile/00580507341501269020</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://bp1.blogger.com/_Rp2aW7U_0tQ/RXJUC53eM2I/AAAAAAAAABI/6y-MOG4-Cww/s72-c/24LC512.jpg' height='72' width='72'/><thr:total>12</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1154217537013373102.post-954145977816243671</id><published>2006-09-10T10:15:00.001+07:00</published><updated>2009-05-20T12:14:28.496+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C Programming'/><category scheme='http://www.blogger.com/atom/ns#' term='8051'/><category scheme='http://www.blogger.com/atom/ns#' term='Interfacing'/><category scheme='http://www.blogger.com/atom/ns#' term='Real Time Clock'/><title type='text'>Real Time Clock Interfacing</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_Rp2aW7U_0tQ/RXJVzJ3eM3I/AAAAAAAAABU/BO5HWDdW1Mk/s1600-h/ds1307.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp2.blogger.com/_Rp2aW7U_0tQ/RXJVzJ3eM3I/AAAAAAAAABU/BO5HWDdW1Mk/s320/ds1307.jpg" alt="" id="BLOGGER_PHOTO_ID_5004156473272316786" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;DS1307, a 64 x 8, Serial, I2C Real-Time Clock, is a low-power, full binary-coded decimal (BCD) clock/calendar plus 56  bytes of NV SRAM. Address and data are transferred serially through an I2C, bidirectional bus. The clock/calendar provides seconds, minutes, hours, day, date, month, and year information. It a product of Maxim/Dallas Semiconductor, &lt;a href="http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2688" target="_blank"&gt;see the product page&lt;/a&gt;.    &lt;p&gt;This is an example how to interface DS1307 with 8051. I use SDCC as C Compiler. My schematic is shown below. &lt;/p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/6318/140895695436202/1600/ds1307.0.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/6318/140895695436202/320/ds1307.png" alt="" border="0" /&gt;&lt;/a&gt; &lt;p align="center"&gt;Schematic: 8051 interface to DS1307&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Datasheet&lt;/strong&gt;&lt;br /&gt;- DS1307 &lt;a href="http://datasheets.maxim-ic.com/en/ds/DS1307.pdf" target="_blank"&gt;[pdf]&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Source Code (For SDCC) &lt;/strong&gt;&lt;br /&gt;- &lt;a href="http://p89v51-sdcc.googlecode.com/svn/trunk/p89v51-sdcc/DS1307/ds1307.h" target="_blank"&gt; ds1307.h&lt;/a&gt;&lt;br /&gt;- &lt;a href="http://p89v51-sdcc.googlecode.com/svn/trunk/p89v51-sdcc/DS1307/test_ds1307.c" target="_blank"&gt; test_ds1307.c&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Note:&lt;/strong&gt; require &lt;a href="http://p89v51-sdcc.googlecode.com/svn/trunk/p89v51-sdcc/LCD/lcd.h" target="_blank"&gt;lcd.h&lt;/a&gt; and &lt;a href="http://p89v51-sdcc.googlecode.com/svn/trunk/p89v51-sdcc/I2C/i2c.h" target="_blank"&gt;i2c.h&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Related Links&lt;/strong&gt;&lt;br /&gt;- &lt;a href="http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2688" target="_blank"&gt; DS1307 Products Page&lt;/a&gt;&lt;br /&gt;- &lt;a href="http://www.sixca.com/micro/mcs51/rtc_51/index.html" target="_blank"&gt; Interfacing I2C RTC (DS1307) with MCS-51 &lt;/a&gt;(KEIL C51)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1154217537013373102-954145977816243671?l=mcu-programming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mcu-programming.blogspot.com/feeds/954145977816243671/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1154217537013373102&amp;postID=954145977816243671' title='17 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/954145977816243671'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/954145977816243671'/><link rel='alternate' type='text/html' href='http://mcu-programming.blogspot.com/2006/09/real-time-clock-interfacing.html' title='Real Time Clock Interfacing'/><author><name>Doug</name><uri>http://www.blogger.com/profile/00580507341501269020</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://bp2.blogger.com/_Rp2aW7U_0tQ/RXJVzJ3eM3I/AAAAAAAAABU/BO5HWDdW1Mk/s72-c/ds1307.jpg' height='72' width='72'/><thr:total>17</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1154217537013373102.post-4118395169799857024</id><published>2006-09-09T23:18:00.001+07:00</published><updated>2009-05-20T12:12:35.530+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C Programming'/><category scheme='http://www.blogger.com/atom/ns#' term='8051'/><category scheme='http://www.blogger.com/atom/ns#' term='I²C'/><category scheme='http://www.blogger.com/atom/ns#' term='Interfacing'/><title type='text'>I²C Bus Interfacing</title><content type='html'>&lt;strong&gt;&lt;a href="http://www.i2c-bus.org/" target="_blank"&gt;I²C bus&lt;/a&gt;&lt;/strong&gt; (Inter-Integrated Circuit) is a bidirectional, half duplex, two-wire, synchoronous bus,  originally        designed for interconnection over short distances within a piece of equipment. The I2C bus uses two lines called  Serial Clock Line (SCL) and Serial Data Lines (SDA). Both        lines are pulled high via a resistor (Rpu) as shown in Figure below. The bus is defined by Philips, &lt;a href="http://www.standardics.philips.com/support/i2c/usage/" target="_blank"&gt;see more details&lt;/a&gt;.&lt;p&gt; Three speed modes are specified: Standard; 100kbps [Bits per        Second], Fast mode; 400kbps, High speed mode 3.4Mbps. I2C, due to its        two-wire nature (one clock, one data) can only communicate half-duplex.        The maximum bus capacitance is 400pF, which sets the maximum number of        devices on the bus and the maximum line length.   &lt;/p&gt;&lt;p&gt;The interface uses 8 bit        long bytes, MSB (Most Significant Bit) first, with each device having a        unique address. Any device may be a Transmitter or Receiver, and a Master        or Slave. The Slave is any device addressed by the Master. A system may have more than one Master, although only one may me active at any time.&lt;/p&gt;&lt;p&gt;Data and clock are sent from the Master: valid while the clock        line is high. The link may have multiple Masters and Slaves on the bus,        but only one Master may be active at any one time. Slaves may receive or        transmit data to the master.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;This is an example how to interface I²C with 8051. I use SDCC as C Compiler. My schematic is shown below. I set P2.6 as SCL and P2.7 as SDA.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/6318/140895695436202/1600/i2c.0.gif"&gt;&lt;br /&gt;&lt;/a&gt;   &lt;/p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/6318/140895695436202/1600/i2c.1.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/6318/140895695436202/320/i2c.0.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-weight: bold;"&gt;Schematic:&lt;/span&gt; I²C Bus&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;Datasheet &lt;/strong&gt;&lt;br /&gt;I²C-Bus Specification &lt;a href="http://www.semiconductors.philips.com/acrobat_download/literature/9398/39340011.pdf"&gt;[pdf]&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Source Code (For SDCC) &lt;/strong&gt;&lt;br /&gt;- &lt;a href="http://p89v51-sdcc.googlecode.com/svn/trunk/p89v51-sdcc/I2C/i2c.h" target="_blank"&gt; i2c.h&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Note: see &lt;a href="http://mcu-programming.blogspot.com/2006/09/real-time-clock-interfacing.html"&gt;DS1307&lt;/a&gt; and &lt;a href="http://mcu-programming.blogspot.com/2006/09/eeproms-interfacing.html"&gt;24LC512&lt;/a&gt; for applications&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Related Links&lt;/strong&gt;&lt;br /&gt;- &lt;a href="http://www.semiconductors.philips.com/products/interface_control/i2c/"&gt; Philips I²C      Bus &lt;/a&gt;&lt;br /&gt;- &lt;a href="http://www.sixca.com/micro/mcs51/rtc_51/index.html" target="_blank"&gt; &lt;/a&gt;&lt;a href="http://www.esacademy.com/faq/i2c/" target="_blank"&gt;I2C (Inter-Integrated Circuit) Bus Technical Overview and Frequently Asked Questions (FAQ)&lt;/a&gt;&lt;br /&gt;- &lt;a href="http://www.interfacebus.com/Design_Connector_I2C.html" title="http://www.interfacebus.com/Design_Connector_I2C.html" target="_blank" rel="nofollow"&gt;I²C Bus and Access Bus&lt;/a&gt;&lt;br /&gt;- &lt;a href="http://www.i2c-bus.org/" target="_blank"&gt;http://www.i2c-bus.org/&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/1154217537013373102-4118395169799857024?l=mcu-programming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mcu-programming.blogspot.com/feeds/4118395169799857024/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1154217537013373102&amp;postID=4118395169799857024' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/4118395169799857024'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/4118395169799857024'/><link rel='alternate' type='text/html' href='http://mcu-programming.blogspot.com/2006/09/ic-bus-interfacing.html' title='I²C Bus Interfacing'/><author><name>Doug</name><uri>http://www.blogger.com/profile/00580507341501269020</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-1154217537013373102.post-1828014403028761088</id><published>2006-09-08T23:02:00.001+07:00</published><updated>2009-05-20T12:11:38.183+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C Programming'/><category scheme='http://www.blogger.com/atom/ns#' term='8051'/><category scheme='http://www.blogger.com/atom/ns#' term='Interfacing'/><category scheme='http://www.blogger.com/atom/ns#' term='Analog-to-Digital'/><title type='text'>Analog-to-Digital Interfacing</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_Rp2aW7U_0tQ/RXJS-Z3eM1I/AAAAAAAAAA8/sfRxu2A22qk/s1600-h/ads7841.gif"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp3.blogger.com/_Rp2aW7U_0tQ/RXJS-Z3eM1I/AAAAAAAAAA8/sfRxu2A22qk/s320/ads7841.gif" alt="" id="BLOGGER_PHOTO_ID_5004153368010961746" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The ADS7841 is a 4-channel, 12-bit sampling Analog-to-Digital Converter (ADC)   with a synchronous serial interface. The resolution is programmable to either 8   bits or 12 bits. It is a product of Burr-Brown form Texas Instrument, &lt;a href="http://focus.ti.com/docs/prod/folders/print/ads7841.html" target="_blank"&gt;see the product page&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;This ADC give the 12-bit Binary Code Decimal (BCD) output value therefore the maximum value is 999 integer. If we want to convert this value to the real value, we must divide this  value  by  4096  (12-bit) and multiply by the maximum real ouput.  Suppose  the  real  maximum  of  output is 5V, the ratio should be 5/4096 = 0.00122. We can use 0.00122 multiply the output from ADS7841 to get the real ouput value.&lt;br /&gt;&lt;p&gt;This is an example how to interface ADS7841 with 8051. I use SDCC as C Compiler. My schematic is shown below. I still do not convert to the real value so my variables are integer.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/6318/140895695436202/1600/ads_schem.1.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/6318/140895695436202/320/ads_schem.0.png" alt="" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;&lt;a href="http://beta.blogger.com/images/ads_schem.gif"&gt;&lt;/a&gt;&lt;p align="center"&gt; &lt;/p&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-weight: bold;"&gt;Schematic:&lt;/span&gt; 8051 interface to ADS7841&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;Datasheet&lt;/strong&gt;&lt;br /&gt;- ADS7841 &lt;a href="http://www-s.ti.com/sc/ds/ads7841.pdf" target="_blank"&gt;[pdf]&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Source Code (For SDCC) &lt;/strong&gt;&lt;br /&gt;- &lt;a href="http://p89v51-sdcc.googlecode.com/svn/trunk/p89v51-sdcc/ADS/ads7841.h" target="_blank"&gt; ads7841.h&lt;/a&gt;&lt;br /&gt;- &lt;a href="http://p89v51-sdcc.googlecode.com/svn/trunk/p89v51-sdcc/ADS/test_ads7841.c" target="_blank"&gt; test_ads7841.c&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Note:&lt;/strong&gt; require &lt;a href="http://p89v51-sdcc.googlecode.com/svn/trunk/p89v51-sdcc/LCD/lcd.h" target="_blank"&gt;lcd.h&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Related Links&lt;/strong&gt;&lt;br /&gt;- &lt;a href="http://focus.ti.com/docs/prod/folders/print/ads7841.html" target="_blank"&gt; ADS7841 Products Page&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/1154217537013373102-1828014403028761088?l=mcu-programming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mcu-programming.blogspot.com/feeds/1828014403028761088/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1154217537013373102&amp;postID=1828014403028761088' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/1828014403028761088'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/1828014403028761088'/><link rel='alternate' type='text/html' href='http://mcu-programming.blogspot.com/2006/09/adc-interfacing.html' title='Analog-to-Digital Interfacing'/><author><name>Doug</name><uri>http://www.blogger.com/profile/00580507341501269020</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://bp3.blogger.com/_Rp2aW7U_0tQ/RXJS-Z3eM1I/AAAAAAAAAA8/sfRxu2A22qk/s72-c/ads7841.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1154217537013373102.post-7016801417448793228</id><published>2006-09-07T22:51:00.001+07:00</published><updated>2009-05-20T12:09:45.355+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C Programming'/><category scheme='http://www.blogger.com/atom/ns#' term='8051'/><category scheme='http://www.blogger.com/atom/ns#' term='LCD'/><category scheme='http://www.blogger.com/atom/ns#' term='Interfacing'/><title type='text'>LCD interfacing</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_Rp2aW7U_0tQ/RXJXiZ3eM5I/AAAAAAAAABo/HeTJ178WNyQ/s1600-h/lcd.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp3.blogger.com/_Rp2aW7U_0tQ/RXJXiZ3eM5I/AAAAAAAAABo/HeTJ178WNyQ/s320/lcd.jpg" alt="" id="BLOGGER_PHOTO_ID_5004158384532763538" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;This is an example how to interface to the standard  Hitachi-44780 LCD using an 8051 microcontroller and SDCC as C Compiler. I use a standard 16-character by 2-line LCD module, see schematic below. Here, I use 4-bit interfacing.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/6318/140895695436202/1600/lcd_schem.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/6318/140895695436202/320/lcd_schem.gif" alt="" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-weight: bold;"&gt;Schematic:&lt;/span&gt; 4-bit interfacing 16x2 LCD&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;Source Code (For SDCC) &lt;/strong&gt;&lt;br /&gt;- &lt;a href="http://p89v51-sdcc.googlecode.com/svn/trunk/p89v51-sdcc/LCD/lcd.h" target="_blank"&gt; lcd.h&lt;/a&gt;&lt;br /&gt;- &lt;a href="http://p89v51-sdcc.googlecode.com/svn/trunk/p89v51-sdcc/LCD/test_lcd.c" target="_blank"&gt; test_lcd.c&lt;/a&gt;   &lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;Related Links&lt;/strong&gt;&lt;br /&gt;- &lt;a href="http://home.iae.nl/users/pouweha/lcd/lcd.shtml" target="_blank"&gt; How to control a HD44780-based Character-LCD: The Industry Standard Character LCD&lt;/a&gt;&lt;br /&gt;- &lt;a href="http://www.latke.net/lcd/index.html" target="_blank"&gt; Yet Another 8051-to-LCD Interface&lt;/a&gt;&lt;br /&gt;- &lt;a href="http://esd.cs.ucr.edu/labs/interface/interface.html" target="_blank"&gt; Interfacing: Converting 8-bit LCD communication to 4-bit&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/1154217537013373102-7016801417448793228?l=mcu-programming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mcu-programming.blogspot.com/feeds/7016801417448793228/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1154217537013373102&amp;postID=7016801417448793228' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/7016801417448793228'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/7016801417448793228'/><link rel='alternate' type='text/html' href='http://mcu-programming.blogspot.com/2006/09/lcd-interfacing.html' title='LCD interfacing'/><author><name>Doug</name><uri>http://www.blogger.com/profile/00580507341501269020</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://bp3.blogger.com/_Rp2aW7U_0tQ/RXJXiZ3eM5I/AAAAAAAAABo/HeTJ178WNyQ/s72-c/lcd.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1154217537013373102.post-3147258021601249578</id><published>2006-09-06T11:20:00.000+07:00</published><updated>2007-05-11T10:55:56.963+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Software and Tools'/><category scheme='http://www.blogger.com/atom/ns#' term='Compilers'/><title type='text'>Installing MIDE-51 and SDCC and for Win32</title><content type='html'>&lt;p&gt;This page is an installation guide for someone who are interested in developing &lt;a href="http://en.wikipedia.org/wiki/Intel_8051" target="_blank"&gt;8051&lt;/a&gt; microcontrllor with C-language. All of tools I selected are freeware or opensource with no limitation of number of lines of your code.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Contents&lt;/strong&gt;&lt;br /&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://mcu-programming.blogspot.com/2006/09/installing-mide-51-and-sdcc-and-for.html#1"&gt;Installing MIDE-51, Editor for 8051&lt;/a&gt; &lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://mcu-programming.blogspot.com/2006/09/installing-mide-51-and-sdcc-and-for.html#2"&gt;Installing SDCC, C Compiler for 8051&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://mcu-programming.blogspot.com/2006/09/installing-mide-51-and-sdcc-and-for.html#3"&gt;Installing ASEM-51, Assembler for 8051&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://mcu-programming.blogspot.com/2006/09/installing-mide-51-and-sdcc-and-for.html#4"&gt;Installing JSIM-51, Simulator for 8051&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://mcu-programming.blogspot.com/2006/09/installing-mide-51-and-sdcc-and-for.html#5"&gt;Installing FlashMagic, ISP for Philips  MPU&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://mcu-programming.blogspot.com/2006/09/installing-mide-51-and-sdcc-and-for.html#6"&gt;Configuration&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://mcu-programming.blogspot.com/2006/09/installing-mide-51-and-sdcc-and-for.html#7"&gt;Test&lt;/a&gt;  &lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;p&gt;&lt;strong&gt;&lt;a name="1"&gt;&lt;/a&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;1. Installing MIDE-51&lt;/strong&gt;&lt;br /&gt;&lt;a href="http://www.opcube.com/home.html"&gt;MIDE-51&lt;/a&gt; is freeware Integrated Development Environment (IDE) for MCS-51 microcontroller. The full package already comes with:&lt;/p&gt;&lt;p&gt;Assembler : &lt;a href="http://plit.de/asem-51/home.htm" target="_blank"&gt;ASEM-51 by W.W.Heinz&lt;/a&gt; (v1.3)&lt;br /&gt;C compiler : &lt;a href="http://sdcc.sourceforge.net/" target="_blank"&gt;SDCC: Small Device C Compiler&lt;/a&gt; (v2.5.4)&lt;br /&gt;Simulator : TS Controls 8051 Emulator v1.0 evaluation (Owner : http://www.tscontrols.com  was gone)&lt;br /&gt;Simulator : &lt;a href="http://home.arcor.de/jensaltmann/jsim-e.htm" target="_blank"&gt;JSIM-51 Simulator  by Jens Altmann&lt;/a&gt; (v4.05)&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Just downloads &lt;a href="http://www.opcube.com/software/midepack0258.exe"&gt;midepack0258.exe&lt;/a&gt; and executes this file, everything will setup completely.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Feature on MIDE-51:&lt;/strong&gt;&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Syntax highlighter on ASEM-51 reserved word &amp; addition register on selected device (devices listed on ASEM51/MCU folder)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Syntax highlighter on SDCC reserved word &amp;amp; MCS-51 standard register&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Support multi document workspace&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Support standard editor feature and shortcut key such as Cut , Copy, Paste, Find, Replace and Windows tile &amp; cascade&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Editor font style and size selectable&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Save recent file(s) opened in list&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Shortcut to ASEM-51 html manual&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Shortcut to SDCC html &amp;amp; PDF manual (search file on SDCC/DOC)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Report assembler &amp; compiler message&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Support drag and drop file from explorer.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Automatic save last windows position.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Support wheel mouse&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Bookmark code position upto 10&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Show/Hide line number on editor&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;However, if you would like to use the newer version of them, you can also install each package manualy. First, downloads only editor version of MIDE-51 ( &lt;a href="http://www.opcube.com/software/MIDE51_0258.zip"&gt;MIDE51_0258.zip&lt;/a&gt;) and extracts it to any directory (C:\MIDE51). You should have C:\MIDE51\MIDE51.EXE. For others package, please follow these instructions.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;a name="2"&gt;&lt;/a&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;2. Installing SDCC&lt;/strong&gt;&lt;br /&gt;&lt;a href="http://sdcc.sourceforge.net/" target="_blank"&gt;SDCC&lt;/a&gt; is a Freeware, retargettable, optimizing ANSI - C compiler that targets the Intel 8051, Maxim 80DS390, Zilog Z80 and the Motorola 68HC08 based MCUs. Work is in progress on supporting the Microchip PIC16 and PIC18 series. The entire source code for the compiler is distributed under GPL.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;To install the SDCC, download the latest version from &lt;a href="http://sdcc.sourceforge.net/snap.php#Windows" target="_blank"&gt;http://sdcc.sourceforge.net/snap.php#Windows&lt;/a&gt; (currently v2.6.x). SDCC are available for several different operating systems. I am working on a PC running Microsoft Windows XP therefore I download the win32 self-executing SDCC install file&lt;br /&gt;(sdcc-20060818-4339-setup.exe) and run the executable. By default, it will install all files to C:\Program Files\SDCC, you also can change to any directory.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;When finishing installing the program, a prompt will appear asking to add the directory containing the program binaries to your PATH. I  also recommend you to download the SDCC documentation (sdcc-doc-20060818-4339.zip), and extract it to your SDCC documentation directory (C:\Program Files\SDCC\doc).&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;a name="3"&gt;&lt;/a&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;3. Installing ASEM-51&lt;/strong&gt;&lt;br /&gt;&lt;a href="http://plit.de/asem-51/introv13.htm" target="_blank"&gt;ASEM-51&lt;/a&gt; is a two-pass macro assembler for the Intel &lt;a href="http://developer.intel.com/design/mcs51/"&gt;MCS-51&lt;/a&gt; family of microcontrollers.  It is running on the PC under MS-DOS, Windows and Linux.  The &lt;strong&gt;ASEM-51&lt;/strong&gt; assembly language is based on the  standard &lt;strong&gt;Intel&lt;/strong&gt; syntax, and implements conditional assembly,  macros, and include file processing. The assembler can output object code in &lt;strong&gt;Intel-HEX&lt;/strong&gt; or Intel &lt;strong&gt;OMF-51&lt;/strong&gt; format as well as a detailed list file.  The &lt;strong&gt;ASEM-51&lt;/strong&gt; package includes support for more than 180 &lt;a href="http://developer.intel.com/design/mcs51/ov_51.htm" target="_blank"&gt;8051&lt;/a&gt; derivatives, a bootstrap program for MCS-51 target boards, and  documentation in ASCII and HTML format.  And it is free ...&lt;br /&gt;&lt;/p&gt;&lt;p&gt; The simplest way of installing ASEM-51 is  copying all files of the package  to your working directory, and enjoy the benefits of true plug-and-play  compatibility!. Alternatively, I have set it up on Windows XP manually:&lt;br /&gt; &lt;/p&gt;&lt;ul&gt;&lt;li&gt;Downloads the lastest &lt;a href="http://plit.de/asem-51/download.htm"&gt;ASEM-51 for DOS/Windows&lt;/a&gt; (currently v1.3) &lt;/li&gt;&lt;br /&gt;&lt;li&gt;Create a new, empty directory on your harddisk (C:\ASEM51).&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Unpack your ASEM-51 distribution archive into this directory,  or copy all files of the ASEM-51 package into it. &lt;/li&gt;&lt;br /&gt;&lt;li&gt;Make the scratch directory default, run the batch file INSTALL.BAT provided, and follow the instructions.&lt;br /&gt;  &lt;/li&gt;&lt;br /&gt;&lt;li&gt;Reboot your PC.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;You can update MPU file by downloading &lt;a href="http://plit.de/asem-51/mcufiles.zip"&gt;http://plit.de/asem-51/mcufiles.zip.&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;a name="4"&gt;&lt;/a&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;4. Installing JSIM-51&lt;/strong&gt;&lt;br /&gt;&lt;a href="http://home.arcor.de/jensaltmann/jsim-e.htm" target="_blank"&gt;JSIM-51&lt;/a&gt; is a powerful software simulator for  8051 Microcontrollers and it's derivatives. The program simulates the processor kernel and some of the  hardware functions. It was born due to all commercial products are too expensive for  private users. It is free and opensource.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;To install:&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt; Download &lt;a href="http://home.arcor.de/jensaltmann/8051.zip"&gt;8051.zip&lt;/a&gt; ( DLL for simulation of a standard-8051 ,  V1.017 - 09/17/1998) &lt;/li&gt;&lt;br /&gt; &lt;li&gt; Download &lt;a href="http://home.arcor.de/jensaltmann/80320.zip"&gt;80320.zip&lt;/a&gt; ( DLL for simulation of a 80320 -Dallas , V1.019 - 10/03/2000) &lt;/li&gt;&lt;br /&gt; &lt;li&gt; Download &lt;a href="http://home.arcor.de/jensaltmann/jsim_e.zip"&gt;jsim_e.zip&lt;/a&gt; ( english version V4.05 from 01/08/2000)&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Extract all files i.e., jsim.exe, 8051.dll and 80320.dll to your directory (C:\Jsim51).&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;a name="5"&gt;&lt;/a&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;5. Installing FlashMagic ISP Software&lt;/strong&gt;&lt;br /&gt;&lt;a href="http://www.esacademy.com/software/flashmagic/fmfree.htm" target="_blank"&gt;Flash Magic&lt;/a&gt; is a free, powerful, feature-rich Windows  application that allows easy programming of Philips Flash  Microcontrollers. Its function is to download compiled HEX file to your (Philips) microcontroller.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Please download and install the current version of &lt;a href="http://www.esacademy.com/software/flashmagic/FlashMagic.exe"&gt;FlashMagic.exe&lt;/a&gt; here.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;a name="6"&gt;&lt;/a&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;6. Configuration&lt;/strong&gt;&lt;br /&gt;To combine every things:&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Execute MIDE-51.exe &lt;/li&gt;&lt;br /&gt;&lt;li&gt;From menu bar, Edit--&amp;gt;Preference (F12)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Click Tab C-Compiler, Edit your SDCC Path (C:\Program Files\SDCC)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Click Tab Assembler, Edit your ASEM-51 Path (C:\ASEM51).&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Click Tab Simulaotr, Simulator Profile, select JSIM with 8051.dll, edit Execute file (Full path and filename) C:\JSIM51\jsim.exe.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Now, everything is complete&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;a name="7"&gt;&lt;/a&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;7. Test&lt;/strong&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Execute MIDE-51.exe and File--&amp;gt;New (Ctrl+N), edit this code&lt;br /&gt;&lt;/p&gt;&lt;pre&gt;#include &amp;lt;p89v51rd2.h&amp;gt;&lt;br /&gt;unsigned char i;&lt;br /&gt;void main() {&lt;br /&gt;i=10;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;Save to anyname.c and then Build (F9). You will found many files in the directory, one of them is .HEX file which can be downloaded to your MCU by using FlashMagic. Or, you can simulate it by using Jsim51, Build and Sim (Shift+Ctrl+F9).&lt;br /&gt;&lt;p&gt;&lt;strong&gt;Note:       &lt;/strong&gt;I tested on my P89V51RD2 MPU. Enjoy your 8051 microcontroller.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Related Links&lt;/strong&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Product Page: &lt;a href="http://www.semiconductors.philips.com/pip/P89V51RD2FA.html" target="_blank"&gt;http://www.semiconductors.philips.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Data Sheet: &lt;a href="http://www.semiconductors.philips.com/acrobat_download/datasheets/P89V51RB2_RC2_RD2-03.pdf" target="_blank"&gt;P89V51RB2_RC2_RD2-03.pdf&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Boot Loader: &lt;a href="http://www.semiconductors.philips.com/files/products/standard/microcontrollers/utilities/p89v_lv51rd2_bl_upd_v5.zip" target="_blank"&gt;p89v_lv51rd2_bl_upd_v5.zip&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;FlashMagic ISP Software: &lt;a href="http://www.esacademy.com/software/flashmagic/fmfree.htm" target="_blank"&gt;http://www.esacademy.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;SDCC : &lt;a href="http://sdcc.sourceforge.net/" target="_blank"&gt;http://sdcc.sourceforge.net/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;MIDE-51 : &lt;a href="http://www.opcube.com/home.html" target="_blank"&gt;http://www.opcube.com/home.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;ASEM-51 : &lt;a href="http://plit.de/asem-51/home.htm" target="_blank"&gt;http://plit.de/asem-51/home.htm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;JSIM-51 : &lt;a href="http://home.arcor.de/jensaltmann/jsim-e.htm" target="_blank"&gt;http://home.arcor.de/jensaltmann/jsim-e.htm&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/1154217537013373102-3147258021601249578?l=mcu-programming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mcu-programming.blogspot.com/feeds/3147258021601249578/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1154217537013373102&amp;postID=3147258021601249578' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/3147258021601249578'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/3147258021601249578'/><link rel='alternate' type='text/html' href='http://mcu-programming.blogspot.com/2006/09/installing-mide-51-and-sdcc-and-for.html' title='Installing MIDE-51 and SDCC and for Win32'/><author><name>Doug</name><uri>http://www.blogger.com/profile/00580507341501269020</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>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1154217537013373102.post-1851635303688554612</id><published>2006-09-05T11:16:00.000+07:00</published><updated>2006-09-16T11:19:06.923+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C Programming'/><category scheme='http://www.blogger.com/atom/ns#' term='Software and Tools'/><category scheme='http://www.blogger.com/atom/ns#' term='Compilers'/><title type='text'>Introduction to SDCC: Small Device C Compiler</title><content type='html'>&lt;p&gt;&lt;a href="http://sdcc.sourceforge.net/" target="_blank"&gt;SDCC&lt;/a&gt; is a Freeware, retargettable, optimizing ANSI - C compiler that targets the Intel 8051, Maxim 80DS390, Zilog Z80 and the Motorola 68HC08 based MCUs. Work is in progress on supporting the Microchip PIC16 and PIC18 series. AVR and gbz80 ports are no longer maintained. The entire source code for the compiler is distributed under GPL.&lt;br /&gt; &lt;/p&gt;&lt;p&gt;&lt;strong&gt;Some of the features include:&lt;/strong&gt;&lt;br /&gt;   &lt;/p&gt;&lt;ul&gt;&lt;li&gt;  ASXXXX and ASLINK, a Freeware, retargettable assembler and linker. &lt;/li&gt;&lt;br /&gt;   &lt;li&gt;  extensive MCU specific language extensions, allowing effective use of the underlying hardware. &lt;/li&gt;&lt;br /&gt;   &lt;li&gt;  a host of standard optimizations such as global sub expression elimination, loop optimizations (loop invariant, strength reduction of induction variables and loop reversing ), constant folding and propagation, copy propagation, dead code elimination and jump tables for 'switch' statements. &lt;/li&gt;&lt;br /&gt;    &lt;li&gt; MCU specific optimisations, including a global register allocator. &lt;/li&gt;&lt;br /&gt;    &lt;li&gt; adaptable MCU specific backend that should be well suited for other 8 bit MCUs &lt;/li&gt;&lt;br /&gt;    &lt;li&gt; independent rule based peep hole optimizer. &lt;/li&gt;&lt;br /&gt;    &lt;li&gt; a full range of data types: char (8 bits, 1 byte), short (16 bits, 2 bytes), int (16 bits, 2 bytes), long (32 bit, 4 bytes) and float (4 byte IEEE). &lt;/li&gt;&lt;br /&gt;    &lt;li&gt; the ability to add inline assembler code anywhere in a function. &lt;/li&gt;&lt;br /&gt;    &lt;li&gt; the ability to report on the complexity of a function to help decide what should be re-written in assembler. &lt;/li&gt;&lt;br /&gt;    &lt;li&gt; a good selection of automated regression tests.&lt;br /&gt; &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;SDCC also comes with the source level debugger SDCDB, using the current version of Daniel's s51 simulator. (Currently not available on Win32 platforms).&lt;br /&gt; &lt;/p&gt;&lt;p&gt;SDCC was written by Sandeep Dutta and released under a GPL license. Since its initial release there have been numerous bug fixes and improvements. As of December 1999, the code was moved to SourceForge where all the "users turned developers" can access the same source tree. SDCC is constantly being updated with all the users' and developers' input.&lt;br /&gt; &lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;SDCC Homepage&lt;/span&gt;&lt;br /&gt;   - &lt;a href="http://sdcc.sourceforge.net/" target="_blank"&gt; http://sdcc.sourceforge.net/&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/1154217537013373102-1851635303688554612?l=mcu-programming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mcu-programming.blogspot.com/feeds/1851635303688554612/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1154217537013373102&amp;postID=1851635303688554612' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/1851635303688554612'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/1851635303688554612'/><link rel='alternate' type='text/html' href='http://mcu-programming.blogspot.com/2006/09/introduction-to-sdcc-small-device-c.html' title='Introduction to SDCC: Small Device C Compiler'/><author><name>Doug</name><uri>http://www.blogger.com/profile/00580507341501269020</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>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1154217537013373102.post-7079433666924839080</id><published>2006-09-04T11:11:00.000+07:00</published><updated>2006-09-16T11:13:04.818+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='8051'/><category scheme='http://www.blogger.com/atom/ns#' term='Hardware'/><category scheme='http://www.blogger.com/atom/ns#' term='Chip Architecture'/><title type='text'>Philips P89V51RD2 Microcontroller</title><content type='html'>&lt;p&gt;I am using Philips P89V51RD2 as 8051 Microcontroller Unit (MCU). And I have been developing my code with Opensouce C Compiler &lt;a href="http://sdcc.sourceforge.net/" target="_blank"&gt;SDCC&lt;/a&gt;. Please visit my &lt;a href="http://mcu-programming.blogspot.com/2006/09/installing-mide-51-and-sdcc-and-for.html"&gt;Tools page&lt;/a&gt; for software preparation guides.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;The P89V51RD2 is a 80C51 microcontroller with 64 kB Flash and 1024 bytes of data RAM. A key feature of the P89V51RD2 is its X2 mode option. The design engineer can choose to run the application with the conventional 80C51 clock rate (12 clocks per machine cycle) or select the X2 mode (6 clocks per machine cycle) to achieve twice the throughput at the same clock frequency. Another way to benefit from this feature is to keep the same performance by reducing the clock frequency by half, thus dramatically reducing the EMI.&lt;/p&gt;&lt;p&gt;    The Flash program memory supports both parallel programming and in serial In-System Programming (ISP). Parallel programming mode offers gang-programming at high speed, reducing programming costs and time to market. ISP allows a device to be reprogrammed in the end product under software control. The capability to field/update the application firmware makes a wide range of applications possible.&lt;br /&gt;&lt;br /&gt; The P89V51RD2 is also In-Application Programmable (IAP), allowing the Flash program memory to be reconfigured even while the application is running.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Features&lt;/strong&gt;&lt;br /&gt;    &lt;/p&gt;&lt;ul&gt;&lt;li&gt;  80C51 Central Processing Unit&lt;/li&gt;&lt;br /&gt;    &lt;li&gt;  5 V Operating voltage from 0 MHz to 40 MHz&lt;/li&gt;&lt;br /&gt;    &lt;li&gt; 64 kB of on-chip Flash user code memory with ISP (In-System Programming) and IAP (In-Application Programming)&lt;/li&gt;&lt;br /&gt;    &lt;li&gt;   Supports 12-clock (default) or 6-clock mode selection via software or ISP&lt;/li&gt;&lt;br /&gt;    &lt;li&gt; SPI (Serial Peripheral Interface) and enhanced UART&lt;/li&gt;&lt;br /&gt;    &lt;li&gt; PCA (Programmable Counter Array) with PWM and Capture/Compare functions&lt;/li&gt;&lt;br /&gt;    &lt;li&gt; Four 8-bit I/O ports with three high-current Port 1 pins (16 mA each)&lt;/li&gt;&lt;br /&gt;    &lt;li&gt; Three 16-bit timers/counters&lt;/li&gt;&lt;br /&gt;    &lt;li&gt; Programmable watchdog timer&lt;/li&gt;&lt;br /&gt;    &lt;li&gt; Eight interrupt sources with four priority levels&lt;/li&gt;&lt;br /&gt;    &lt;li&gt;   Second DPTR register&lt;/li&gt;&lt;br /&gt;    &lt;li&gt; Low EMI mode (ALE inhibit)&lt;/li&gt;&lt;br /&gt;    &lt;li&gt;   TTL- and CMOS-compatible logic levels&lt;/li&gt;&lt;br /&gt;    &lt;li&gt;   Brown-out detection&lt;/li&gt;&lt;br /&gt;    &lt;li&gt; Low power modes&lt;br /&gt;&lt;br /&gt;    o Power-down mode with external interrupt wake-up&lt;br /&gt;&lt;br /&gt;    o Idle mode  &lt;/li&gt;&lt;br /&gt;&lt;li&gt; DIP40 packages&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;strong&gt;Related Links&lt;br /&gt;&lt;/strong&gt; Product Page: &lt;a href="http://www.semiconductors.philips.com/pip/P89V51RD2FA.html" target="_blank"&gt;http://www.semiconductors.philips.com/&lt;/a&gt;&lt;br /&gt;Data Sheet: &lt;a href="http://www.semiconductors.philips.com/acrobat_download/datasheets/P89V51RB2_RC2_RD2-03.pdf" target="_blank"&gt;P89V51RB2_RC2_RD2-03.pdf&lt;/a&gt;&lt;br /&gt;Boot Loader: &lt;a href="http://www.semiconductors.philips.com/files/products/standard/microcontrollers/utilities/p89v_lv51rd2_bl_upd_v5.zip" target="_blank"&gt;p89v_lv51rd2_bl_upd_v5.zip&lt;/a&gt;&lt;br /&gt;FlashMagic ISP Software: &lt;a href="http://www.esacademy.com/software/flashmagic/fmfree.htm" target="_blank"&gt;http://www.esacademy.com/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1154217537013373102-7079433666924839080?l=mcu-programming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mcu-programming.blogspot.com/feeds/7079433666924839080/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1154217537013373102&amp;postID=7079433666924839080' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/7079433666924839080'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/7079433666924839080'/><link rel='alternate' type='text/html' href='http://mcu-programming.blogspot.com/2006/09/philips-p89v51rd2-microcontroller.html' title='Philips P89V51RD2 Microcontroller'/><author><name>Doug</name><uri>http://www.blogger.com/profile/00580507341501269020</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>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1154217537013373102.post-4042914974821788577</id><published>2006-09-03T11:06:00.000+07:00</published><updated>2006-10-12T15:50:59.491+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='8051'/><category scheme='http://www.blogger.com/atom/ns#' term='Hardware'/><category scheme='http://www.blogger.com/atom/ns#' term='Chip Architecture'/><title type='text'>Introduction to 8051 Microcontroller</title><content type='html'>&lt;p&gt;The &lt;a href="http://en.wikipedia.org/wiki/Intel_8051" target="_blank"&gt;8051&lt;/a&gt; is an 8 bit microcontroller originally developed by Intel in&lt;br /&gt;     1980.  It is the world's most popular microcontroller core, made by&lt;br /&gt;     many independent manufacturers (truly multi-sourced).  There were 126&lt;br /&gt;     million 8051s (and variants) shipped in 1993!!&lt;br /&gt;   &lt;/p&gt;&lt;p&gt; A typical 8051 contains:&lt;br /&gt;     &lt;/p&gt;&lt;ul&gt;&lt;li&gt; CPU with boolean processor          &lt;/li&gt;&lt;br /&gt;     &lt;li&gt; 5 or 6 interrupts:&lt;br /&gt;2 are external&lt;br /&gt;&lt;br /&gt;       2 priority levels &lt;/li&gt;&lt;br /&gt;     &lt;li&gt; 2 or 3 16-bit timer/counters          &lt;/li&gt;&lt;br /&gt;     &lt;li&gt;programmable full-duplex serial port&lt;br /&gt;       (baud rate provided by one of the timers)          &lt;/li&gt;&lt;br /&gt;     &lt;li&gt;32 I/O lines (four 8-bit ports)          &lt;/li&gt;&lt;br /&gt;     &lt;li&gt;RAM          &lt;/li&gt;&lt;br /&gt;     &lt;li&gt;ROM/EPROM in some models&lt;br /&gt;   &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;        One strong point of the 8051 is the way it handles interrupts.&lt;br /&gt;     Vectoring to fixed 8-byte areas is convenient and efficient.  Most&lt;br /&gt;     interrupt routines are very short (or at least they should be), and&lt;br /&gt;     generally can fit into the 8-byte area.  Of course if your interrupt&lt;br /&gt;     routine is longer, you can still jump to the appropriate routine from&lt;br /&gt;     within the 8 byte interrupt region.&lt;br /&gt;   &lt;/p&gt;&lt;p&gt;The 8051 instruction set is optimized for the one-bit operations so&lt;br /&gt;     often desired in real-world, real-time control applications.  The&lt;br /&gt;     boolean processor provides direct support for bit manipulation.  This&lt;br /&gt;     leads to more efficient programs that need to deal with binary input&lt;br /&gt;     and output conditions inherent in digital-control problems.  Bit&lt;br /&gt;     addressing can be used for test pin monitoring or program control&lt;br /&gt;     flags.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;See full information from 8051 FAQ&lt;br /&gt;  - &lt;a href="http://www.faqs.org/faqs/microcontroller-faq/8051/" target="_blank"&gt; http://www.faqs.org/faqs/microcontroller-faq/8051/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1154217537013373102-4042914974821788577?l=mcu-programming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mcu-programming.blogspot.com/feeds/4042914974821788577/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1154217537013373102&amp;postID=4042914974821788577' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/4042914974821788577'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1154217537013373102/posts/default/4042914974821788577'/><link rel='alternate' type='text/html' href='http://mcu-programming.blogspot.com/2006/09/introduction-to-8051-micrcontroller.html' title='Introduction to 8051 Microcontroller'/><author><name>Doug</name><uri>http://www.blogger.com/profile/00580507341501269020</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>1</thr:total></entry></feed>
