<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;AkcFQnY8eCp7ImA9WhRUFks.&quot;"><id>tag:blogger.com,1999:blog-3967613250975275925</id><updated>2012-01-27T20:40:13.870+08:00</updated><category term="instrumentation" /><category term="modding" /><category term="LEDs" /><category term="ARM Cortex-M3 / STM32" /><category term="experimental circuits" /><category term="Audio" /><category term="Atmel mcu" /><category term="wireless" /><category term="Serial" /><category term="Microchip PIC mcu" /><category term="PC programming" /><category term="ZiLOG Z8F mcu" /><category term="memory cards" /><category term="LCDs" /><category term="Android" /><category term="mobot" /><category term="DS89/8051 mcu" /><category term="ARM9 / WM8505" /><category term="USB" /><title>ProjectProto</title><subtitle type="html">Prototype Projects - experiments on theoretical electronics/electrical designs and actual prototype circuits.</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://projectproto.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://projectproto.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>'yus</name><uri>http://www.blogger.com/profile/09469609276942488473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="29" src="http://2.bp.blogspot.com/_meF1KpGU79k/Sq5sE50miPI/AAAAAAAAAAY/V2noVm7vCM8/S220/minibot.JPG" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>49</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/Projectproto" /><feedburner:info uri="projectproto" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;C0IDQnY_eSp7ImA9WhRVFUg.&quot;"><id>tag:blogger.com,1999:blog-3967613250975275925.post-2812998412555806284</id><published>2012-01-14T10:20:00.005+08:00</published><updated>2012-01-14T22:32:53.841+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-14T22:32:53.841+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ARM Cortex-M3 / STM32" /><category scheme="http://www.blogger.com/atom/ns#" term="ARM9 / WM8505" /><title>crossBuild ARM target binaries on ARM host</title><content type="html">&lt;span style="font-size: x-small;"&gt;&lt;i&gt;... building STM32F10x (ARM Cortex-M3) sources on WM8505 (ARM9) host.&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-RXxMiTaRVNE/TxDY75Rpw-I/AAAAAAAAAY8/OejA3R4cimk/s1600/arm-none-eabi.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://2.bp.blogspot.com/-RXxMiTaRVNE/TxDY75Rpw-I/AAAAAAAAAY8/OejA3R4cimk/s320/arm-none-eabi.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
The Debian installation on my &lt;a href="http://projectproto.blogspot.com/2012/01/debian-wheezy-on-wm8505.html" target="_blank"&gt;WM8505-based tablet&lt;/a&gt; already includes "&lt;i&gt;build-essential&lt;/i&gt;" package (&lt;i&gt;gcc, binutils, make, etc.&lt;/i&gt;) but, unfortunately, no "&lt;i&gt;multilib&lt;/i&gt;" package available yet for debian armel =( . So I have to built my own bare-metal toolchain using &lt;a href="http://crosstool-ng.org/" target="_blank"&gt;croostool-ng&lt;/a&gt;. Using this &lt;a href="http://yus-repo.googlecode.com/svn/trunk/crosstool/crosstool.config" target="_blank"&gt;config file&lt;/a&gt;, I was able to built this toolchain &lt;a href="http://code.google.com/p/yus-repo/downloads/detail?name=arm-none-eabi-4.6-armv5.tar.gz" target="_blank"&gt;arm-none-eabi-4.6-armv5.tar.gz&lt;/a&gt; &lt;i&gt;&lt;span style="font-size: x-small;"&gt;(just extract this archive to install&lt;/span&gt;&lt;/i&gt;). It took almost &lt;a href="http://2.bp.blogspot.com/-L8aH_cQxCuk/TxDccZOWQmI/AAAAAAAAAZE/0cbnGzJl9xk/s1600/xtool.jpg" target="_blank"&gt;20 hrs&lt;/a&gt; to finish on WM8505 ( &lt;i&gt;&lt;span style="font-size: x-small;"&gt;at 300MHz with 128MB RAM&lt;/span&gt;&lt;/i&gt; ).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For testing the toolchain, I have chosen this &lt;a href="http://code.google.com/p/yus-repo/source/browse/trunk/FreeRTOS/STM32/examples/stm32f103rb_freertos_demo_01/" target="_blank"&gt;STM32F103RB FreeRTOS demo&lt;/a&gt; (&lt;i&gt;4 tasks example&lt;/i&gt;) sources since it requires "&lt;a href="http://en.wikipedia.org/wiki/Newlib" target="_blank"&gt;newlib&lt;/a&gt;" functions to build completely.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;span style="font-size: x-small;"&gt;# export CROSS_COMPILE=/path/to/arm-none-eabi/bin/arm-none-eabi-&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: x-small;"&gt;# make -s clean all&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: x-small;"&gt;# make program&lt;/span&gt;&lt;/blockquote&gt;
&lt;br /&gt;
Also, &lt;a href="https://github.com/jsnyder/stm32loader" target="_blank"&gt;STM32Loader&lt;/a&gt; also works properly on my host machine since it already has &lt;a href="http://packages.debian.org/wheezy/python-serial" target="_blank"&gt;python-serial&lt;/a&gt; installed. Using "&lt;a href="http://projectproto.blogspot.com/2011/03/hello-world-wm8505.html" target="_blank"&gt;&lt;i&gt;/dev/ttyWMT0&lt;/i&gt;&lt;/a&gt;" serial port* to transfer the binary using STM32's uart bootloader:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-gzvU7CHiklQ/TxDhux1B3FI/AAAAAAAAAZU/xDPsVPlOflk/s1600/stm32loader.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://1.bp.blogspot.com/-gzvU7CHiklQ/TxDhux1B3FI/AAAAAAAAAZU/xDPsVPlOflk/s320/stm32loader.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&amp;nbsp;&amp;nbsp; &lt;i&gt;&lt;span style="font-size: x-small;"&gt;* USB-to-Serial adapters (e.g. FT232 and PL2303 based) will also work.&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
For serial-port monitor, I'm using "&lt;a href="http://en.wikipedia.org/wiki/Minicom" target="_blank"&gt;minicom&lt;/a&gt;" already installed on my Debian. Below is the expected result of the STM32 FreeRTOS demo:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-55_EpXgzrrw/TxDeVdhO5aI/AAAAAAAAAZM/u2WFVEGi6A8/s1600/minicom.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://3.bp.blogspot.com/-55_EpXgzrrw/TxDeVdhO5aI/AAAAAAAAAZM/u2WFVEGi6A8/s320/minicom.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3967613250975275925-2812998412555806284?l=projectproto.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/9QaDC0aY-znrTnuUzv_QV9rj_t4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9QaDC0aY-znrTnuUzv_QV9rj_t4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/9QaDC0aY-znrTnuUzv_QV9rj_t4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9QaDC0aY-znrTnuUzv_QV9rj_t4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Projectproto/~4/2wMVj7fYgDE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://projectproto.blogspot.com/feeds/2812998412555806284/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://projectproto.blogspot.com/2012/01/cross-build-arm-target-binaries-on-arm.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/2812998412555806284?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/2812998412555806284?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Projectproto/~3/2wMVj7fYgDE/cross-build-arm-target-binaries-on-arm.html" title="&lt;strike&gt;cross&lt;/strike&gt;Build ARM target binaries on ARM host" /><author><name>'yus</name><uri>http://www.blogger.com/profile/09469609276942488473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="29" src="http://2.bp.blogspot.com/_meF1KpGU79k/Sq5sE50miPI/AAAAAAAAAAY/V2noVm7vCM8/S220/minibot.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-RXxMiTaRVNE/TxDY75Rpw-I/AAAAAAAAAY8/OejA3R4cimk/s72-c/arm-none-eabi.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://projectproto.blogspot.com/2012/01/cross-build-arm-target-binaries-on-arm.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ck4ASX08eSp7ImA9WhRVFEs.&quot;"><id>tag:blogger.com,1999:blog-3967613250975275925.post-692445247445501589</id><published>2012-01-13T11:05:00.004+08:00</published><updated>2012-01-13T21:22:28.371+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-13T21:22:28.371+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ARM9 / WM8505" /><title>Debian Wheezy on WM8505</title><content type="html">&lt;span id="goog_1356293486"&gt;&lt;/span&gt;&lt;span id="goog_1356293487"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-NzYX4NcgH3Q/Tw7yNE3HS8I/AAAAAAAAAYs/X1jAW1WBEdw/s1600/wm8505debian.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://1.bp.blogspot.com/-NzYX4NcgH3Q/Tw7yNE3HS8I/AAAAAAAAAYs/X1jAW1WBEdw/s320/wm8505debian.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Installing &lt;a href="http://wiki.debian.org/DebianWheezy"&gt;Debian-Wheezy&lt;/a&gt; on microSD card is just simply extracting the two gzip archives into two separate partitions (see below).&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;span style="font-size: x-small;"&gt;$ sudo tar xzpvf &lt;a href="http://code.google.com/p/yus-repo/downloads/detail?name=wm8505-debian-wheezy-lxde.tar.gz"&gt;wm8505-debian-wheezy-lxde.tar.gz&lt;/a&gt; -C /media/extpart/ ; sync&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: x-small;"&gt;$ sudo tar xzpvf &lt;a href="http://code.google.com/p/yus-repo/downloads/detail?name=wm8505-kernel-3.0-fatpart.tar.gz"&gt;wm8505-kernel-3.0-fatpart.tar.gz&lt;/a&gt; -C /media/fatpart/ ; sync&lt;/span&gt;&lt;/blockquote&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-gYELEcNMmFg/Tw7yzk2ZRFI/AAAAAAAAAY0/eLuQHgx-Rv8/s1600/gparted.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="144" src="http://3.bp.blogspot.com/-gYELEcNMmFg/Tw7yzk2ZRFI/AAAAAAAAAY0/eLuQHgx-Rv8/s320/gparted.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
At least 1GB card is needed for the installation, 2GB recommended. The first partition should be a FAT32 (or FAT16)
where the "script" folder, containing the "scriptcmd" and "uImage" (linux kernel image) files, is located.The second partition should be an ext2 (or ext4) partition where the root file system will be extracted. Visit these sites for more references: &lt;a href="http://projectgus.com/2010/07/debian-on-the-eken-m001/"&gt;projectgus.com&lt;/a&gt;, 
&lt;a href="http://devio.us/%7Enextvolume/via_arm/viewtopic.php?id=4&amp;amp;t_id=86&amp;amp;page=1"&gt;devio.us&lt;/a&gt; , 
&lt;a href="http://www.cheap-hack.com/home/en/computer-science/wm8505/debian-installation.html"&gt;cheap-hack.com.&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;gparted&gt;username: &lt;b&gt;root&lt;/b&gt;&lt;/gparted&gt;&lt;br /&gt;
&lt;gparted&gt;password: &lt;b&gt;root&lt;/b&gt;&lt;/gparted&gt;&lt;br /&gt;
&lt;gparted&gt;&lt;/gparted&gt;&lt;/blockquote&gt;
&lt;br /&gt;
&lt;gparted&gt;&lt;actual pix=""&gt;&lt;span style="font-size: x-small;"&gt;&lt;i&gt;* initial installation using &lt;a href="http://wiki.debian.org/EmDebian/CrossDebootstrap"&gt;debootstrap&lt;/a&gt;&lt;br /&gt;* with minimal &lt;a href="http://lxde.org/lxde"&gt;LXDE&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/Dillo"&gt;dillo&lt;/a&gt;, build-essential, python, &lt;a href="http://en.wikipedia.org/wiki/Minicom"&gt;minicom&lt;/a&gt;, etc.&lt;/i&gt;&lt;/span&gt;&lt;/actual&gt;&lt;/gparted&gt;&lt;br /&gt;
&lt;gparted&gt;&lt;actual pix=""&gt;&lt;span style="font-size: x-small;"&gt;&lt;i&gt;* wi-fi / ethernet working ; touchscreen NOT working &lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pix&gt;&lt;pix&gt;&lt;br /&gt;&lt;/pix&gt;&lt;/pix&gt;&lt;/actual&gt;&lt;/gparted&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3967613250975275925-692445247445501589?l=projectproto.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/MKReD1bWKppATA0QNhPXkB2L_zg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/MKReD1bWKppATA0QNhPXkB2L_zg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/MKReD1bWKppATA0QNhPXkB2L_zg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/MKReD1bWKppATA0QNhPXkB2L_zg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Projectproto/~4/n0Gb2LqDkgk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://projectproto.blogspot.com/feeds/692445247445501589/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://projectproto.blogspot.com/2012/01/debian-wheezy-on-wm8505.html#comment-form" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/692445247445501589?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/692445247445501589?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Projectproto/~3/n0Gb2LqDkgk/debian-wheezy-on-wm8505.html" title="Debian Wheezy on WM8505" /><author><name>'yus</name><uri>http://www.blogger.com/profile/09469609276942488473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="29" src="http://2.bp.blogspot.com/_meF1KpGU79k/Sq5sE50miPI/AAAAAAAAAAY/V2noVm7vCM8/S220/minibot.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-NzYX4NcgH3Q/Tw7yNE3HS8I/AAAAAAAAAYs/X1jAW1WBEdw/s72-c/wm8505debian.jpg" height="72" width="72" /><thr:total>4</thr:total><feedburner:origLink>http://projectproto.blogspot.com/2012/01/debian-wheezy-on-wm8505.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0UMRX8ycCp7ImA9WhdSE0Q.&quot;"><id>tag:blogger.com,1999:blog-3967613250975275925.post-3106427658787924187</id><published>2011-07-23T10:39:00.003+08:00</published><updated>2011-07-23T11:21:24.198+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-23T11:21:24.198+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ARM Cortex-M3 / STM32" /><category scheme="http://www.blogger.com/atom/ns#" term="mobot" /><title>Quadruped</title><content type="html">&lt;br /&gt;
My first prototype of a four-legged robot.&lt;br /&gt;
12 servo motors controlled by STM32F103RB (MiniSTM32 board).
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;object class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="http://i.ytimg.com/vi/ORAz-04GT_w/0.jpg" height="266" width="320"&gt;&lt;param name="movie" value="http://www.youtube.com/v/ORAz-04GT_w?f=user_uploads&amp;c=google-webdrive-0&amp;app=youtube_gdata" /&gt;

&lt;param name="bgcolor" value="#FFFFFF" /&gt;

&lt;embed width="320" height="266"  src="http://www.youtube.com/v/ORAz-04GT_w?f=user_uploads&amp;c=google-webdrive-0&amp;app=youtube_gdata" type="application/x-shockwave-flash"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
It was previously a "tripod" =) . But then, later, another leg was added (3 servos per leg) for easy balancing even without using IMU sensors.
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-hbL24YwTVn4/TiowhjRgJmI/AAAAAAAAAYg/seNAFcebXBE/s1600/3.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://1.bp.blogspot.com/-hbL24YwTVn4/TiowhjRgJmI/AAAAAAAAAYg/seNAFcebXBE/s320/3.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-aV_J-g84uMg/TioyP1NpL1I/AAAAAAAAAYk/DkbqkIyVZdE/s1600/4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://1.bp.blogspot.com/-aV_J-g84uMg/TioyP1NpL1I/AAAAAAAAAYk/DkbqkIyVZdE/s320/4.jpg" width="240" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-0jYP6mnLlYM/TioyUCScBQI/AAAAAAAAAYo/Ow8YjawXxB4/s1600/philrobotics_moa_071711.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://2.bp.blogspot.com/-0jYP6mnLlYM/TioyUCScBQI/AAAAAAAAAYo/Ow8YjawXxB4/s320/philrobotics_moa_071711.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * &lt;a href="http://www.philrobotics.com/"&gt;PhilRobotics&lt;/a&gt; @ &lt;a href="http://www.facebook.com/media/set/?set=a.230051717035359.64116.131316556908876"&gt;MOA July 17, 2011&lt;/a&gt; &lt;i&gt;(pics by vic)&lt;/i&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3967613250975275925-3106427658787924187?l=projectproto.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/zMSiaWbzZugCvYdhv2yeczN6XkQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/zMSiaWbzZugCvYdhv2yeczN6XkQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/zMSiaWbzZugCvYdhv2yeczN6XkQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/zMSiaWbzZugCvYdhv2yeczN6XkQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Projectproto/~4/uoPpJvry3ug" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://projectproto.blogspot.com/feeds/3106427658787924187/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://projectproto.blogspot.com/2011/07/quadruped.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/3106427658787924187?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/3106427658787924187?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Projectproto/~3/uoPpJvry3ug/quadruped.html" title="Quadruped" /><author><name>'yus</name><uri>http://www.blogger.com/profile/09469609276942488473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="29" src="http://2.bp.blogspot.com/_meF1KpGU79k/Sq5sE50miPI/AAAAAAAAAAY/V2noVm7vCM8/S220/minibot.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-hbL24YwTVn4/TiowhjRgJmI/AAAAAAAAAYg/seNAFcebXBE/s72-c/3.JPG" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://projectproto.blogspot.com/2011/07/quadruped.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEANSHc8eyp7ImA9WhZSGE4.&quot;"><id>tag:blogger.com,1999:blog-3967613250975275925.post-5975808358714618740</id><published>2011-04-03T21:06:00.002+08:00</published><updated>2011-04-03T21:19:59.973+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-03T21:19:59.973+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="LCDs" /><category scheme="http://www.blogger.com/atom/ns#" term="ARM9 / WM8505" /><title>WM8505 LCD driver</title><content type="html">Another low-level hack on my Android Apad &lt;i&gt;(&lt;strike&gt; clone/fake Apad? &lt;/strike&gt;)&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
This time it's now with the 800x480 GLCD driver. It's working, but I'm not sure if the initialization is complete (&lt;i&gt;i.e.&lt;/i&gt; the hardware is, most probably, already initialized by the bootloader). I've just modified the &lt;a href="http://ftp.gpl-devices.org/pub/vendors/Wondermedia/WM8505/wm8505-uboot-src-20110325.tgz%20"&gt;sources&lt;/a&gt; from Wondermedia (&lt;i&gt;look at "\common\wmt_logo\" folder&lt;/i&gt;). LCD routines here are not using the graphics engine (GE) of WM8505.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-beKsfpMod2w/TZhmN11Nt0I/AAAAAAAAAYY/tM5Y7KzKGgs/s1600/eclipse_wm8505_lcd.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="223" src="http://1.bp.blogspot.com/-beKsfpMod2w/TZhmN11Nt0I/AAAAAAAAAYY/tM5Y7KzKGgs/s320/eclipse_wm8505_lcd.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
download Eclipse project here:&amp;nbsp; &lt;a href="http://www.4shared.com/file/64PluB-S/ARM9_WM8505_LCD.html"&gt;ARM9_WM8505_LCD.zip&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: x-small;"&gt;Read my &lt;a href="http://projectproto.blogspot.com/2011/03/hello-world-wm8505.html"&gt;previous post&lt;/a&gt; on how to set-up the tool-chain and how to load the program on WM8505.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
expected output:
&lt;/ul&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-Zvv-b4eQv8Q/TZhmQXHBMbI/AAAAAAAAAYc/XKxeJ-W-pOE/s1600/wm8505_lcd_test.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://2.bp.blogspot.com/-Zvv-b4eQv8Q/TZhmQXHBMbI/AAAAAAAAAYc/XKxeJ-W-pOE/s320/wm8505_lcd_test.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
forum link: &lt;a href="http://www.electronicslab.ph/forum/index.php?topic=24793.msg437614#msg437614"&gt;Re: Let's learn ARM using cheap 7" tablets&lt;/a&gt;&lt;br /&gt;
&lt;div id="subject_437614" style="font-weight: bold;"&gt;
&lt;/div&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3967613250975275925-5975808358714618740?l=projectproto.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/RH1nkJYKFoULFZmc7lHxIDB8cdc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RH1nkJYKFoULFZmc7lHxIDB8cdc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/RH1nkJYKFoULFZmc7lHxIDB8cdc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RH1nkJYKFoULFZmc7lHxIDB8cdc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Projectproto/~4/H5RWjHQEjCs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://projectproto.blogspot.com/feeds/5975808358714618740/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://projectproto.blogspot.com/2011/04/wm8505-lcd-driver.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/5975808358714618740?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/5975808358714618740?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Projectproto/~3/H5RWjHQEjCs/wm8505-lcd-driver.html" title="WM8505 LCD driver" /><author><name>'yus</name><uri>http://www.blogger.com/profile/09469609276942488473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="29" src="http://2.bp.blogspot.com/_meF1KpGU79k/Sq5sE50miPI/AAAAAAAAAAY/V2noVm7vCM8/S220/minibot.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-beKsfpMod2w/TZhmN11Nt0I/AAAAAAAAAYY/tM5Y7KzKGgs/s72-c/eclipse_wm8505_lcd.png" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://projectproto.blogspot.com/2011/04/wm8505-lcd-driver.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUUNRH86eSp7ImA9WhZSGE4.&quot;"><id>tag:blogger.com,1999:blog-3967613250975275925.post-8288258353383734085</id><published>2011-03-29T23:07:00.007+08:00</published><updated>2011-04-03T21:28:15.111+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-03T21:28:15.111+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ARM9 / WM8505" /><category scheme="http://www.blogger.com/atom/ns#" term="Serial" /><title>Hello World, WM8505!</title><content type="html">&amp;nbsp;My first step in learning the ARM9 platform.&lt;br /&gt;
&lt;br /&gt;
VIA / WonderMedia's WM8505 (ARM926EJ-S):&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-mq9tygvwB7E/TZHW1C2KS5I/AAAAAAAAAXs/9vXa3YZADvA/s1600/WM8505_ARM926.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://1.bp.blogspot.com/-mq9tygvwB7E/TZHW1C2KS5I/AAAAAAAAAXs/9vXa3YZADvA/s320/WM8505_ARM926.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
UART0 Connection:&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-u08scbUMmH0/TZHb2RQC5gI/AAAAAAAAAXw/0v-5V51-DCM/s1600/UART_0.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://2.bp.blogspot.com/-u08scbUMmH0/TZHb2RQC5gI/AAAAAAAAAXw/0v-5V51-DCM/s320/UART_0.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Serial console connection details:&amp;nbsp; &lt;a href="http://projectgus.com/2010/06/eken-m001-teardown-serial-consol/"&gt;Project Gus&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Required Tools:&amp;nbsp; &lt;i&gt;all are free =)&amp;nbsp;
&lt;/i&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;GNU Toolchain for ARM Processors&lt;/li&gt;
&lt;a href="http://www.codesourcery.com/sgpp/lite/arm/download.html"&gt;Sourcery G++ Lite Edition&lt;/a&gt;&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;Eclipse IDE for C/C++ Developers&lt;/li&gt;
&lt;a href="http://www.eclipse.org/downloads/packages/eclipse-ide-cc-developers/heliossr2"&gt;Helios SR2&lt;/a&gt;&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;Eclipse CDT (C/C++ Development Tooling)&lt;/li&gt;
&lt;a href="http://download.eclipse.org/tools/cdt/releases/helios/"&gt;CDT 7 for Eclipse Helios&lt;/a&gt;&amp;nbsp;&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;GNU ARM Eclipse Plug-in&lt;/li&gt;
&lt;a href="http://sourceforge.net/apps/mediawiki/gnuarmeclipse/index.php?title=Plug-in_Installation"&gt;Plug-in_Installation&lt;/a&gt;&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
The goal is to run this simple code: (main.c)&lt;br /&gt;
&lt;textarea cols="52" readonly="true" rows="9" style="background-color: #9fcf70; color: #00007f; font-family: courier; font-size: 8pt;" wrap="off"&gt;int main()
{
   uart_init();
   while(1)
   {
      uart_puts("hello world, WM8505/ARM926!\r\n");
   }
   return 0;
}&lt;/textarea&gt;
&lt;br /&gt;
&amp;nbsp;It should output these strings on UART_0 port, just like this:&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-Be3PeC3NtOE/TZHfQqc_woI/AAAAAAAAAX0/d2Y0xBxjqzA/s1600/uart0.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="213" src="http://1.bp.blogspot.com/-Be3PeC3NtOE/TZHfQqc_woI/AAAAAAAAAX0/d2Y0xBxjqzA/s320/uart0.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;After setting up the tools, here are the next steps:&lt;br /&gt;
-Create new project on Eclipse&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-qnzBvpUDGck/TZHfkpAzY8I/AAAAAAAAAX4/3pMyvQN_7Qs/s1600/new_project.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://1.bp.blogspot.com/-qnzBvpUDGck/TZHfkpAzY8I/AAAAAAAAAX4/3pMyvQN_7Qs/s320/new_project.png" width="265" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&amp;nbsp;-Select target processor (WM8505 is a ARM926EJ-S processor)&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-GYLXFAtpr2g/TZHghoJOx8I/AAAAAAAAAX8/FSJLgyNJL2A/s1600/target.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="210" src="http://2.bp.blogspot.com/-GYLXFAtpr2g/TZHghoJOx8I/AAAAAAAAAX8/FSJLgyNJL2A/s320/target.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
-Select binary format for the flash image:&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-bIWPNrDBRQA/TZHhhbSv59I/AAAAAAAAAYA/thXj-WsBW2c/s1600/output.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="192" src="http://3.bp.blogspot.com/-bIWPNrDBRQA/TZHhhbSv59I/AAAAAAAAAYA/thXj-WsBW2c/s320/output.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
-linker setting:&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-ja6DFwEwXEk/TZHjDPalkiI/AAAAAAAAAYE/Kjn2O8LkbBg/s1600/linker.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="192" src="http://3.bp.blogspot.com/-ja6DFwEwXEk/TZHjDPalkiI/AAAAAAAAAYE/Kjn2O8LkbBg/s320/linker.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&amp;nbsp;- after building the project, open the generated *.map file to verify the linker output&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-xD3lYdOaV6k/TZHjm-vnhZI/AAAAAAAAAYI/Hk9hweK1VpQ/s1600/linker_map.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="227" src="http://2.bp.blogspot.com/-xD3lYdOaV6k/TZHjm-vnhZI/AAAAAAAAAYI/Hk9hweK1VpQ/s320/linker_map.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;ul&gt;&lt;i&gt;&lt;span style="font-size: x-small;"&gt;*I don't know, yet, what's with this 0x03F80000 address.&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp; This is the load address used by Wondermedia version of U-BOOT&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;/ul&gt;
&lt;br /&gt;
- Complete Eclipse project files:
&lt;br /&gt;
&lt;a href="http://www.blogger.com/post-create.g?blogID=3967613250975275925" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;
&lt;/a&gt;download here: &lt;a href="http://www.4shared.com/file/gxWXsuC8/ARM9_WM8505_UART0.html"&gt;ARM9_WM8505_UART0.zip&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://www.blogger.com/post-create.g?blogID=3967613250975275925" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;/a&gt;&lt;a href="http://www.blogger.com/post-create.g?blogID=3967613250975275925" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;/a&gt;&lt;a href="http://4.bp.blogspot.com/-F15qJHHS5NI/TZHlzKyP-kI/AAAAAAAAAYM/Qd8XWeJa4UE/s1600/eclipse.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="204" src="http://4.bp.blogspot.com/-F15qJHHS5NI/TZHlzKyP-kI/AAAAAAAAAYM/Qd8XWeJa4UE/s320/eclipse.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;i&gt;&lt;span style="font-size: x-small;"&gt;* most of the hardware initializations (e.g. clock settings) are already done by the bootloader,&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp; so we don't have to worry about them for now.&lt;/span&gt;&lt;/i&gt;
&lt;br /&gt;
&lt;br /&gt;
Next question is, "how to load and run the code?
&lt;br /&gt;
I've tested two ways of how to transfer the generated image to the RAM:
&lt;br /&gt;
First is through &lt;b&gt;tftp &lt;/b&gt;transfer, second is &lt;b&gt;SD card&lt;/b&gt; load during boot-up.&lt;br /&gt;
Both method uses the &lt;b&gt;bootloader&lt;/b&gt;, which is already present in the board (in the SPI flash).
&lt;br /&gt;
My board got &lt;b&gt;v1.1.4&lt;/b&gt; of U-BOOT.&lt;br /&gt;
&lt;br /&gt;
1. TFTP transfer to RAM.
&lt;br /&gt;
- get a copy of this free&lt;a href="http://tftpd32.jounin.net/"&gt;TFTPD32 server&lt;/a&gt; application.
&lt;br /&gt;
- using the &lt;a href="http://4.bp.blogspot.com/-5fayfFyhEH4/TZHp_vW7jNI/AAAAAAAAAYQ/hzu0u79wGhA/s1600/IMG_2125.JPG"&gt;LAN adapter&lt;/a&gt;, connect board to host PC Ethernet
&lt;br /&gt;
enter u-boot console, and type these commands:&lt;br /&gt;
&lt;textarea cols="50" readonly="true" rows="3"&gt;tftp {load address} {image file}
go {load address}
&lt;/textarea&gt;

&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-85Evx5iEqfU/TZHq9HEUhyI/AAAAAAAAAYU/FULfZQzO44E/s1600/hyperterm.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="213" src="http://2.bp.blogspot.com/-85Evx5iEqfU/TZHq9HEUhyI/AAAAAAAAAYU/FULfZQzO44E/s320/hyperterm.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style="font-size: x-small;"&gt;* RAM load address can use other than 0x0&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
2. SD card scriptcmd&lt;br /&gt;
-guide:&amp;nbsp; &lt;a href="http://www.blogger.com/href=%22http://www.slatedroid.com/index.php?/topic/6173-how-to-edit-scriptcmd/"&gt;How to edit "scriptcmd"&lt;/a&gt;&lt;br /&gt;
-during boot-up, the u-boot will read the "scriptcmd" script in the "script" folder of the SD card.&lt;br /&gt;
&lt;textarea cols="50" readonly="true" rows="3"&gt;fatload mmc 0 {load address} {image file}
go {load address}&amp;nbsp;&lt;/textarea&gt;
&lt;br /&gt;
&lt;i&gt;&lt;span style="font-size: x-small;"&gt;*these commands can also be typed in the uboot console. ("mmcinit" must be sent first)&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
references:&lt;br /&gt;
&lt;a href="ftp://ftp.gpl-devices.org/pub/vendors/Wondermedia/WM8505/"&gt;Wondermedia GPL sources&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://tails92.sepwich.com/files/easypc/datasheets/"&gt;WM8505 datasheets&lt;/a&gt;&lt;br /&gt;
forum link:&lt;br /&gt;
&lt;a href="http://www.electronicslab.ph/forum/index.php?topic=24793.0"&gt;Let's learn ARM using cheap 7" tablets&lt;/a&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/3967613250975275925-8288258353383734085?l=projectproto.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/8mRKploXYb8lfyO7zRw8jOylZvk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/8mRKploXYb8lfyO7zRw8jOylZvk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/8mRKploXYb8lfyO7zRw8jOylZvk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/8mRKploXYb8lfyO7zRw8jOylZvk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Projectproto/~4/QozX4hOhp6g" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://projectproto.blogspot.com/feeds/8288258353383734085/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://projectproto.blogspot.com/2011/03/hello-world-wm8505.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/8288258353383734085?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/8288258353383734085?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Projectproto/~3/QozX4hOhp6g/hello-world-wm8505.html" title="Hello World, WM8505!" /><author><name>'yus</name><uri>http://www.blogger.com/profile/09469609276942488473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="29" src="http://2.bp.blogspot.com/_meF1KpGU79k/Sq5sE50miPI/AAAAAAAAAAY/V2noVm7vCM8/S220/minibot.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-mq9tygvwB7E/TZHW1C2KS5I/AAAAAAAAAXs/9vXa3YZADvA/s72-c/WM8505_ARM926.JPG" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://projectproto.blogspot.com/2011/03/hello-world-wm8505.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUEESXw9fSp7ImA9Wx9VGEQ.&quot;"><id>tag:blogger.com,1999:blog-3967613250975275925.post-7176200823981234211</id><published>2011-02-03T10:52:00.002+08:00</published><updated>2011-02-05T17:20:08.265+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-05T17:20:08.265+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Atmel mcu" /><category scheme="http://www.blogger.com/atom/ns#" term="instrumentation" /><category scheme="http://www.blogger.com/atom/ns#" term="Android" /><category scheme="http://www.blogger.com/atom/ns#" term="wireless" /><title>MARG sensors + Bluetooth</title><content type="html">&lt;b&gt;MARG&lt;/b&gt; (Magnetic, Angular Rate, and Gravity) sensor array used for &lt;b&gt;AHRS&lt;/b&gt; (Attitude and Heading Reference Systems).
&lt;br /&gt;
&lt;br /&gt;
&lt;object width="400" height="320"&gt;&lt;param name="movie" value="http://www.youtube.com/v/X9FdipCXRjw?fs=1&amp;amp;hl=en_US&amp;amp;rel=0"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/X9FdipCXRjw?fs=1&amp;amp;hl=en_US&amp;amp;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="400" height="320"&gt;&lt;/embed&gt;&lt;/object&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style="text-align: center;"&gt;
Android OpenGL 3D display on Samsung Spica (i5700).
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/_meF1KpGU79k/TUoO48WE6tI/AAAAAAAAAXU/-kC-FwtRbWQ/s1600/android_bt_ahrs_3D.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://1.bp.blogspot.com/_meF1KpGU79k/TUoO48WE6tI/AAAAAAAAAXU/-kC-FwtRbWQ/s320/android_bt_ahrs_3D.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style="text-align: center;"&gt;
Sparkfun 9DOF sensor stick &lt;a href="http://www.sparkfun.com/products/10389"&gt;SEN-10389&lt;/a&gt;, later replaced by &lt;a href="http://www.sparkfun.com/products/10321"&gt;SEN-10321&lt;/a&gt;.
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/_meF1KpGU79k/TUoO3a3-fvI/AAAAAAAAAXQ/BXc-F-qabVI/s1600/bluetooth_9dofstick.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://4.bp.blogspot.com/_meF1KpGU79k/TUoO3a3-fvI/AAAAAAAAAXQ/BXc-F-qabVI/s320/bluetooth_9dofstick.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Using &lt;a href="http://www.atmel.com/dyn/products/product_card.asp?PN=ATmega328P"&gt;ATmega328P&lt;/a&gt;, operated at 3.3V supply and 8MHz crystal. At this speed, reading sensors' measurements and computing "AHRSupdate" take about 31ms to complete. Default compiler setting is used on &lt;a href="http://winavr.sourceforge.net/"&gt;WinAVR&lt;/a&gt;. With 25Hz sampling rate, this leaves mega328p extra 9ms to do other tasks. Bluetooth SPP (serial) communication is buffered and interrupt driven, so no processing time is wasted in reading and sending data to the android phone.
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/_meF1KpGU79k/TUoO6EP0TlI/AAAAAAAAAXY/jepOWWdv0rg/s1600/atmega328p_battery.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://4.bp.blogspot.com/_meF1KpGU79k/TUoO6EP0TlI/AAAAAAAAAXY/jepOWWdv0rg/s320/atmega328p_battery.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
References:
&lt;br /&gt;
(1) &lt;a href="http://code.google.com/p/imumargalgorithm30042010sohm/downloads/detail?name=AHRS.zip&amp;amp;can=2&amp;amp;q="&gt;Sebastian Madgwick's Alternative AHRS (MARG) algorithm&lt;/a&gt; - Quaternion implementation of Mayhony's DCM filter incorporating magnetic distortion compensation.
&lt;br /&gt;
(2) &lt;a href="http://www.varesano.net/topic/freeimu"&gt;Fabio Varesano's FreeIMU&lt;/a&gt;. Also using Madgwick's implementation of the DCM filter on Arduino platform.
&lt;br /&gt;
(3) &lt;a href="http://www.euclideanspace.com/maths/geometry/rotations/conversions/index.htm"&gt;Rotation convertions by Martin Baker&lt;/a&gt;. Very good discussion on quaternions and other 3D representation like Euler angles and transformation matrix.
&lt;br /&gt;
(4) &lt;a href="http://www.songho.ca/opengl/gl_transform.html#matrix"&gt;OpenGL Transformation Matrix by Song Ho Ahn&lt;/a&gt;
&lt;br /&gt;
(5) Similar discusion on &lt;a href="http://diydrones.com/forum/topics/sf-9dof-razor-ahrs-dcm-to"&gt;diydrones.com started by Harinath&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
Android project examples:
&lt;br /&gt;
&lt;a href="http://developer.android.com/guide/topics/wireless/bluetooth.html"&gt;Android Bluetooth&lt;/a&gt;
&lt;br /&gt;
&lt;a href="http://developer.android.com/resources/samples/BluetoothChat/index.html"&gt;Bluetooth Chat&lt;/a&gt;
&lt;br /&gt;
&lt;a href="http://insanitydesign.com/wp/projects/"&gt;Android OpenGL Projects&lt;/a&gt;
&lt;br /&gt;
&lt;a href="http://blog.jayway.com/2009/12/03/opengl-es-tutorial-for-android-part-i/"&gt;OpenGL ES tutorial&lt;/a&gt;
&lt;br /&gt;
&lt;a href="http://projectproto.blogspot.com/2010/09/android-bluetooth-oscilloscope.html"&gt;Android Bluetooth Oscilloscope&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Special thanks to the generous guy who gave me these toys, Thank you very much!&lt;/i&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3967613250975275925-7176200823981234211?l=projectproto.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Eq0RHnsj1hJ43z4CzRKfoKxBJ7M/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Eq0RHnsj1hJ43z4CzRKfoKxBJ7M/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Eq0RHnsj1hJ43z4CzRKfoKxBJ7M/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Eq0RHnsj1hJ43z4CzRKfoKxBJ7M/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Projectproto/~4/W3UbjpxC81I" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://projectproto.blogspot.com/feeds/7176200823981234211/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://projectproto.blogspot.com/2011/02/marg-sensors-bluetooth.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/7176200823981234211?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/7176200823981234211?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Projectproto/~3/W3UbjpxC81I/marg-sensors-bluetooth.html" title="MARG sensors + Bluetooth" /><author><name>'yus</name><uri>http://www.blogger.com/profile/09469609276942488473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="29" src="http://2.bp.blogspot.com/_meF1KpGU79k/Sq5sE50miPI/AAAAAAAAAAY/V2noVm7vCM8/S220/minibot.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_meF1KpGU79k/TUoO48WE6tI/AAAAAAAAAXU/-kC-FwtRbWQ/s72-c/android_bt_ahrs_3D.jpg" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://projectproto.blogspot.com/2011/02/marg-sensors-bluetooth.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkABRH47eCp7ImA9Wx9WFEk.&quot;"><id>tag:blogger.com,1999:blog-3967613250975275925.post-7451544098245474719</id><published>2011-01-19T21:36:00.002+08:00</published><updated>2011-01-19T21:45:55.000+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-19T21:45:55.000+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Atmel mcu" /><category scheme="http://www.blogger.com/atom/ns#" term="instrumentation" /><category scheme="http://www.blogger.com/atom/ns#" term="Android" /><category scheme="http://www.blogger.com/atom/ns#" term="wireless" /><title>Inertial Measurement Unit + Bluetooth</title><content type="html">&lt;b&gt;&lt;span style="font-size: large;"&gt;A&lt;/span&gt;rduino plus &lt;span style="font-size: large;"&gt;A&lt;/span&gt;ndroid&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;
&lt;/b&gt;
&lt;object height="300" width="400"&gt;&lt;param name="movie" value="http://www.youtube.com/v/-1_Y8IUouhY?fs=1&amp;amp;hl=en_US"&gt;




&lt;/param&gt;
&lt;param name="allowFullScreen" value="true"&gt;




&lt;/param&gt;
&lt;param name="allowscriptaccess" value="always"&gt;




&lt;/param&gt;
&lt;embed src="http://www.youtube.com/v/-1_Y8IUouhY?fs=1&amp;amp;hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="400" height="300"&gt;&lt;/embed&gt;&lt;/object&gt;

&lt;br /&gt;
* &lt;i&gt;pitch and roll only&lt;/i&gt;&lt;br /&gt;
* &lt;i&gt;Arduino code by&lt;/i&gt; &lt;a href="http://www.varesano.net/blog/fabio/my-first-6-dof-imu-sensors-fusion-implementation-adxl345-itg3200-arduino-and-processing"&gt;fabio (www.varesano.net)&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/_meF1KpGU79k/TTbkjQwTg8I/AAAAAAAAAXI/jtTdZu6dZ4k/s1600/android_blueimu.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="300" src="http://4.bp.blogspot.com/_meF1KpGU79k/TTbkjQwTg8I/AAAAAAAAAXI/jtTdZu6dZ4k/s400/android_blueimu.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;a href="http://www.sparkfun.com/products/10121"&gt;IMU Digital 6-DOF (ITG3200/ADXL345)&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://arduino.cc/en/Main/ArduinoBoardFio"&gt;Arduino FIO&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/_meF1KpGU79k/TTbkqa6yktI/AAAAAAAAAXM/itdedDvJJh0/s1600/FIO_6DOF_BT.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="300" src="http://4.bp.blogspot.com/_meF1KpGU79k/TTbkqa6yktI/AAAAAAAAAXM/itdedDvJJh0/s400/FIO_6DOF_BT.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&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/3967613250975275925-7451544098245474719?l=projectproto.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Iz9_K9ZkzQBCDqNgYT9gKd5r1gk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Iz9_K9ZkzQBCDqNgYT9gKd5r1gk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Iz9_K9ZkzQBCDqNgYT9gKd5r1gk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Iz9_K9ZkzQBCDqNgYT9gKd5r1gk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Projectproto/~4/3DwBuYgoj7U" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://projectproto.blogspot.com/feeds/7451544098245474719/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://projectproto.blogspot.com/2011/01/inertial-measurement-unit-bluetooth.html#comment-form" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/7451544098245474719?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/7451544098245474719?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Projectproto/~3/3DwBuYgoj7U/inertial-measurement-unit-bluetooth.html" title="Inertial Measurement Unit + Bluetooth" /><author><name>'yus</name><uri>http://www.blogger.com/profile/09469609276942488473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="29" src="http://2.bp.blogspot.com/_meF1KpGU79k/Sq5sE50miPI/AAAAAAAAAAY/V2noVm7vCM8/S220/minibot.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_meF1KpGU79k/TTbkjQwTg8I/AAAAAAAAAXI/jtTdZu6dZ4k/s72-c/android_blueimu.jpg" height="72" width="72" /><thr:total>4</thr:total><feedburner:origLink>http://projectproto.blogspot.com/2011/01/inertial-measurement-unit-bluetooth.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkUBRnwzeCp7ImA9Wx9RFEw.&quot;"><id>tag:blogger.com,1999:blog-3967613250975275925.post-1530100771844977258</id><published>2010-12-14T22:54:00.002+08:00</published><updated>2010-12-15T21:04:17.280+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-15T21:04:17.280+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Microchip PIC mcu" /><category scheme="http://www.blogger.com/atom/ns#" term="LCDs" /><title>N6610 LCD 3D Demo Part II</title><content type="html">Instead of drawing only the edges of a polyhedron, this time we draw the faces and 'fill' it with corresponding colors. This demo now uses a dsPIC (16-bit and 40MIPS core) for "faster" and "smoother" graphics in the N6610/N6100 LCD (w/ pcf8833 controller). See "lcd6610.h" for the used pinouts.&lt;br /&gt;
&lt;br /&gt;
&lt;object height="300" width="400"&gt;&lt;param name="movie" value="http://www.youtube.com/v/3hsGie6RX5k?hl=en&amp;fs=1"&gt;





&lt;/param&gt;
&lt;param name="allowFullScreen" value="true"&gt;





&lt;/param&gt;
&lt;param name="allowscriptaccess" value="always"&gt;





&lt;/param&gt;
&lt;embed src="http://www.youtube.com/v/3hsGie6RX5k?hl=en&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;
&lt;br /&gt;
&lt;br /&gt;
There are several ways of "hidden surface removal". The easiest way, and most appropriate for drawing convex polyhedron is the use of &lt;a href="http://gpwiki.org/index.php/3D:Backface_Culling"&gt;Backface culling&lt;/a&gt;. "Backface" will determine whether a surface (e.g. triangular face) is need to be drawn or not.&lt;br /&gt;
/-----------------------------------------------------------------------------------/ &lt;br /&gt;
Draw3D routine:&lt;br /&gt;
&lt;textarea cols="60" id="intCode" name="intCode" readonly="true" rows="20" style="background-color: #e0e0e0; color: #00007f; font-family: courier; font-size: 8pt;" wrap="off"&gt;/***** Draw 3D object with given vertices, triangular faces and angles of rotation******/
void draw_3D(Vertex * V, Triangle * T, nVertices, nTriangles, R)
{
    // sin and cos values
    sinX = sin_table( R.x ) / 255.0;
    sinY = sin_table( R.y ) / 255.0;
    sinZ = sin_table( R.z ) / 255.0;

    cosX = cos_table( R.x ) / 255.0;
    cosY = cos_table( R.y ) / 255.0;
    cosZ = cos_table( R.z ) / 255.0;

    // calculate the new coordinates of points
        for (i=0; i&amp;lt; nVertices; i++)
        {
            tempX = V[i].x;
            tempY = V[i].y;
            tempZ = V[i].z;

            // store previous coordinates
            old_points[i] = new_points[i];

            // rotation on X axis
            py = tempY * cosX - tempZ * sinX;
            pz = tempY * sinX + tempZ * cosX;
            tempY =py; tempZ = pz;

            // rotation on Z axis
            px = tempX * cosZ - tempY * sinZ;
            py = tempX * sinZ + tempY * cosZ;
            tempX = px; tempY = py;

            // rotation on Y axis
            px = tempX * cosY - tempZ * sinY;
            pz = tempX * sinY + tempZ * cosY;

            // save the screen coordinates
            new_points[i].x = px * SCALE_FACTOR + OFFSETX;
            new_points[i].y = py * SCALE_FACTOR + OFFSETY;
        }
        // erase previous triangles
        for (i=0; i&amp;lt; nTriangles; i++)
        {
            if( !Backface( old_points[T[i].A], old_points[T[i].B], old_points[T[i].C] ) )
                fill_triangle(old_points[T[i].A], old_points[T[i].B], old_points[T[i].C], BG_COLOR);
        }
        // lcd plot new triangles
        for (i=0; i&amp;lt; nTriangles; i++)
        {
            if( !Backface( new_points[T[i].A], new_points[T[i].B], new_points[T[i].C] ) )
                fill_triangle(new_points[T[i].A], new_points[T[i].B], new_points[T[i].C], T[i].color);
        }
}
&lt;/textarea&gt;

&lt;br /&gt;
&lt;br /&gt;
triangle color-fill routine:
&lt;br /&gt;
&lt;textarea cols="60" id="intCode" name="intCode" readonly="true" rows="20" style="background-color: #e0e0e0; color: #00007f; font-family: courier; font-size: 8pt;" wrap="off"&gt;void fill_triangle(Point A, Point B, Point C, color)
{ 
    // bubble sort points
    if(B.y&amp;lt; A.y){ P=A; A=B; B=P; }
    if(C.y&amp;lt; B.y){ P=B; B=C; C=P; }
    if(C.y&amp;lt; A.y){ P=A; A=C; C=P; }
    if(B.y&amp;lt; A.y){ P=A; A=B; B=P; }

    // compute dx's
    dx1=0, dx2=0, dx3=0;
    if (B.y-A.y &amp;gt; 0) dx1 = (float)(B.x-A.x)/(B.y-A.y);
    if (C.y-B.y &amp;gt; 0) dx2 = (float)(C.x-B.x)/(C.y-B.y);
    if (C.y-A.y &amp;gt; 0) dx3 = (float)(C.x-A.x)/(C.y-A.y);

    for(h = (i16) A.y; h &amp;lt; B.y; h++) {
        sx = A.x + ((h - A.y) * dx3);
        ex = A.x + ((h - A.y) * dx1);
        draw_hline(sx,ex,h,color);
    }
    for(h = (i16) B.y; h &amp;lt; C.y; h++) {
        sx = A.x + ((h - A.y) * dx3);
        ex = B.x + ((h - B.y) * dx2);
        draw_hline(sx,ex,h,color);
    }
}
&lt;/textarea&gt;&lt;br /&gt;
&lt;span style="font-size: x-small;"&gt;(*another version of using dsPIC hardware multiplier/divider is included in the download)
&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
detect whether a triangle is facing backward.
&lt;textarea cols="60" id="intCode" name="intCode" readonly="true" rows="10" style="background-color: #e0e0e0; color: #00007f; font-family: courier; font-size: 8pt;" wrap="off"&gt;/***** BACKFACE CULLING  ******/
BOOL Backface(Point A, Point B, Point C)
{
    Point L1, L2; // lines/edges

    L1.x = A.x - B.x;
    L1.y = A.y - B.y;
    L2.x = C.x - B.x;
    L2.y = C.y - B.y;

    if( ((L1.x * L2.y)  - (L1.y * L2.x)) &amp;lt; 0 )
        return TRUE;
    return FALSE;
}
&lt;/textarea&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Complete MPLAB+C30 project (dsPIC33FJ16GS504):&lt;br /&gt;
&lt;a href="http://www.4shared.com/file/Gwg6XW-f/n6610lcd_3D_demo_part2.html"&gt;n6610lcd_3D_demo_part2.zip&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3967613250975275925-1530100771844977258?l=projectproto.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/-8FE67ShpiSyypkKx3r1S806HRE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-8FE67ShpiSyypkKx3r1S806HRE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/-8FE67ShpiSyypkKx3r1S806HRE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-8FE67ShpiSyypkKx3r1S806HRE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Projectproto/~4/KTP_8iGTWZ4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://projectproto.blogspot.com/feeds/1530100771844977258/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://projectproto.blogspot.com/2010/12/n6610-lcd-3d-demo-part-ii.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/1530100771844977258?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/1530100771844977258?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Projectproto/~3/KTP_8iGTWZ4/n6610-lcd-3d-demo-part-ii.html" title="N6610 LCD 3D Demo Part II" /><author><name>'yus</name><uri>http://www.blogger.com/profile/09469609276942488473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="29" src="http://2.bp.blogspot.com/_meF1KpGU79k/Sq5sE50miPI/AAAAAAAAAAY/V2noVm7vCM8/S220/minibot.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://projectproto.blogspot.com/2010/12/n6610-lcd-3d-demo-part-ii.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Dk4ERX86fCp7ImA9Wx9SGEg.&quot;"><id>tag:blogger.com,1999:blog-3967613250975275925.post-8881777395668674037</id><published>2010-12-08T22:52:00.003+08:00</published><updated>2010-12-09T08:35:04.114+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-09T08:35:04.114+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Microchip PIC mcu" /><category scheme="http://www.blogger.com/atom/ns#" term="LCDs" /><title>N6610 LCD 3D Demo</title><content type="html">Nokia 6610/6100 LCD 3D projections demo using Microchip's PIC18F25J11.
PIC18F25J11 is clocked at 12MHz external oscillator with 4xPLL enabled.
It's operated at 3.3V supply, same with the LCD (and so, direct connections and higher spi clock rates are possible).
&lt;br /&gt;
&lt;object height="300" width="400"&gt;&lt;param name="movie" value="http://www.youtube.com/v/IrXP0mtwpbo?hl=en&amp;fs=1"&gt;
&lt;/param&gt;
&lt;param name="allowFullScreen" value="true"&gt;
&lt;/param&gt;
&lt;param name="allowscriptaccess" value="always"&gt;
&lt;/param&gt;
&lt;embed src="http://www.youtube.com/v/IrXP0mtwpbo?hl=en&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;
&lt;br /&gt;
The demo is all about simple 3D projection - no rendering, no raycasting, etc., just the plotting of edges/lines. It displays common polyhedrons like tetrahedron, hexahedron(cube), octahedron, square pyramid, and triangular prism.
&lt;br /&gt;
&lt;br /&gt;
"3Ddemo.c"
&lt;br /&gt;
&lt;textarea cols="60" id="intCode" name="intCode" readonly="true" rows="20" style="background-color: #e0e0e0; color: #00007f; font-family: courier; font-size: 8pt;" wrap="off"&gt;/***** Draw 3D object with given vertices, edges and angles of rotation******/
void draw_3D(Vertex * V, Edge * E, nVertices, nEdges, xRot, yRot, zRot)
{
 u8 i;
 float tempX,tempY,tempZ;    // temporary coordinates
 float sinX,sinY,sinZ,cosX,cosY,cosZ; // precomputed sin and cos values
 float px,py,pz;       // projected

 // sin and cos values
 sinX = sin_table( xRot ) / 255.0;
 sinY = sin_table( yRot ) / 255.0;
 sinZ = sin_table( zRot ) / 255.0;

 cosX = cos_table( xRot ) / 255.0;
 cosY = cos_table( yRot ) / 255.0;
 cosZ = cos_table( zRot ) / 255.0;

 // calculate the new coordinates of points
    for (i=0; i&amp;lt; nVertices; i++)
 {
  tempX = V[i].x;
  tempY = V[i].y;
  tempZ = V[i].z;

  // store previous coordinates
  old_points[i] = new_points[i];

  // rotation on X axis
  py = tempY * cosX - tempZ * sinX;
  pz = tempY * sinX + tempZ * cosX;
  tempY =py; tempZ = pz;

  // rotation on Z axis
  px = tempX * cosZ - tempY * sinZ;
  py = tempX * sinZ + tempY * cosZ;
  tempX = px; tempY = py;

  // rotation on Y axis
  px = tempX * cosY - tempZ * sinY;
  pz = tempX * sinY + tempZ * cosY;

  // save the screen coordinates
  new_points[i].x = (u8)px * SCALE_FACTOR + OFFSETX;
  new_points[i].y = (u8)py * SCALE_FACTOR + OFFSETY;
 }

 // lcd plot
 for (i=0; i&amp;lt; nEdges; i++)
 {
  // erase old edges
  drawline(
   old_points[E[i].start].x, old_points[E[i].start].y,
   old_points[E[i].end].x, old_points[E[i].end].y,
   BG_COLOR);
  // draw new edges
  drawline(
   new_points[E[i].start].x, new_points[E[i].start].y,
   new_points[E[i].end].x, new_points[E[i].end].y,
   LINE_COLOR);

 }
&lt;/textarea&gt;
&lt;br /&gt;
*based on original sources:&lt;br /&gt;
&lt;a href="http://www.edaboard.com/thread99516.html"&gt;Nokia 6100 LCD with CCS C&lt;/a&gt;
&lt;br /&gt;
&lt;a href="http://www.pyrofersprojects.com/blog/3dpic/"&gt;3D Vector objects in C using the PIC micro&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Microchip C18 project:&amp;nbsp; &lt;a href="http://www.4shared.com/file/kuYxplBT/n6610lcd_3D_demo.html"&gt;&lt;b&gt;n6610lcd_3D_demo.zip&lt;/b&gt;&lt;/a&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/3967613250975275925-8881777395668674037?l=projectproto.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/sr2wJWllcH-JJsbtLdf4qap3gAE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/sr2wJWllcH-JJsbtLdf4qap3gAE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/sr2wJWllcH-JJsbtLdf4qap3gAE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/sr2wJWllcH-JJsbtLdf4qap3gAE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Projectproto/~4/ULl6iJmMahM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://projectproto.blogspot.com/feeds/8881777395668674037/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://projectproto.blogspot.com/2010/12/n6610-lcd-3d-demo.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/8881777395668674037?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/8881777395668674037?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Projectproto/~3/ULl6iJmMahM/n6610-lcd-3d-demo.html" title="N6610 LCD 3D Demo" /><author><name>'yus</name><uri>http://www.blogger.com/profile/09469609276942488473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="29" src="http://2.bp.blogspot.com/_meF1KpGU79k/Sq5sE50miPI/AAAAAAAAAAY/V2noVm7vCM8/S220/minibot.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://projectproto.blogspot.com/2010/12/n6610-lcd-3d-demo.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0UDQnw5eip7ImA9Wx9TE0w.&quot;"><id>tag:blogger.com,1999:blog-3967613250975275925.post-2147073595121290741</id><published>2010-11-18T22:44:00.004+08:00</published><updated>2010-11-21T12:54:33.222+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-11-21T12:54:33.222+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="LCDs" /><title>Nokia LCDs - Proteus VSM Models</title><content type="html">&lt;a href="http://www.labcenter.com/products/vsm_overview.cfm"&gt;Proteus VSM&lt;/a&gt; models for some Nokia LCDs&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/_meF1KpGU79k/TOU6INifb-I/AAAAAAAAAWo/xPQmiRuUqcM/s1600/demo_all.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="185" src="http://2.bp.blogspot.com/_meF1KpGU79k/TOU6INifb-I/AAAAAAAAAWo/xPQmiRuUqcM/s320/demo_all.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
LCD controllers used:&lt;br /&gt;
&lt;b&gt;PCF8833&lt;/b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Nokia 6100/6610/6610i&lt;br /&gt;
&lt;b&gt;S1D15G14&lt;/b&gt; - Nokia 3530/3510i/3595&lt;br /&gt;
&lt;b&gt;PCF8814&lt;/b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Nokia 1100&lt;br /&gt;
&lt;br /&gt;
Download: &lt;a href="http://www.4shared.com/file/W1VjGH4r/Nokia_LCDs_-_Proteus_VSM_Model.html"&gt;&lt;b&gt;Nokia LCDs - Proteus VSM Models.zip&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;
(MODELS + LIBRARY + some demos)&lt;br /&gt;
* just copy the files to their corresponding folder&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
//------------------------------------------------------------------------------------&lt;br /&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;img src="http://3.bp.blogspot.com/_meF1KpGU79k/TOiX-vHt7zI/AAAAAAAAAWw/p39-TqjO8Tc/s1600/pic_user_interface_demo.PNG" width="200" /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="http://1.bp.blogspot.com/_meF1KpGU79k/TOiYBviwdQI/AAAAAAAAAW0/ysTixsbB5S4/s1600/reifel.org_PICUserInterface.png" width="200" /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
//------------------------------------------------------------------------------------&lt;br /&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;img src="http://4.bp.blogspot.com/_meF1KpGU79k/TOiYC6DE1UI/AAAAAAAAAW4/wLwXMeOdKak/s1600/spiralbrain_n1100lcd_demo.png" width="200" /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="http://2.bp.blogspot.com/_meF1KpGU79k/TOiYH0IWv2I/AAAAAAAAAW8/8ZrjE1ZRQ8A/s1600/sunbizhosting.com_spiral_1100.png" width="200" /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
//------------------------------------------------------------------------------------&lt;br /&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;img src="http://2.bp.blogspot.com/_meF1KpGU79k/TOiX9aMGl1I/AAAAAAAAAWs/jDrM542GQgk/s1600/nN3530lcd_demo.png" width="200" /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="http://3.bp.blogspot.com/_meF1KpGU79k/TOibsgPTtkI/AAAAAAAAAXA/va54H0vaw58/s1600/comunicom.com.py_juno_3595_.png" width="200" /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
//------------------------------------------------------------------------------------&lt;br /&gt;
&lt;span style="font-size: x-small;"&gt;UPDATES: &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: x-small;"&gt;11-21-10&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; - N6610LCD model (&amp;amp;symbol) was updated based on the datasheet of PCF8833 alone, &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; but the result was different from expected. =(&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; again, this model still have lots of problems!&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; - found a bug on the N3530LCD model (PASET &amp;amp; CASET commands affected),&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; corrected model will be uploaded soon.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; - I apologize for I &lt;b&gt;cannot &lt;/b&gt;upload the source codes (msvc++ 2008) for these projects.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ( Proteus ISIS itself is NOT free. VSM SDK, I assume, is also not open-source).&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ask for code snippets here: &lt;a href="http://www.electronicslab.ph/forum/index.php/topic,10649.0.html"&gt;"Creating Proteus Models"&lt;/a&gt; ,instead.&lt;/span&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/3967613250975275925-2147073595121290741?l=projectproto.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/-OLOwIt5WR5IRKGB47LJacoq9VQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-OLOwIt5WR5IRKGB47LJacoq9VQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/-OLOwIt5WR5IRKGB47LJacoq9VQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-OLOwIt5WR5IRKGB47LJacoq9VQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Projectproto/~4/sn6IcvMQ-wU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://projectproto.blogspot.com/feeds/2147073595121290741/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://projectproto.blogspot.com/2010/11/nokia-lcds-proteus-vsm-models.html#comment-form" title="15 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/2147073595121290741?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/2147073595121290741?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Projectproto/~3/sn6IcvMQ-wU/nokia-lcds-proteus-vsm-models.html" title="Nokia LCDs - Proteus VSM Models" /><author><name>'yus</name><uri>http://www.blogger.com/profile/09469609276942488473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="29" src="http://2.bp.blogspot.com/_meF1KpGU79k/Sq5sE50miPI/AAAAAAAAAAY/V2noVm7vCM8/S220/minibot.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_meF1KpGU79k/TOU6INifb-I/AAAAAAAAAWo/xPQmiRuUqcM/s72-c/demo_all.png" height="72" width="72" /><thr:total>15</thr:total><feedburner:origLink>http://projectproto.blogspot.com/2010/11/nokia-lcds-proteus-vsm-models.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUUAQno6eSp7ImA9WhdQE0w.&quot;"><id>tag:blogger.com,1999:blog-3967613250975275925.post-6390437382790827098</id><published>2010-10-14T21:34:00.005+08:00</published><updated>2011-08-14T17:14:03.411+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-14T17:14:03.411+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Microchip PIC mcu" /><category scheme="http://www.blogger.com/atom/ns#" term="instrumentation" /><category scheme="http://www.blogger.com/atom/ns#" term="USB" /><title>PIC18F USB LC Meter</title><content type="html">Inductance and Capacitance Meter using Microchip's PIC18F2550 connected to USB using HID class (Plug-n-Play).&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/_meF1KpGU79k/TLb8xw8yiyI/AAAAAAAAAWA/Hi4_9V537wE/s1600/lcmeter.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://3.bp.blogspot.com/_meF1KpGU79k/TLb8xw8yiyI/AAAAAAAAAWA/Hi4_9V537wE/s320/lcmeter.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/_meF1KpGU79k/TLb9BrHFY4I/AAAAAAAAAWU/kQHIQxDqfHU/s1600/screenshot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_meF1KpGU79k/TLb9BrHFY4I/AAAAAAAAAWU/kQHIQxDqfHU/s1600/screenshot.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style="font-size: x-small;"&gt;&lt;i&gt;* f1, f2. and f3 are the frequencies defined by the equations stated on &lt;a href="http://ironbark.bendigo.latrobe.edu.au/%7Erice/lc/"&gt;Digital LC Meter&lt;/a&gt;&lt;/i&gt;&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/_meF1KpGU79k/TLb87c3GyqI/AAAAAAAAAWI/q2pyhCRk4GU/s1600/front.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="150" src="http://2.bp.blogspot.com/_meF1KpGU79k/TLb87c3GyqI/AAAAAAAAAWI/q2pyhCRk4GU/s200/front.JPG" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;td&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/_meF1KpGU79k/TLb842S8aNI/AAAAAAAAAWE/kdueD4bOI88/s1600/bottom.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="150" src="http://3.bp.blogspot.com/_meF1KpGU79k/TLb842S8aNI/AAAAAAAAAWE/kdueD4bOI88/s200/bottom.JPG" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;span style="font-size: x-small;"&gt;diagram using internal Analog Comparator and Timer Peripherals of PIC18:&lt;/span&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/_meF1KpGU79k/TLb8__Ufd3I/AAAAAAAAAWM/AfNwEkjck_I/s1600/diagram.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://1.bp.blogspot.com/_meF1KpGU79k/TLb8__Ufd3I/AAAAAAAAAWM/AfNwEkjck_I/s400/diagram.PNG" width="400" /&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;span style="font-size: x-small;"&gt;schematic with actual values:&lt;/span&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/_meF1KpGU79k/TLb9A9Ff4JI/AAAAAAAAAWQ/Z2UQC7jit7w/s1600/schematic.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="251" src="http://1.bp.blogspot.com/_meF1KpGU79k/TLb9A9Ff4JI/AAAAAAAAAWQ/Z2UQC7jit7w/s400/schematic.PNG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;span style="font-size: x-small;"&gt;&lt;i&gt;*simulation on Proteus 7 is NOT working (particularly the LC oscillator part and internal pull-up on RB0)&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style="font-size: x-small;"&gt;download link (HEX and PC app):&lt;/span&gt; &lt;a href="http://www.4shared.com/file/3hRGWSgg/PIC18F2550_USB-HID_LC-Meter.html"&gt;PIC18F2550_USB-HID_LC-Meter.zip&lt;/a&gt;&lt;br /&gt;
elab.ph forum link: &amp;nbsp;
      
      
       
       
       &lt;span id="msg_355017"&gt;&lt;a href="http://www.electronicslab.ph/forum/index.php/topic,20892.0.html"&gt;PIC18F2550 USB LC Meter&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;span id="msg_355017"&gt;&amp;nbsp;# edit (10-20-10)&lt;/span&gt;&lt;/i&gt; 
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/_meF1KpGU79k/TL7ZL3HT8QI/AAAAAAAAAWk/jNICeXa6oys/s1600/lcmeter_screenshot.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="162" src="http://1.bp.blogspot.com/_meF1KpGU79k/TL7ZL3HT8QI/AAAAAAAAAWk/jNICeXa6oys/s400/lcmeter_screenshot.PNG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
added "Calibration option" ( &lt;i&gt;same PIC18F firmware&lt;/i&gt; )&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;reference capacitance range is 1.0nF +/- 5%&lt;/li&gt;
&lt;li&gt;Fosc (20MHz crystal with PLL) frequency range is 48MHz +/- 200ppm&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;i&gt;&lt;span id="msg_355017"&gt;# edit (08-14-11)&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span id="msg_355017"&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;span id="msg_355017"&gt;V1.2 -&amp;gt;&amp;nbsp; updated host-side application&lt;/span&gt;&lt;i&gt;&lt;span id="msg_355017"&gt;,&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span id="msg_355017"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;gt; &lt;/span&gt;&lt;/i&gt;&lt;span id="msg_355017"&gt;should now work both on 32-bit OS and 64-bit OS hosts&lt;/span&gt;&lt;i&gt;&lt;span id="msg_355017"&gt;.&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3967613250975275925-6390437382790827098?l=projectproto.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ADscIWJE2VkZ0ibLvGeMw3h65Ic/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ADscIWJE2VkZ0ibLvGeMw3h65Ic/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ADscIWJE2VkZ0ibLvGeMw3h65Ic/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ADscIWJE2VkZ0ibLvGeMw3h65Ic/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Projectproto/~4/5IS40ssYsfQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://projectproto.blogspot.com/feeds/6390437382790827098/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://projectproto.blogspot.com/2010/10/pic18f-usb-lc-meter.html#comment-form" title="10 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/6390437382790827098?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/6390437382790827098?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Projectproto/~3/5IS40ssYsfQ/pic18f-usb-lc-meter.html" title="PIC18F USB LC Meter" /><author><name>'yus</name><uri>http://www.blogger.com/profile/09469609276942488473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="29" src="http://2.bp.blogspot.com/_meF1KpGU79k/Sq5sE50miPI/AAAAAAAAAAY/V2noVm7vCM8/S220/minibot.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_meF1KpGU79k/TLb8xw8yiyI/AAAAAAAAAWA/Hi4_9V537wE/s72-c/lcmeter.JPG" height="72" width="72" /><thr:total>10</thr:total><feedburner:origLink>http://projectproto.blogspot.com/2010/10/pic18f-usb-lc-meter.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkMNSHc-eyp7ImA9WhRVFUw.&quot;"><id>tag:blogger.com,1999:blog-3967613250975275925.post-6346291910943278696</id><published>2010-09-23T21:17:00.008+08:00</published><updated>2012-01-14T11:08:19.953+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-14T11:08:19.953+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Microchip PIC mcu" /><category scheme="http://www.blogger.com/atom/ns#" term="instrumentation" /><category scheme="http://www.blogger.com/atom/ns#" term="Android" /><category scheme="http://www.blogger.com/atom/ns#" term="wireless" /><title>Android Bluetooth Oscilloscope</title><content type="html">&lt;br /&gt;
&lt;span style="font-size: x-small;"&gt;&lt;i&gt;*This application is tested only with Samsung Galaxy &lt;a href="http://www.gsmarena.com/samsung_i5700_galaxy_spica-2965.php"&gt;GT-i5700 Spica&lt;/a&gt; (&lt;a href="http://forum.samdroid.net/f9/lk2-08-original-firmwares-root-new-superuser-wifi-tether-bb-12-07-2010-a-1193/"&gt;rooted&lt;/a&gt; Android 2.1 OS, &lt;a href="http://stackoverflow.com/questions/2661932/problem-with-bluetooth-on-android-2-1-samsung-spica-i5700-where-pairing-works-b"&gt;i570EXXJD1 Baseband&lt;/a&gt;&lt;/i&gt; version).&lt;/span&gt;&lt;br /&gt;
The transmitter circuit uses Microchip's &lt;a href="http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en537165"&gt;dsPIC33FJ16GS504&lt;/a&gt; for the analog-to-digital conversion of the input signals on two channels.
The processed data on the dsPIC are then transmitted to the phone (for waveform display) via the &lt;a href="http://www.national.com/opf/LM/LMX9838.html"&gt;LMX9838&lt;/a&gt; bluetooth SPP module.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;object height="370" width="450"&gt;&lt;param name="movie" value="http://www.youtube.com/v/DIDy3PAReXo?fs=1&amp;amp;hl=en_US"&gt;












&lt;/param&gt;
&lt;param name="allowFullScreen" value="true"&gt;












&lt;/param&gt;
&lt;param name="allowscriptaccess" value="always"&gt;












&lt;/param&gt;
&lt;embed src="http://www.youtube.com/v/DIDy3PAReXo?fs=1&amp;amp;hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="450" height="370"&gt;&lt;/embed&gt;&lt;/object&gt;
&lt;br /&gt;
specs/ranges:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-size: x-small;"&gt;time per division: {5us, 10us, 20us, 50us, 100us, 200us, 500us, 1ms, 2ms, 5ms, 10ms, 20ms, 50ms }&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: x-small;"&gt;volt per division: {10mV, 20mV, 50mV, 100mV, 200mV, 500mV, 1V, 2V, GND}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: x-small;"&gt;analog input (depends on external  pre-amplifier configuration): {-8V to +8V }&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/_meF1KpGU79k/TJtN-SVSeiI/AAAAAAAAAV4/lY122hFiPag/s1600/transmitter.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="300" src="http://1.bp.blogspot.com/_meF1KpGU79k/TJtN-SVSeiI/AAAAAAAAAV4/lY122hFiPag/s400/transmitter.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
The source codes for the bluetooth communication is based on &lt;a href="http://developer.android.com/resources/samples/BluetoothChat/index.html"&gt;Bluetooth Chat&lt;/a&gt; example from &lt;i&gt;&lt;u&gt;http://developer.android.com&lt;/u&gt;&lt;/i&gt;.
That example contains three java source files. And, I've completely copied the "&lt;i&gt;DeviceListActivity.java&lt;/i&gt;", which is used for searching remote bluetooth devices.
Then I've modified the "&lt;i&gt;BluetoothChatService.java&lt;/i&gt;" to use only the &lt;b&gt;RFCOMM Client&lt;/b&gt; functions,
and used the well-known &lt;b&gt;UUID&lt;/b&gt; "&lt;a href="http://stackoverflow.com/questions/1953888/bluetooth-rfcomm-sdp-connection-to-a-rs232-adapter-in-android"&gt;00001101-0000-1000-8000-00805F9B34FB&lt;/a&gt;" for the Bluetooth RFCOMM/SPP.&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
For the plotting of waveforms, I'm using SurfaceView object to draw on its canvas.
This tutorial found on &lt;u&gt;www.helloandroid.com&lt;/u&gt; helps me a lot for this task:
"&lt;a href="http://www.helloandroid.com/tutorials/how-use-canvas-your-android-apps-part-2"&gt;How to use canvas in your android&lt;/a&gt;".&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/_meF1KpGU79k/TJtNLrdZRBI/AAAAAAAAAVw/Nt4mT_3io6A/s1600/screenshot.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="300" src="http://1.bp.blogspot.com/_meF1KpGU79k/TJtNLrdZRBI/AAAAAAAAAVw/Nt4mT_3io6A/s400/screenshot.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
The rest of the job mainly involves porting of my &lt;a href="http://projectproto.blogspot.com/2009/09/wireless-oscilloscope.html"&gt;previous Python S60 script&lt;/a&gt; to JAVA language.
It was too painful on my side, because I had to convert a single script file to multiple &lt;b&gt;java + xml&lt;/b&gt; source files!
Nonetheless, it was a good experience for me on learning the Android SDK (JAVA programming).&lt;br /&gt;
&lt;br /&gt;
Project source codes for Android and dsPIC (with APK and HEX) :&lt;br /&gt;
&lt;a href="http://www.4shared.com/file/LWwfGrDs/AndroidBluetoothOscilloscope.html"&gt;&lt;u&gt;&lt;b&gt;AndroidBluetoothOscilloscope.zip&lt;/b&gt;&lt;/u&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Electronicslab.ph forum link : &lt;a href="http://www.electronicslab.ph/forum/index.php/topic,20245.0.html"&gt;Android Bluetooth Oscilloscope&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: x-small;"&gt;Here are some interesting projects that are also based on the Bluetooth Chat example:&lt;/span&gt;&lt;br /&gt;
&lt;a href="http://uzzors2k.4hv.org/index.php?page=blucar"&gt;Bluetooth Controlled Model Car&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://code.google.com/p/sprime/"&gt;SPRIME&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Special thanks to:&lt;br /&gt;
&lt;a href="http://forum.samdroid.net/"&gt;Samdroid Forum&lt;/a&gt;&amp;nbsp; for the customized/rooted firmwares for our Spica.&lt;br /&gt;
&lt;a href="http://www.tipidcp.com/viewtopic.php?tid=13408"&gt;Tipidcp Spica users&lt;/a&gt; for sharing their tips and experiences with this android phone.&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------------------&lt;br /&gt;
&lt;i&gt;#edit (10-15-2010)&lt;/i&gt;&lt;br /&gt;
Here's now my circuit. Nothing special on it, all are based on existing circuits. &lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/_meF1KpGU79k/TLkhEaWX9vI/AAAAAAAAAWg/0TUsoaiTMD8/s1600/schematic2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="233" src="http://1.bp.blogspot.com/_meF1KpGU79k/TLkhEaWX9vI/AAAAAAAAAWg/0TUsoaiTMD8/s320/schematic2.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;span style="font-size: x-small;"&gt;&lt;i&gt;*The dsPIC I have used is most probably NOT the best choice for this project because of the many left unused peripherals (extra pins). But, this is the only part readily available in my bin and it has the fastest ADC (2 x 2MSps) among the chips I have.&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: x-small;"&gt;&lt;i&gt;*If you prefer to change the input range via the op-amp preamp, the computation is located on the "adc.xmcd" file.&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: x-small;"&gt;&lt;i&gt;*You can use other SPP bluetooth modules aside from LMX. (accdg to manufacturer, it's already obsolete)&lt;/i&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------------------&lt;br /&gt;
&lt;i&gt;#edit (9-14-2011)&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: small;"&gt;It's almost a year now, and yet some people are still interested in this project (considered to be obsolete). So I've decided to place the source repository also on&lt;/span&gt; &lt;a href="http://code.google.com/p/android-bluetooth-oscilloscope/"&gt;Google Code&lt;/a&gt; &lt;span style="font-size: small;"&gt;site. &lt;/span&gt;&lt;span style="font-size: small;"&gt;You can either&lt;/span&gt; &lt;a href="http://code.google.com/p/android-bluetooth-oscilloscope/source/browse/"&gt;Browse&lt;/a&gt;  or use &lt;span style="font-size: large;"&gt;&lt;b&gt;git&lt;/b&gt;&lt;/span&gt; to have your own local copy: &lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: #999999;"&gt;
&amp;nbsp;&amp;nbsp; git clone https://code.google.com/p/android-bluetooth-oscilloscope/&lt;/div&gt;
&lt;br /&gt;
&lt;span style="font-size: small;"&gt;See also the&lt;/span&gt; &lt;a href="http://code.google.com/p/android-bluetooth-oscilloscope/source/list"&gt;Changes&lt;/a&gt;, if you want also to learn on how to modify the code. I've started the first 'commit' with a simple "hello world" from the SDK project template. And then changes were made until the desired final oscilloscope application is achieved.&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3967613250975275925-6346291910943278696?l=projectproto.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/elQ5XfQE7Q63RyIuyiF8zbTtUgg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/elQ5XfQE7Q63RyIuyiF8zbTtUgg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/elQ5XfQE7Q63RyIuyiF8zbTtUgg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/elQ5XfQE7Q63RyIuyiF8zbTtUgg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Projectproto/~4/RoT9T415Fc0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://projectproto.blogspot.com/feeds/6346291910943278696/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://projectproto.blogspot.com/2010/09/android-bluetooth-oscilloscope.html#comment-form" title="132 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/6346291910943278696?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/6346291910943278696?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Projectproto/~3/RoT9T415Fc0/android-bluetooth-oscilloscope.html" title="Android Bluetooth Oscilloscope" /><author><name>'yus</name><uri>http://www.blogger.com/profile/09469609276942488473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="29" src="http://2.bp.blogspot.com/_meF1KpGU79k/Sq5sE50miPI/AAAAAAAAAAY/V2noVm7vCM8/S220/minibot.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_meF1KpGU79k/TJtN-SVSeiI/AAAAAAAAAV4/lY122hFiPag/s72-c/transmitter.jpg" height="72" width="72" /><thr:total>132</thr:total><feedburner:origLink>http://projectproto.blogspot.com/2010/09/android-bluetooth-oscilloscope.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkEBQn0zfSp7ImA9WxFbFU0.&quot;"><id>tag:blogger.com,1999:blog-3967613250975275925.post-2508967247442846693</id><published>2010-07-07T20:07:00.010+08:00</published><updated>2010-07-07T20:10:53.385+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-07T20:10:53.385+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ZiLOG Z8F mcu" /><category scheme="http://www.blogger.com/atom/ns#" term="PC programming" /><title>ZiLOG Z8F64xx Timer Calculator</title><content type="html">&lt;p&gt;Sample code generator for ZiLOG's Z8F64xx Z8 Encore family of 8-bit Flash MCU's.
Tested only with ZDSII v4.11 (C compiler-v3.60) on Z8F6423 running at 20MHz crystal.
It's expected to work also with other parts, like Z8F6421 of &lt;a href="http://e-gizmo.com/KIT/Slimboard.htm"&gt;&lt;b&gt;e-Gizmo's IRC Slimboard&lt;/b&gt;&lt;/a&gt;. 
It generates sample codes of "timer interrupt" and "pulse width modulation(pwm)" 
for TIMER0, TIMER1, TIMER2, and TIMER3 peripherals. 
Please refer to the datasheet("part selection guide" table) of this family
to see what timer peripherals are available on a particular part.&lt;/p&gt;

&lt;script type="text/javascript" language="javascript"&gt;
&lt;!--
/*********************/
function limit_input(input, maximum)
{
if(isNaN(input.value) || (input.value).search(".")&gt;1) input.value = input.value.substring(0,(input.value.length-1));
else if(parseFloat(input.value)&gt;maximum) input.value = maximum;
}
/*********************/
function calculate_reload_value(sys_freq, int_rate)
{
var reload_value, prescaler;
var result = new Array(2);
reload_value = (sys_freq / int_rate);
if((sys_freq&gt;0) &amp;&amp; (int_rate&gt;0) &amp;&amp; (reload_value&gt;0))
{
prescaler = 0;
while((reload_value&gt;65535)&amp;&amp;(prescaler&lt;8)){
prescaler += 1;
reload_value /= 2;      
}
if((reload_value&lt;65535)&amp;&amp;(prescaler&lt;8))
{
result[0] = Math.round(reload_value);
result[1] = Math.round(prescaler);
return result;
}
else{ return false; }
}
else{ return false; }
}
/*********************/
function generate_interrupt_code()
{
var int_code="", init_code="", main_code="";
var rate_actual;
var form=document.getElementById("intForm");
var clock=form["SysFreq1"].value;
var rate=form["IntRate"].value;
var timer_periph=form["selTimer1"].value;
var reload = calculate_reload_value(clock, rate);
if((reload==false) || (rate&gt;clock))
{
form["intCode"].value = "EoW poH!";
return;
}
/***** interrupt code *****/
int_code = "#pragma interrupt\nvoid TIMER"
   + timer_periph
   + "_ISR(void)\n{\n\tDI(); //disable global interrupt\n"
   + "\t/* your ISR code here *\/\n"; /* */
if(timer_periph=="3")
{
   int_code += "\tIRQ2 &amp;= ~0x80;\t//clear pending interrupt request\n";
}else{
   int_code += "\tIRQ0 &amp;= ~0x"+Math.pow(2,Number(timer_periph)+1)+"0;\t//clear pending interrupt request\n";
}
int_code += "\tEI(); //enable global interrupt\n}\n\n";
/***** intitialization code *****/
rate_actual = Number(clock) / (reload[0] * Math.pow(2,reload[1]));
init_code = "void init_TIMER" + timer_periph + "(void)\n{\n";
init_code += "\tT" + timer_periph + "CTL1 &amp;= ~0x80;\t//disable Timer\n";
init_code += "\tT" + timer_periph + "CTL1 |= 0x01;\t\t//continuous mode\n";
init_code += "\tT" + timer_periph + "CTL1 |= ("+ reload[1] + ")&lt;&lt;3;\t//prescaler\n";
init_code += "\tT" + timer_periph + "H = 0x00;\t\t//initial value is 1\n";
init_code += "\tT" + timer_periph + "L = 0x01;\n";
init_code += "\t//expected interrupt rate = " + rate_actual.toFixed(5) + "Hz\n";
init_code += "\tT" + timer_periph + "RH = " + Math.floor(reload[0]/256)+ ";\t\t//reload value\n";
init_code += "\tT" + timer_periph + "RL = " + (reload[0]%256)+ ";\n";
init_code += "\tSET_VECTOR(TIMER"+timer_periph+", TIMER"+timer_periph+"_ISR);// interrupt vector\n";
if(timer_periph=="3")
{
   init_code += "\tIRQ2ENH |= 0x80;\t//enable timer interrupt\n";
   init_code += "\t//IRQ2ENL |= 0x80;\t//(enable this to make it high priority interrupt)\n";
}else{
   init_code += "\tIRQ0ENH |= 0x"+Math.pow(2,Number(timer_periph)+1)+"0;\t//enable timer interrupt\n";
   init_code += "\t//IRQ0ENL |= 0x"+Math.pow(2,Number(timer_periph)+1)+"0;\t//(enable this to make it high priority interrupt)\n";
}
init_code += "\tT" + timer_periph + "CTL1 |= 0x80;\t\t//enable timer\n}\n\n";  
/***** sample main code *****/
main_code = "void main(void)\n"
   + "{\n\tDI();\t\t//disable global interrupt\n"
   + "\tinit_TIMER" + timer_periph + "();\t//initialize timer \n"
   + "\tEI();\t\t//enable global interrupt\n\n"
   + "\twhile(1){\n\t\/* your code here*\/\n\t}\n}\n\n";
/***** generate sample code *****/
form["intCode"].value = "#include &lt;ez8.h&gt;\n\n" + int_code + init_code + main_code;
}
function generate_pwm_code()
{
var init_code="", duty_code="", main_code="";
var form=document.getElementById("pwmForm");
var clock=form["SysFreq2"].value;
var freq=form["PWMFreq"].value;
var duty=form["PWMDuty"].value;
var timer_periph=form["selTimer2"].value;
var reload = calculate_reload_value(clock, freq);
if((reload==false) || isNaN(form["PWMDuty"].value) || (freq&gt;(clock/2)))
{
form["pwmCode"].value = "EoW poH!";
return;
}
/***** initialize code *****/
init_code = "#define T"+timer_periph+"_RELOAD\t(unsigned int)"+reload[0]+"\t// _DEFFREQ / ( Freq * Prescaler )\n";
init_code += "void init_PWM" + timer_periph + "(void)\n{\n";
init_code += "\tT" + timer_periph + "CTL1 &amp;= ~0x80;\t//disable Timer\n";
init_code += "\tT" + timer_periph + "CTL1 |= 0x03;\t\t//pwm mode\n";
init_code += "\tT" + timer_periph + "CTL1 |= ("+ reload[1] + ")&lt;&lt;3;\t//prescaler\n";
init_code += "\tT" + timer_periph + "H = 0x00;\t\t//initial value is 1\n";
init_code += "\tT" + timer_periph + "L = 0x01;\n";    
init_code += "\tT" + timer_periph + "RH = (T" + timer_periph + "_RELOAD &amp; 0xFF00)&gt;&gt; 8;\t//reload value\n";
init_code += "\tT" + timer_periph + "RL = (T" + timer_periph + "_RELOAD &amp; 0x00FF);\n";
if(timer_periph=="0") init_code += "\tPAAF |= 0x02;\t\t//pwm output at PA1\n";
else if(timer_periph=="1") init_code += "\tPCAF |= 0x02;\t\t//pwm output at PC1\n";
else if(timer_periph=="2") init_code += "\tPCAF |= 0x80;\t\t//pwm output at PC7\n";
else if(timer_periph=="3") init_code += "\tPDAF |= 0x02;\t\t//pwm output at PD1\n";
init_code += "\tT" + timer_periph + "CTL1 |= 0x80;\t\t//enable timer\n}\n\n";
  
/***** set duty code *****/
duty_code = "void set_PWM" + timer_periph + "_duty(unsigned char duty) // 0 to 100%\n{\n";
duty_code += "\tunsigned int pwm_data;\n";
duty_code += "\tpwm_data = ((unsigned int)duty * T" + timer_periph + "_RELOAD) / 100;\n";
duty_code += "\tpwm_data = T" + timer_periph + "_RELOAD - pwm_data; // if TPOL bit = 0\n";
duty_code += "\tT" + timer_periph + "PWMH = (pwm_data &amp; 0xFF00)&gt;&gt;8;\n";
duty_code += "\tT" + timer_periph + "PWML = (pwm_data &amp; 0x00FF);\n}\n\n";
  
/***** sample main code *****/
main_code = "void main(void)\n"
   + "{\n\tDI();\t\t//disable global interrupt\n"
   + "\tinit_PWM" + timer_periph + "();\t//initialize timer \n"
   + "\tEI();\t\t//enable global interrupt\n\n"
   + "\tset_PWM" + timer_periph + "_duty(" + Math.round(duty) + ");\t// set pwm duty cycle\n\n"
   + "\twhile(1){\n\t\/* your code here*\/\n\t}\n}\n\n";
    
/***** generate sample code *****/
form["pwmCode"].value = "#include &lt;ez8.h&gt;\n\n" + init_code + duty_code + main_code;

}
--&gt;
&lt;/script&gt;

&lt;p&gt;-----------------------------------------------------------------&lt;/p&gt;

&lt;form id="intForm" name="intForm"&gt;
&lt;h3 style="color:#0000AF"&gt;Timer Interrupt Code Generator&lt;/h3&gt;
&lt;table border="0" summary=""&gt;
&lt;tr&gt;
&lt;td&gt;&lt;b&gt;System Clock Frequency:&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;&lt;input type="text" id="SysFreq1" name="SysFreq1" value="18432000" size="8" onkeyup="limit_input(this, 20000000)"/&gt;&lt;/td&gt;
&lt;td&gt;&lt;b&gt;Hz&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;b&gt;Select Timer Peripheral:&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;&lt;select size="1" name="selTimer1"&gt;&lt;option value="0"&gt;TIMER0&lt;/option&gt;&lt;option value="1"&gt;TIMER1&lt;/option&gt;&lt;option value="2"&gt;TIMER2&lt;/option&gt;&lt;option value="3"&gt;TIMER3&lt;/option&gt;&lt;/select&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;b&gt;Desired Interrupt Rate:&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;&lt;input type="text" id="IntRate" name="IntRate" value="100" size="8" onkeyup="limit_input(this, 1000000)"/&gt;&lt;/td&gt;
&lt;td&gt;&lt;b&gt;Hz&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;input type="button" id="btnGen1" name="btnGen1" value="Generate Sample Code" onclick="generate_interrupt_code()"/&gt;&lt;br&gt;
&lt;textarea id="intCode" name="intCode" rows="15" cols="50" readonly=true wrap='off' style="font-family:courier; font-size:8pt; color:#00007F; background-color:#9FCF70;"&gt;
&lt;/textarea&gt;
&lt;/form&gt;

&lt;br&gt;
&lt;p&gt;-----------------------------------------------------------------&lt;/p&gt;

&lt;form id="pwmForm" name="pwmForm"&gt;
&lt;h3 style="color:#0000AF"&gt;PWM Code Generator&lt;/h3&gt;
&lt;table border="0" summary=""&gt;
&lt;tr&gt;
&lt;td&gt;&lt;b&gt;System Clock Frequency:&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;&lt;input type="text" id="SysFreq2" name="SysFreq2" value="20000000" size="8" onkeyup="limit_input(this, 20000000)"/&gt;&lt;/td&gt;
&lt;td&gt;&lt;b&gt;Hz&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;b&gt;Select Timer Peripheral:&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;&lt;select size="1" name="selTimer2"&gt;&lt;option value="0"&gt;TIMER0&lt;/option&gt;&lt;option value="1"&gt;TIMER1&lt;/option&gt;&lt;option value="2"&gt;TIMER2&lt;/option&gt;&lt;option value="3"&gt;TIMER3&lt;/option&gt;&lt;/select&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;b&gt;Desired PWM Frequency:&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;&lt;input type="text" id="PWMFreq" name="PWMFreq" value="1000" size="8" onkeyup="limit_input(this, 1000000)"/&gt;&lt;/td&gt;
&lt;td&gt;&lt;b&gt;Hz&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;b&gt;Initial PWM Duty Cycle:&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;&lt;input type="text" id="PWMDuty" name="PWMDuty" value="50" size="8" onkeyup="limit_input(this, 100)"/&gt;&lt;/td&gt;
&lt;td&gt;&lt;b&gt;%&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;input type="button" id="btnGen2" name="btnGen2" value="Generate Sample Code" onclick="generate_pwm_code()"/&gt;&lt;br&gt;
&lt;textarea id="pwmCode" name="pwmCode" rows="15" cols="50" readonly=true wrap='off' style="font-family:courier; font-size:8pt; color:#00007F; background-color:#9FCF70;"&gt;
&lt;/textarea&gt;
&lt;/form&gt;

&lt;p&gt;-----------------------------------------------------------------&lt;/p&gt;
&lt;i&gt;note: I'm a newcomer to javascript. Please notify me of found "bugs" in these code makers.&lt;/i&gt;
&lt;p&gt;-----------------------------------------------------------------&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3967613250975275925-2508967247442846693?l=projectproto.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/hOmyFr-idmPwhCjXulAu9A0R85g/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/hOmyFr-idmPwhCjXulAu9A0R85g/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/hOmyFr-idmPwhCjXulAu9A0R85g/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/hOmyFr-idmPwhCjXulAu9A0R85g/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Projectproto/~4/bDc8QFwdBxs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://projectproto.blogspot.com/feeds/2508967247442846693/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://projectproto.blogspot.com/2010/07/zilog-z8f64xx-timer-calculator.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/2508967247442846693?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/2508967247442846693?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Projectproto/~3/bDc8QFwdBxs/zilog-z8f64xx-timer-calculator.html" title="ZiLOG Z8F64xx Timer Calculator" /><author><name>'yus</name><uri>http://www.blogger.com/profile/09469609276942488473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="29" src="http://2.bp.blogspot.com/_meF1KpGU79k/Sq5sE50miPI/AAAAAAAAAAY/V2noVm7vCM8/S220/minibot.JPG" /></author><thr:total>2</thr:total><feedburner:origLink>http://projectproto.blogspot.com/2010/07/zilog-z8f64xx-timer-calculator.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0YDQn06fCp7ImA9WxFUFk0.&quot;"><id>tag:blogger.com,1999:blog-3967613250975275925.post-7201616085746251162</id><published>2010-06-27T10:19:00.000+08:00</published><updated>2010-06-27T10:19:33.314+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-06-27T10:19:33.314+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ZiLOG Z8F mcu" /><category scheme="http://www.blogger.com/atom/ns#" term="mobot" /><category scheme="http://www.blogger.com/atom/ns#" term="wireless" /><title>Bluetooth Controlled Mobot</title><content type="html">Bluetooth Controlled Mobot using Z8F0823 and LMX9838.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_meF1KpGU79k/TCYcNIQTy3I/AAAAAAAAAUs/ZkbXNJwymXs/s1600/IMG_1912.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="300" src="http://4.bp.blogspot.com/_meF1KpGU79k/TCYcNIQTy3I/AAAAAAAAAUs/ZkbXNJwymXs/s400/IMG_1912.JPG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;It's supposed to be my entry for a friendly competitions of "sumobots". But, I wasn't able to make it "autonomous" on time for the event. It only have four sensors on each corner to detect "black" lines, but no sensor for detecting an opponent. And so that I can still test the hardware, I just made it &lt;b&gt;manually&lt;/b&gt; controllable by using my phone's bluetooth. The bluetooth module is the same circuit I used in my &lt;a href="http://projectproto.blogspot.com/2009/09/bluetooth-controlled-mini-mobot.html"&gt;BT minibot&lt;/a&gt; . I also used the same python S60 script for my N6120c (Symbian phone) controller.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_meF1KpGU79k/TCYc7GUEvvI/AAAAAAAAAU8/EneDPSb1x8w/s1600/IMG_1915.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="150" src="http://1.bp.blogspot.com/_meF1KpGU79k/TCYc7GUEvvI/AAAAAAAAAU8/EneDPSb1x8w/s200/IMG_1915.JPG" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://1.bp.blogspot.com/_meF1KpGU79k/TCYcujgGnnI/AAAAAAAAAU0/X8Id8gZDMlg/s1600/IMG_1919.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="150" src="http://1.bp.blogspot.com/_meF1KpGU79k/TCYcujgGnnI/AAAAAAAAAU0/X8Id8gZDMlg/s200/IMG_1919.JPG" width="200" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
forum link: &lt;a href="http://www.electronicslab.ph/forum/index.php/topic,16789.msg316030.html#msg316030"&gt;Filipino  Version of Robot Wars&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3967613250975275925-7201616085746251162?l=projectproto.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/oAwdjpGwROXRMncJfby--6u-zj8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/oAwdjpGwROXRMncJfby--6u-zj8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/oAwdjpGwROXRMncJfby--6u-zj8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/oAwdjpGwROXRMncJfby--6u-zj8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Projectproto/~4/COibkBLmOwQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://projectproto.blogspot.com/feeds/7201616085746251162/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://projectproto.blogspot.com/2010/06/bluetooth-controlled-mobot.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/7201616085746251162?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/7201616085746251162?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Projectproto/~3/COibkBLmOwQ/bluetooth-controlled-mobot.html" title="Bluetooth Controlled Mobot" /><author><name>'yus</name><uri>http://www.blogger.com/profile/09469609276942488473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="29" src="http://2.bp.blogspot.com/_meF1KpGU79k/Sq5sE50miPI/AAAAAAAAAAY/V2noVm7vCM8/S220/minibot.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_meF1KpGU79k/TCYcNIQTy3I/AAAAAAAAAUs/ZkbXNJwymXs/s72-c/IMG_1912.JPG" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://projectproto.blogspot.com/2010/06/bluetooth-controlled-mobot.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUECQ308eCp7ImA9WxFWFE0.&quot;"><id>tag:blogger.com,1999:blog-3967613250975275925.post-4971703381358335215</id><published>2010-06-01T23:49:00.001+08:00</published><updated>2010-06-01T23:54:22.370+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-06-01T23:54:22.370+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Audio" /><category scheme="http://www.blogger.com/atom/ns#" term="ARM Cortex-M3 / STM32" /><category scheme="http://www.blogger.com/atom/ns#" term="LCDs" /><title>Mini-STM32 WAVE Audio Player</title><content type="html">Mini-STM32 SD/MMC WAV (RIFF-WAVE-LPCM format) Audio Player with Spectrum Display&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_meF1KpGU79k/TAUmWm4ElfI/AAAAAAAAAUU/Hfz8EZ2aLnA/s1600/sample.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://2.bp.blogspot.com/_meF1KpGU79k/TAUmWm4ElfI/AAAAAAAAAUU/Hfz8EZ2aLnA/s320/sample.jpg" alt="" id="BLOGGER_PHOTO_ID_5477826691600782834" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://elm-chan.org/works/sd8p/report.html"&gt;Simple SD Audio Player with an 8-pin IC&lt;/a&gt; by &lt;a href="http://elm-chan.org/"&gt;ChaN&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.embeddedsignals.com/ARM.htm"&gt;DSP (&lt;span style="font-weight: bold;"&gt;FFT&lt;/span&gt;) libraries for Cortex M3&lt;/a&gt; by Ivan Mellen&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.coocox.org/CoOS.htm"&gt;CooCox &lt;span style="font-weight: bold;"&gt;CoOS&lt;/span&gt;&lt;/a&gt; real-time multi-task OS&lt;br /&gt;&lt;br /&gt;minimal hardware modification:&lt;table border="0" width="150"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_meF1KpGU79k/TAUrqCA7P6I/AAAAAAAAAUc/UAb5Cq3wj1Y/s1600/audio+out.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 200px; height: 98px;" src="http://3.bp.blogspot.com/_meF1KpGU79k/TAUrqCA7P6I/AAAAAAAAAUc/UAb5Cq3wj1Y/s200/audio+out.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5477832522861330338" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_meF1KpGU79k/TAUr0iaD2zI/AAAAAAAAAUk/K_NEpUHklOU/s1600/filter.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 200px; height: 150px;" src="http://1.bp.blogspot.com/_meF1KpGU79k/TAUr0iaD2zI/AAAAAAAAAUk/K_NEpUHklOU/s200/filter.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5477832703355378482" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;demo video:&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/sNo6axRcdeQ&amp;hl=en&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/sNo6axRcdeQ&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;Project files: &lt;a href="http://www.4shared.com/file/sEiVfU5C/Mini-STM32_WAVE_Audio_Player.html"&gt;&lt;span style="font-weight: bold;"&gt;Mini-STM32 WAVE Audio Player.rar&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;forum link: &lt;a href="http://www.electronicslab.ph/forum/index.php/topic,15370.msg304102.html#msg304102"&gt;Mini-STM32 board&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3967613250975275925-4971703381358335215?l=projectproto.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/BAjdoOoS8MwKvc6tD9ZxWyry6Mo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/BAjdoOoS8MwKvc6tD9ZxWyry6Mo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/BAjdoOoS8MwKvc6tD9ZxWyry6Mo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/BAjdoOoS8MwKvc6tD9ZxWyry6Mo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Projectproto/~4/HRNyycuyAxc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://projectproto.blogspot.com/feeds/4971703381358335215/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://projectproto.blogspot.com/2010/06/mini-stm32-wave-audio-player.html#comment-form" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/4971703381358335215?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/4971703381358335215?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Projectproto/~3/HRNyycuyAxc/mini-stm32-wave-audio-player.html" title="Mini-STM32 WAVE Audio Player" /><author><name>'yus</name><uri>http://www.blogger.com/profile/09469609276942488473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="29" src="http://2.bp.blogspot.com/_meF1KpGU79k/Sq5sE50miPI/AAAAAAAAAAY/V2noVm7vCM8/S220/minibot.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_meF1KpGU79k/TAUmWm4ElfI/AAAAAAAAAUU/Hfz8EZ2aLnA/s72-c/sample.jpg" height="72" width="72" /><thr:total>5</thr:total><feedburner:origLink>http://projectproto.blogspot.com/2010/06/mini-stm32-wave-audio-player.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D08CSHs5fSp7ImA9WxFWEUQ.&quot;"><id>tag:blogger.com,1999:blog-3967613250975275925.post-7097535530022377235</id><published>2010-05-22T08:52:00.008+08:00</published><updated>2010-05-30T13:04:29.525+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-05-30T13:04:29.525+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Microchip PIC mcu" /><category scheme="http://www.blogger.com/atom/ns#" term="Audio" /><category scheme="http://www.blogger.com/atom/ns#" term="LCDs" /><category scheme="http://www.blogger.com/atom/ns#" term="memory cards" /><title>PIC18F SD WAV Audio Player</title><content type="html">As inspired by &lt;a href="http://elm-chan.org/works/sd8p/report.html"&gt;Simple SD Audio Player by ChaN&lt;/a&gt;, this project uses Microchip's PIC18F2550 to read &lt;a href="https://ccrma.stanford.edu/courses/422/projects/WaveFormat/"&gt;RIFF WAVE files&lt;/a&gt;, and display some file information on the N6610 LCD; And then it will play the audio itself through PIC's PWM with a simple RC filter  on the output pin. The hardware actually comes from my &lt;a href="http://projectproto.blogspot.com/2010/05/pic-sd-bmp-reader-ii.html"&gt;previous project&lt;/a&gt;, and I just attached a ready-made audio amp (w/ speaker) for the demo.&lt;br /&gt;Schematic:&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_meF1KpGU79k/S_csFZP7s6I/AAAAAAAAAUM/0mM7eLn7uWg/s1600/PIC18F2550+WAV+Player.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 230px;" src="http://2.bp.blogspot.com/_meF1KpGU79k/S_csFZP7s6I/AAAAAAAAAUM/0mM7eLn7uWg/s320/PIC18F2550+WAV+Player.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5473892343280808866" /&gt;&lt;/a&gt;&lt;br /&gt;Due to PIC's peripheral limitations, I only set the PWM frequency to 187.5kHz and not the 250kHz carrier frequency originally used by &lt;a href="http://elm-chan.org/"&gt;ChaN&lt;/a&gt;, because it's the maximum PWM frequency than can still get an 8-bit resolution of the duty cycles (=48MHz/256). It is also possible to use &lt;a href="http://en.wikipedia.org/wiki/Resistor_ladder"&gt;R-2R ladder&lt;/a&gt; in stead of (low-pass) filtering the PWM output since there still enough unused digital output pins for this approach.&lt;br /&gt;On the software part, I wasn't able to make a good data buffering as good as what ChaN did. It's noticeable with WAVE files with higher bit-rates (=SampleRate*NumChannels*BitsPerSample). Nevertheless, it can still support up to 48kHz sampling rate, but with only Mono channel and 8-bits/sample resolution.&lt;br /&gt;&lt;br /&gt;demo video:&lt;br /&gt;&lt;object width="480" height="385"&gt;&lt;param name="movie" value="http://www.youtube.com/v/mRzOwF4bx7c&amp;hl=en_US&amp;fs=1&amp;"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/mRzOwF4bx7c&amp;hl=en_US&amp;fs=1&amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;Source code(PICC-18) with and without LCD: &lt;a href="http://www.4shared.com/file/3xcVM6rL/PIC18_SD_WAV_Audio_Player.html"&gt;&lt;span style="font-weight:bold;"&gt;PIC18 SD WAV Audio Player&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;My on-going project: currently porting the code to &lt;a href="http://www.electronicslab.ph/forum/index.php/topic,15370.msg305955.html#msg305955"&gt;STM32F103RB for additional features&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Some useful software (shareware) tools:&lt;br /&gt;&lt;a href="http://www.nextup.com/"&gt;TextAloud&lt;/a&gt; - Text to Speech software&lt;br /&gt;&lt;a href="http://www.nch.com.au/switch/"&gt;Switch Sound File Converter&lt;/a&gt;-multi format audio file converters&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3967613250975275925-7097535530022377235?l=projectproto.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/V9g8LbNmPs-dJNgaa3jdMZYLCYA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/V9g8LbNmPs-dJNgaa3jdMZYLCYA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/V9g8LbNmPs-dJNgaa3jdMZYLCYA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/V9g8LbNmPs-dJNgaa3jdMZYLCYA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Projectproto/~4/s9JsPkS_lr0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://projectproto.blogspot.com/feeds/7097535530022377235/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://projectproto.blogspot.com/2010/05/pic18f-sd-wav-audio-player.html#comment-form" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/7097535530022377235?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/7097535530022377235?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Projectproto/~3/s9JsPkS_lr0/pic18f-sd-wav-audio-player.html" title="PIC18F SD WAV Audio Player" /><author><name>'yus</name><uri>http://www.blogger.com/profile/09469609276942488473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="29" src="http://2.bp.blogspot.com/_meF1KpGU79k/Sq5sE50miPI/AAAAAAAAAAY/V2noVm7vCM8/S220/minibot.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_meF1KpGU79k/S_csFZP7s6I/AAAAAAAAAUM/0mM7eLn7uWg/s72-c/PIC18F2550+WAV+Player.jpg" height="72" width="72" /><thr:total>5</thr:total><feedburner:origLink>http://projectproto.blogspot.com/2010/05/pic18f-sd-wav-audio-player.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D08DRHozeip7ImA9WxFWEUQ.&quot;"><id>tag:blogger.com,1999:blog-3967613250975275925.post-2313054018198175193</id><published>2010-05-11T22:42:00.010+08:00</published><updated>2010-05-30T13:04:35.482+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-05-30T13:04:35.482+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Microchip PIC mcu" /><category scheme="http://www.blogger.com/atom/ns#" term="LCDs" /><category scheme="http://www.blogger.com/atom/ns#" term="memory cards" /><title>PIC SD BMP Reader II</title><content type="html">It is similar to my first &lt;a href="http://projectproto.blogspot.com/2010/05/pic18-sd-bmp-reader.html"&gt;PIC SD BMP Reader&lt;/a&gt; , and almost the same circuit except for the LCD. This time I now use a &lt;a href="http://projectproto.blogspot.com/2010/01/nokia-lcd-interfacing.html"&gt;Nokia 6610 LCD&lt;/a&gt;. The LCD is capable of displaying 4096 colors, but for code simplicity I just operate it at 8-bit (256 colors) resolution.&lt;br /&gt;&lt;br /&gt;Diagram:&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_meF1KpGU79k/S-lv7JlXx3I/AAAAAAAAAUE/BbBsZlHEzrA/s1600/diagram.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 230px;" src="http://3.bp.blogspot.com/_meF1KpGU79k/S-lv7JlXx3I/AAAAAAAAAUE/BbBsZlHEzrA/s320/diagram.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5470026284393809778" /&gt;&lt;/a&gt;&lt;br /&gt;This project is capable of reading bitmap file using common format (24-bit per pixel), with size (width and height) equal to or less than 132 pixels at both side.&lt;br /&gt;&lt;br /&gt;demo video:&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/lrGJ3ZsSoy0&amp;hl=en&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/lrGJ3ZsSoy0&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Source code + diagram: &lt;a href="http://www.4shared.com/file/Tn0V5glQ/PIC18_SD_BMP_Reader_2.html"&gt;&lt;span style="font-weight:bold;"&gt;PIC18 SD BMP Reader 2.rar&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;similar project at Hack-a-day: &lt;a href="http://hackaday.com/2009/01/08/how-to-digital-picture-frame-100-diy/"&gt;&lt;span style="font-weight:bold;"&gt;How-to: Digital picture frame, 100% DIY&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;-it uses PIC24FJ64 in stead of pic18f2550&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3967613250975275925-2313054018198175193?l=projectproto.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/uyA0EqekTrA2vbmTnBLjXjPBtMc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/uyA0EqekTrA2vbmTnBLjXjPBtMc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/uyA0EqekTrA2vbmTnBLjXjPBtMc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/uyA0EqekTrA2vbmTnBLjXjPBtMc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Projectproto/~4/wPWBN0Kq20M" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://projectproto.blogspot.com/feeds/2313054018198175193/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://projectproto.blogspot.com/2010/05/pic-sd-bmp-reader-ii.html#comment-form" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/2313054018198175193?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/2313054018198175193?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Projectproto/~3/wPWBN0Kq20M/pic-sd-bmp-reader-ii.html" title="PIC SD BMP Reader II" /><author><name>'yus</name><uri>http://www.blogger.com/profile/09469609276942488473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="29" src="http://2.bp.blogspot.com/_meF1KpGU79k/Sq5sE50miPI/AAAAAAAAAAY/V2noVm7vCM8/S220/minibot.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_meF1KpGU79k/S-lv7JlXx3I/AAAAAAAAAUE/BbBsZlHEzrA/s72-c/diagram.jpg" height="72" width="72" /><thr:total>4</thr:total><feedburner:origLink>http://projectproto.blogspot.com/2010/05/pic-sd-bmp-reader-ii.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D08MQX8yeip7ImA9WxFWEUQ.&quot;"><id>tag:blogger.com,1999:blog-3967613250975275925.post-6878845384282218367</id><published>2010-05-08T23:42:00.009+08:00</published><updated>2010-05-30T13:04:40.192+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-05-30T13:04:40.192+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Microchip PIC mcu" /><category scheme="http://www.blogger.com/atom/ns#" term="LCDs" /><category scheme="http://www.blogger.com/atom/ns#" term="memory cards" /><title>PIC18 SD BMP Reader</title><content type="html">This project uses Microchip's PIC18F2550 and &lt;a href="http://projectproto.blogspot.com/2010/01/nokia-lcd-interfacing.html"&gt;Nokia 3310 LCD&lt;/a&gt; to read and display images from BMP files on the SD/MMC cards. Although the display itself is monochrome, it still supports 24-bpp (bits per pixel), 8-bpp, 4-bpp, and 1-bpp (monochrome) Bitmap files (*.BMP) with size of 84x48 pixels. It uses the &lt;a href="http://elm-chan.org/fsw/ff/00index_p.html"&gt;Petit FAT File System Module&lt;/a&gt; by &lt;a href="http://elm-chan.org/"&gt;ChaN&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Diagram and simulation:&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_meF1KpGU79k/S-V3wCfdTBI/AAAAAAAAATk/_VYj6WPLZo0/s1600/diagram.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 229px;" src="http://1.bp.blogspot.com/_meF1KpGU79k/S-V3wCfdTBI/AAAAAAAAATk/_VYj6WPLZo0/s320/diagram.jpg" alt="" id="BLOGGER_PHOTO_ID_5468908989697575954" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Actual circuit:&lt;table border="0" width="150"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_meF1KpGU79k/S-WEMdIQ7LI/AAAAAAAAATs/5pfINRxdPYs/s1600/front.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 200px; height: 150px;" src="http://1.bp.blogspot.com/_meF1KpGU79k/S-WEMdIQ7LI/AAAAAAAAATs/5pfINRxdPYs/s200/front.jpg" alt="" id="BLOGGER_PHOTO_ID_5468922672023923890" border="0" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_meF1KpGU79k/S-WEaClqbCI/AAAAAAAAAT0/q88zi2yRueU/s1600/rear.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 200px; height: 150px;" src="http://2.bp.blogspot.com/_meF1KpGU79k/S-WEaClqbCI/AAAAAAAAAT0/q88zi2yRueU/s200/rear.jpg" alt="" id="BLOGGER_PHOTO_ID_5468922905417640994" border="0" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_meF1KpGU79k/S-WEn6zZvMI/AAAAAAAAAT8/LfjGFFNpxm4/s1600/closeup.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://4.bp.blogspot.com/_meF1KpGU79k/S-WEn6zZvMI/AAAAAAAAAT8/LfjGFFNpxm4/s320/closeup.jpg" alt="" id="BLOGGER_PHOTO_ID_5468923143845952706" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Demo video:&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/sovl6MoydeA&amp;hl=en&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/sovl6MoydeA&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;forum link: &lt;a href="http://www.electronicslab.ph/forum/index.php/topic,17055"&gt;Petit FAT File System (w/ Proteus ISIS simulation)&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Source code(PICC18) + simulation(ISIS) + others: &lt;a href="http://www.4shared.com/file/afAR7f8A/PIC18_SD_BMP_Reader.html"&gt;&lt;span style="font-weight:bold;"&gt;PIC18 SD BMP Reader.rar&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;references for BMP file format:&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/BMP_file_format"&gt;Wiki BMP file format&lt;/a&gt;&lt;br /&gt;&lt;a href="http://atlc.sourceforge.net/bmp.html"&gt;atlc.sourceforge bmp format&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms536393%28VS.85%29.aspx"&gt;MSDN Types of Bitmaps&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3967613250975275925-6878845384282218367?l=projectproto.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/h_PLid0nkAzzz6qW3ISxYL17BHM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/h_PLid0nkAzzz6qW3ISxYL17BHM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/h_PLid0nkAzzz6qW3ISxYL17BHM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/h_PLid0nkAzzz6qW3ISxYL17BHM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Projectproto/~4/pkN9rSS8sGg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://projectproto.blogspot.com/feeds/6878845384282218367/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://projectproto.blogspot.com/2010/05/pic18-sd-bmp-reader.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/6878845384282218367?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/6878845384282218367?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Projectproto/~3/pkN9rSS8sGg/pic18-sd-bmp-reader.html" title="PIC18 SD BMP Reader" /><author><name>'yus</name><uri>http://www.blogger.com/profile/09469609276942488473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="29" src="http://2.bp.blogspot.com/_meF1KpGU79k/Sq5sE50miPI/AAAAAAAAAAY/V2noVm7vCM8/S220/minibot.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_meF1KpGU79k/S-V3wCfdTBI/AAAAAAAAATk/_VYj6WPLZo0/s72-c/diagram.jpg" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://projectproto.blogspot.com/2010/05/pic18-sd-bmp-reader.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0ACQnw8cCp7ImA9WxFWEUQ.&quot;"><id>tag:blogger.com,1999:blog-3967613250975275925.post-6384179397567167384</id><published>2010-04-24T18:07:00.007+08:00</published><updated>2010-05-30T13:02:43.278+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-05-30T13:02:43.278+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ARM Cortex-M3 / STM32" /><category scheme="http://www.blogger.com/atom/ns#" term="LCDs" /><category scheme="http://www.blogger.com/atom/ns#" term="memory cards" /><title>Mini-STM32 Digital Picture Frame</title><content type="html">The original source code for this project is copied from &lt;a href="http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects/index_cortex.html#stm32_dpf"&gt;Martin Thomas' Simple STM32 Digital Picture Frame&lt;/a&gt; &lt;blockquote&gt;The application reads picture-files in standard Windows BMP-format from a SD-Card and shows them on a 2.8" color-LCD-module (320*240 px).&lt;/blockquote&gt; The application also uses the &lt;a href="http://elm-chan.org/fsw/ff/00index_e.html"&gt;FAT File System Module&lt;/a&gt; by &lt;a href="http://elm-chan.org/"&gt;Chan&lt;/a&gt;, on which M. Thomas ported to work on STM32 SPI interface. &lt;span style="font-style:italic;"&gt;Additional information about this project can be found on the link above.&lt;/span&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_meF1KpGU79k/S9KmoKqWiGI/AAAAAAAAATU/Coo4ACC7Qmw/s1600/IMG_1805.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://3.bp.blogspot.com/_meF1KpGU79k/S9KmoKqWiGI/AAAAAAAAATU/Coo4ACC7Qmw/s320/IMG_1805.JPG" alt="" id="BLOGGER_PHOTO_ID_5463612506940803170" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_meF1KpGU79k/S9Km6FIv9lI/AAAAAAAAATc/Opq65-ZNVgE/s1600/IMG_1815.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://4.bp.blogspot.com/_meF1KpGU79k/S9Km6FIv9lI/AAAAAAAAATc/Opq65-ZNVgE/s320/IMG_1815.JPG" alt="" id="BLOGGER_PHOTO_ID_5463612814695331410" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Some of the minor modifications I made were:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;I've modified the LCD driver so that it will work on my unit. My unit got the ILI9320 LCD controller.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;I didn't utilize the USART interface (but this can be easily enabled in the code). In stead of sending the "information" through this interface , some of them are being displayed on the LCD itself (e.g. bitmap filenames).&lt;br /&gt;&lt;/li&gt;&lt;li&gt;I've enabled the two push-buttons on the board. The first one toggles between "Play" and "Pause"; and the other one is to "Restart" the "slide-show" from the beginning.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;demo video:&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/Xk-h1CDADSc&amp;hl=en&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/Xk-h1CDADSc&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;Modified Source Code (Keil RVMDK + uVision 4): &lt;a href="http://www.4shared.com/file/kevwi3bU/Digital_Picture_Frame.html"&gt;&lt;span style="font-weight: bold;"&gt;Digital Picture Frame.rar&lt;/span&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3967613250975275925-6384179397567167384?l=projectproto.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/CdrsFg21syzEnG01COPk1oyTrNE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/CdrsFg21syzEnG01COPk1oyTrNE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/CdrsFg21syzEnG01COPk1oyTrNE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/CdrsFg21syzEnG01COPk1oyTrNE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Projectproto/~4/Nmswiw9Z7HE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://projectproto.blogspot.com/feeds/6384179397567167384/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://projectproto.blogspot.com/2010/04/mini-stm32-digital-picture-frame.html#comment-form" title="14 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/6384179397567167384?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/6384179397567167384?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Projectproto/~3/Nmswiw9Z7HE/mini-stm32-digital-picture-frame.html" title="Mini-STM32 Digital Picture Frame" /><author><name>'yus</name><uri>http://www.blogger.com/profile/09469609276942488473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="29" src="http://2.bp.blogspot.com/_meF1KpGU79k/Sq5sE50miPI/AAAAAAAAAAY/V2noVm7vCM8/S220/minibot.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_meF1KpGU79k/S9KmoKqWiGI/AAAAAAAAATU/Coo4ACC7Qmw/s72-c/IMG_1805.JPG" height="72" width="72" /><thr:total>14</thr:total><feedburner:origLink>http://projectproto.blogspot.com/2010/04/mini-stm32-digital-picture-frame.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0ADQX09eyp7ImA9WxFWEUQ.&quot;"><id>tag:blogger.com,1999:blog-3967613250975275925.post-3091670132281037400</id><published>2010-04-16T21:40:00.011+08:00</published><updated>2010-05-30T13:02:50.363+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-05-30T13:02:50.363+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ARM Cortex-M3 / STM32" /><title>FreeRTOS on Mini-STM32</title><content type="html">&lt;a href="http://www.freertos.org/"&gt;FreeRTOS&lt;/a&gt; Demo on Mini-STM32 kit (STM32F103RBT6 with 2.8" TFT LCD).&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_meF1KpGU79k/S8kdnjN_PAI/AAAAAAAAAS8/qtUDgooSdG0/s1600/FreeRTOS+LCD+message.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://1.bp.blogspot.com/_meF1KpGU79k/S8kdnjN_PAI/AAAAAAAAAS8/qtUDgooSdG0/s320/FreeRTOS+LCD+message.JPG" alt="" id="BLOGGER_PHOTO_ID_5460928588469451778" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;My &lt;a href="http://www.electronicslab.ph/forum/index.php/topic,15370.msg290751.html#msg290751"&gt;initial attempt&lt;/a&gt; of porting the FreeRTOS Demo was considerably a success. But later on, I found out that the version used of STM32 standard peripheral library was already obsolete. And so I didn't anymore continue with that. In stead, I opt to use the latest &lt;a href="http://www.st.com/mcu/modules.php?name=mcu&amp;amp;file=devicedocs&amp;amp;DEV=STM32F103RB#Firmware"&gt;Firmware&lt;/a&gt; version which is v3.2.0 (Mar-2010), and combine it with the latest &lt;a href="http://sourceforge.net/projects/freertos/files/FreeRTOS/"&gt;FreeRTOS source code&lt;/a&gt; - v6.0.4.&lt;br /&gt;&lt;br /&gt;It wasn't easy for me to start the &lt;a href="http://www.keil.com/arm/"&gt;Keil uVision&lt;/a&gt; project from scratch (almost). On the brighter side, I already got familiarized with STM32 code libraries because of this activity. It's mostly trial-and-error approach. But luckily I stepped into this guide of porting the FreeRTOS source: &lt;a href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dai0210A/index.html"&gt;Running FreeRTOS on the Keil MCBSTM32 Board with the RVMDK Evaluation Tools&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;table border="0" width="150"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_meF1KpGU79k/S8keVVgCHjI/AAAAAAAAATE/nDHlqV3igKY/s1600/timertest.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 200px; height: 150px;" src="http://3.bp.blogspot.com/_meF1KpGU79k/S8keVVgCHjI/AAAAAAAAATE/nDHlqV3igKY/s200/timertest.JPG" alt="" id="BLOGGER_PHOTO_ID_5460929375061024306" border="0" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_meF1KpGU79k/S8kepxw1SQI/AAAAAAAAATM/e61qFDdncgk/s1600/comtest.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 200px; height: 150px;" src="http://4.bp.blogspot.com/_meF1KpGU79k/S8kepxw1SQI/AAAAAAAAATM/e61qFDdncgk/s200/comtest.JPG" alt="" id="BLOGGER_PHOTO_ID_5460929726245062914" border="0" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;Here's the result. After few seconds of displaying the "Powered by FreeRTOS" message, the demo will now display the status of all tasks. If there's no error occurred, it will show "PASS" and the 'jitter' in the processing of timer interrupt (timertest.c). For the USART test (comtest.c), there's a "loopback" test of transmitted and received characters. Simply short the pins 2 and 3 (RX and TX) of CON1 in the Mini-STM32 board. Otherwise, it will show "ERROR IN COM TEST" message.&lt;br /&gt;&lt;br /&gt;Source Code (Keil RVMDK + uVision 4): &lt;a href="http://www.4shared.com/file/BaB8XNG4/FreeRTOS_on_MINI-STM32.html"&gt;&lt;span style="font-weight: bold;"&gt;FreeRTOS on MINI-STM32.rar&lt;/span&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3967613250975275925-3091670132281037400?l=projectproto.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/tJ8h2M6Y5yxkeWYmBU-Fn7iTXTM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/tJ8h2M6Y5yxkeWYmBU-Fn7iTXTM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/tJ8h2M6Y5yxkeWYmBU-Fn7iTXTM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/tJ8h2M6Y5yxkeWYmBU-Fn7iTXTM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Projectproto/~4/EzkI8RhzUyo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://projectproto.blogspot.com/feeds/3091670132281037400/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://projectproto.blogspot.com/2010/04/freertos-on-mini-stm32.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/3091670132281037400?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/3091670132281037400?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Projectproto/~3/EzkI8RhzUyo/freertos-on-mini-stm32.html" title="FreeRTOS on Mini-STM32" /><author><name>'yus</name><uri>http://www.blogger.com/profile/09469609276942488473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="29" src="http://2.bp.blogspot.com/_meF1KpGU79k/Sq5sE50miPI/AAAAAAAAAAY/V2noVm7vCM8/S220/minibot.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_meF1KpGU79k/S8kdnjN_PAI/AAAAAAAAAS8/qtUDgooSdG0/s72-c/FreeRTOS+LCD+message.JPG" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://projectproto.blogspot.com/2010/04/freertos-on-mini-stm32.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0ABR348cCp7ImA9WxFWEUQ.&quot;"><id>tag:blogger.com,1999:blog-3967613250975275925.post-5291010061939187417</id><published>2010-04-09T15:34:00.005+08:00</published><updated>2010-05-30T13:02:36.078+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-05-30T13:02:36.078+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ARM Cortex-M3 / STM32" /><category scheme="http://www.blogger.com/atom/ns#" term="LCDs" /><category scheme="http://www.blogger.com/atom/ns#" term="Serial" /><title>Mini-Term</title><content type="html">I've recently bought a &lt;a href="http://www.poweravr.com/?action-viewnews-itemid-5"&gt;Mini-STM32&lt;/a&gt; kit for the purpose of learning &lt;a href="http://en.wikipedia.org/wiki/ARM_architecture"&gt;ARM&lt;/a&gt;-based MCUs. These development kits were from China and then locally distributed by &lt;span id="msg_272003"&gt;&lt;/span&gt;&lt;a href="http://www.1diycentre.com/"&gt;DIY  Hobbyist Corner&lt;/a&gt; at an affordable price.&lt;br /&gt;After playing with the example codes, including the &lt;a href="http://www.micrium.com/page/products/rtos/gui"&gt;uCOS/uCGUI&lt;/a&gt; demo, I came up with this Mini UART (serial) Terminal application.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_meF1KpGU79k/S77Lt7emYdI/AAAAAAAAASM/8ee84RDboKk/s1600/IMG_1659.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://2.bp.blogspot.com/_meF1KpGU79k/S77Lt7emYdI/AAAAAAAAASM/8ee84RDboKk/s320/IMG_1659.JPG" alt="" id="BLOGGER_PHOTO_ID_5458023788340208082" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;I just utilized the source/library for OS of the uCOS_DEMO since I still don't understand how it works. Luckily I got a copy of uCGUI manual and so I manage to make modifications on the existing sample GUIs (graphical user interface). And later, I'm also able to design my own GUIs.&lt;br /&gt;The USART interface is not difficult to learn since it's almost similar to what other microcontrollers is using. Therefor, it's also easy "porting" the USART code (using standard C language) from my previous MCUs to this STM32 MCU.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_meF1KpGU79k/S77QbXJCzcI/AAAAAAAAASU/gk7Q4ZVD6co/s1600/IMG_1661.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://4.bp.blogspot.com/_meF1KpGU79k/S77QbXJCzcI/AAAAAAAAASU/gk7Q4ZVD6co/s320/IMG_1661.JPG" alt="" id="BLOGGER_PHOTO_ID_5458028966906613186" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The application uses the touch-screen capability of the kit for the keypad interface. However, because of the small LCD area, it's impractical to design the keypad as a full featured "qwerty" keyboard. What I did was just provide alternate characters for most of the existing keys.&lt;br /&gt;&lt;br /&gt;"Caps" key pressed and USART baudrate chage:&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_meF1KpGU79k/S77RxnCy9UI/AAAAAAAAASc/X-JafWIJ0Z4/s1600/IMG_1663.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://1.bp.blogspot.com/_meF1KpGU79k/S77RxnCy9UI/AAAAAAAAASc/X-JafWIJ0Z4/s320/IMG_1663.JPG" alt="" id="BLOGGER_PHOTO_ID_5458030448644126018" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;"QWERTY" key toggled and MainForm minimized(showing desktop background):&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_meF1KpGU79k/S77SabptWvI/AAAAAAAAASk/vjMdGz9Lno0/s1600/IMG_1664.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://3.bp.blogspot.com/_meF1KpGU79k/S77SabptWvI/AAAAAAAAASk/vjMdGz9Lno0/s320/IMG_1664.JPG" alt="" id="BLOGGER_PHOTO_ID_5458031149960747762" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Alternate keys/symbols and movable dialog:&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_meF1KpGU79k/S77TSRAOjmI/AAAAAAAAASs/ZKtaOxhr6k8/s1600/IMG_1665.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://4.bp.blogspot.com/_meF1KpGU79k/S77TSRAOjmI/AAAAAAAAASs/ZKtaOxhr6k8/s320/IMG_1665.JPG" alt="" id="BLOGGER_PHOTO_ID_5458032109175082594" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It's also possible to use a "gender changer" (DB9 female to DB9 Male) on CON1 of the kit to make it resembles as a common PC serial port.&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_meF1KpGU79k/S77T2T9LNXI/AAAAAAAAAS0/m4VFQt2VYgQ/s1600/IMG_1666.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://1.bp.blogspot.com/_meF1KpGU79k/S77T2T9LNXI/AAAAAAAAAS0/m4VFQt2VYgQ/s320/IMG_1666.JPG" alt="" id="BLOGGER_PHOTO_ID_5458032728442877298" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;A problem may also raises because of the possibility that the touch-screen response will vary with different units. So, I added an optional "touch-screen calibrate" at start-up. This option can be found on "miniterm.h" header (the "calibration" code is also copied from one of the demo/example codes).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Source Code&lt;/span&gt; (using Keil RVMDK + uVision) download: &lt;a href="http://www.4shared.com/file/mKZWh5do/mini-Term.html"&gt;&lt;span style="font-weight: bold;"&gt;mini-Term.rar&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;forum link: &lt;span id="msg_268084"&gt;&lt;/span&gt;&lt;a href="http://www.electronicslab.ph/forum/index.php/topic,15370.msg286563.html#msg286563"&gt;Mini  STM32 with 2.8 LCD and touchscreen&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3967613250975275925-5291010061939187417?l=projectproto.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/eLTlnjm68-ZglacX-tzkSnOQ_Pg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/eLTlnjm68-ZglacX-tzkSnOQ_Pg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/eLTlnjm68-ZglacX-tzkSnOQ_Pg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/eLTlnjm68-ZglacX-tzkSnOQ_Pg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Projectproto/~4/CgnpkVYuPEg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://projectproto.blogspot.com/feeds/5291010061939187417/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://projectproto.blogspot.com/2010/04/mini-term.html#comment-form" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/5291010061939187417?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/5291010061939187417?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Projectproto/~3/CgnpkVYuPEg/mini-term.html" title="Mini-Term" /><author><name>'yus</name><uri>http://www.blogger.com/profile/09469609276942488473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="29" src="http://2.bp.blogspot.com/_meF1KpGU79k/Sq5sE50miPI/AAAAAAAAAAY/V2noVm7vCM8/S220/minibot.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_meF1KpGU79k/S77Lt7emYdI/AAAAAAAAASM/8ee84RDboKk/s72-c/IMG_1659.JPG" height="72" width="72" /><thr:total>4</thr:total><feedburner:origLink>http://projectproto.blogspot.com/2010/04/mini-term.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkEFQnw7cCp7ImA9WxBUGEo.&quot;"><id>tag:blogger.com,1999:blog-3967613250975275925.post-7234201129034690477</id><published>2010-02-22T22:37:00.004+08:00</published><updated>2010-03-06T18:16:53.208+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-06T18:16:53.208+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="modding" /><title>MSI Wind 12 Internal HSDPA (3.5G) Modem Mod</title><content type="html">Ever since Wind12 series was introduced in the market, I always see in most of the reviews for these products announcing that these units have SIM card slot found underneath the battery pack. Yes I'm also aware that the 3G modules are only optional, but when I checked my Wind U230 I noticed that the SIM slot actually has no SIM connector inside. Nevertheless, it is true that there's an extra PCIe-mini card slot (intended for 3G modem module) found beside the harddisk. This is a great candidate for circuit modding on which I've already made one. =)&lt;br /&gt;&lt;br /&gt;I've dissected my Smart Bro (Huawei E1553) modem for the sake of this mod. Anyway, these USB dongles are relatively cheap nowadays. AFAIK,  pcie-mini card-type modems cost 3-4 times more compared to usb-types. Before doing the actual mod, I was still not sure whether this will work on 3.3V supply instead of the common 5V of USB ports. Since I cannot find its electrical specs, I just test it on actual. And, fortunately, it works!&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_meF1KpGU79k/S4HhjJuZK7I/AAAAAAAAARk/hrm7_fAjMYE/s1600-h/disected+huawei+e1553.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://1.bp.blogspot.com/_meF1KpGU79k/S4HhjJuZK7I/AAAAAAAAARk/hrm7_fAjMYE/s320/disected+huawei+e1553.jpg" alt="" id="BLOGGER_PHOTO_ID_5440877818862447538" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I'm using &lt;a href="http://www.allpinouts.org/index.php/PCI_Express_Card_and_PCI_Express_Mini_Card#PCI_Express_Mini_Card"&gt;pins 36 and 38 of PCIE mini card&lt;/a&gt; connector for the USB functionality of this port. And for the USB supply, I tapped 3.3V and GND  on capacitor C236.This 3.3V supply for the pcie-mini card is automatically turned off during system standby.&lt;br /&gt;&lt;table border="0" width="150"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_meF1KpGU79k/S4EV2iVzovI/AAAAAAAAAP0/U0Y0j48Hei8/s1600-h/USB+pins.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 200px; height: 150px;" src="http://1.bp.blogspot.com/_meF1KpGU79k/S4EV2iVzovI/AAAAAAAAAP0/U0Y0j48Hei8/s200/USB+pins.jpg" alt="" id="BLOGGER_PHOTO_ID_5440653851515658994" border="0" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_meF1KpGU79k/S4EWY6suOSI/AAAAAAAAAP8/fh7PBq1c8AI/s1600-h/supply.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 200px; height: 150px;" src="http://1.bp.blogspot.com/_meF1KpGU79k/S4EWY6suOSI/AAAAAAAAAP8/fh7PBq1c8AI/s200/supply.jpg" alt="" id="BLOGGER_PHOTO_ID_5440654442169776418" border="0" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_meF1KpGU79k/S4Hf-RapGYI/AAAAAAAAARU/LWz4_tR2rmE/s1600-h/w_disable.jpg"&gt;&lt;img style="float: right; margin: 0pt 0pt 10px 10px; cursor: pointer; width: 200px; height: 150px;" src="http://2.bp.blogspot.com/_meF1KpGU79k/S4Hf-RapGYI/AAAAAAAAARU/LWz4_tR2rmE/s200/w_disable.jpg" alt="" id="BLOGGER_PHOTO_ID_5440876085760301442" border="0" /&gt;&lt;/a&gt;There's also a disable pin function for the host to disable the pcie-mini card. It is W_DISABLE# on pin 20. It is held low during boot up of the unit. Also during boot-up, the BIOS will check if there's a load on the pcie-mini's 3V3 output. If it doesn't see any load on the 3V3 bus, the unit will cut-off the 3.3V supply all throughout. Therefor, pressing Fn+F10 keys combination without "load" on the 3V3 will not cause this pin to go to logic high. For now, I'm not utilizing this pin since my "enable circuit" is not yet working. The enable circuit is basically using a p-channel mosfet, which is the same with the &lt;a href="http://projectproto.blogspot.com/2010/02/msi-wind-12-bluetooth-mod.html"&gt;bluetooth mod&lt;/a&gt;. However, the mosfet I currently have doesn't operate well with only -3.3V Vgs (i.e. doesn't turn on properly). BTW, the enable logic for this pin 20 is opposite of what the previous mod have. Meaning, low (0V) on pin 20 corresponds to "module disabled", and high (3.3V) is "enabled".&lt;br /&gt;&lt;br /&gt;I was also got bothered of whether the internal antenna of the modem may not be able to get a good signal strength since Wind12 chassis has metal backbones and the plastic cover itself has conductive coatings. But, there was a&lt;a href="http://tipidpc.com/viewtopic.php?tid=201083&amp;amp;page=94"&gt; U210-lite user &lt;/a&gt;who ask me to solder his usb hsdpa modem inside his  unit. And I'm quite satisfied with the result even if we didn't wire and reposition the antenna of his modem.&lt;br /&gt;I managed to get coaxial wires (hoping that these wires are similar to what WiFi adapters and actual 3G modems are using).  Unfortunately, after finishing the mod and testing the modem, from the usual RSSI of -85dBm (before placing the modem inside the unit) it drops to -90dBm(sometimes -95dBm to -100dBm with &lt;a href="http://www.suncellular.com.ph/broadband.php"&gt;SUN network&lt;/a&gt;) =( . I'm already anticipating this result. The important is that I can still surf the net (and other online stuffs) without the unexpected disconnection.&lt;br /&gt;&lt;table border="0" width="150"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_meF1KpGU79k/S4EXX8V73TI/AAAAAAAAAQE/kv6JwYjz4gM/s1600-h/IMG_1609.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 200px; height: 150px;" src="http://2.bp.blogspot.com/_meF1KpGU79k/S4EXX8V73TI/AAAAAAAAAQE/kv6JwYjz4gM/s200/IMG_1609.JPG" alt="" id="BLOGGER_PHOTO_ID_5440655524942830898" border="0" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_meF1KpGU79k/S4ElNLosByI/AAAAAAAAAQM/T5qh-0H49Kc/s1600-h/main+antenna.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 200px; height: 150px;" src="http://4.bp.blogspot.com/_meF1KpGU79k/S4ElNLosByI/AAAAAAAAAQM/T5qh-0H49Kc/s200/main+antenna.jpg" alt="" id="BLOGGER_PHOTO_ID_5440670733232244514" border="0" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;Actually, I'm not sure if the second one is really another antenna of this modem but assumed it is since it's not connected directly to GND. We even tested hsdpa modem without this and still works surprisingly.&lt;table border="0" width="150"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_meF1KpGU79k/S4Eltc4vmoI/AAAAAAAAAQU/4xXDTGIde1E/s1600-h/antenna2_connection.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 200px; height: 150px;" src="http://4.bp.blogspot.com/_meF1KpGU79k/S4Eltc4vmoI/AAAAAAAAAQU/4xXDTGIde1E/s200/antenna2_connection.jpg" alt="" id="BLOGGER_PHOTO_ID_5440671287618804354" border="0" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_meF1KpGU79k/S4ElzkgXooI/AAAAAAAAAQc/HzLQu3NvmsM/s1600-h/antenna2.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 200px; height: 150px;" src="http://1.bp.blogspot.com/_meF1KpGU79k/S4ElzkgXooI/AAAAAAAAAQc/HzLQu3NvmsM/s200/antenna2.jpg" alt="" id="BLOGGER_PHOTO_ID_5440671392743268994" border="0" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;I've placed the two antennas in between the touch pad and the right speaker, and put some spaced in between the two. I've also repositioned the modem in such a way that SIM card can easily be accessed by just removing the upgrade panel of this unit.&lt;br /&gt;&lt;table border="0" width="150"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_meF1KpGU79k/S4EwPJAIHyI/AAAAAAAAAQs/QdDm6NKK78U/s1600-h/antenna.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 200px; height: 150px;" src="http://4.bp.blogspot.com/_meF1KpGU79k/S4EwPJAIHyI/AAAAAAAAAQs/QdDm6NKK78U/s200/antenna.jpg" alt="" id="BLOGGER_PHOTO_ID_5440682861512892194" border="0" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_meF1KpGU79k/S4E081IcQXI/AAAAAAAAAQ0/P3AGFMQuV9M/s1600-h/sim+card.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 200px; height: 150px;" src="http://3.bp.blogspot.com/_meF1KpGU79k/S4E081IcQXI/AAAAAAAAAQ0/P3AGFMQuV9M/s200/sim+card.jpg" alt="" id="BLOGGER_PHOTO_ID_5440688044499550578" border="0" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;Finally, the complete internal hsdpa modem mod (&lt;span style="font-style: italic;"&gt;somewhat "messy"&lt;/span&gt;).&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_meF1KpGU79k/S4HfB_D-KpI/AAAAAAAAARM/k9FNjQ7pku8/s1600-h/IMG_1624.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://1.bp.blogspot.com/_meF1KpGU79k/S4HfB_D-KpI/AAAAAAAAARM/k9FNjQ7pku8/s320/IMG_1624.JPG" alt="" id="BLOGGER_PHOTO_ID_5440875050041223826" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Fn+F10 combination is now working (&lt;span style="font-size:85%;"&gt;the symbol appears on the bottom right of the screen&lt;/span&gt;). The LED indicator, which is shared with WiFi, turns yellow. It turns to blue for WiFi and light-blue when both are enabled. &lt;span style="font-size:85%;"&gt;(note: my hsdpa modem is always enabled in my present mod)&lt;/span&gt;&lt;br /&gt;&lt;table border="0" width="150"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_meF1KpGU79k/S4ETtdfLOCI/AAAAAAAAAPs/vJ6QA9e-WxA/s1600-h/IMG_1628.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 200px; height: 150px;" src="http://4.bp.blogspot.com/_meF1KpGU79k/S4ETtdfLOCI/AAAAAAAAAPs/vJ6QA9e-WxA/s200/IMG_1628.JPG" alt="" id="BLOGGER_PHOTO_ID_5440651496570697762" border="0" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_meF1KpGU79k/S4ETKns7pzI/AAAAAAAAAPk/jF2UZD4TVvc/s1600-h/IMG_1632.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 200px; height: 150px;" src="http://1.bp.blogspot.com/_meF1KpGU79k/S4ETKns7pzI/AAAAAAAAAPk/jF2UZD4TVvc/s200/IMG_1632.JPG" alt="" id="BLOGGER_PHOTO_ID_5440650898017330994" border="0" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;----------------------&lt;br /&gt;&lt;span style="font-style:italic;"&gt;03/01/10 update:&lt;/span&gt;&lt;br /&gt;Now I have the extra time to revisit this mod. It seems that it's better (in term of signal reception) for the second antenna(?) to be soldered directly to usb modem instead of using coax wire. Below is my latest adjustment. It looks "presentable" now compared to the previous circuit.&lt;br /&gt;&lt;table border="0" width="150"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_meF1KpGU79k/S5IcJb7e2GI/AAAAAAAAARs/W2RY2hbwLsE/s1600-h/single+coax.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 200px; height: 150px;" src="http://4.bp.blogspot.com/_meF1KpGU79k/S5IcJb7e2GI/AAAAAAAAARs/W2RY2hbwLsE/s200/single+coax.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5445445847885994082" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_meF1KpGU79k/S5IcvWml-0I/AAAAAAAAAR0/SiY4m-UYELk/s1600-h/with+irlml5103.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 200px; height: 150px;" src="http://3.bp.blogspot.com/_meF1KpGU79k/S5IcvWml-0I/AAAAAAAAAR0/SiY4m-UYELk/s200/with+irlml5103.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5445446499291233090" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;I also tried using different mosfet (IRLML5103 SOT23 package) for the enable/disable function. Although I can now toggle the whole circuit by Fn+F10 keys, it's not a full success yet since my U230 encounters frequent usb disconnection of this modem. I'm not sure of the exact reason of this problem, so I just put back the previous hardware (i.e. Vcc supply) configuration.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3967613250975275925-7234201129034690477?l=projectproto.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/6rx_joVEVjsUE-elkDq4x26u-QE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/6rx_joVEVjsUE-elkDq4x26u-QE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/6rx_joVEVjsUE-elkDq4x26u-QE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/6rx_joVEVjsUE-elkDq4x26u-QE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Projectproto/~4/QnG2PHgBkJ4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://projectproto.blogspot.com/feeds/7234201129034690477/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://projectproto.blogspot.com/2010/02/msi-wind-12-internal-hsdpa-35g-modem.html#comment-form" title="6 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/7234201129034690477?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/7234201129034690477?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Projectproto/~3/QnG2PHgBkJ4/msi-wind-12-internal-hsdpa-35g-modem.html" title="MSI Wind 12 Internal HSDPA (3.5G) Modem Mod" /><author><name>'yus</name><uri>http://www.blogger.com/profile/09469609276942488473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="29" src="http://2.bp.blogspot.com/_meF1KpGU79k/Sq5sE50miPI/AAAAAAAAAAY/V2noVm7vCM8/S220/minibot.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_meF1KpGU79k/S4HhjJuZK7I/AAAAAAAAARk/hrm7_fAjMYE/s72-c/disected+huawei+e1553.jpg" height="72" width="72" /><thr:total>6</thr:total><feedburner:origLink>http://projectproto.blogspot.com/2010/02/msi-wind-12-internal-hsdpa-35g-modem.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkAHQXs9cCp7ImA9WxBVF0g.&quot;"><id>tag:blogger.com,1999:blog-3967613250975275925.post-2014880037903618752</id><published>2010-02-06T10:54:00.003+08:00</published><updated>2010-02-21T19:12:10.568+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-02-21T19:12:10.568+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="modding" /><title>MSI Wind 12 Bluetooth Mod</title><content type="html">It's been more than a year since I made my own &lt;a href="http://www.electronicslab.ph/forum/index.php/topic,6721.0.html"&gt;BT modding on U100&lt;/a&gt;. I made that a month later after I bought my first wind netbook. Then recently (a week ago), I bought a new &lt;s&gt;netbook&lt;/s&gt; notebook - &lt;a href="http://www.msi.com/index.php?func=proddesc&amp;amp;prod_no=1928&amp;amp;maincat_no=135"&gt;MSI Wind u230&lt;/a&gt;. It's one of the Wind12 series and its specs (&lt;i&gt;i.e.&lt;/i&gt; processor and graphics) are far way better than the early wind netbooks.&lt;br /&gt;However, the locally available Wind12 notebooks in the country also don't have the built-in bluetooth module. The good news is, according to the msi forum, the &lt;a href="http://forum-en.msi.com/index.php?topic=130739.0"&gt;bluetooth module for the U100 will also work on U210&lt;/a&gt;. So, without hesitation (since I've already verified the other features of my unit), I opened my less-than-a-week old U230 and found out that there's also readily available connector for the bluetooth.&lt;br /&gt;&lt;br /&gt;For this modding I chose a slim-type USB bluetooth dongle (worth Php220), so that it will be easy to disassemble and also easy to fit inside my U230.&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_meF1KpGU79k/S2zF7LQyloI/AAAAAAAAAN8/Wgg-PTMcHiI/s1600-h/slim+bluetooth.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://1.bp.blogspot.com/_meF1KpGU79k/S2zF7LQyloI/AAAAAAAAAN8/Wgg-PTMcHiI/s400/slim+bluetooth.JPG" alt="" id="BLOGGER_PHOTO_ID_5434936470755513986" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Checking first the voltage supply for the bluetooth module.&lt;br /&gt;(showing 5V across pin1/red and pin2/orange) &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_meF1KpGU79k/S2zHWwMX-eI/AAAAAAAAAOM/pXK6RiSv7Fg/s1600-h/supply+5V.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://1.bp.blogspot.com/_meF1KpGU79k/S2zHWwMX-eI/AAAAAAAAAOM/pXK6RiSv7Fg/s400/supply+5V.jpg" alt="" id="BLOGGER_PHOTO_ID_5434938044037200354" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The electrical connection is the same as for the U100 BT mod, except for the connector's wire colors (not the typical BBROYGBVGW arrangement). &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_meF1KpGU79k/S2zH8y5jidI/AAAAAAAAAOU/mxGYr1C0eSE/s1600-h/connection.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 209px;" src="http://1.bp.blogspot.com/_meF1KpGU79k/S2zH8y5jidI/AAAAAAAAAOU/mxGYr1C0eSE/s400/connection.jpg" alt="" id="BLOGGER_PHOTO_ID_5434938697598601682" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The finished 'product':&lt;br /&gt;(I use the same part number of MosFET for the 'enable switch'. It's IRFR5505 P-channel MosFET.)&lt;table border="0" width="150"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_meF1KpGU79k/S2zIuC5NDDI/AAAAAAAAAOc/AkktCDzlCow/s1600-h/diy+BT.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 200px; height: 150px;" src="http://4.bp.blogspot.com/_meF1KpGU79k/S2zIuC5NDDI/AAAAAAAAAOc/AkktCDzlCow/s400/diy+BT.jpg" alt="" id="BLOGGER_PHOTO_ID_5434939543705685042" border="0" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_meF1KpGU79k/S2zJCcai56I/AAAAAAAAAOk/3yxzmaY_Rw0/s1600-h/IMG_1571.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 200px; height: 150px;" src="http://2.bp.blogspot.com/_meF1KpGU79k/S2zJCcai56I/AAAAAAAAAOk/3yxzmaY_Rw0/s400/IMG_1571.JPG" alt="" id="BLOGGER_PHOTO_ID_5434939894153799586" border="0" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Initial testing:&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_meF1KpGU79k/S2zLo-IPh2I/AAAAAAAAAOs/e31VFCcEhsA/s1600-h/IMG_1567.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 450px; height: 337px;" src="http://1.bp.blogspot.com/_meF1KpGU79k/S2zLo-IPh2I/AAAAAAAAAOs/e31VFCcEhsA/s400/IMG_1567.JPG" alt="" id="BLOGGER_PHOTO_ID_5434942755062122338" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Putting some insulation (kapton tape)first before placing inside the unit:&lt;table border="0" width="150"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_meF1KpGU79k/S2zMxtn1eGI/AAAAAAAAAO8/a_G9xHNzx2Q/s1600-h/insulation.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 200px; height: 150px;" src="http://2.bp.blogspot.com/_meF1KpGU79k/S2zMxtn1eGI/AAAAAAAAAO8/a_G9xHNzx2Q/s200/insulation.jpg" alt="" id="BLOGGER_PHOTO_ID_5434944004761679970" border="0" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_meF1KpGU79k/S2zM7Ay_8AI/AAAAAAAAAPE/3unfIPot5d4/s1600-h/hardisk.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 200px; height: 150px;" src="http://2.bp.blogspot.com/_meF1KpGU79k/S2zM7Ay_8AI/AAAAAAAAAPE/3unfIPot5d4/s200/hardisk.jpg" alt="" id="BLOGGER_PHOTO_ID_5434944164527599618" border="0" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Finally, SCM already detects the new hardware by pressing Fn+F9.&lt;br /&gt;The bluetooth LED indicator is now also working.&lt;table border="0" width="150"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_meF1KpGU79k/S2zNvTk8IDI/AAAAAAAAAPM/uD8RKlh2zAA/s1600-h/SCM+Fn%2BF9.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 200px; height: 150px;" src="http://4.bp.blogspot.com/_meF1KpGU79k/S2zNvTk8IDI/AAAAAAAAAPM/uD8RKlh2zAA/s320/SCM+Fn%2BF9.jpg" alt="" id="BLOGGER_PHOTO_ID_5434945062922100786" border="0" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_meF1KpGU79k/S2zOGvWPIRI/AAAAAAAAAPc/a0ZBnifMjf8/s1600-h/bt+led+indicator.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 200px; height: 150px;" src="http://4.bp.blogspot.com/_meF1KpGU79k/S2zOGvWPIRI/AAAAAAAAAPc/a0ZBnifMjf8/s320/bt+led+indicator.jpg" alt="" id="BLOGGER_PHOTO_ID_5434945465513615634" border="0" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;And that's the do-it-yourself bluetooth module for MSI U230, costing only less than 300 pesos... =)&lt;br /&gt;&lt;span style="font-size:75%;"&gt;&lt;i&gt;Hopefully I could also mod a usb hsdpa modem to fit inside the vacant mini-pcie slot of my U230.&lt;/i&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3967613250975275925-2014880037903618752?l=projectproto.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/zAsuMjpRCajN2BqhpCcr135BzWI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/zAsuMjpRCajN2BqhpCcr135BzWI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/zAsuMjpRCajN2BqhpCcr135BzWI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/zAsuMjpRCajN2BqhpCcr135BzWI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Projectproto/~4/d7vSJrjW7KM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://projectproto.blogspot.com/feeds/2014880037903618752/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://projectproto.blogspot.com/2010/02/msi-wind-12-bluetooth-mod.html#comment-form" title="17 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/2014880037903618752?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/2014880037903618752?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Projectproto/~3/d7vSJrjW7KM/msi-wind-12-bluetooth-mod.html" title="MSI Wind 12 Bluetooth Mod" /><author><name>'yus</name><uri>http://www.blogger.com/profile/09469609276942488473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="29" src="http://2.bp.blogspot.com/_meF1KpGU79k/Sq5sE50miPI/AAAAAAAAAAY/V2noVm7vCM8/S220/minibot.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_meF1KpGU79k/S2zF7LQyloI/AAAAAAAAAN8/Wgg-PTMcHiI/s72-c/slim+bluetooth.JPG" height="72" width="72" /><thr:total>17</thr:total><feedburner:origLink>http://projectproto.blogspot.com/2010/02/msi-wind-12-bluetooth-mod.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEYFRHc_eip7ImA9WxFWEUQ.&quot;"><id>tag:blogger.com,1999:blog-3967613250975275925.post-445096938768168661</id><published>2010-01-13T13:04:00.024+08:00</published><updated>2010-05-30T13:08:35.942+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-05-30T13:08:35.942+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ZiLOG Z8F mcu" /><category scheme="http://www.blogger.com/atom/ns#" term="LCDs" /><title>Z8 on-chip Temperature Sensor</title><content type="html">&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_meF1KpGU79k/S08r-UUy2BI/AAAAAAAAANs/XD2G6uS2bUE/s1600-h/thermometer_.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://1.bp.blogspot.com/_meF1KpGU79k/S08r-UUy2BI/AAAAAAAAANs/XD2G6uS2bUE/s400/thermometer_.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5426604425612548114" /&gt;&lt;/a&gt;&lt;br /&gt;It is basically based on technical note (TN004201-0905) by ZiLOG: &lt;a href="http://www.zilog.com/docs/z8encorexp/appnotes/tn0042.pdf"&gt;Technique for Measuring System Temperature Using the On-chip Temperature Sensor of the Z8 Encore! XP®&lt;/a&gt;. I just copied the routine for measuring the temperature. The main difference is, in stead of sending the result through the UART of Z8F042A (i.e. using Hyperterminal), I used Nokia 5110 LCD to display the temperature reading. N5110 LCD has the same LCD controller with that of &lt;a href="http://www.electronicslab.ph/forum/index.php/topic,7768.0.html"&gt;N3310 LCD&lt;/a&gt; (so, N3310 LCD can also be used with this project).&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_meF1KpGU79k/S08sUoJDjmI/AAAAAAAAAN0/TNmTSM8GSy0/s1600-h/z8f042a_.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://3.bp.blogspot.com/_meF1KpGU79k/S08sUoJDjmI/AAAAAAAAAN0/TNmTSM8GSy0/s400/z8f042a_.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5426604808889142882" /&gt;&lt;/a&gt;&lt;br /&gt;The equation used for temperature reading is:&lt;br /&gt;&lt;blockquote&gt;integrated on-chip temperature sensor (ITS) temperature:&lt;br /&gt;T = (25/128)*ADC – 77&lt;br /&gt;where,&lt;br /&gt;T is the temperature in C&lt;br /&gt;ADC represents the 10-bit compensated ADC register value&lt;/blockquote&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_meF1KpGU79k/S08midkJriI/AAAAAAAAAMs/huVidcaww2U/s1600-h/schematic.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 396px; height: 400px;" src="http://4.bp.blogspot.com/_meF1KpGU79k/S08midkJriI/AAAAAAAAAMs/huVidcaww2U/s400/schematic.jpg" alt="" id="BLOGGER_PHOTO_ID_5426598449498402338" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I was also able to implement a different approach in computing the temperature of the on-chip sensor using the sample code from this application note AN019102-0708 also by ZiLOG: &lt;a href="http://www.zilog.com/docs/z8encorexp/appnotes/an0191.pdf"&gt;Reading Temperature Using the F082A Series MCUs&lt;/a&gt;. Unfortunately, I don't know why the result is different from the previous approach. And I don't have the time (and an accurate thermometer) to test which one is correct (although both of them are not accurate enough compared to of using external temperature sensor). Also, in the datasheet of &lt;a href="http://www.zilog.com/docs/z8encorexp/ps0228.pdf"&gt;F082A series&lt;/a&gt;, there's a parameter called TSCAL (Temperature Sensor Calibration Data) which I never noticed in the sample codes of the two. I also tried doing my own code starting from 'scratch' (using the datasheet as the only reference), but I always failed. The hardest part is on the compensating of the ADC results.&lt;br /&gt;&lt;br /&gt;Download:&lt;br /&gt;source code (w/ HEX) and schematic: &lt;a href="http://www.4shared.com/file/196842191/abdc978c/Z8042A_temperature_sensor.html"&gt;Z8042A temperature sensor.rar&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;edited (Jan 16, 2009):&lt;/span&gt;&lt;br /&gt;uses this equation from the datasheet in stead of the previous one:&lt;br /&gt;&lt;blockquote&gt;V = 0.01 * T + 0.65 (where T is the temperature in C; V is the sensor output in Volts)&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;forum link: &lt;a href="http://www.electronicslab.ph/forum/index.php/topic,8117.msg241776.html#msg241776"&gt;digital thermometer using 8-pin Z8F042A &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3967613250975275925-445096938768168661?l=projectproto.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/vbMS_T0zAio9Z-VgyGb-qyQSetY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vbMS_T0zAio9Z-VgyGb-qyQSetY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/vbMS_T0zAio9Z-VgyGb-qyQSetY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vbMS_T0zAio9Z-VgyGb-qyQSetY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Projectproto/~4/OU1owxa8KeI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://projectproto.blogspot.com/feeds/445096938768168661/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://projectproto.blogspot.com/2010/01/z8-on-chip-temperature-sensor.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/445096938768168661?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/445096938768168661?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Projectproto/~3/OU1owxa8KeI/z8-on-chip-temperature-sensor.html" title="Z8 on-chip Temperature Sensor" /><author><name>'yus</name><uri>http://www.blogger.com/profile/09469609276942488473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="29" src="http://2.bp.blogspot.com/_meF1KpGU79k/Sq5sE50miPI/AAAAAAAAAAY/V2noVm7vCM8/S220/minibot.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_meF1KpGU79k/S08r-UUy2BI/AAAAAAAAANs/XD2G6uS2bUE/s72-c/thermometer_.JPG" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://projectproto.blogspot.com/2010/01/z8-on-chip-temperature-sensor.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEYGQHY7fip7ImA9WxFWEUQ.&quot;"><id>tag:blogger.com,1999:blog-3967613250975275925.post-1362118451047047731</id><published>2010-01-13T12:37:00.019+08:00</published><updated>2010-05-30T13:08:41.806+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-05-30T13:08:41.806+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Microchip PIC mcu" /><category scheme="http://www.blogger.com/atom/ns#" term="ZiLOG Z8F mcu" /><category scheme="http://www.blogger.com/atom/ns#" term="LCDs" /><title>Nokia LCD Interfacing</title><content type="html">Due to their wide availability in the local markets, old Nokia LCDs are the best alternatives for those expensive GLCDs. They can be bought cheaply at many cellphone parts shops (N3310 lcds usually cost only around Php100 each). Interfacing them with microcontrollers can easily be done using serial communication (e.g. SPI protocol).&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.electronicslab.ph/forum/index.php/topic,2742.0.html"&gt;Nokia 3530/3510i LCD&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_meF1KpGU79k/S03aGMQn1gI/AAAAAAAAAME/dokbklmNrg8/s1600-h/N3530LCD.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 200px; height: 150px;" src="http://3.bp.blogspot.com/_meF1KpGU79k/S03aGMQn1gI/AAAAAAAAAME/dokbklmNrg8/s200/N3530LCD.jpg" alt="" id="BLOGGER_PHOTO_ID_5426232925956331010" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;98x67 pixels , 4096 colors &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.electronicslab.ph/forum/index.php/topic,4167.0.html"&gt;Nokia 6610/6100 LCD&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_meF1KpGU79k/S03aRRW0plI/AAAAAAAAAMM/LIxvsHQv9eY/s1600-h/N6610LCD.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 200px; height: 150px;" src="http://1.bp.blogspot.com/_meF1KpGU79k/S03aRRW0plI/AAAAAAAAAMM/LIxvsHQv9eY/s200/N6610LCD.jpg" alt="" id="BLOGGER_PHOTO_ID_5426233116303074898" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;132x132 pixels, 4096 colors&lt;br /&gt;(good backlights,&lt;br /&gt;but the connector is difficult to use)  &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;a href="http://www.electronicslab.ph/forum/index.php/topic,7768.0.html"&gt;Nokia 3310/5110 LCD&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_meF1KpGU79k/S03ahaDEWVI/AAAAAAAAAMU/Vt1DcQNC4NE/s1600-h/N3310LCD.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 200px; height: 150px;" src="http://1.bp.blogspot.com/_meF1KpGU79k/S03ahaDEWVI/AAAAAAAAAMU/Vt1DcQNC4NE/s200/N3310LCD.jpg" alt="" id="BLOGGER_PHOTO_ID_5426233393514043730" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;84x48 pixels, monochrome&lt;br /&gt;(very common and relatively cheap)&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;some links for N3310/N5110 LCDs:&lt;br /&gt;&lt;a href="http://geekzone.freehostia.com/2008/02/25/using-nokia-3310-lcd-as-display-for-pic-projects/"&gt;Using Nokia 3310 LCD as Display for PIC Projects&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.techdesign.be/forum/viewtopic.php?t=8"&gt;Nokia 3310 LCD LPH7779&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.electronicslab.ph/forum/index.php/topic,4402.0.html"&gt;Nokia 3310 LCD Image Encoder&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.electronicslab.ph/forum/index.php/topic,7906.0.html"&gt;DIY scope using Z8F0823 and N3310 LCD&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3967613250975275925-1362118451047047731?l=projectproto.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/LkEzipINUGA6NDKLPk_99sqhVwY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LkEzipINUGA6NDKLPk_99sqhVwY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/LkEzipINUGA6NDKLPk_99sqhVwY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LkEzipINUGA6NDKLPk_99sqhVwY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Projectproto/~4/MXkzKYlZtwM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://projectproto.blogspot.com/feeds/1362118451047047731/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://projectproto.blogspot.com/2010/01/nokia-lcd-interfacing.html#comment-form" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/1362118451047047731?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/1362118451047047731?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Projectproto/~3/MXkzKYlZtwM/nokia-lcd-interfacing.html" title="Nokia LCD Interfacing" /><author><name>'yus</name><uri>http://www.blogger.com/profile/09469609276942488473</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="29" src="http://2.bp.blogspot.com/_meF1KpGU79k/Sq5sE50miPI/AAAAAAAAAAY/V2noVm7vCM8/S220/minibot.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_meF1KpGU79k/S03aGMQn1gI/AAAAAAAAAME/dokbklmNrg8/s72-c/N3530LCD.jpg" height="72" width="72" /><thr:total>4</thr:total><feedburner:origLink>http://projectproto.blogspot.com/2010/01/nokia-lcd-interfacing.html</feedburner:origLink></entry></feed>

