<?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:blogger="http://schemas.google.com/blogger/2008" 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;C0ADQnY-fCp7ImA9WhFSFUk.&quot;"><id>tag:blogger.com,1999:blog-3967613250975275925</id><updated>2013-06-18T15:49:33.854+08:00</updated><category term="ARM Cortex-A8 / Allwinner A10" /><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="OpenCV" /><category term="PC programming" /><category term="LEDs and LCDs" /><category term="ZiLOG Z8F mcu" /><category term="ARM Cortex-M0 / LPC11xx" /><category term="memory cards" /><category term="LCDs" /><category term="ARM Cortex-M4 / LM4F" /><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>58</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;AkcBR3w4fCp7ImA9WhFTEkk.&quot;"><id>tag:blogger.com,1999:blog-3967613250975275925.post-1756645729581456593</id><published>2013-06-02T14:33:00.000+08:00</published><updated>2013-06-03T16:27:36.234+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-06-03T16:27:36.234+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ARM Cortex-A8 / Allwinner A10" /><category scheme="http://www.blogger.com/atom/ns#" term="OpenCV" /><title>OpenCV ARM - Face Detect</title><content type="html">&lt;br /&gt;
Here's another application that uses opencv libraries in the &lt;a href="http://projectproto.blogspot.com/2013/06/debian-wheezy-on-sun4i-allwinner-a10.html" target="_blank"&gt;Debian disto&lt;/a&gt;. It performs face detection using &lt;a href="http://docs.opencv.org/modules/objdetect/doc/cascade_classification.html" target="_blank"&gt;Haar cascade&lt;/a&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/-CRqTc9xHlJw/UaqoX8FrSPI/AAAAAAAAAe4/tRAVLIJx2Z8/s1600/IMG_2507.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://2.bp.blogspot.com/-CRqTc9xHlJw/UaqoX8FrSPI/AAAAAAAAAe4/tRAVLIJx2Z8/s320/IMG_2507.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div style="text-align: left;"&gt;The code below continuously captures frames with a USB web-camera. (In this demo, I displayed a sample picture on a separate laptop but this will also work for actual faces). Using the input frames and a loaded Haar classifier cascade, vector of rectangles containing the detected faces is returned to the user. A bounding box is drawn to each face to show successful detection.&lt;/div&gt;&lt;br /&gt;
face_detect.py&lt;br /&gt;
&lt;div style="background: #f0f0f0; border-width: .1em .1em .1em .8em; border: solid gray; overflow: auto; padding: .2em .6em; width: auto;"&gt;&lt;pre style="line-height: 125%; margin: 0;"&gt;&lt;span style="color: #007020; font-weight: bold;"&gt;import&lt;/span&gt; &lt;span style="color: #0e84b5; font-weight: bold;"&gt;cv2.cv&lt;/span&gt; &lt;span style="color: #007020; font-weight: bold;"&gt;as&lt;/span&gt; &lt;span style="color: #0e84b5; font-weight: bold;"&gt;cv&lt;/span&gt;

HAAR_CASCADE &lt;span style="color: #666666;"&gt;=&lt;/span&gt; &lt;span style="color: #4070a0;"&gt;"/usr/local/share/OpenCV/haarcascades/haarcascade_frontalface_default.xml"&lt;/span&gt;

cv&lt;span style="color: #666666;"&gt;.&lt;/span&gt;NamedWindow( &lt;span style="color: #4070a0;"&gt;"mycamera"&lt;/span&gt; )
capture &lt;span style="color: #666666;"&gt;=&lt;/span&gt; cv&lt;span style="color: #666666;"&gt;.&lt;/span&gt;CreateCameraCapture(&lt;span style="color: #40a070;"&gt;0&lt;/span&gt;)
storage &lt;span style="color: #666666;"&gt;=&lt;/span&gt; cv&lt;span style="color: #666666;"&gt;.&lt;/span&gt;CreateMemStorage()
cascade &lt;span style="color: #666666;"&gt;=&lt;/span&gt; cv&lt;span style="color: #666666;"&gt;.&lt;/span&gt;Load(HAAR_CASCADE)

&lt;span style="color: #007020; font-weight: bold;"&gt;while&lt;/span&gt; &lt;span style="color: #007020;"&gt;True&lt;/span&gt;:
    image &lt;span style="color: #666666;"&gt;=&lt;/span&gt; cv&lt;span style="color: #666666;"&gt;.&lt;/span&gt;QueryFrame(capture)
    faces &lt;span style="color: #666666;"&gt;=&lt;/span&gt; cv&lt;span style="color: #666666;"&gt;.&lt;/span&gt;HaarDetectObjects(image, cascade, storage, &lt;span style="color: #40a070;"&gt;1.1&lt;/span&gt;, &lt;span style="color: #40a070;"&gt;3&lt;/span&gt;, cv&lt;span style="color: #666666;"&gt;.&lt;/span&gt;CV_HAAR_DO_CANNY_PRUNING, (&lt;span style="color: #40a070;"&gt;100&lt;/span&gt;,&lt;span style="color: #40a070;"&gt;100&lt;/span&gt;))
    &lt;span style="color: #007020; font-weight: bold;"&gt;for&lt;/span&gt;((x,y,w,h),i) &lt;span style="color: #007020; font-weight: bold;"&gt;in&lt;/span&gt; faces:
        cv&lt;span style="color: #666666;"&gt;.&lt;/span&gt;Rectangle(image, (x,y), (x&lt;span style="color: #666666;"&gt;+&lt;/span&gt;w, y&lt;span style="color: #666666;"&gt;+&lt;/span&gt;h), (&lt;span style="color: #40a070;"&gt;0&lt;/span&gt;,&lt;span style="color: #40a070;"&gt;255&lt;/span&gt;,&lt;span style="color: #40a070;"&gt;0&lt;/span&gt;), &lt;span style="color: #40a070;"&gt;3&lt;/span&gt;)
    cv&lt;span style="color: #666666;"&gt;.&lt;/span&gt;ShowImage( &lt;span style="color: #4070a0;"&gt;"mycamera"&lt;/span&gt;, image )
    &lt;span style="color: #007020; font-weight: bold;"&gt;if&lt;/span&gt; cv&lt;span style="color: #666666;"&gt;.&lt;/span&gt;WaitKey(&lt;span style="color: #40a070;"&gt;5&lt;/span&gt;) &lt;span style="color: #666666;"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #40a070;"&gt;0&lt;/span&gt;:
        &lt;span style="color: #007020; font-weight: bold;"&gt;break&lt;/span&gt;

cv&lt;span style="color: #666666;"&gt;.&lt;/span&gt;DestroyWindow( &lt;span style="color: #4070a0;"&gt;"mycamera"&lt;/span&gt; )
&lt;/pre&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-m5-eEpHwcEE/UaqojWPm29I/AAAAAAAAAfA/J_YsQdO46eA/s1600/Screenshot_compile_run.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;br /&gt;
&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Below is the C/C++ equivalent of the above python script. (The code appears lengthy due to the comments and cleanup routines.)&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://2.bp.blogspot.com/-m5-eEpHwcEE/UaqojWPm29I/AAAAAAAAAfA/J_YsQdO46eA/s1600/Screenshot_compile_run.png" target="_blank"&gt;face_detect.cpp&lt;/a&gt;&lt;br /&gt;
&lt;div style="background: #f0f0f0; border-width: .1em .1em .1em .8em; border: solid gray; overflow: auto; padding: .2em .6em; width: auto; height: 360px"&gt;&lt;pre style="line-height: 125%; margin: 0;"&gt;&lt;span style="color: #007020;"&gt;#include &amp;lt;opencv2/highgui/highgui.hpp&amp;gt;&lt;/span&gt;
&lt;span style="color: #007020;"&gt;#include &amp;lt;opencv2/objdetect/objdetect.hpp&amp;gt;&lt;/span&gt;
&lt;span style="color: #007020; font-weight: bold;"&gt;using&lt;/span&gt; &lt;span style="color: #007020; font-weight: bold;"&gt;namespace&lt;/span&gt; cv;

&lt;span style="color: #007020;"&gt;#define HAAR_CASCADE "/usr/local/share/OpenCV/haarcascades/haarcascade_frontalface_default.xml"&lt;/span&gt;

&lt;span style="color: #902000;"&gt;int&lt;/span&gt; main(&lt;span style="color: #902000;"&gt;int&lt;/span&gt; argc, &lt;span style="color: #007020; font-weight: bold;"&gt;const&lt;/span&gt; &lt;span style="color: #902000;"&gt;char&lt;/span&gt; &lt;span style="color: #666666;"&gt;**&lt;/span&gt; argv)
{
    cvNamedWindow( &lt;span style="color: #4070a0;"&gt;"mycamera"&lt;/span&gt; &lt;span style="color: #60a0b0; font-style: italic;"&gt;/*, CV_WINDOW_AUTOSIZE*/&lt;/span&gt;); &lt;span style="color: #60a0b0; font-style: italic;"&gt;// create camera window, 1=CV_WINDOW_AUTOSIZE(default,the user cannot resize the window)&lt;/span&gt;
    CvCapture &lt;span style="color: #666666;"&gt;*&lt;/span&gt;capture &lt;span style="color: #666666;"&gt;=&lt;/span&gt; cvCreateCameraCapture(&lt;span style="color: #40a070;"&gt;0&lt;/span&gt;); &lt;span style="color: #60a0b0; font-style: italic;"&gt;// start capturing frames from camera (i.e. /dev/video0 device)&lt;/span&gt;
    CvMemStorage &lt;span style="color: #666666;"&gt;*&lt;/span&gt;storage &lt;span style="color: #666666;"&gt;=&lt;/span&gt; cvCreateMemStorage(); &lt;span style="color: #60a0b0; font-style: italic;"&gt;// create new memory storage&lt;/span&gt;
    CvHaarClassifierCascade &lt;span style="color: #666666;"&gt;*&lt;/span&gt;cascade &lt;span style="color: #666666;"&gt;=&lt;/span&gt; (CvHaarClassifierCascade &lt;span style="color: #666666;"&gt;*&lt;/span&gt;)cvLoad(HAAR_CASCADE); &lt;span style="color: #60a0b0; font-style: italic;"&gt;// load frontal face detector&lt;/span&gt;

    &lt;span style="color: #007020; font-weight: bold;"&gt;while&lt;/span&gt; (&lt;span style="color: #40a070;"&gt;1&lt;/span&gt;){
        IplImage &lt;span style="color: #666666;"&gt;*&lt;/span&gt;image &lt;span style="color: #666666;"&gt;=&lt;/span&gt; cvQueryFrame(capture); &lt;span style="color: #60a0b0; font-style: italic;"&gt;// grab and retrieve frame&lt;/span&gt;
        CvSeq &lt;span style="color: #666666;"&gt;*&lt;/span&gt;faces &lt;span style="color: #666666;"&gt;=&lt;/span&gt; cvHaarDetectObjects(image, cascade, storage, &lt;span style="color: #40a070;"&gt;1.1&lt;/span&gt;, &lt;span style="color: #40a070;"&gt;3&lt;/span&gt;, CV_HAAR_DO_CANNY_PRUNING, cvSize(&lt;span style="color: #40a070;"&gt;100&lt;/span&gt;,&lt;span style="color: #40a070;"&gt;100&lt;/span&gt;)); &lt;span style="color: #60a0b0; font-style: italic;"&gt;// find rectangular regions that contain faces&lt;/span&gt;
        &lt;span style="color: #007020; font-weight: bold;"&gt;for&lt;/span&gt;(&lt;span style="color: #902000;"&gt;int&lt;/span&gt; i&lt;span style="color: #666666;"&gt;=&lt;/span&gt;&lt;span style="color: #40a070;"&gt;0&lt;/span&gt;; i &lt;span style="color: #666666;"&gt;&amp;lt;&lt;/span&gt; faces&lt;span style="color: #666666;"&gt;-&amp;gt;&lt;/span&gt;total; i&lt;span style="color: #666666;"&gt;++&lt;/span&gt;){
            CvRect &lt;span style="color: #666666;"&gt;*&lt;/span&gt;r &lt;span style="color: #666666;"&gt;=&lt;/span&gt; (CvRect &lt;span style="color: #666666;"&gt;*&lt;/span&gt;)cvGetSeqElem(faces, i); &lt;span style="color: #60a0b0; font-style: italic;"&gt;// get bounding rectangle of the detected face&lt;/span&gt;
            cvRectangle(image, cvPoint(r&lt;span style="color: #666666;"&gt;-&amp;gt;&lt;/span&gt;x, r&lt;span style="color: #666666;"&gt;-&amp;gt;&lt;/span&gt;y), cvPoint(r&lt;span style="color: #666666;"&gt;-&amp;gt;&lt;/span&gt;x &lt;span style="color: #666666;"&gt;+&lt;/span&gt; r&lt;span style="color: #666666;"&gt;-&amp;gt;&lt;/span&gt;width, r&lt;span style="color: #666666;"&gt;-&amp;gt;&lt;/span&gt;y &lt;span style="color: #666666;"&gt;+&lt;/span&gt; r&lt;span style="color: #666666;"&gt;-&amp;gt;&lt;/span&gt;height), cvScalar(&lt;span style="color: #40a070;"&gt;0&lt;/span&gt;,&lt;span style="color: #40a070;"&gt;255&lt;/span&gt;,&lt;span style="color: #40a070;"&gt;0&lt;/span&gt;), &lt;span style="color: #40a070;"&gt;3&lt;/span&gt;); &lt;span style="color: #60a0b0; font-style: italic;"&gt;// draw a green rectangle&lt;/span&gt;
        }
        cvShowImage( &lt;span style="color: #4070a0;"&gt;"mycamera"&lt;/span&gt;, image ); &lt;span style="color: #60a0b0; font-style: italic;"&gt;// display image within window&lt;/span&gt;
        &lt;span style="color: #007020; font-weight: bold;"&gt;if&lt;/span&gt; (cvWaitKey(&lt;span style="color: #40a070;"&gt;5&lt;/span&gt;) &lt;span style="color: #666666;"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #40a070;"&gt;0&lt;/span&gt;) &lt;span style="color: #60a0b0; font-style: italic;"&gt;// press any key to exit&lt;/span&gt;
            &lt;span style="color: #007020; font-weight: bold;"&gt;break&lt;/span&gt;;
    }
    &lt;span style="color: #60a0b0; font-style: italic;"&gt;// cleanups&lt;/span&gt;
    cvReleaseHaarClassifierCascade( &lt;span style="color: #666666;"&gt;&amp;amp;&lt;/span&gt;cascade ); &lt;span style="color: #60a0b0; font-style: italic;"&gt;// release cascade&lt;/span&gt;
    cvReleaseMemStorage( &lt;span style="color: #666666;"&gt;&amp;amp;&lt;/span&gt;storage ); &lt;span style="color: #60a0b0; font-style: italic;"&gt;// release memory storage&lt;/span&gt;
    cvReleaseCapture( &lt;span style="color: #666666;"&gt;&amp;amp;&lt;/span&gt;capture ); &lt;span style="color: #60a0b0; font-style: italic;"&gt;// stop capturing/reading&lt;/span&gt;
    cvDestroyWindow( &lt;span style="color: #4070a0;"&gt;"mycamera"&lt;/span&gt; ); &lt;span style="color: #60a0b0; font-style: italic;"&gt;// end camera window&lt;/span&gt;
    &lt;span style="color: #007020; font-weight: bold;"&gt;return&lt;/span&gt; &lt;span style="color: #40a070;"&gt;0&lt;/span&gt;;
}
&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;
&lt;img src="http://feeds.feedburner.com/~r/Projectproto/~4/2wPcYbkPNFE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://projectproto.blogspot.com/feeds/1756645729581456593/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://projectproto.blogspot.com/2013/06/opencv-arm-face-detect.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/1756645729581456593?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/1756645729581456593?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Projectproto/~3/2wPcYbkPNFE/opencv-arm-face-detect.html" title="OpenCV ARM - Face Detect" /><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/-CRqTc9xHlJw/UaqoX8FrSPI/AAAAAAAAAe4/tRAVLIJx2Z8/s72-c/IMG_2507.JPG" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://projectproto.blogspot.com/2013/06/opencv-arm-face-detect.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DU8ASXg4eip7ImA9WhFTEk4.&quot;"><id>tag:blogger.com,1999:blog-3967613250975275925.post-8558385723600717336</id><published>2013-06-01T13:48:00.000+08:00</published><updated>2013-06-03T13:37:28.632+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-06-03T13:37:28.632+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ARM Cortex-A8 / Allwinner A10" /><category scheme="http://www.blogger.com/atom/ns#" term="OpenCV" /><title>OpenCV ARM - Hello World</title><content type="html">&lt;div class="separator" style="clear: both; text-align: left;"&gt;
Here is a sample application that utilizes OpenCV in my &lt;a href="http://projectproto.blogspot.com/2013/06/debian-wheezy-on-sun4i-allwinner-a10.html" target="_blank"&gt;customized Debian disto&lt;/a&gt;. Sample codes are posted below. The demo simply displays images captured by the camera. This can be extended to utilize other opencv functions.&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;a href="http://3.bp.blogspot.com/-L_LViaaqKgI/UaleA6DdBMI/AAAAAAAAAeM/5N_VbEyfYTU/s1600/IMG_2505.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://3.bp.blogspot.com/-L_LViaaqKgI/UaleA6DdBMI/AAAAAAAAAeM/5N_VbEyfYTU/s320/IMG_2505.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://2.bp.blogspot.com/-YyfwqYh8qfo/UamHv4aU5aI/AAAAAAAAAec/P4mKzrTbQD4/s1600/Screenshot_py.png" target="_blank"&gt;hello_camera.py&lt;/a&gt;&lt;br /&gt;
&lt;div style="background: #f0f0f0; border-width: .1em .1em .1em .8em; border: solid gray; overflow: auto; padding: .2em .6em; width: auto;"&gt;
&lt;pre style="line-height: 125%; margin: 0;"&gt;&lt;span style="color: #007020; font-weight: bold;"&gt;import&lt;/span&gt; &lt;span style="color: #0e84b5; font-weight: bold;"&gt;cv2.cv&lt;/span&gt; &lt;span style="color: #007020; font-weight: bold;"&gt;as&lt;/span&gt; &lt;span style="color: #0e84b5; font-weight: bold;"&gt;cv&lt;/span&gt;

cv&lt;span style="color: #666666;"&gt;.&lt;/span&gt;NamedWindow( &lt;span style="color: #4070a0;"&gt;"mycamera"&lt;/span&gt;, &lt;span style="color: #40a070;"&gt;1&lt;/span&gt; )
capture &lt;span style="color: #666666;"&gt;=&lt;/span&gt; cv&lt;span style="color: #666666;"&gt;.&lt;/span&gt;CreateCameraCapture( &lt;span style="color: #40a070;"&gt;0&lt;/span&gt; )

&lt;span style="color: #007020; font-weight: bold;"&gt;while&lt;/span&gt; &lt;span style="color: #007020;"&gt;True&lt;/span&gt;:
    img &lt;span style="color: #666666;"&gt;=&lt;/span&gt; cv&lt;span style="color: #666666;"&gt;.&lt;/span&gt;QueryFrame( capture )
    cv&lt;span style="color: #666666;"&gt;.&lt;/span&gt;ShowImage( &lt;span style="color: #4070a0;"&gt;"mycamera"&lt;/span&gt;, img )
    &lt;span style="color: #007020; font-weight: bold;"&gt;if&lt;/span&gt; cv&lt;span style="color: #666666;"&gt;.&lt;/span&gt;WaitKey(&lt;span style="color: #40a070;"&gt;20&lt;/span&gt;) &lt;span style="color: #666666;"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #40a070;"&gt;0&lt;/span&gt;:
        &lt;span style="color: #007020; font-weight: bold;"&gt;break&lt;/span&gt;

cv&lt;span style="color: #666666;"&gt;.&lt;/span&gt;DestroyWindow( &lt;span style="color: #4070a0;"&gt;"mycamera"&lt;/span&gt; )
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
Below is the C/C++ equivalent of the above Python script.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://3.bp.blogspot.com/-1IFHtOU8RSM/UamIfGRXh2I/AAAAAAAAAeo/vSAM4muV_lU/s1600/Screenshot_cpp.png" target="_blank"&gt;hello_camera.cpp&lt;/a&gt;&lt;br /&gt;
&lt;div style="background: #f0f0f0; border-width: .1em .1em .1em .8em; border: solid gray; overflow: auto; padding: .2em .6em; width: auto;"&gt;
&lt;pre style="line-height: 125%; margin: 0;"&gt;&lt;span style="color: #007020;"&gt;#include &amp;lt;opencv2/highgui/highgui.hpp&amp;gt;&lt;/span&gt;
&lt;span style="color: #007020; font-weight: bold;"&gt;using&lt;/span&gt; &lt;span style="color: #007020; font-weight: bold;"&gt;namespace&lt;/span&gt; cv;

&lt;span style="color: #902000;"&gt;int&lt;/span&gt; main( &lt;span style="color: #902000;"&gt;int&lt;/span&gt; argc, &lt;span style="color: #007020; font-weight: bold;"&gt;const&lt;/span&gt; &lt;span style="color: #902000;"&gt;char&lt;/span&gt;&lt;span style="color: #666666;"&gt;**&lt;/span&gt; argv )
{
    cvNamedWindow( &lt;span style="color: #4070a0;"&gt;"mycamera"&lt;/span&gt;, &lt;span style="color: #40a070;"&gt;1&lt;/span&gt; ); &lt;span style="color: #60a0b0; font-style: italic;"&gt;// create camera window&lt;/span&gt;
    CvCapture &lt;span style="color: #666666;"&gt;*&lt;/span&gt;capture &lt;span style="color: #666666;"&gt;=&lt;/span&gt; cvCreateCameraCapture( &lt;span style="color: #40a070;"&gt;0&lt;/span&gt; ); &lt;span style="color: #60a0b0; font-style: italic;"&gt;// start capturing frames from camera (i.e. /dev/video0 device)&lt;/span&gt;

    &lt;span style="color: #007020; font-weight: bold;"&gt;while&lt;/span&gt;(&lt;span style="color: #40a070;"&gt;1&lt;/span&gt;){
        IplImage&lt;span style="color: #666666;"&gt;*&lt;/span&gt; img &lt;span style="color: #666666;"&gt;=&lt;/span&gt; cvQueryFrame( capture ); &lt;span style="color: #60a0b0; font-style: italic;"&gt;// grab and retrieve frame&lt;/span&gt;
        cvShowImage( &lt;span style="color: #4070a0;"&gt;"mycamera"&lt;/span&gt;, img ); &lt;span style="color: #60a0b0; font-style: italic;"&gt;// display image within window&lt;/span&gt;
        &lt;span style="color: #007020; font-weight: bold;"&gt;if&lt;/span&gt;( waitKey(&lt;span style="color: #40a070;"&gt;20&lt;/span&gt;) &lt;span style="color: #666666;"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #40a070;"&gt;0&lt;/span&gt; ) &lt;span style="color: #60a0b0; font-style: italic;"&gt;// press any key to exit (interval=20ms)&lt;/span&gt;
            &lt;span style="color: #007020; font-weight: bold;"&gt;break&lt;/span&gt;;
    }
    &lt;span style="color: #60a0b0; font-style: italic;"&gt;// cleanups&lt;/span&gt;
    cvReleaseCapture( &lt;span style="color: #666666;"&gt;&amp;amp;&lt;/span&gt;capture ); &lt;span style="color: #60a0b0; font-style: italic;"&gt;// stop capturing/reading // not needed in python (?)&lt;/span&gt;
    cvDestroyWindow( &lt;span style="color: #4070a0;"&gt;"mycamera"&lt;/span&gt; ); &lt;span style="color: #60a0b0; font-style: italic;"&gt;// end camera window&lt;/span&gt;
    &lt;span style="color: #007020; font-weight: bold;"&gt;return&lt;/span&gt; &lt;span style="color: #40a070;"&gt;0&lt;/span&gt;;
}
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
---------------------------------------------------------------------------&lt;br /&gt;
- thanks to &lt;a href="http://hilite.me/"&gt;hilite.me&lt;/a&gt; for formating the codes. (&lt;i&gt;best viewed with Firefox browser&lt;/i&gt;)&lt;br /&gt;
- webcam can also be tested with &lt;a href="http://packages.debian.org/wheezy/guvcview" target="_blank"&gt;guvcview&lt;/a&gt; (&lt;i&gt;&lt;span style="font-size: x-small;"&gt;Applications Menu-&amp;gt;Multimedia-&amp;gt;guvcview&lt;/span&gt;&lt;/i&gt;)&lt;br /&gt;
&lt;br /&gt;&lt;img src="http://feeds.feedburner.com/~r/Projectproto/~4/jioyw4p__Kg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://projectproto.blogspot.com/feeds/8558385723600717336/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://projectproto.blogspot.com/2013/06/opencv-arm-hello-world.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/8558385723600717336?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/8558385723600717336?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Projectproto/~3/jioyw4p__Kg/opencv-arm-hello-world.html" title="OpenCV ARM - Hello World" /><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/-L_LViaaqKgI/UaleA6DdBMI/AAAAAAAAAeM/5N_VbEyfYTU/s72-c/IMG_2505.JPG" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://projectproto.blogspot.com/2013/06/opencv-arm-hello-world.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkEDRH0yeyp7ImA9WhFTGE4.&quot;"><id>tag:blogger.com,1999:blog-3967613250975275925.post-8202851360466610526</id><published>2013-06-01T13:02:00.001+08:00</published><updated>2013-06-10T10:17:55.393+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-06-10T10:17:55.393+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ARM Cortex-A8 / Allwinner A10" /><title>Debian Wheezy on SUN4I (Allwinner A10)</title><content type="html">&lt;div class="separator" style="clear: both; text-align: justify;"&gt;
I purchased a mini android tv box available at &lt;a href="http://www.cdrking.com/?mod=products&amp;amp;type=view&amp;amp;sid=16420&amp;amp;main=167" target="_blank"&gt;cd-rking&lt;/a&gt;. The item is actually a re-branded &lt;a href="http://www.yonesnav.com/products/bc218.php" target="_blank"&gt;BC218&lt;/a&gt; (similar specs to &lt;a href="http://en.wikipedia.org/wiki/Android_Mini_PC_MK802" target="_blank"&gt;MK802+&lt;/a&gt;). This connects to a hdmi monitor, and with a mouse and keyboard this can function as a mini computer. After some testing, I decided to customize a Debian image dedicated for &lt;a href="http://opencv.org/" target="_blank"&gt;OpenCV&lt;/a&gt; development.&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;a href="http://4.bp.blogspot.com/-TVITWvqW2bQ/UajGzUjix0I/AAAAAAAAAds/SVXUivw_yXY/s1600/sun4i_brd.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://4.bp.blogspot.com/-TVITWvqW2bQ/UajGzUjix0I/AAAAAAAAAds/SVXUivw_yXY/s320/sun4i_brd.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
download: &lt;span style="font-size: large;"&gt;&lt;a href="https://docs.google.com/file/d/0ByrUyGCmwm6eMzExMWlfWmxQcHM/edit?usp=sharing" target="_blank"&gt;Debian Wheezy armhf image&lt;/a&gt;&lt;/span&gt; (~164MB)&lt;br /&gt;
- &lt;a href="http://wiki.debian.org/ArmHardFloatPort" target="_blank"&gt;Debian&lt;/a&gt; Wheezy w/ XFCE4 desktop (&lt;span style="font-size: x-small;"&gt;&lt;i&gt;&lt;a href="https://yus-repo.googlecode.com/svn/trunk/Linux/AllwinnerA10/debian/bootstrap/debootstrap" target="_blank"&gt;debootstrap&lt;/a&gt;&lt;/i&gt;&lt;/span&gt; &lt;span style="font-size: x-small;"&gt;&lt;i&gt;&lt;a href="https://yus-repo.googlecode.com/svn/trunk/Linux/AllwinnerA10/debian/bootstrap/bootstrap_wheezy_armhf.log" target="_blank"&gt;log&lt;/a&gt;&lt;/i&gt;&lt;/span&gt; )&lt;br /&gt;
- Kernel 3.4.43 (&lt;span style="font-size: xx-small;"&gt;&lt;a href="https://github.com/linux-sunxi/linux-sunxi/tree/sunxi-3.4" target="_blank"&gt;6416f0bf9e32d0950ba6f768ac20228ce8940a79&lt;/a&gt;&lt;/span&gt;) [&lt;span style="font-size: x-small;"&gt;&lt;a href="https://launchpad.net/linaro-toolchain-binaries/+milestone/2013.04" target="_blank"&gt;Linaro 4.7&lt;/a&gt;&lt;/span&gt;]&lt;br /&gt;
- natively build &lt;a href="http://linux-sunxi.org/Binary_drivers" target="_blank"&gt;MALI GPU drivers&lt;/a&gt;&lt;br /&gt;
- natively build &lt;a href="http://opencv.org/" target="_blank"&gt;OpenCV&lt;/a&gt; 2.4.5 libraries (C/C++ and Python2.7 &lt;a href="https://yus-repo.googlecode.com/svn/trunk/Linux/AllwinnerA10/opencv/logs/cmake_052913.log" target="_blank"&gt;support&lt;/a&gt;)&lt;br /&gt;
- with build-essential (e.g. compiler) and python packages&lt;br /&gt;
&lt;br /&gt;
instructions:&lt;br /&gt;
- needs at least 2G microSD card &lt;br /&gt;
- extract *.img file using &lt;a href="http://p7zip.sourceforge.net/" target="_blank"&gt;p7zip&lt;/a&gt; or &lt;a href="http://www.7-zip.org/" target="_blank"&gt;7zip&lt;/a&gt;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp; then use &lt;a href="http://en.wikipedia.org/wiki/Dd_%28Unix%29" target="_blank"&gt;dd&lt;/a&gt; (Linux) or &lt;a href="http://sourceforge.net/projects/win32diskimager/" target="_blank"&gt;win32diskimager&lt;/a&gt; (Windows) to burn the image&lt;br /&gt;
- resize partitions (optional ) &lt;br /&gt;
- root password: &lt;b&gt;toor&lt;/b&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-gwp1ODqRSiQ/UajPLdsMr6I/AAAAAAAAAd8/iEybD_4VjvI/s1600/Screenshot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="180" src="http://3.bp.blogspot.com/-gwp1ODqRSiQ/UajPLdsMr6I/AAAAAAAAAd8/iEybD_4VjvI/s320/Screenshot.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
notes:&lt;br /&gt;
- tested only on &lt;a href="http://www.yonesnav.com/products/bc218.php" target="_blank"&gt;BC218&lt;/a&gt;; so the u-boot, script, and kernel may need to be modified to work for other boards)&lt;br /&gt;
- this Debian is intended only for &lt;a href="http://www.csksoft.net/blog/post/mk802_dev_opencv.html" target="_blank"&gt;opencv development&lt;/a&gt;, NOT for everyday use. There are other &lt;a href="http://liliputing.com/2012/07/linux-distributions-that-can-run-on-an-mk802-mini-pc.html" target="_blank"&gt;linux distro's&lt;/a&gt; that are more functional than this. &lt;br /&gt;
- no &lt;a href="http://linux-sunxi.org/CedarX" target="_blank"&gt;CedarX&lt;/a&gt; (VPU) libraries&lt;br /&gt;
- to keep the image size small: (1)there's no media player and no web browser included (wifi still works though); (2)remove docs, some locales, and /var/cache/ files.&lt;br /&gt;
- some kernel drivers in the default "sun4i_defconfig" were disabled. While, UVC, usb2serial, etc drivers were enabled for interfacing development.&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
update 06/09/13&lt;br /&gt;
&lt;span style="font-size: large;"&gt;&lt;a href="http://code.google.com/p/yus-repo/downloads/detail?name=debian_wheezy_lxde_opencv_armhf_sun4i_1g_720p.7z" target="_blank"&gt;Debian Wheezy armhf image V2&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
* with &lt;a href="http://yus-repo.googlecode.com/svn/trunk/Linux/AllwinnerA10/debian/bootstrap/bootstrap_wheezy_lxde_armhf.log" target="_blank"&gt;LXDE&lt;/a&gt; desktop&lt;br /&gt;
* apply some tweaks (may cause instability in the system!!!)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; - increase dram clock to 432MHz&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; - increase default min cpu freq to 204MHz, default max to 1104MHz&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; - use tmpfs for "tmp" and "log" folders&lt;br /&gt;
* re-&lt;a href="http://yus-repo.googlecode.com/svn/trunk/Linux/AllwinnerA10/opencv/logs_v2/build_060913.log" target="_blank"&gt;build&lt;/a&gt; opencv &lt;a href="http://yus-repo.googlecode.com/svn/trunk/Linux/AllwinnerA10/opencv/logs_v2/cmake_060913.log" target="_blank"&gt;libraries&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If interested only on uboot and kernel files, here's the &lt;a href="http://code.google.com/p/yus-repo/downloads/detail?name=boot_kernel_modules_armhf_sun4i_1g_720p.tar.gz" target="_blank"&gt;archive&lt;/a&gt;.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-hS3ZssuzciI/UbU1ULRu8fI/AAAAAAAAAfQ/E8oWCz6m280/s1600/sun4i_heatsink.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="150" src="http://4.bp.blogspot.com/-hS3ZssuzciI/UbU1ULRu8fI/AAAAAAAAAfQ/E8oWCz6m280/s200/sun4i_heatsink.jpg" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;
You may also need to mod the device by adding heatsink. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'yus &lt;img src="http://feeds.feedburner.com/~r/Projectproto/~4/wnQQ6fS64Eg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://projectproto.blogspot.com/feeds/8202851360466610526/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://projectproto.blogspot.com/2013/06/debian-wheezy-on-sun4i-allwinner-a10.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/8202851360466610526?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/8202851360466610526?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Projectproto/~3/wnQQ6fS64Eg/debian-wheezy-on-sun4i-allwinner-a10.html" title="Debian Wheezy on SUN4I (Allwinner A10)" /><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/-TVITWvqW2bQ/UajGzUjix0I/AAAAAAAAAds/SVXUivw_yXY/s72-c/sun4i_brd.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://projectproto.blogspot.com/2013/06/debian-wheezy-on-sun4i-allwinner-a10.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUQER304fSp7ImA9WhBWFkU.&quot;"><id>tag:blogger.com,1999:blog-3967613250975275925.post-193804657307806642</id><published>2013-04-10T23:12:00.000+08:00</published><updated>2013-04-11T21:35:06.335+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-04-11T21:35:06.335+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="LEDs and LCDs" /><category scheme="http://www.blogger.com/atom/ns#" term="ARM Cortex-M4 / LM4F" /><title>Stellaris Launchpad and Nokia 6100 LCD</title><content type="html">... interfacing Nokia &lt;a href="http://e-gizmo.com/KIT/COLOR%20LCD%20SHIELD.html" target="_blank"&gt;6100 LCD shield&lt;/a&gt; to &lt;a href="http://www.ti.com/tool/ek-lm4f120xl" target="_blank"&gt;Stellaris Launchpad&lt;/a&gt;.&lt;br /&gt;
The LCD library used in this demo is included in the &lt;a href="http://projectproto.blogspot.com/2013/04/lm4f-gcc-arm-ide.html" target="_blank"&gt;LM4F GCC-ARM IDE&lt;/a&gt; package.&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/-HX31PA5CoNI/UWa7kAj2YRI/AAAAAAAAAdQ/sijHJgn_MdM/s1600/IMG_2497_2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="300" src="http://3.bp.blogspot.com/-HX31PA5CoNI/UWa7kAj2YRI/AAAAAAAAAdQ/sijHJgn_MdM/s400/IMG_2497_2.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-T70CphN9qtM/UWWAlO7fm9I/AAAAAAAAAb0/Us95HPaZLsU/s1600/IMG_2494.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="300" src="http://4.bp.blogspot.com/-T70CphN9qtM/UWWAlO7fm9I/AAAAAAAAAb0/Us95HPaZLsU/s400/IMG_2494.JPG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;img src="http://feeds.feedburner.com/~r/Projectproto/~4/g0JwVuAJH7w" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://projectproto.blogspot.com/feeds/193804657307806642/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://projectproto.blogspot.com/2013/04/stellaris-launchpad-and-nokia-6100-lcd.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/193804657307806642?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/193804657307806642?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Projectproto/~3/g0JwVuAJH7w/stellaris-launchpad-and-nokia-6100-lcd.html" title="Stellaris Launchpad and Nokia 6100 LCD" /><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/-HX31PA5CoNI/UWa7kAj2YRI/AAAAAAAAAdQ/sijHJgn_MdM/s72-c/IMG_2497_2.jpg" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://projectproto.blogspot.com/2013/04/stellaris-launchpad-and-nokia-6100-lcd.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0INQng5fSp7ImA9WhBWFkU.&quot;"><id>tag:blogger.com,1999:blog-3967613250975275925.post-3850261452088236248</id><published>2013-04-10T15:41:00.000+08:00</published><updated>2013-04-11T21:06:33.625+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-04-11T21:06:33.625+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ARM Cortex-M4 / LM4F" /><title>LM4F-GCC-ARM-IDE</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-X0Hjz45xRi0/UWavj_8-EDI/AAAAAAAAAcU/pOevRvxmCo0/s1600/app.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-X0Hjz45xRi0/UWavj_8-EDI/AAAAAAAAAcU/pOevRvxmCo0/s1600/app.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
...an alternative Integrated Development Environment for &lt;a href="http://www.ti.com/"&gt;TI&lt;/a&gt;'s &lt;a href="http://www.ti.com/tool/ek-lm4f120xl"&gt;Stellaris® LM4F120 LaunchPad&lt;/a&gt; (ARM Cortex-M4F @80MHz, 256kB FLASH + 32kB SRAM)&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-8jeTbqFR8s8/UWTKxQdIgdI/AAAAAAAAAbQ/W788NE2DkGQ/s1600/StellarisLaunchPad.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="280" src="http://1.bp.blogspot.com/-8jeTbqFR8s8/UWTKxQdIgdI/AAAAAAAAAbQ/W788NE2DkGQ/s320/StellarisLaunchPad.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
download: &lt;a href="http://code.google.com/p/yus-repo/downloads/detail?name=lm4f-gcc-arm-ide-win32.7z" target="_blank"&gt;&lt;span style="font-size: large;"&gt;lm4f-gcc-arm-ide-win32.7z&lt;/span&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;   17.7 MB only.&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/-NLZULjteddM/UWUVC1Pj8CI/AAAAAAAAAbk/t_ivoepE5c8/s1600/lm4f-ide.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://3.bp.blogspot.com/-NLZULjteddM/UWUVC1Pj8CI/AAAAAAAAAbk/t_ivoepE5c8/s400/lm4f-ide.png" width="367" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
IDE features:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;fast light-weight IDE (&lt;a href="http://www.riverbankcomputing.com/software/pyqt/intro"&gt;PyQt&lt;/a&gt; based)&lt;/li&gt;
&lt;li&gt;using &lt;a href="https://launchpad.net/gcc-arm-embedded"&gt;gcc-arm-embedded&lt;/a&gt; 4.7.3 &lt;/li&gt;
&lt;li&gt;auto-completion (NOT IntelliSense)&lt;/li&gt;
&lt;li&gt;code-outline using &lt;a href="http://clang.llvm.org/docs/Tooling.html"&gt;CLang&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;lm4flash (flash loader from &lt;a href="https://github.com/utzig/lm4tools"&gt;lm4tools&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;serial monitor&lt;/li&gt;
&lt;li&gt;supports C++ projects&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.ti.com/tool/sw-lm3s" target="_blank"&gt;stellarisware&lt;/a&gt; peripheral driver library&lt;/li&gt;
&lt;li&gt;supports 8 hardware UARTs: Serial0 to Serial7 (&lt;i&gt;&lt;span style="font-size: x-small;"&gt;Serial0 is the same as the debug "Serial". Serial6 pins are mux w/ USB pins&lt;/span&gt;&lt;/i&gt;)&lt;/li&gt;
&lt;li&gt;advanced libraries( USB device, &lt;a href="http://www.freertos.org/" target="_blank"&gt;FreeRTOS&lt;/a&gt; kernel)&lt;/li&gt;
&lt;li&gt;basic libraries (gpio's, delay's, buttons, RGB led, N6100 lcd) &lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&lt;a href="http://philrobotics.com/forum/index.php/topic,133.msg2553.html#msg2553"&gt;forum discussion link&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;img src="http://feeds.feedburner.com/~r/Projectproto/~4/R0ZM4kfvRLE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://projectproto.blogspot.com/feeds/3850261452088236248/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://projectproto.blogspot.com/2013/04/lm4f-gcc-arm-ide.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/3850261452088236248?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/3850261452088236248?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Projectproto/~3/R0ZM4kfvRLE/lm4f-gcc-arm-ide.html" title="LM4F-GCC-ARM-IDE" /><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/-X0Hjz45xRi0/UWavj_8-EDI/AAAAAAAAAcU/pOevRvxmCo0/s72-c/app.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://projectproto.blogspot.com/2013/04/lm4f-gcc-arm-ide.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0cMRH48eyp7ImA9WhBVEEk.&quot;"><id>tag:blogger.com,1999:blog-3967613250975275925.post-6303253307613808592</id><published>2013-04-10T15:29:00.000+08:00</published><updated>2013-04-15T23:51:25.073+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-04-15T23:51:25.073+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ARM Cortex-M3 / STM32" /><title>STM32-GCC-ARM-IDE</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-gc7kJDSspkM/UWa1qCfymQI/AAAAAAAAAck/NhEWeWxFgiE/s1600/app_stm32.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-gc7kJDSspkM/UWa1qCfymQI/AAAAAAAAAck/NhEWeWxFgiE/s1600/app_stm32.png" /&gt;&lt;/a&gt;&lt;/div&gt;
a port of &lt;a href="http://www.philrobotics.com/philrobokit-ide-update"&gt;Philrobokit IDE&lt;/a&gt; to STM32F1 w/ GCC-ARM toolchain&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-hx3aXdfMQnU/UWTHUJkrCNI/AAAAAAAAAa4/iXlkByF1xPI/s1600/STM32-GCC-ARM-IDE.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://1.bp.blogspot.com/-hx3aXdfMQnU/UWTHUJkrCNI/AAAAAAAAAa4/iXlkByF1xPI/s400/STM32-GCC-ARM-IDE.png" width="338" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
currently, only works for &lt;a href="http://e-gizmo.com/"&gt;E-Gizmo&lt;/a&gt;'s &lt;a href="http://e-gizmo.com/KIT/STM32.html"&gt;STM32 MCU Board&lt;/a&gt;&lt;br /&gt;
(STM32F100C8 @24MHz, 64kB FLASH + 8kB SRAM)&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-xjXlx5KjVlg/UWTHUMMm-vI/AAAAAAAAAa8/1xkiAyUA0D8/s1600/STM32+ARM+Cortex.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="258" src="http://3.bp.blogspot.com/-xjXlx5KjVlg/UWTHUMMm-vI/AAAAAAAAAa8/1xkiAyUA0D8/s320/STM32+ARM+Cortex.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
download: &lt;a href="http://code.google.com/p/yus-repo/downloads/detail?name=stm32-gcc-arm-ide-win32.7z" target="_blank"&gt;&lt;span style="font-size: large;"&gt;stm32-gcc-arm-ide-win32.7z&lt;/span&gt;&lt;/a&gt;   38.7 MB&lt;br /&gt;
previous version: &lt;a href="http://code.google.com/p/philrobotics-projects/downloads/detail?name=stm32-gcc-arm-ide-win32.7z" target="_blank"&gt;svn-r125&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://philrobotics.com/forum/index.php/topic,124.0.html"&gt;forum discussion link&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/Projectproto/~4/UQ4hYL5aS9g" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://projectproto.blogspot.com/feeds/6303253307613808592/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://projectproto.blogspot.com/2013/04/stm32-gcc-arm-ide.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/6303253307613808592?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/6303253307613808592?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Projectproto/~3/UQ4hYL5aS9g/stm32-gcc-arm-ide.html" title="STM32-GCC-ARM-IDE" /><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/-gc7kJDSspkM/UWa1qCfymQI/AAAAAAAAAck/NhEWeWxFgiE/s72-c/app_stm32.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://projectproto.blogspot.com/2013/04/stm32-gcc-arm-ide.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUACRH4-cCp7ImA9WhVVEUU.&quot;"><id>tag:blogger.com,1999:blog-3967613250975275925.post-8331828695266339939</id><published>2012-04-22T21:38:00.000+08:00</published><updated>2012-05-05T10:09:25.058+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-05-05T10:09:25.058+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Android" /><category scheme="http://www.blogger.com/atom/ns#" term="OpenCV" /><title>Android-OpenCV Object-Tracking</title><content type="html">&lt;br /&gt;
Tracking a ping-pong ball using Android-OpenCV Library&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/MGX1qzEau2A/0.jpg" height="266" width="320"&gt;&lt;param name="movie" value="http://www.youtube.com/v/MGX1qzEau2A?version=3&amp;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/MGX1qzEau2A?version=3&amp;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;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
source code:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;span style="font-size: x-small;"&gt;svn co http://yus-repo.googlecode.com/svn/trunk/Android/apps/objtrack&lt;/span&gt;&lt;/blockquote&gt;
&lt;i&gt;&lt;span style="font-size: x-small;"&gt;* needs &lt;a href="http://opencv.itseez.com/doc/tutorials/introduction/android_binary_package/android_binary_package_using_with_NDK.html" target="_blank"&gt;Android-NDK&lt;/a&gt; to build.&lt;br /&gt;
modify &lt;a href="http://yus-repo.googlecode.com/svn/trunk/Android/apps/objtrack/jni/objtrack.cpp"&gt;objtrack.cpp&lt;/a&gt; to detect other objects/colors&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
pre-built installer: &lt;a href="http://code.google.com/p/yus-repo/downloads/detail?name=Object-Track.apk" target="_blank"&gt;Object-Track.apk&lt;/a&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style="font-size: x-small;"&gt;* only for Android phones with ARMv7-capable CPU and Gingerbread OS. &lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
references:&lt;br /&gt;
&lt;a href="http://code.opencv.org/projects/opencv/wiki/OpenCV4Android"&gt;OpenCV for Android&lt;/a&gt; &lt;span style="font-size: x-small;"&gt;(see &lt;a href="http://code.opencv.org/projects/opencv/wiki/AndroidSamples" target="_blank"&gt;Tutorial 2 Advanced - 1. Add Native OpenCV&lt;/a&gt;)&lt;/span&gt;&lt;br /&gt;
&lt;a href="http://www.aishack.in/2010/07/tracking-colored-objects-in-opencv/" target="_blank"&gt;Tracking colored objects in OpenCV&lt;/a&gt;&lt;br /&gt;
&lt;a href="https://groups.google.com/forum/?fromgroups#%21forum/android-opencv" target="_blank"&gt;Android-OpenCV Google-Group&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
##############################################&lt;br /&gt;
&lt;i&gt;edit 05-05-12&lt;/i&gt;&lt;br /&gt;
interfacing the app to philrobokit-Anito board (observe the LEDs+buzzer states with respect to the ball position).&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;object width="320" height="266" 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://3.gvt0.com/vi/pJr4SBs1u7M/0.jpg"&gt;&lt;param name="movie" value="http://www.youtube.com/v/pJr4SBs1u7M&amp;fs=1&amp;source=uds" /&gt;
&lt;param name="bgcolor" value="#FFFFFF" /&gt;
&lt;embed width="320" height="266"  src="http://www.youtube.com/v/pJr4SBs1u7M&amp;fs=1&amp;source=uds" type="application/x-shockwave-flash"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;
&lt;br /&gt;
 * Data are being transmitted via the usb2serial adapter (built-in to the kit) using &lt;a href="http://code.google.com/p/android-serialport-api/" target="_blank"&gt;&lt;span itemprop="name"&gt;android-serialport-api.&lt;/span&gt;&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/Projectproto/~4/dC7rSx9qFxA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://projectproto.blogspot.com/feeds/8331828695266339939/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://projectproto.blogspot.com/2012/04/android-opencv-object-tracking.html#comment-form" title="8 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/8331828695266339939?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/8331828695266339939?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Projectproto/~3/dC7rSx9qFxA/android-opencv-object-tracking.html" title="Android-OpenCV Object-Tracking" /><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>8</thr:total><feedburner:origLink>http://projectproto.blogspot.com/2012/04/android-opencv-object-tracking.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEABRHs5cSp7ImA9WhRaFU4.&quot;"><id>tag:blogger.com,1999:blog-3967613250975275925.post-381366835455420849</id><published>2012-02-18T11:45:00.000+08:00</published><updated>2012-02-18T11:45:55.529+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-18T11:45:55.529+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="mobot" /><category scheme="http://www.blogger.com/atom/ns#" term="ARM Cortex-M0 / LPC11xx" /><title>Quadruped - part 2</title><content type="html">&lt;i&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; my second prototype of a four-legged robot...&lt;/i&gt;&lt;br /&gt;
It is the same assembly with the &lt;a href="http://projectproto.blogspot.com/2011/07/quadruped.html" target="_blank"&gt;previous&lt;/a&gt;. But this time, it's now powered by &lt;a href="http://ics.nxp.com/lpcxpresso/" target="_blank"&gt;LPCXpresso&lt;/a&gt; (LPC1114) running &lt;a href="http://www.coocox.org/CoOS.htm" target="_blank"&gt;CoOS&lt;/a&gt;. It's also controllable by &lt;a href="http://projectproto.blogspot.com/2012/02/bluetooth-joystick.html" target="_blank"&gt;bluetooth joystick&lt;/a&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/-KwzwCGI3qD8/Tz8XjnmaZMI/AAAAAAAAAZ0/B-oDKW7i-Qw/s1600/quadruped_lpc1114.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://2.bp.blogspot.com/-KwzwCGI3qD8/Tz8XjnmaZMI/AAAAAAAAAZ0/B-oDKW7i-Qw/s320/quadruped_lpc1114.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://4.bp.blogspot.com/-LnikFwkrl94/Tz8Ze7M0FkI/AAAAAAAAAZ8/KGz5PqKEGjo/s1600/lpcxpresso_lpc1114.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://4.bp.blogspot.com/-LnikFwkrl94/Tz8Ze7M0FkI/AAAAAAAAAZ8/KGz5PqKEGjo/s320/lpcxpresso_lpc1114.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style="font-size: x-small;"&gt;source code (with all the revisions):&lt;/span&gt;&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;
svn co http://yus-repo.googlecode.com/svn/trunk/Bots/quad_lpc1114&lt;/div&gt;
&lt;/blockquote&gt;
&lt;br /&gt;
&lt;i&gt;&lt;span style="font-size: x-small;"&gt;* source code can be build using &lt;a href="http://www.mentor.com/embedded-software/sourcery-tools/sourcery-codebench/editions/lite-edition/" target="_blank"&gt;Sourcery CodeBench Lite&lt;/a&gt; for ARM-EABI&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style="font-size: x-small;"&gt;* I'm using&amp;nbsp; &lt;a href="http://sourceforge.net/projects/lpc21isp/" target="_blank"&gt;lpc21isp&lt;/a&gt; to load the binaries for the lpc1114 using built-in serial bootloader.&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style="font-size: x-small;"&gt;* &lt;a href="http://youtu.be/Vxc3j-rmIDg" target="_blank"&gt;demo video&lt;/a&gt; is on my previous post. &lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;img src="http://feeds.feedburner.com/~r/Projectproto/~4/PB5R-UAIuqI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://projectproto.blogspot.com/feeds/381366835455420849/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://projectproto.blogspot.com/2012/02/quadruped-part-2.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/381366835455420849?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/381366835455420849?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Projectproto/~3/PB5R-UAIuqI/quadruped-part-2.html" title="Quadruped - part 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><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-KwzwCGI3qD8/Tz8XjnmaZMI/AAAAAAAAAZ0/B-oDKW7i-Qw/s72-c/quadruped_lpc1114.jpg" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://projectproto.blogspot.com/2012/02/quadruped-part-2.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CE4FSHo-fyp7ImA9WhNTE0w.&quot;"><id>tag:blogger.com,1999:blog-3967613250975275925.post-5256832408121505957</id><published>2012-02-15T10:58:00.006+08:00</published><updated>2012-10-15T22:55:19.457+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-10-15T22:55:19.457+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Android" /><category scheme="http://www.blogger.com/atom/ns#" term="wireless" /><title>Bluetooth Joystick</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-Y4linYYIqew/TzsnMlGHJSI/AAAAAAAAAZs/yG-GmwV8DIw/s1600/btjoystickicon.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-Y4linYYIqew/TzsnMlGHJSI/AAAAAAAAAZs/yG-GmwV8DIw/s1600/btjoystickicon.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Android Bluetooth Dual-Joystick Controller&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Sends 5 bytes every 200ms (or every 3 sec if idle).&lt;br /&gt;
data format: [ STX : radiusL : angleL : radiusR : angleR ]&lt;br /&gt;
where: STX = 0x55&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; radius = {0..10}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; angle = {0..35} (or actual/10)&lt;br /&gt;
&lt;br /&gt;
sample:&lt;br /&gt;
&lt;a href="http://3.bp.blogspot.com/-XcPcI3sj_Bs/TzscjuuDn8I/AAAAAAAAAZc/JQ3uEvBqi-g/s1600/BTJoystick.png"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-XcPcI3sj_Bs/TzscjuuDn8I/AAAAAAAAAZc/JQ3uEvBqi-g/s320/BTJoystick.png" /&gt;&lt;/a&gt;&lt;br /&gt;
will send [ 0x55 : 0x0A : 0x12 : 0x05 : 0x09 ]&lt;br /&gt;
&lt;span style="font-size: x-small;"&gt;&lt;i&gt;(**left-joystick is pulled backward; right-joystick leaning to the left)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Source code:&lt;br /&gt;
svn co https://yus-repo.googlecode.com/svn/trunk/Android/apps/btjoystick&lt;br /&gt;
&lt;br /&gt;
Installer: &lt;a href="http://code.google.com/p/yus-repo/downloads/detail?name=BTJoystick.apk"&gt;BTJoystick.apk&lt;/a&gt; .&lt;br /&gt;
&lt;br /&gt;
Joystick widget from &lt;a href="http://code.google.com/p/mobile-anarchy-widgets/"&gt;Mobile-Anarchy&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
demo on my quadruped: &lt;br /&gt;
&lt;object height="315" width="420"&gt;&lt;param name="movie" value="http://www.youtube.com/v/Vxc3j-rmIDg?version=3&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/Vxc3j-rmIDg?version=3&amp;amp;hl=en_US" type="application/x-shockwave-flash" width="420" height="315" allowscriptaccess="always" allowfullscreen="true"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;
&lt;br /&gt;
#---------------------------------&lt;br /&gt;
edit 10/15/12&lt;br /&gt;
version 2: &lt;a class="bbc_link" href="http://code.google.com/p/yus-repo/downloads/detail?name=BTJoystick.v2.apk" target="_blank"&gt;&lt;strong&gt;&lt;span class="bbc_u"&gt;BTJoystick.v2.apk&lt;/span&gt;&lt;/strong&gt;&lt;/a&gt;&amp;nbsp; &amp;nbsp;45.8 KB&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/-oXuhQdCedIQ/UHwjSz86q-I/AAAAAAAAAak/nqLHBzlGTEk/s1600/BTJoystick.v2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="213" src="http://2.bp.blogspot.com/-oXuhQdCedIQ/UHwjSz86q-I/AAAAAAAAAak/nqLHBzlGTEk/s320/BTJoystick.v2.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
modifications:&lt;br /&gt;* preference menu (e.g. "Menu-&amp;gt;Connect" &amp;amp; "Menu-&amp;gt;Options" )&lt;br /&gt;* add four customizable buttons (send either an ascii char or a string)&lt;br /&gt;* immediately send joystick data when a joystick returns to center position&lt;br /&gt;* selectable data format, intervals and timeout&lt;br /&gt;* prevent accidental closing&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;img src="http://feeds.feedburner.com/~r/Projectproto/~4/9FBo58nbmV8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://projectproto.blogspot.com/feeds/5256832408121505957/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://projectproto.blogspot.com/2012/02/bluetooth-joystick.html#comment-form" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/5256832408121505957?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3967613250975275925/posts/default/5256832408121505957?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Projectproto/~3/9FBo58nbmV8/bluetooth-joystick.html" title="Bluetooth Joystick" /><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/-Y4linYYIqew/TzsnMlGHJSI/AAAAAAAAAZs/yG-GmwV8DIw/s72-c/btjoystickicon.png" height="72" width="72" /><thr:total>4</thr:total><feedburner:origLink>http://projectproto.blogspot.com/2012/02/bluetooth-joystick.html</feedburner:origLink></entry><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;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;D0IMRHo_fCp7ImA9WhVQEkU.&quot;"><id>tag:blogger.com,1999:blog-3967613250975275925.post-692445247445501589</id><published>2012-01-13T11:05:00.008+08:00</published><updated>2012-04-01T21:06:25.444+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-04-01T21:06:25.444+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;/actual&gt;&lt;/gparted&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;gparted&gt;&lt;actual pix=""&gt;&lt;span style="font-size: x-small;"&gt;&lt;i&gt;side note&lt;/i&gt;:&lt;/span&gt;&lt;/actual&gt;&lt;/gparted&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;gparted&gt;&lt;actual pix=""&gt;&lt;span style="font-size: small;"&gt;Recovering "wload" and "u-boot"&amp;nbsp; without a flash programmer.&lt;/span&gt;&lt;/actual&gt;&lt;/gparted&gt;&lt;/b&gt;&lt;br /&gt;
&lt;gparted&gt;&lt;actual pix=""&gt;&lt;span style="font-size: small;"&gt;However, this procedure needs an already working SPI Flash chip.&lt;/span&gt;&lt;/actual&gt;&lt;/gparted&gt;&lt;br /&gt;
&lt;gparted&gt;&lt;actual pix=""&gt;&lt;span style="font-size: small;"&gt;( &lt;i&gt;I got mine from another &lt;/i&gt;&lt;/span&gt;&lt;i&gt;unit&lt;/i&gt;. )&lt;/actual&gt;&lt;/gparted&gt;&lt;br /&gt;
&lt;gparted&gt;&lt;actual pix=""&gt;&lt;/actual&gt;&lt;/gparted&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-Qkm4qxM-nZM/T3fzeNs6nJI/AAAAAAAAAaM/yjP_g_4a8fg/s1600/piggyback_flash.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://2.bp.blogspot.com/-Qkm4qxM-nZM/T3fzeNs6nJI/AAAAAAAAAaM/yjP_g_4a8fg/s320/piggyback_flash.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
I soldered them both in a piggy-back connection, except for their &lt;b&gt;#CS pins&lt;/b&gt; (&lt;i&gt;pin 1 = chip select&lt;/i&gt;). I also soldered a wire on the pin-1 pad on the board and covered it with a kapton tape as an insulation. The other end of the wire is initially connected to the #CS pin of the working chip. The working chip will be only needed for the first boot until we got to u-boot console prompt (&lt;i&gt;needs serial/uart connector&lt;/i&gt;).&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-xe1OMAIU7wU/T3fzbZVbmkI/AAAAAAAAAaE/YaTiHHoiL6E/s1600/initialboot_flash.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://2.bp.blogspot.com/-xe1OMAIU7wU/T3fzbZVbmkI/AAAAAAAAAaE/YaTiHHoiL6E/s320/initialboot_flash.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
After getting to the console(&lt;i&gt;i.e press Enter key on the serial console while booting&lt;/i&gt;), transfer the #CS wire to the chip that needs to be reprogrammed (&lt;i&gt;use SPDT switch, if needed&lt;/i&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://2.bp.blogspot.com/-ztcLXjTgGV4/T3fzgTTsLKI/AAAAAAAAAaU/X8V9Z0HRSFw/s1600/program_flash.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://2.bp.blogspot.com/-ztcLXjTgGV4/T3fzgTTsLKI/AAAAAAAAAaU/X8V9Z0HRSFw/s320/program_flash.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;gparted&gt;&lt;actual pix=""&gt;Then, execute these commands (assuming that "wload.bin" and "u-boot.bin" binaries are already saved in the FAT partition of the SD card)&lt;/actual&gt;&lt;/gparted&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;gparted&gt;&lt;actual pix=""&gt;mmcinit&lt;/actual&gt;&lt;/gparted&gt;&lt;br /&gt;
&lt;gparted&gt;&lt;actual pix=""&gt;&lt;/actual&gt;&lt;/gparted&gt;&lt;br /&gt;
&lt;gparted&gt;&lt;actual pix=""&gt;fatload mmc 0 0 wload.bin&lt;/actual&gt;&lt;/gparted&gt;&lt;br /&gt;
&lt;gparted&gt;&lt;actual pix=""&gt;erase ffff0000 +10000&lt;/actual&gt;&lt;/gparted&gt;&lt;br /&gt;
&lt;gparted&gt;&lt;actual pix=""&gt;cp.b 0 ffff0000 10000&lt;/actual&gt;&lt;/gparted&gt;&lt;br /&gt;
&lt;gparted&gt;&lt;actual pix=""&gt;&lt;/actual&gt;&lt;/gparted&gt;&lt;br /&gt;
&lt;gparted&gt;&lt;actual pix=""&gt;fatload mmc 0 0 u-boot.bin&lt;/actual&gt;&lt;/gparted&gt;&lt;br /&gt;
&lt;gparted&gt;&lt;actual pix=""&gt;erase fff80000 +50000&lt;/actual&gt;&lt;/gparted&gt;&lt;br /&gt;
&lt;gparted&gt;&lt;actual pix=""&gt;cp.b 0 fff80000 50000&lt;/actual&gt;&lt;/gparted&gt;&lt;br /&gt;
&lt;gparted&gt;&lt;actual pix=""&gt;&lt;/actual&gt;&lt;/gparted&gt;&lt;/blockquote&gt;
&lt;br /&gt;
&lt;gparted&gt;&lt;actual pix=""&gt;&lt;pix&gt;&lt;pix&gt;...&amp;nbsp; here's the &lt;a href="http://yus-repo.googlecode.com/svn/trunk/WMT/serial_logs/recover_flash.log" target="_blank"&gt;serial log&lt;/a&gt; for this process.&lt;/pix&gt;&lt;/pix&gt;&lt;/actual&gt;&lt;/gparted&gt;&lt;br /&gt;
&lt;gparted&gt;&lt;actual pix=""&gt;&lt;pix&gt;&lt;pix&gt;&lt;br /&gt;&lt;/pix&gt;&lt;/pix&gt;&lt;/actual&gt;&lt;/gparted&gt;
&lt;br /&gt;
&lt;gparted&gt;&lt;actual pix=""&gt;&lt;pix&gt;&lt;pix&gt;&lt;br /&gt;&lt;/pix&gt;&lt;/pix&gt;&lt;/actual&gt;&lt;/gparted&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="15 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>15</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;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="3 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>3</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;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;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;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;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;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;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;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="18 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>18</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;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="18 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>18</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;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="169 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>169</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;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;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;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="6 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>6</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;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="9 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>9</thr:total><feedburner:origLink>http://projectproto.blogspot.com/2010/05/pic18f-sd-wav-audio-player.html</feedburner:origLink></entry></feed>
