<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1513864689406418682</id><updated>2011-07-08T02:34:02.862+02:00</updated><title type='text'>FTDI 2232H USB to I2C</title><subtitle type='html'>interfacing IO board from PC via FT2232H using RS232 to I2C conversion</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ftdi-guyvo.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513864689406418682/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://ftdi-guyvo.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>guyvo</name><uri>http://www.blogger.com/profile/10832934523371817183</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_y_OuF5jdLuo/SyQFsoO3PYI/AAAAAAAAATE/ux-nhBDeWf8/S220/twiiterface.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>14</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1513864689406418682.post-8929088301348502411</id><published>2009-11-01T17:44:00.008+01:00</published><updated>2009-11-01T18:25:53.833+01:00</updated><title type='text'>some video shots</title><content type='html'>&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;&lt;object width="320" height="266" class="BLOG_video_class" id="BLOG_video-c040f6cb07983905" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"&gt;&lt;param name="movie" value="http://www.youtube.com/get_player"&gt;&lt;param name="bgcolor" value="#FFFFFF"&gt;&lt;param name="allowfullscreen" value="true"&gt;&lt;param name="flashvars" value="flvurl=http://v18.nonxt4.googlevideo.com/videoplayback?id%3Dc040f6cb07983905%26itag%3D5%26app%3Dblogger%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1331023849%26sparams%3Did,itag,ip,ipbits,expire%26signature%3DD7846D13A4E0598DD231FD82AEF166B3F3E17C6.C086D927E3A0D3D73B1F60DA436864C676398FE%26key%3Dck1&amp;amp;iurl=http://video.google.com/ThumbnailServer2?app%3Dblogger%26contentid%3Dc040f6cb07983905%26offsetms%3D5000%26itag%3Dw160%26sigh%3DhVqhQQtxvqDZR28rrxvZjKl7e6k&amp;amp;autoplay=0&amp;amp;ps=blogger"&gt;&lt;embed src="http://www.youtube.com/get_player" type="application/x-shockwave-flash"width="320" height="266" bgcolor="#FFFFFF"flashvars="flvurl=http://v18.nonxt4.googlevideo.com/videoplayback?id%3Dc040f6cb07983905%26itag%3D5%26app%3Dblogger%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1331023849%26sparams%3Did,itag,ip,ipbits,expire%26signature%3DD7846D13A4E0598DD231FD82AEF166B3F3E17C6.C086D927E3A0D3D73B1F60DA436864C676398FE%26key%3Dck1&amp;iurl=http://video.google.com/ThumbnailServer2?app%3Dblogger%26contentid%3Dc040f6cb07983905%26offsetms%3D5000%26itag%3Dw160%26sigh%3DhVqhQQtxvqDZR28rrxvZjKl7e6k&amp;autoplay=0&amp;ps=blogger"allowFullScreen="true" /&gt;&lt;/object&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;The FTDI driver board connected  to my 2 dimmer boards by I2C. Running a test asking 4 status requests and 4 update requests with 100ms delay between them. Average of 55ms for 4 commands running on the test on the same PC as the driver. Which would be around 1 second if you use the FTDI with bit bang mode.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;&lt;object width="320" height="266" class="BLOG_video_class" id="BLOG_video-bb47778f41067ab0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"&gt;&lt;param name="movie" value="http://www.youtube.com/get_player"&gt;&lt;param name="bgcolor" value="#FFFFFF"&gt;&lt;param name="allowfullscreen" value="true"&gt;&lt;param name="flashvars" value="flvurl=http://v10.nonxt3.googlevideo.com/videoplayback?id%3Dbb47778f41067ab0%26itag%3D5%26app%3Dblogger%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1331023849%26sparams%3Did,itag,ip,ipbits,expire%26signature%3D165A2C2FD5887AC1006A6259EA44A910470697D9.2D0EFB7EF7CDBF1A3FBF59CE35E5332F8123C9A%26key%3Dck1&amp;amp;iurl=http://video.google.com/ThumbnailServer2?app%3Dblogger%26contentid%3Dbb47778f41067ab0%26offsetms%3D5000%26itag%3Dw160%26sigh%3DhZKv1bFCMuJQ9X87rlV3o6AGlow&amp;amp;autoplay=0&amp;amp;ps=blogger"&gt;&lt;embed src="http://www.youtube.com/get_player" type="application/x-shockwave-flash"width="320" height="266" bgcolor="#FFFFFF"flashvars="flvurl=http://v10.nonxt3.googlevideo.com/videoplayback?id%3Dbb47778f41067ab0%26itag%3D5%26app%3Dblogger%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1331023849%26sparams%3Did,itag,ip,ipbits,expire%26signature%3D165A2C2FD5887AC1006A6259EA44A910470697D9.2D0EFB7EF7CDBF1A3FBF59CE35E5332F8123C9A%26key%3Dck1&amp;iurl=http://video.google.com/ThumbnailServer2?app%3Dblogger%26contentid%3Dbb47778f41067ab0%26offsetms%3D5000%26itag%3Dw160%26sigh%3DhZKv1bFCMuJQ9X87rlV3o6AGlow&amp;autoplay=0&amp;ps=blogger"allowFullScreen="true" /&gt;&lt;/object&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;The actual board based on the high speed FTDI 2232H chip running the same test.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;&lt;object width="320" height="266" class="BLOG_video_class" id="BLOG_video-b29243308a7948e4" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"&gt;&lt;param name="movie" value="http://www.youtube.com/get_player"&gt;&lt;param name="bgcolor" value="#FFFFFF"&gt;&lt;param name="allowfullscreen" value="true"&gt;&lt;param name="flashvars" value="flvurl=http://v10.nonxt2.googlevideo.com/videoplayback?id%3Db29243308a7948e4%26itag%3D5%26app%3Dblogger%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1331023850%26sparams%3Did,itag,ip,ipbits,expire%26signature%3D59CB9A1FD083704A8DE692F2CA12D85B4A0A6111.48AAF17E5AB1A6401CCF31D21223DA955AD58F0E%26key%3Dck1&amp;amp;iurl=http://video.google.com/ThumbnailServer2?app%3Dblogger%26contentid%3Db29243308a7948e4%26offsetms%3D5000%26itag%3Dw160%26sigh%3D_16fA7tJwXhPxeYogXpjKX2UidI&amp;amp;autoplay=0&amp;amp;ps=blogger"&gt;&lt;embed src="http://www.youtube.com/get_player" type="application/x-shockwave-flash"width="320" height="266" bgcolor="#FFFFFF"flashvars="flvurl=http://v10.nonxt2.googlevideo.com/videoplayback?id%3Db29243308a7948e4%26itag%3D5%26app%3Dblogger%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1331023850%26sparams%3Did,itag,ip,ipbits,expire%26signature%3D59CB9A1FD083704A8DE692F2CA12D85B4A0A6111.48AAF17E5AB1A6401CCF31D21223DA955AD58F0E%26key%3Dck1&amp;iurl=http://video.google.com/ThumbnailServer2?app%3Dblogger%26contentid%3Db29243308a7948e4%26offsetms%3D5000%26itag%3Dw160%26sigh%3D_16fA7tJwXhPxeYogXpjKX2UidI&amp;autoplay=0&amp;ps=blogger"allowFullScreen="true" /&gt;&lt;/object&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;The output of the driver program written in C. This program handles the real RS232 FTDI reads and writes. It's also programmed to be extremely portable. It's tested on windows as well as linux. I used a socket approach to send and receive commands because this is the most portable way. So a host program is able to connect ,request and update by using the dedicated socket port.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;&lt;object width="320" height="266" class="BLOG_video_class" id="BLOG_video-17315e767357e088" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"&gt;&lt;param name="movie" value="http://www.youtube.com/get_player"&gt;&lt;param name="bgcolor" value="#FFFFFF"&gt;&lt;param name="allowfullscreen" value="true"&gt;&lt;param name="flashvars" value="flvurl=http://v19.nonxt4.googlevideo.com/videoplayback?id%3D17315e767357e088%26itag%3D5%26app%3Dblogger%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1331023850%26sparams%3Did,itag,ip,ipbits,expire%26signature%3D2B9F16E9AA9A72E5DD4C56E669422850293546D3.43533E08BB6D00FB26BB005993A43C6D9BF4AD04%26key%3Dck1&amp;amp;iurl=http://video.google.com/ThumbnailServer2?app%3Dblogger%26contentid%3D17315e767357e088%26offsetms%3D5000%26itag%3Dw160%26sigh%3D6RaAsmSKcX2yCcEQsX7nJeqI1L8&amp;amp;autoplay=0&amp;amp;ps=blogger"&gt;&lt;embed src="http://www.youtube.com/get_player" type="application/x-shockwave-flash"width="320" height="266" bgcolor="#FFFFFF"flashvars="flvurl=http://v19.nonxt4.googlevideo.com/videoplayback?id%3D17315e767357e088%26itag%3D5%26app%3Dblogger%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1331023850%26sparams%3Did,itag,ip,ipbits,expire%26signature%3D2B9F16E9AA9A72E5DD4C56E669422850293546D3.43533E08BB6D00FB26BB005993A43C6D9BF4AD04%26key%3Dck1&amp;iurl=http://video.google.com/ThumbnailServer2?app%3Dblogger%26contentid%3D17315e767357e088%26offsetms%3D5000%26itag%3Dw160%26sigh%3D6RaAsmSKcX2yCcEQsX7nJeqI1L8&amp;autoplay=0&amp;ps=blogger"allowFullScreen="true" /&gt;&lt;/object&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;This video shows the output of the java based host program. It's actually running on a linux system to prove the great amount on portability. It's easy to take whatever system you like to interface the FTDI board. You also can for instance take a web based design and communicate internally by using regular sockets. The average here was just a bit higher 65ms due to the overhead on wireless network.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;I think finally my system is a great success. It's very fast , I2C commands are extendable ,low cost and has an extreme high rate on portability.&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513864689406418682-8929088301348502411?l=ftdi-guyvo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ftdi-guyvo.blogspot.com/feeds/8929088301348502411/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513864689406418682&amp;postID=8929088301348502411' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513864689406418682/posts/default/8929088301348502411'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513864689406418682/posts/default/8929088301348502411'/><link rel='alternate' type='text/html' href='http://ftdi-guyvo.blogspot.com/2009/11/some-video-shots.html' title='some video shots'/><author><name>guyvo</name><uri>http://www.blogger.com/profile/10832934523371817183</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_y_OuF5jdLuo/SyQFsoO3PYI/AAAAAAAAATE/ux-nhBDeWf8/S220/twiiterface.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513864689406418682.post-2361674028679895636</id><published>2009-10-23T21:48:00.006+02:00</published><updated>2009-10-23T22:29:52.041+02:00</updated><title type='text'>errata on timings</title><content type='html'>&lt;span style="color: rgb(51, 255, 51);"&gt;After I did the timings I did some thinking ... And yes I forgot to include the RS232  control bits in my calculation. So in fact when having 1 start bit , 8 data bits , 1 stop bit  and no parity there are &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(51, 255, 51);"&gt;10 bits&lt;/span&gt;&lt;span style="color: rgb(51, 255, 51);"&gt; to transfer per byte.&lt;/span&gt;&lt;span style="color: rgb(51, 255, 51);"&gt; So indeed don't forget you have 25% overhead on control bits.&lt;/span&gt;&lt;br /&gt;&lt;ul style="color: rgb(51, 102, 255);"&gt;&lt;li&gt;serial bit speed 4 500 000 bits/s&lt;/li&gt;&lt;li&gt;serial byte+control speed 450 000 bytes /s&lt;br /&gt;&lt;/li&gt;&lt;li&gt;4096 bytes transfer in &lt;span style="font-weight: bold;"&gt;9,1ms&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;So the above calculation for the speed is the right one. I measured around 9ms with my scoop so this confirmed the latter. Also the fact I mentioned on the usb latency when only receiving is not correct. I can only measure the real serial speed when hooking in with scoop. Only when testing Rx-Tx complete chain I can deduce the latency. So I must get 18.2 ms to Rx-Tx the 8k ideally.&lt;/span&gt;&lt;br /&gt;&lt;ul style="color: rgb(51, 102, 255);"&gt;&lt;li&gt;&lt;span class="Apple-style-span"&gt;&lt;b&gt;on windows 19.8ms -&gt; 1.6 ms latency&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"&gt;&lt;b&gt;on linux 18.8 ms -&gt; 0.6 ms latency&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;Still some nice results I must say. Far better than using the FTDI in bit bang modes. As I wrote before these modes are far from efficient as they had to transfer byte after byte over the USB. &lt;/span&gt;&lt;br /&gt;&lt;ul style="color: rgb(51, 102, 255);"&gt;&lt;li&gt;bit bang Tx 84 bytes 200ms&lt;/li&gt;&lt;li&gt;bit bang Rx 84 bytes 250ms&lt;/li&gt;&lt;/ul&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;Meanwhile I wrote some middle ware software to test the all chain. I can send 16 messages of 256 bytes in one chunk now. Timings are wonderful ! Only 140ms to Tx - I2C -Rx them all. If I compare that with the bit bang mode:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;Tx 200 ms * 16 = 3.2 seconds&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;With my system only 140ms which is a &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(51, 102, 255);"&gt;factor 23 faster &lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;Next blog I will show a small video about my test setup so stay tuned for more on this great interface.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513864689406418682-2361674028679895636?l=ftdi-guyvo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ftdi-guyvo.blogspot.com/feeds/2361674028679895636/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513864689406418682&amp;postID=2361674028679895636' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513864689406418682/posts/default/2361674028679895636'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513864689406418682/posts/default/2361674028679895636'/><link rel='alternate' type='text/html' href='http://ftdi-guyvo.blogspot.com/2009/10/errata-on-timings.html' title='errata on timings'/><author><name>guyvo</name><uri>http://www.blogger.com/profile/10832934523371817183</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_y_OuF5jdLuo/SyQFsoO3PYI/AAAAAAAAATE/ux-nhBDeWf8/S220/twiiterface.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513864689406418682.post-4375105196300179210</id><published>2009-10-18T15:25:00.007+02:00</published><updated>2009-10-18T16:06:26.046+02:00</updated><title type='text'>some more timings</title><content type='html'>&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;Here are some results with maximum speed (maximum cortex USART1 speed):&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="text-decoration: underline; "&gt;&lt;span class="Apple-style-span"  style="color:#3366FF;"&gt;Test setup:&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;serial speed &lt;b&gt;4.5 MB/s -&gt; ca 549 kb/s&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;tx/rx buffers taken 4k bytes&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;cortex DMA transfer used on both rx/tx&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;host PC1 with window 7 RC drivers 2.04.16&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;host PC2 with linux ubuntu 9.04 2xx so 0.4.16&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;FTDI latency on 1ms&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;So tx/rx theoretical time should be&lt;b&gt; 7.28&lt;/b&gt;&lt;b&gt; ms / 4k.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="text-decoration: underline; "&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#3366FF;"&gt;Win7 Project written in C with VC 2008 using the 2xx FTDI DLL:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51); "&gt;PC tx - Cortex rx time&lt;b&gt; 8.9 ms / 4k&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51); "&gt;PC tx - Cortex rx- Cortex tx - PC rx time &lt;b&gt;19.8ms / 8k&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="text-decoration: underline; "&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#3366FF;"&gt;Linux Project written in gnu C (gcc) using 2xx shared 2xx lib:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;PC tx - Cortex rx time &lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;8.9 ms / 4k&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;&lt;li&gt;&lt;span class="Apple-style-span"&gt;PC tx - Cortex rx- Cortex tx - PC rx time &lt;b&gt;18.8 ms / 8k&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;/span&gt;&lt;/ul&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#3366FF;"&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;b style=""&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); font-weight: normal; -webkit-text-decorations-in-effect: none; "&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#3366FF;"&gt;&lt;span class="Apple-style-span" style="text-decoration: underline;"&gt;Linux Project written in java NB with RXTX:&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=""&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51); "&gt;Test succeeded only with baud rate at 9600 !!!&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51); "&gt;Bad results not comparable&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div style=""&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255); font-weight: bold; "&gt;&lt;span class="Apple-style-span" style="text-decoration: underline; "&gt;Conclusion:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;USB latency is now dropped to &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;--&gt; 1,5 ms / 4K &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;--&gt; 3 ms / 8K&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;Which can be seen as the normal due to the minimum USB latency timeout of 1ms.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;You notice that Linux can perform 1ms better with 8k than win 7 ! Again a proof that for some processing Linux performs much faster than windows. The java test on linux was very bad. As soon speeds were higher than 9600 the receiver could not follow at all and stayed suspended on the read function. I don't know the reason for this but probably a mix of causes ( jre , rxtx lib and driver )&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;Any way I know for now that I can proceed using the 2xx DLL which performs very good and offers a nice portability between windows and Linux. You can simply take your code from one project to the other. However on linux you have to make sure that ftdi_sio and usbserial are unloaded with rmmod. Your user program will only run with sudo as root. I must investigate that further but is less important. &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;I continue in making the message layout buffers and programming the cortex to understand the commands. As soon I have some overall results I will write one last topic here.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513864689406418682-4375105196300179210?l=ftdi-guyvo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ftdi-guyvo.blogspot.com/feeds/4375105196300179210/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513864689406418682&amp;postID=4375105196300179210' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513864689406418682/posts/default/4375105196300179210'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513864689406418682/posts/default/4375105196300179210'/><link rel='alternate' type='text/html' href='http://ftdi-guyvo.blogspot.com/2009/10/some-more-timings.html' title='some more timings'/><author><name>guyvo</name><uri>http://www.blogger.com/profile/10832934523371817183</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_y_OuF5jdLuo/SyQFsoO3PYI/AAAAAAAAATE/ux-nhBDeWf8/S220/twiiterface.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513864689406418682.post-5949336052822350558</id><published>2009-10-17T21:54:00.004+02:00</published><updated>2009-10-17T23:24:12.376+02:00</updated><title type='text'>Some timings</title><content type='html'>&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;Here are some results of the first tests I did:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="text-decoration: underline;"&gt;&lt;span class="Apple-style-span"  style="color:#3366FF;"&gt;Test setup:&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;serial speed 2.25 MB/s -&gt; ca 275 kb/s&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;tx/rx buffers taken 4k bytes &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;cortex DMA transfer used on both rx/tx&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;host PC with window 7 RC&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;FTDI latency on 2ms&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;So tx/rx theoretical time should be 14,56 ms.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="text-decoration: underline;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#3366FF;"&gt;Project written in C with VC 2008 using the 2xx FTDI DLL:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51); "&gt;PC tx - Cortex rx time 18 ms / 4k&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51); "&gt;PC tx - Cortex rx- Cortex tx - PC rx time 40 ms / 8k&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="text-decoration: underline;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#3366FF;"&gt;Project written in java with NB using RXTX DLL:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); "&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51); "&gt;PC tx - Cortex rx time 18 ms / 4k&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51); "&gt;PC tx - Cortex rx- Cortex tx - PC rx time 54 ms / 8k&lt;/span&gt;&lt;/li&gt;&lt;/span&gt;&lt;/ul&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#3366FF;"&gt;&lt;span class="Apple-style-span" style="text-decoration: underline;"&gt;First conclusion:&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#3366FF;"&gt;&lt;span class="Apple-style-span" style="text-decoration: underline;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;Still some USB overhead but far less than the bit bang modes:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;-&gt; serial mode 3ms / 4K &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;-&gt; bit bang 2ms / 2-64 bytes&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51); "&gt;Also the java is slower than the C approach. But this is nothing new as the java program must cross a few more layers than the C one ;-) To give you an idea I had to loop around to read all the bytes in java. Sometimes even 3 times to have the 4k fully read:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt; while ( temp != 4096 ){&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;   readin = inputStream.read( rbuf , temp ,rbuf.length - temp);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;   temp += readin;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;Therefore time increases due to the overhead on executing java code on the PC (40 -&gt; 54 ms )&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;While using the 2xx DLL in C this was not needed and I could limit to one read as this was always the full 4k. Also the fact that is function is blocking while the java streams don't:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;stat = FT_Read ( hSer1 , ReadBuffer, 4096 ,&amp;amp;read);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;I will do some more tests on my linux machine with the java approach and gnu C. But the big advantage is that we can make the I2C message and put them into the 4K buffer. Once transfered they will be treated in a batch one after the other using dedicated I2C hardware on the cortex instead of making it by the FTDI. I did some tests transferring 84 bytes using the I2C FTDI DLL with bit bang mode ( with the previous design ) and the timings were between 200 - 300 ms ! I can assure you already that we are gone do much better than that. Let say we will try to reach a factor 5 faster. Stay tuned to follow the results....&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513864689406418682-5949336052822350558?l=ftdi-guyvo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ftdi-guyvo.blogspot.com/feeds/5949336052822350558/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513864689406418682&amp;postID=5949336052822350558' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513864689406418682/posts/default/5949336052822350558'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513864689406418682/posts/default/5949336052822350558'/><link rel='alternate' type='text/html' href='http://ftdi-guyvo.blogspot.com/2009/10/some-timings.html' title='Some timings'/><author><name>guyvo</name><uri>http://www.blogger.com/profile/10832934523371817183</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_y_OuF5jdLuo/SyQFsoO3PYI/AAAAAAAAATE/ux-nhBDeWf8/S220/twiiterface.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513864689406418682.post-8863648259299413770</id><published>2009-10-17T20:54:00.007+02:00</published><updated>2009-10-17T21:28:25.557+02:00</updated><title type='text'>new schematics</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_y_OuF5jdLuo/StoT5XSH6uI/AAAAAAAAARw/0e6COkDquPg/s1600-h/layoutusb.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 258px; height: 320px;" src="http://1.bp.blogspot.com/_y_OuF5jdLuo/StoT5XSH6uI/AAAAAAAAARw/0e6COkDquPg/s320/layoutusb.png" alt="" id="BLOGGER_PHOTO_ID_5393645379953093346" border="0" /&gt;&lt;/a&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;Left the PCB layout&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;Features:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;- 2 x I2C ( 400k )&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;- Serial speed 4M&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;- USB bus powered&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;- STM32F103RET &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;- JTAG + reset&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_y_OuF5jdLuo/StoS5maz0jI/AAAAAAAAARo/282CNWClMuM/s1600-h/usb2i2c.png"&gt;&lt;/a&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;Schematics:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_y_OuF5jdLuo/StoS5maz0jI/AAAAAAAAARo/282CNWClMuM/s1600-h/usb2i2c.png" style="text-decoration: none;"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px; height: 215px;" src="http://2.bp.blogspot.com/_y_OuF5jdLuo/StoS5maz0jI/AAAAAAAAARo/282CNWClMuM/s320/usb2i2c.png" alt="" id="BLOGGER_PHOTO_ID_5393644284504429106" border="0" /&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;Hardware by:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;manes6969 at &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;telenet dot&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;be&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513864689406418682-8863648259299413770?l=ftdi-guyvo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ftdi-guyvo.blogspot.com/feeds/8863648259299413770/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513864689406418682&amp;postID=8863648259299413770' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513864689406418682/posts/default/8863648259299413770'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513864689406418682/posts/default/8863648259299413770'/><link rel='alternate' type='text/html' href='http://ftdi-guyvo.blogspot.com/2009/10/schematics.html' title='new schematics'/><author><name>guyvo</name><uri>http://www.blogger.com/profile/10832934523371817183</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_y_OuF5jdLuo/SyQFsoO3PYI/AAAAAAAAATE/ux-nhBDeWf8/S220/twiiterface.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_y_OuF5jdLuo/StoT5XSH6uI/AAAAAAAAARw/0e6COkDquPg/s72-c/layoutusb.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513864689406418682.post-3769519570928096872</id><published>2009-10-17T19:52:00.004+02:00</published><updated>2009-10-17T21:29:46.287+02:00</updated><title type='text'>brand new approach</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_y_OuF5jdLuo/StoHHsTVmbI/AAAAAAAAARg/X-wizWOi5yk/s1600-h/USB2I2C.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px; height: 240px;" src="http://4.bp.blogspot.com/_y_OuF5jdLuo/StoHHsTVmbI/AAAAAAAAARg/X-wizWOi5yk/s320/USB2I2C.JPG" alt="" id="BLOGGER_PHOTO_ID_5393631332462336434" border="0" /&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;br /&gt;As you could read in my previous stories there were a few issues using the FTDI in bit bang mode. The most important one was the minimum latency of 2ms to send a few bytes and converting them to I2C protocol. Now I took a totally different approach in using the FTDI chip as a usual USB to RS232  converter. I used the latest FTDI chip series FT2232H as I had the opportunity with this huge change. This chip has 4096 byte buffers on board and can have speeds of more than 4M bit a second. Because I use the chip pure as RS232 device I had to make the I2C with something else of course. And guess what , I took the STM32 to do this job. I have quit some experience now with this MCU that I challenged myself to interface it with the FTDI chip. So the USB2I2C bridge came finally to an end. I will use it as a gateway in my dimmer project ( see my other blogs ) On the picture you can see the final result. I will post the schematics later on and will tell a bit on speeds too.&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;  &lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513864689406418682-3769519570928096872?l=ftdi-guyvo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ftdi-guyvo.blogspot.com/feeds/3769519570928096872/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513864689406418682&amp;postID=3769519570928096872' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513864689406418682/posts/default/3769519570928096872'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513864689406418682/posts/default/3769519570928096872'/><link rel='alternate' type='text/html' href='http://ftdi-guyvo.blogspot.com/2009/10/brand-new-approach.html' title='brand new approach'/><author><name>guyvo</name><uri>http://www.blogger.com/profile/10832934523371817183</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_y_OuF5jdLuo/SyQFsoO3PYI/AAAAAAAAATE/ux-nhBDeWf8/S220/twiiterface.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_y_OuF5jdLuo/StoHHsTVmbI/AAAAAAAAARg/X-wizWOi5yk/s72-c/USB2I2C.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513864689406418682.post-3961723803796958937</id><published>2008-10-09T19:06:00.002+02:00</published><updated>2008-10-09T19:26:59.589+02:00</updated><title type='text'>multithreaded approach</title><content type='html'>&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;I rewrote the first test program with a multithreaded approach. Basically there are three thread involved:&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;PollThread&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;LogicThread&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;MainThread&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;The Pollthread serve to check the FTDI ADBUS line connected to the interrupt. Whenever an interrupt arrives an Event is set to signal the MainThread that work has to be done. The access to the FDTI is guarded by a mutex. Let me show you the code:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;DWORD WINAPI PollThread ( LPVOID lp )&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;UCHAR ad&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;[1];&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;UCHAR in&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;[5];&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;UCHAR out&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;[5];&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;status = FTDI_I2C_STARTUP( _400KHZ );&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;status = FTDI_I2C_PCA_READN_ALL( PCA9698_INPUT_READ , in );&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;RefSet.FromByteBuf(in);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;RefSet.flip();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;RefOut.ToByteBuf(CmdOut);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;status = FTDI_I2C_PCA_WRITE_ALL( PCA9698_OUTPUT_WRITE , CmdOut );&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;while (1)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;WaitForSingleObject(InterruptAckEvent,INFINITE);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;WaitForSingleObject(FtdiMutex,INFINITE);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;status = FTDI_2XX_READN_ADBUS(ad);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;ReleaseMutex(FtdiMutex);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;while ( (ad[0] &amp;amp; INT_MASK_FLAG) != 0 )&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;WaitForSingleObject(FtdiMutex,INFINITE);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;status = FTDI_2XX_READN_ADBUS(ad);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;ReleaseMutex(FtdiMutex);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;SetEvent(InterruptEvent);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;return 0;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;The second thread is the LogicThread that will be created by the MainThread on event basis. This thread reads the inputs resets the interrupt and sends an acknowledge to the the PollThread. This is needed because otherwise the interrupt event will be send more than ones if it is not reset. The read and writes will be guarded by the same mutex as the PollThread. Here is the code:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;DWORD WINAPI LogicThread ( LPVOID lp )&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;UCHAR in&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;[5];&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;UCHAR out&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;[5];&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;WaitForSingleObject(FtdiMutex,INFINITE);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;status = FTDI_I2C_PCA_READN_ALL( PCA9698_INPUT_READ , in );&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;ReleaseMutex(FtdiMutex);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;SetEvent(InterruptAckEvent);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;BitSetExtended&lt;40&gt; InNew(in);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;InNew.flip();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;for ( int input = 0 ; input &lt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;if ( (RefSet[input] != InNew[input]) &amp;amp;&amp;amp; (InNew.test(input)) )&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;RefOut.flip(input);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;RefSet = InNew;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;RefOut.ToByteBuf(CmdOut);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;WaitForSingleObject(FtdiMutex,INFINITE);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;status = FTDI_I2C_PCA_WRITE_ALL( PCA9698_OUTPUT_WRITE , CmdOut );&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;status = FTDI_I2C_DAC_SET(0,0);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;ReleaseMutex(FtdiMutex);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;return 0;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;The last thread is the main and is very small. Basically this thread waits until the interrupt event is set and creates the LogicThread with a priority just a bit higher to force the context switch immediately:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;InterruptEvent&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;= CreateEvent(NULL,false,false,L"Local\\INT");&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;InterruptAckEvent&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;= CreateEvent(NULL,false,true,L"Local\\INTACK");&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;FtdiMutex&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;= CreateMutex(NULL,false,L"Local\\FTDI");&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;// start to poll&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;CreateThread(NULL,0,PollThread,NULL,0,&amp;amp;PollThreadId);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;while (1)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;WaitForSingleObject(InterruptEvent,INFINITE);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;hThreadLogic = CreateThread(NULL,0,LogicThread,NULL,CREATE_SUSPENDED,&amp;amp;LogicThreadId);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;SetThreadPriority(hThreadLogic,THREAD_PRIORITY_ABOVE_NORMAL);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;ResumeThread(hThreadLogic);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;CloseHandle(hThreadLogic);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); "&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51); "&gt;The program works very stable. The only thing I noticed was that the process better runs with ABOVE_NORMAL priority as normal on the eee Asus PC. This is due to having only a single core and running quit small with 1GHz. The only improvement I can add is a mutex object on the input BitSet to exclude all possible race conditions possible. But it's only a test of course.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513864689406418682-3961723803796958937?l=ftdi-guyvo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ftdi-guyvo.blogspot.com/feeds/3961723803796958937/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513864689406418682&amp;postID=3961723803796958937' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513864689406418682/posts/default/3961723803796958937'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513864689406418682/posts/default/3961723803796958937'/><link rel='alternate' type='text/html' href='http://ftdi-guyvo.blogspot.com/2008/10/multithreaded-approach.html' title='multithreaded approach'/><author><name>guyvo</name><uri>http://www.blogger.com/profile/10832934523371817183</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_y_OuF5jdLuo/SyQFsoO3PYI/AAAAAAAAATE/ux-nhBDeWf8/S220/twiiterface.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513864689406418682.post-797818263538648208</id><published>2008-09-26T10:01:00.010+02:00</published><updated>2008-09-26T11:53:38.710+02:00</updated><title type='text'>final results</title><content type='html'>&lt;a style="color: rgb(51, 255, 51);" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_y_OuF5jdLuo/SNyXFFDet3I/AAAAAAAAAHs/dTrux23uEAo/s1600-h/26092008024.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://1.bp.blogspot.com/_y_OuF5jdLuo/SNyXFFDet3I/AAAAAAAAAHs/dTrux23uEAo/s200/26092008024.jpg" alt="" id="BLOGGER_PHOTO_ID_5250237379119069042" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);font-family:arial;"&gt;On the picture you can see my test equipment for the FTDI. Three parts are involved:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);font-family:arial;"&gt;1. Asus EEE PC as platform&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);font-family:arial;"&gt;2. FTDI interface board ( small one)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);font-family:arial;"&gt;3. I2C I/O board ( big one )&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="color: rgb(51, 255, 51);font-family:arial;"&gt;The final test I did was based on the fact that I simulated the real domotic logic as close as possible to the final program logical blocks. I also included the fact of worse case timings. The best way to explain this is by showing you the piece of test code I wrote:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="color:#3366ff;"&gt;&lt;span style="font-family:courier new;"&gt;void TestWorstCaseTiming(void)&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="color:#3366ff;"&gt;{&lt;br /&gt; UCHAR in [5];  //I2C InBuf&lt;br /&gt; UCHAR out [5];  //I2C OutBuf&lt;br /&gt; UCHAR ad [1];  //Int&lt;br /&gt;&lt;br /&gt; //*********INIT BLOCK&lt;br /&gt; status = FTDI_I2C_STARTUP( _400KHZ );&lt;br /&gt; //*********PREPARE IN AND INVERT&lt;br /&gt; status = FTDI_I2C_PCA_READN_ALL( PCA9698_INPUT_READ , in );&lt;br /&gt; BitSetExtended&lt;40&gt; InSet(in);// start with real values&lt;br /&gt; InSet.flip();// invert push = 1&lt;br /&gt; //*********PREPARE OUT ALL TO ZERO&lt;br /&gt; BitSetExtended&lt;40&gt; OutSet(CmdOut);&lt;br /&gt; //OutSet.none();&lt;br /&gt; OutSet.ToByteBuf(CmdOut);&lt;br /&gt; status = FTDI_I2C_PCA_WRITE_ALL( PCA9698_OUTPUT_WRITE , CmdOut );//16ms&lt;br /&gt; //*********MAIN LOOP&lt;br /&gt; while (1)&lt;br /&gt; {&lt;br /&gt;  //*********POLL LOOP&lt;br /&gt;  status = FTDI_2XX_READN_ADBUS(ad);&lt;br /&gt;  while ( (ad[0] &amp;amp; INT_MASK_FLAG) != 0 )&lt;br /&gt;  {&lt;br /&gt;   //overwrite time to have total chain time at the end&lt;br /&gt;   GetSystemTime(&amp;amp;begin);&lt;br /&gt;   status = FTDI_2XX_READN_ADBUS(ad);//2ms&lt;br /&gt;  }&lt;br /&gt;  //*********DOMOTICS LOGIC READ&lt;br /&gt;  status = FTDI_I2C_PCA_READN_ALL( PCA9698_INPUT_READ , in );//22ms&lt;br /&gt;  //*********DOMOTICS LOGIC COMPARE AND MODIFY&lt;br /&gt;  BitSetExtended&lt;40&gt; InNew(in);&lt;br /&gt;  InNew.flip();&lt;br /&gt;  for ( int input = 0 ; input &lt;&gt;&lt;br /&gt;  {&lt;br /&gt;   if ( (InSet[input] != InNew[input]) &amp;amp;&amp;amp; (InNew.test(input)) )&lt;br /&gt;   {&lt;br /&gt;    OutSet.flip(input);&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt;  //*********DOMOTICS LOGIC UPDATE LAST IN&lt;br /&gt;  InSet = InNew;&lt;br /&gt;  //*********DOMOTICS LOGIC PREPARE AND OUT&lt;br /&gt;  OutSet.ToByteBuf(CmdOut);&lt;br /&gt;  status = FTDI_I2C_PCA_WRITE_ALL( PCA9698_OUTPUT_WRITE , CmdOut );//16ms&lt;br /&gt;  status = FTDI_I2C_DAC_SET(0,0);//10ms&lt;br /&gt;  //*********CHECK TIME&lt;br /&gt;  //Sleep(30); simulate cpu charge&lt;br /&gt;  GetSystemTime(&amp;amp;end);&lt;br /&gt;  printf ("cpu time : %d ms\n",end.wMilliseconds-begin.wMilliseconds);&lt;br /&gt;  // should be ca 50ms + Xms logic&lt;br /&gt; }&lt;br /&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="color:#33ff33;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="color:#33ff33;"&gt;&lt;span style="font-size:100%;"&gt;The program flow is very simple. I poll on interrupt flag change in the inner while loop. As soon this becomes signals I leave the loop to read in the values of the PCA-IN. I check upon which bits are changed and also if this bit equal to 1. Due to the fact I use the inputs as button device I'm not interested if this bit is zero because this indicates the released state. I'm only act upon state pushed here. I invert the PCA-OUT accordingly to have a toggle behaviour on the leds. I didn't use a complex mapping for the in and out simply in-bit[0] relates to out-bit[0] etc for all 40 of them. Finally I write the new output state to the I/O board. I also added the DAC write just for timing simulating purposes but has no further meaning in this test. As you can see in the code I use the BitSetExtended&lt;40&gt; InNew(in) class. This one I wrote to ease the work with atomic bits. It's an extended (derived) STD class of BitSet:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:78%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#3366ff;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:78%;"&gt;template &lt;/span&gt;&lt;/span&gt;&lt;size_t&gt; class BitSetExtended : public bitset&lt;_n&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:78%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:78%;"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:78%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt; typedef __int64 _Ty;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:78%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt; public:&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:78%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;  BitSetExtended ( );&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:78%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;  BitSetExtended ( __int64 ll );&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:78%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;  BitSetExtended ( PUCHAR pC );&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:78%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;  void ToByteBuf ( PUCHAR pC);&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:78%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt; private:&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:78%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;  enum { _Nb = CHAR_BIT * sizeof (_Ty),_Nw = _N == 0 ? 0 : (_N - 1) / _Nb };&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:78%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;  void _Treat64( __int64 _X);&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:78%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;   void _Tidy(_Ty _X = 0);&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:78%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;  void _Trim( void );&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:78%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;  _Ty _A[_Nw + 1];&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:78%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="color:#3366ff;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:78%;"&gt;};&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/size_t&gt;&lt;/span&gt;&lt;size_t&gt;&lt;p&gt;&lt;size_t&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="color:#33ff33;"&gt;&lt;span style="font-size:100%;"&gt;My estimated 50ms total time was quite correctly. I tried pretty much with a real button switch connected on several inputs to check if the program was fast enough to trigger all interrupt coming from the PCA-IN. And it worked very well I must say ! I can in some unreal conditions trigger an error but this really testing as a fool and can not be compared to the usual real life application. I inserted a sleep line in the code to simulate higher domotic logic execution time. I went even to 30ms and my system continued working stable. I need this test to be sure that with the final code ,which will be much more than what I have now, the program will not suffer any timing site effects.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="color:#33ff33;"&gt;&lt;span style="font-size:100%;"&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/size_t&gt;&lt;size_t&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="color:#33ff33;"&gt;&lt;span style="font-size:100%;"&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="color:#33ff33;"&gt;&lt;span style="font-size:100%;"&gt;Conclusion:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="color:#33ff33;"&gt;&lt;span style="font-size:100%;"&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="color:#33ff33;"&gt;&lt;span style="font-size:100%;"&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="color:#33ff33;"&gt;&lt;span style="font-size:100%;"&gt;I find this a very good result even with quit slow communication of the FTDI USB device. In this test I wrote the code chained one block after the other. I didn't use any optimizations on the code flow and avoided working with multiple threads. I can think of a couple changes in terms of logic and threading which  can optimize the program a little bit eg seperate the poll code into one thread using events and syncronizations on the FTDI object. Perhaps writing the read-in bits to a queue system and trait the changes in an other thread. I will look into this possibilties soon and report in my blog as usually do. But I must say I'm one step closer to my decision for taking this approach as my future domotic server.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/size_t&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513864689406418682-797818263538648208?l=ftdi-guyvo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ftdi-guyvo.blogspot.com/feeds/797818263538648208/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513864689406418682&amp;postID=797818263538648208' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513864689406418682/posts/default/797818263538648208'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513864689406418682/posts/default/797818263538648208'/><link rel='alternate' type='text/html' href='http://ftdi-guyvo.blogspot.com/2008/09/final-results.html' title='final results'/><author><name>guyvo</name><uri>http://www.blogger.com/profile/10832934523371817183</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_y_OuF5jdLuo/SyQFsoO3PYI/AAAAAAAAATE/ux-nhBDeWf8/S220/twiiterface.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_y_OuF5jdLuo/SNyXFFDet3I/AAAAAAAAAHs/dTrux23uEAo/s72-c/26092008024.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513864689406418682.post-5297921938046230607</id><published>2008-09-21T20:21:00.006+02:00</published><updated>2008-09-21T21:25:21.067+02:00</updated><title type='text'>timings</title><content type='html'>&lt;span style="color: rgb(51, 255, 51);"&gt;What are the results using the FDTI chip as a I2C peripheral ? The same as you pehaps I was very curious about the performance using it from the USB driver and DLL. To get a good idea I wrote some higher level functions that use the API the make things easier accessing the PCA device. i divided it into:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;- Init&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;- Read ADBUS interrupt line&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;- Read byte(s) from PCA&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;- Write bytes(s) to PCA&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;Basically the init function put the PCA in the correct mode and initialize the FTDI chip properly regarding the speed. I used 1Mhz speed as the PCA can handle this fast I2C speed but this will not be a bottleneck as we'll see. To initialize it took 350ms. This sounds big and actually it's but this is only done ones at the start of the program and is not that important.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;Than I started to poll on the INT line :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;read int time : 1 ms &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;status : ef &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;read int time : 3 ms &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;status : ef &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;read int time : 1 ms &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;status : ef &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;read int time : 3 ms &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;status : ef &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;As you can see an average of 2ms. This was after I changed the LatencyTime parameter of the FTDI from 16ms to 2ms which is the minimum. If you don't do that the fastest result you get is 16ms ! I continued with the read of 5 consequent bytes from the PCA and I got ca 22ms. This is a bit disappointed. I did the same writing 5 bytes and this was a bit better ca 16ms. To deduce the overhead per byte I wrote a command to read/write just one byte:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt; &lt;span style="color: rgb(51, 102, 255);"&gt;read pca time : 9 ms&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt; status : ff&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt; read pca time : 9 ms&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt; status : ff&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt; write pca time : 8 ms&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt; write pca time : 8 ms&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;So the fasted time in read or write to an external I2C device using the USB FTDI chip is ca 10ms. So this had a 2ms overhead for any extra byte to read or send. I see a few reasons for these poor performance results:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;1. The USB overhead for small data packets&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;2. Minimum FTDI latency is 2ms&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;3. High level MPSSE command structure (atomic)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;I checked the DLL code and most of the functions were well written and can not be optimized. However in the read cycle this can be optimized a little bit but not worth to try and see much differences I think. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;Although the performance is not that fantastic, this design let you interface a PC platform (linux,windows,CE,mac) with any customized external board that uses a I2C bus as communication. And it's a very cheap and powerful solution. You can make your programs on your favourite platform without using embedded micro controllers. Use the power of that platform to interact with other high level software components without having the limitations of embedded boards. So anyone that have to work with some extended I2C based device can make use of this chip. Be ware this only counts for the latest series of FTDI eg 2232C or D. One of the drawbacks I see is that to serve systems running 24/7 using this solution, you have to let a PC running too and that's may be a kind of overkill. In that case it's better to have a small embedded system with very low power consumption or at least a PC platform without sensitive mechanical parts like fans or hard drives.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;So the question still remains for me if I'm going to use this as my domotic server system or not. I keep you posted on in this blog. In my next I'll present the overall setup with a nice picture of the components I used.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513864689406418682-5297921938046230607?l=ftdi-guyvo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ftdi-guyvo.blogspot.com/feeds/5297921938046230607/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513864689406418682&amp;postID=5297921938046230607' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513864689406418682/posts/default/5297921938046230607'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513864689406418682/posts/default/5297921938046230607'/><link rel='alternate' type='text/html' href='http://ftdi-guyvo.blogspot.com/2008/09/timings.html' title='timings'/><author><name>guyvo</name><uri>http://www.blogger.com/profile/10832934523371817183</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_y_OuF5jdLuo/SyQFsoO3PYI/AAAAAAAAATE/ux-nhBDeWf8/S220/twiiterface.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513864689406418682.post-8738859052327493719</id><published>2008-09-19T12:42:00.002+02:00</published><updated>2008-09-19T13:59:37.205+02:00</updated><title type='text'>FTCI2C DLL functionalities</title><content type='html'>&lt;span style="color: rgb(51, 255, 51);"&gt;Nothing received on my last mail. So the FDTI support is not that friendly if you ask me. Nevertheless I modified the DLL code so I now have access to the ADBUS and ACBUS bus GPIO. Although the ADBUS access is limited.  But as I promised, this post will be dedicated to the API calls you can use when the FT2232 device is in MPSSE mode. The next post I will show some results on timings from several tests I did to get a better idea on the capabilities of this chip using it for other purposes than usb to serial conversions.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;Mainly two possible ways to work with this device. You can pick the VCP (virtual com port) or the D2XX (low level design and special modes). In my case I downloaded the D2XX package. I took the windows based package but also linux , windows CE and even MAC are possible. Resources are available on the following site:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;http://www.ftdichip.com/Drivers/D2XX.htm&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;The FTDI software comes with a zip file archive with following components:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;- ftdi driver&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;- ftd2xx.dll&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;- ftd2xx.lib&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;- ftd2xx.h&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;These are the minimum components you need to start making your programs using visual studio.  If you choise to interface an I2C bus peripheral than you must download an ectra development package to be able to work easier with the internal command structure of the FT2232. This can be found :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;http://www.ftdichip.com/Projects/MPSSE/FTCI2C.htm&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;Components included are :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;- ftci2c.h&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;- ftci2c.dll&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;- ftci2c.lib&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;Basically you can do pretty much with the default API functions the DLL exports and are quit simple to use. Here is the list of APIs:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(51, 102, 255);font-size:78%;" &gt;FTCI2C_API&lt;br /&gt;FTC_STATUS WINAPI I2C_GetNumDevices(LPDWORD lpdwNumDevices);&lt;br /&gt;&lt;br /&gt;FTCI2C_API&lt;br /&gt;FTC_STATUS WINAPI I2C_GetDeviceNameLocID(DWORD dwDeviceNameIndex, LPSTR lpDeviceNameBuffer, DWORD dwBufferSize, LPDWORD lpdwLocationID);&lt;br /&gt;&lt;br /&gt;FTCI2C_API&lt;br /&gt;FTC_STATUS WINAPI I2C_OpenEx(LPSTR lpDeviceName, DWORD dwLocationID, FTC_HANDLE *pftHandle);&lt;br /&gt;&lt;br /&gt;FTCI2C_API&lt;br /&gt;FTC_STATUS WINAPI I2C_Open(FTC_HANDLE *pftHandle);&lt;br /&gt;&lt;br /&gt;FTCI2C_API&lt;br /&gt;FTC_STATUS WINAPI I2C_Close(FTC_HANDLE ftHandle);&lt;br /&gt;&lt;br /&gt;FTCI2C_API&lt;br /&gt;FTC_STATUS WINAPI I2C_InitDevice(FTC_HANDLE ftHandle, DWORD dwClockDivisor);&lt;br /&gt;&lt;br /&gt;FTCI2C_API&lt;br /&gt;FTC_STATUS WINAPI I2C_GetClock(DWORD dwClockDivisor, LPDWORD lpdwClockFrequencyHz);&lt;br /&gt;&lt;br /&gt;FTCI2C_API&lt;br /&gt;FTC_STATUS WINAPI I2C_SetClock(FTC_HANDLE ftHandle, DWORD dwClockDivisor, LPDWORD lpdwClockFrequencyHz);&lt;br /&gt;&lt;br /&gt;FTCI2C_API&lt;br /&gt;FTC_STATUS WINAPI I2C_SetLoopback(FTC_HANDLE ftHandle, BOOL bLoopbackState);&lt;br /&gt;&lt;br /&gt;FTCI2C_API&lt;br /&gt;FTC_STATUS WINAPI I2C_SetMode(FTC_HANDLE ftHandle, DWORD dwCommsMode);&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:78%;" &gt;&lt;span style="font-style: italic;"&gt; FTCI2C_API&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;FTC_STATUS WINAPI I2C_Write(FTC_HANDLE ftHandle, PWriteControlByteBuffer pWriteControlBuffer,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                            DWORD dwNumControlBytesToWrite, BOOL bControlAcknowledge, DWORD dwControlAckTimeoutmSecs,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                            BOOL bStopCondition, DWORD dwDataWriteTypes, PWriteDataByteBuffer pWriteDataBuffer, DWORD  NumDataBytesToWrite,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                            BOOL bDataAcknowledge, DWORD dwDataAckTimeoutmSecs, PFTC_PAGE_WRITE_DATA pPageWriteData);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;FTCI2C_API&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;FTC_STATUS WINAPI I2C_Read(FTC_HANDLE ftHandle, PWriteControlByteBuffer pWriteControlBuffer,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                           DWORD dwNumControlBytesToWrite, BOOL bControlAcknowledge, DWORD dwControlAckTimeoutmSecs,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                           DWORD dwDataReadTypes, PReadDataByteBuffer pReadDataBuffer, DWORD dwNumDataBytesToRead);&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;FTCI2C_API&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;FTC_STATUS WINAPI I2C_GetDllVersion(LPSTR lpDllVersionBuffer, DWORD dwBufferSize);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;FTCI2C_API&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;FTC_STATUS WINAPI I2C_GetErrorCodeString(LPSTR lpLanguage, FTC_STATUS StatusCode,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                                         LPSTR lpErrorMessageBuffer, DWORD dwBufferSize);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;As you can see quit a complete list of functions that you can call almost directly. The principe is based on dividing the i2c commands into a ControlBuffer and  a DataBuffer. This is done to simplify the internal calls to the FTDI2232 command set available. Here is an example out of my library I write to prepare a command for the PCA device:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(51, 255, 51);font-size:78%;" &gt;&lt;span style="color: rgb(51, 102, 255);"&gt;FTDI_API FTC_STATUS FTDI_I2C_PCA_WRITE_ALL    ( UCHAR adr ,  PCHAR  buf )&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;    FTC_STATUS stat;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;    PageWriteData.dwNumBytesPerPage = PCA9698_MAX_DATA;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;    PageWriteData.dwNumPages                    = PCA9698_MAX_PAGE;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;    WriteControlBuffer[0] = adr;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;    WriteControlBuffer[1] = PCA9698_WRITE_ALL;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;    memcpy ( WriteDataBuffer , buf , PCA9698_MAX_DATA );&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;    stat = I2C_Write(    hI2C, &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;                        &amp;amp;WriteControlBuffer,&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;                        PCA9698_CONTROL_BYTES,&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;                        FTDI_WANT_ACK,&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;                        FTDI_TIME_OUT,&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;                        FTDI_WANT_ACK,&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;                        PAGE_WRITE_TYPE,&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;                        &amp;amp;WriteDataBuffer,&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;                        PCA9698_MAX_DATA,&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;                        FTDI_WANT_ACK,&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;                        FTDI_TIME_OUT,&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;                        &amp;amp;PageWriteData&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;                    );I2C_RETURN_ERROR;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;    I2C_RETURN_SUCCES;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;So in fact you can organize your calls in seperate functions library for readability or you can of course also call it directly within your main logic. Due to the fact I modified the FTDI DLL code I better add my functions directly in the code of the DLL. This has an extra advantage in using only one single device handle. If you need the GPIO calls together with I2C you need to call functions out of the basic  ftd2xx.dll and you need to open up an other handle. This means that if you work like that you simply can't let open two handles in your program. I show you the lines that I changed to be able to access the ACBUS:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;In function FT2232cMpsseI2c::InitDataInOutClockFrequency I commented out these lines:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(51, 255, 51);font-size:78%;" &gt;&lt;span style="color: rgb(51, 102, 255);"&gt;// outputs on GPIO21-24&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;//  FTC_AddByteToOutputBuffer(SET_HIGH_BYTE_DATA_BITS_CMD, false);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;//  FTC_AddByteToOutputBuffer('\x0F', false);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;//  FTC_AddByteToOutputBuffer('\x0F', false);&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;If you don't do that every time the device gets initialized the ACBUS is set to output and the 4 lines become high. Another thing I did was changing the WriteProtectEnable flag. This flag is related to pin 4 of the ADBUS and not documented in the specifications. It's not quit clear to me why they use it but I guess to make the internal command calls save for multihreading.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;In function FT2232cMpsseI2c::ReadDataFromExternalDevice I modified the flag to false :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;span style="font-style: italic; color: rgb(51, 102, 255);font-size:78%;" &gt;Status = WriteAddressExternalDevice(ftHandle, (*pWriteControlBuffer)[0], ControlAckType,  dwControlAckTimeoutmSecs, false);&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;I needed to that because my PCA OE was connected to pin 4. After these changes the OE was working properly and the ACBUS was available for input as well as for output whitout any changes when calling the InitDevice function.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;I went not into great details regarding the code and of course I assume that you know how to build a DLL and use third party DLLs from within visual studio. The purpose of this post is just showing you the fact that FDTI device can be put into other modes than the widly used VCP mode. Next I will tell you bit more on the results of my tests.&lt;/span&gt; &lt;span style="color: rgb(51, 255, 51);"&gt;For the ones interested in reading some hardware specifications &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;http://www.ftdichip.com/Documents/DataSheets.htm&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;I can't attach the DLL source code here in this google blog which is a pitty but if you're interested just give me a reaction on this post.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513864689406418682-8738859052327493719?l=ftdi-guyvo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ftdi-guyvo.blogspot.com/feeds/8738859052327493719/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513864689406418682&amp;postID=8738859052327493719' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513864689406418682/posts/default/8738859052327493719'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513864689406418682/posts/default/8738859052327493719'/><link rel='alternate' type='text/html' href='http://ftdi-guyvo.blogspot.com/2008/09/ftci2c-dll-functionalities.html' title='FTCI2C DLL functionalities'/><author><name>guyvo</name><uri>http://www.blogger.com/profile/10832934523371817183</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_y_OuF5jdLuo/SyQFsoO3PYI/AAAAAAAAATE/ux-nhBDeWf8/S220/twiiterface.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513864689406418682.post-2341522884263378405</id><published>2008-09-13T11:51:00.002+02:00</published><updated>2008-09-13T12:11:43.218+02:00</updated><title type='text'>pcb ready</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_y_OuF5jdLuo/SMuNdmmAmXI/AAAAAAAAAHk/ggn8zbNyVAY/s1600-h/13092008023.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://4.bp.blogspot.com/_y_OuF5jdLuo/SMuNdmmAmXI/AAAAAAAAAHk/ggn8zbNyVAY/s200/13092008023.jpg" alt="" id="BLOGGER_PHOTO_ID_5245441730718767474" border="0" /&gt;&lt;/a&gt;&lt;span style="color: rgb(51, 255, 51);font-size:85%;" &gt;As you can see on the left this is the final design. It's a try out to investigate the possibilities of the FTDI 2232D chip. The objective was using the FTDI provided DLLs and interface my IO board via I2C.&lt;br /&gt;&lt;br /&gt;The first tests were perfect ! The chip in MPSSE mode let you communicate via I2C just by calling a few DLL API calls. But soon I noticed that this mode had some drawbacks. In de specifications of the chip nothing is telling you that if you use the MPSSE mode the gpios of the ADBUS and ACBUS are not available ! As my OE and INT of the IO board were connected using these gpio pins, the design became useless. Of course I tried to write to FTDI support but they are not that fast in response. Here are some FTDI answers:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;span class="804110917-11092008"&gt;&lt;div&gt;&lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;i&gt;&lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt;&lt;span style="font-size: 10pt; font-style: italic; font-family: Arial;"&gt;- Is the use of  ADBUS4-7 totally free as GPIO when using the DLL FTCI2C with  the FTDI 2232D device ?&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p style="color: rgb(0, 204, 204);" class="MsoNormal"&gt;&lt;o:p&gt;&lt;span class="804110917-11092008"&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Ans: Unfortunately when you set the mode for MPSSE those GPIO are not  available&lt;em&gt;.&lt;/em&gt;&lt;/span&gt;&lt;/span&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;/div&gt; &lt;div&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt;&lt;span style="font-size: 10pt; font-style: italic; font-family: Arial;"&gt;- In case of no  please write some additional design remarks in dedicated specifications to avoid  confusion and bad design.&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-size: 10pt; font-style: italic; font-family: Arial;"&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/strong&gt;&lt;o:p style="color: rgb(0, 204, 204);"&gt;&lt;span class="804110917-11092008"&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Ans: We will elaborate this  point in our future updates.&lt;/span&gt;&lt;/span&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;/div&gt; &lt;div&gt; &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt;&lt;span style="font-size: 10pt; font-style: italic; font-family: Arial;"&gt;- In case of yes  is it also free to use ACBUS as gpio together with I2C DLL  ?&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p style="color: rgb(0, 204, 204);" class="MsoNormal"&gt;&lt;o:p&gt;&lt;span class="804110917-11092008"&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Ans: NO&lt;/span&gt;&lt;/span&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;/div&gt; &lt;div&gt;  &lt;p class="MsoNormal"&gt;&lt;em&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt;&lt;span style="font-weight: bold; font-size: 10pt; font-family: Arial;"&gt;- Is it possible  to have the source code of the I2C DLL ?&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;em&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-weight: bold; font-size: 10pt; font-family: Arial;"&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/em&gt;&lt;o:p style="color: rgb(0, 204, 204);"&gt;&lt;span class="804110917-11092008"&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Ans: Sure  attached.&lt;/span&gt;&lt;/span&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p style="color: rgb(51, 255, 51);" class="MsoNormal"&gt;At last they attached the source code of the DLL which was a good thing. Nevertheless I wrote some final mail to point out my situation and what I really need for my design:&lt;/p&gt;&lt;p class="MsoNormal"&gt; &lt;span style="color: rgb(51, 51, 255); font-style: italic;"&gt;First of all thanks for your quick answer and attaching the source code. Bad news of course to hear that the GPIOs can not be combined together with the MPSSE mode. It's not quit clear to me if the behaviour comes from using the DLL or  it's inherent on the MPSSE mode itself. (not checked the code in detail yet) But one thing that FTDI definitly must do is add some remark in the specification. The pdf as is now only shows following notes in the column MPSSE:&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-style: italic;"&gt; **Note 4 : MPSSE is Channel A only.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-style: italic;"&gt; **Note 8 : SI/WU is not available in these modes.&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-style: italic;"&gt; This should be extended with a dedicated note like "GPIOs not available.." in case it's inherent on MPSSE mode and if the cause is due to the DLL in software this can be noted in the API pdf as such.&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-style: italic;"&gt; However my design issue remains and I want to find a solution. The purpose is to have 8 GPIOs available not at the same time when I need the I2C functionality. I want to poll on some eg xxBUS1 signal and act upon it when this is low with a I2C command. So it's important to have a statefull GPIO when using the I2C commands and returning to GPIO mode. Therefore maybe I can use channels A/B in some combination.&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-style: italic;"&gt; Can I use the device channel B in GPIO mode to poll and switch to MPSSE mode on channel A without losing the state on channel B ? What mode for B to use ?&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-style: italic;"&gt; I think the use of EEPROM is mandatory in such a A/B configuration ?&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-style: italic;"&gt; I hope you can point me in the right direction to solve my problems with the right design approach.&lt;/span&gt;&lt;/p&gt;&lt;p style="color: rgb(51, 255, 51);" class="MsoNormal"&gt;Still no answer. So maybe there's still a small change to combine the GPIOs with MPSSE I2C mode but I doubt it really. In the next blog I present some DLL calls I made to work with FTDI.&lt;/p&gt;&lt;p style="color: rgb(51, 255, 51);" class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="color: rgb(51, 255, 51);" class="MsoNormal"&gt;&lt;br /&gt;&lt;o:p&gt;&lt;span class="804110917-11092008"&gt;&lt;/span&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&lt;span class="804110917-11092008"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513864689406418682-2341522884263378405?l=ftdi-guyvo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ftdi-guyvo.blogspot.com/feeds/2341522884263378405/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513864689406418682&amp;postID=2341522884263378405' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513864689406418682/posts/default/2341522884263378405'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513864689406418682/posts/default/2341522884263378405'/><link rel='alternate' type='text/html' href='http://ftdi-guyvo.blogspot.com/2008/09/pcb-ready.html' title='pcb ready'/><author><name>guyvo</name><uri>http://www.blogger.com/profile/10832934523371817183</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_y_OuF5jdLuo/SyQFsoO3PYI/AAAAAAAAATE/ux-nhBDeWf8/S220/twiiterface.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_y_OuF5jdLuo/SMuNdmmAmXI/AAAAAAAAAHk/ggn8zbNyVAY/s72-c/13092008023.jpg' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513864689406418682.post-3904076765579786782</id><published>2008-08-20T20:44:00.000+02:00</published><updated>2008-08-20T21:02:21.302+02:00</updated><title type='text'>initial host platform</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_y_OuF5jdLuo/SKxmrDuwy_I/AAAAAAAAAHc/y6Gedk0oTQA/s1600-h/20082008015.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://3.bp.blogspot.com/_y_OuF5jdLuo/SKxmrDuwy_I/AAAAAAAAAHc/y6Gedk0oTQA/s200/20082008015.jpg" alt="" id="BLOGGER_PHOTO_ID_5236673356646894578" border="0" /&gt;&lt;/a&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;I took the asus eee notebook as the target platform because this it doesn't have a hard disk build in. This pc works completely on SSD. The only mechanical weak part is still the small fan. XP is installed on the 4G C drive and the 8G D drive serves for data and programs. Not having a hard disk has a great advantage espacially if it must work 24/7. Also the small layout is ideal for placing it in a switch board closet. It has default WIFI on board so my access point can be dropped.  It runs on a celeron M 1Ghz processor more than enough power to drive my needed applications. I also benefit of the audio availability which is built in by default. I already tested it for a few days with my web server running and the no issues were dedected. The only bad thing I can say for now is that it only has 4Gb to store the operating system on. As windows XP SP3 is installed now I only have 500Mb left. But up till now I see no blocking issues to start working with this configuration. Maybe this can be replaced in time by a server system running on RAID. I'll see what I can get out of this small 3E pc.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513864689406418682-3904076765579786782?l=ftdi-guyvo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ftdi-guyvo.blogspot.com/feeds/3904076765579786782/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513864689406418682&amp;postID=3904076765579786782' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513864689406418682/posts/default/3904076765579786782'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513864689406418682/posts/default/3904076765579786782'/><link rel='alternate' type='text/html' href='http://ftdi-guyvo.blogspot.com/2008/08/initial-host-platform.html' title='initial host platform'/><author><name>guyvo</name><uri>http://www.blogger.com/profile/10832934523371817183</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_y_OuF5jdLuo/SyQFsoO3PYI/AAAAAAAAATE/ux-nhBDeWf8/S220/twiiterface.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_y_OuF5jdLuo/SKxmrDuwy_I/AAAAAAAAAHc/y6Gedk0oTQA/s72-c/20082008015.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513864689406418682.post-8650754719686920090</id><published>2008-08-20T20:29:00.001+02:00</published><updated>2008-08-20T20:44:10.450+02:00</updated><title type='text'>first analyse</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_y_OuF5jdLuo/SKxi0rPBwDI/AAAAAAAAAHM/R0TtIpczERY/s1600-h/20082008014.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 220px; height: 240px;" src="http://2.bp.blogspot.com/_y_OuF5jdLuo/SKxi0rPBwDI/AAAAAAAAAHM/R0TtIpczERY/s320/20082008014.jpg" alt="" id="BLOGGER_PHOTO_ID_5236669123823517746" border="0" /&gt;&lt;/a&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;On the left my first ideas to cope with an FTDI based architecture. I isolated a few topics:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;- Development platform&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;- Target deployment&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;- Physical composition&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;- Low level software interpretation&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;Mean less to say that this can be changed when I'll have some feedback on the overall performance and reliability of the system in this initial layout.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513864689406418682-8650754719686920090?l=ftdi-guyvo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ftdi-guyvo.blogspot.com/feeds/8650754719686920090/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513864689406418682&amp;postID=8650754719686920090' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513864689406418682/posts/default/8650754719686920090'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513864689406418682/posts/default/8650754719686920090'/><link rel='alternate' type='text/html' href='http://ftdi-guyvo.blogspot.com/2008/08/first-analyse.html' title='first analyse'/><author><name>guyvo</name><uri>http://www.blogger.com/profile/10832934523371817183</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_y_OuF5jdLuo/SyQFsoO3PYI/AAAAAAAAATE/ux-nhBDeWf8/S220/twiiterface.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_y_OuF5jdLuo/SKxi0rPBwDI/AAAAAAAAAHM/R0TtIpczERY/s72-c/20082008014.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513864689406418682.post-2218904400638620362</id><published>2008-08-20T18:34:00.000+02:00</published><updated>2008-08-20T20:43:17.710+02:00</updated><title type='text'>kick off</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_y_OuF5jdLuo/SKxluc9J_HI/AAAAAAAAAHU/oxtZAtMDKR4/s1600-h/domos4.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://1.bp.blogspot.com/_y_OuF5jdLuo/SKxluc9J_HI/AAAAAAAAAHU/oxtZAtMDKR4/s200/domos4.jpg" alt="" id="BLOGGER_PHOTO_ID_5236672315446131826" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;Just started with the FT2232D chip of the new FTDI USB generation. I tried to order a development kit but the order never came trough so I cancelled it. Meanwhile I wrote some hardware specification to build my own board that easily interfaces my I2C IO board. I already did some first tests with a VC program and the FTDI dedicated DLL to have a first impression on performance. I did these tests with a ft232 chip of the previous generation. One USB call via the DLL api takes a minimum time of 2ms. This is acceptable however. So I continued my strategy in using this chip targeted for I2C communication. So it can be used together with my IO board. This means of course that the final application will be running on a PC platform. I'm not sure yet if the OS will be windows or linux because FTDI drivers are provided for several possible operating systems. But I start my development on windows for a start.&lt;br /&gt;&lt;br /&gt;The PCB layout will soon be in production.&lt;/span&gt;&lt;span style="color: rgb(51, 255, 51);"&gt; Attached to this blog the drawing of the customized pcb. As soon it's soldered properly I post a picture.&lt;/span&gt;  &lt;span style="color: rgb(51, 255, 51);"&gt;Further news will follow as we go ahead !&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513864689406418682-2218904400638620362?l=ftdi-guyvo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ftdi-guyvo.blogspot.com/feeds/2218904400638620362/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513864689406418682&amp;postID=2218904400638620362' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513864689406418682/posts/default/2218904400638620362'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513864689406418682/posts/default/2218904400638620362'/><link rel='alternate' type='text/html' href='http://ftdi-guyvo.blogspot.com/2008/08/kick-off.html' title='kick off'/><author><name>guyvo</name><uri>http://www.blogger.com/profile/10832934523371817183</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_y_OuF5jdLuo/SyQFsoO3PYI/AAAAAAAAATE/ux-nhBDeWf8/S220/twiiterface.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_y_OuF5jdLuo/SKxluc9J_HI/AAAAAAAAAHU/oxtZAtMDKR4/s72-c/domos4.jpg' height='72' width='72'/><thr:total>0</thr:total></entry></feed>
