tag:blogger.com,1999:blog-66268726650543992122024-03-06T07:49:24.439+07:00Electronics DesignEnjoy a collection of all electronics in our site. Practical tips on all electronics. Covers all electronics related issues, news, research, tips, and guide.Aryantohttp://www.blogger.com/profile/18082049281071636850noreply@blogger.comBlogger31125tag:blogger.com,1999:blog-6626872665054399212.post-37405159971251708022013-10-24T05:08:00.001+07:002013-10-24T05:08:43.726+07:00Microsoft brings speech recognition to Bing developers<div style="-webkit-font-smoothing: subpixel-antialiased; background-color: white; border: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.984375px; margin-top: 10px; outline: 0px; padding: 0px; vertical-align: baseline;">
In July of this year, Microsoft made it official that Bing is more than just a search engine. <a href="http://www.zdnet.com/microsofts-bing-make-over-back-end-services-take-center-stage-7000017546/" style="border: 0px; color: #2964bf; cursor: pointer; font-family: inherit; font-size: inherit; font-style: inherit; margin: 0px; outline: none; padding: 0px; text-decoration: none; vertical-align: baseline;">It also is a developer platform</a>, providing coders with controls, development kits, and the back-end services powering these elements.</div>
<div class="cnet-image-div image-MEDIUM float-right" style="background-color: white; border: 0px; clear: right; float: right; font-family: Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.984375px; margin: 20px 2px 20px 20px; outline: 0px; padding: 0px; vertical-align: baseline; width: 270px;">
<img alt="" class="cnet-image" height="159" src="http://asset3.cbsistatic.com/cnwk.1d/i/tim2/2013/10/22/Microsoft_Bing_Voice_3_270x159.png" style="border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;" width="270" /><span class="image-credit" style="border: 0px; font-family: inherit; font-size: 0.8em; font-style: inherit; line-height: 1.133em; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">(Credit: Microsoft)</span></div>
<div style="-webkit-font-smoothing: subpixel-antialiased; background-color: white; border: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.984375px; margin-top: 10px; outline: 0px; padding: 0px; vertical-align: baseline;">
On October 21, Microsoft added a long-awaited piece to the Bing developer toolbox: a <a href="http://msdn.microsoft.com/en-us/library/dn434583.aspx" style="border: 0px; color: #2964bf; cursor: pointer; font-family: inherit; font-size: inherit; font-style: inherit; margin: 0px; outline: none; padding: 0px; text-decoration: none; vertical-align: baseline;">speech recognition control</a>. This new control allows developers to build Windows 8, <a href="http://reviews.cnet.com/microsoft-windows-8-1/" section="luke_topic" style="border: 0px; color: #2964bf; cursor: pointer; font-family: inherit; font-size: inherit; font-style: inherit; margin: 0px; outline: none; padding: 0px; text-decoration: none; vertical-align: baseline;">Windows 8.1</a>, and Windows RT Metro-Style/Windows Store apps that include speech-recognition as one of their inputs.</div>
<div style="-webkit-font-smoothing: subpixel-antialiased; background-color: white; border: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.984375px; margin-top: 10px; outline: 0px; padding: 0px; vertical-align: baseline;">
Microsoft execs also announced updates to the existing Bing Optical Character Recognition Control and Bing Translator Controls so that they support Windows 8.1.</div>
<div style="-webkit-font-smoothing: subpixel-antialiased; background-color: white; border: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.984375px; margin-top: 10px; outline: 0px; padding: 0px; vertical-align: baseline;">
"If you are a Windows Phone developer, you may </div>
<a name='more'></a>already be familiar with the speech recognition inside Windows Phone: the user taps a microphone icon, speaks into the mic, and the text shows up on screen," wrote members of the Bing Dev Center team in a new blog post. "Now, that same functionality is <a href="http://blogs.msdn.com/b/bingdevcenter/archive/2013/10/21/new-bing-speech-recognition-control-and-updated-bing-ocr-and-translator-controls.aspx" style="border: 0px; color: #2964bf; cursor: pointer; font-family: inherit; font-size: inherit; font-style: inherit; margin: 0px; outline: none; padding: 0px; text-decoration: none; vertical-align: baseline;">available on Windows 8, Windows 8.1, and Windows RT through the free Bing Speech Recognition Control</a>."<br />
<div class="floatList" section="related" style="background-color: white; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-width: 1px 0px; float: left; font-family: Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.984375px; margin: 10px 20px 10px 0px; outline: 0px; padding: 10px 0px; vertical-align: baseline; width: 300px;">
<h3 style="border: 0px; color: #39434c; font-family: franklin-gothic-urw-cond, 'Helvetica Condensed Bold', Helvetica, Arial, sans-serif; font-size: 1.333em; font-style: inherit; letter-spacing: -0.5px; line-height: 1.2em; margin: 0px; outline: 0px; padding: 0px 0px 10px; vertical-align: baseline;">
Related stories</h3>
<ul style="border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; list-style: none; margin: 0px; outline: 0px; padding: 0px; position: relative; vertical-align: baseline;">
<li style="border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; margin: 0px 0px 3px; outline: 0px; padding: 0px 0px 0px 20px; text-align: left; vertical-align: baseline;"><a href="http://news.cnet.com/8301-31747_7-57608902-243/the-ipad-airs-missed-opportunity/" style="border: 0px; color: #2964bf; cursor: pointer; font-family: inherit; font-size: inherit; font-style: inherit; margin: 0px; outline: none; padding: 0px; text-decoration: none; vertical-align: baseline;">The iPad Air's missed opportunity</a></li>
<li style="border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; margin: 0px 0px 3px; outline: 0px; padding: 0px 0px 0px 20px; text-align: left; vertical-align: baseline;"><a href="http://news.cnet.com/8301-10805_3-57608867-75/microsoft-surface-2-dinged-for-low-repairability-by-ifixit/" style="border: 0px; color: #2964bf; cursor: pointer; font-family: inherit; font-size: inherit; font-style: inherit; margin: 0px; outline: none; padding: 0px; text-decoration: none; vertical-align: baseline;">Microsoft Surface 2 dinged for low repairability by iFixit</a></li>
<li style="border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; margin: 0px 0px 3px; outline: 0px; padding: 0px 0px 0px 20px; text-align: left; vertical-align: baseline;"><a href="http://news.cnet.com/8301-13579_3-57608762-37/apples-newest-biz-strategy-free-free-free/" style="border: 0px; color: #2964bf; cursor: pointer; font-family: inherit; font-size: inherit; font-style: inherit; margin: 0px; outline: none; padding: 0px; text-decoration: none; vertical-align: baseline;">Apple's newest biz strategy: Free, free, free</a></li>
<li style="border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; margin: 0px 0px 3px; outline: 0px; padding: 0px 0px 0px 20px; text-align: left; vertical-align: baseline;"><a href="http://news.cnet.com/8301-31747_7-57608587-243/ipad-air-vs-surface-2-vs-galaxy-note-10.1/" style="border: 0px; color: #2964bf; cursor: pointer; font-family: inherit; font-size: inherit; font-style: inherit; margin: 0px; outline: none; padding: 0px; text-decoration: none; vertical-align: baseline;">iPad Air vs. Surface 2 vs. Galaxy Note 10.1</a></li>
<li style="border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; margin: 0px 0px 3px; outline: 0px; padding: 0px 0px 0px 20px; text-align: left; vertical-align: baseline;"><a href="http://news.cnet.com/8301-10805_3-57608641-75/microsoft-reportedly-testing-its-own-version-of-google-glass/" style="border: 0px; color: #2964bf; cursor: pointer; font-family: inherit; font-size: inherit; font-style: inherit; margin: 0px; outline: none; padding: 0px; text-decoration: none; vertical-align: baseline;">Microsoft reportedly testing its own version of Google Glass</a></li>
</ul>
</div>
<div style="-webkit-font-smoothing: subpixel-antialiased; background-color: white; border: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.984375px; margin-top: 10px; outline: 0px; padding: 0px; vertical-align: baseline;">
Microsoft has been encouraging developers to license its mapping, speech, translation, and various other search-related application programming interfaces (APIs) for years with mixed success. Going forward, Microsoft's pitch to developers is that they can embed not just a set of static APIs and controls, but the continuously updated logic and data powering them.</div>
<div style="-webkit-font-smoothing: subpixel-antialiased; background-color: white; border: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.984375px; margin-top: 10px; outline: 0px; padding: 0px; vertical-align: baseline;">
Some of Microsoft's own product teams are already using these Bing API-plus-service packages. The Bing search experience in Windows 8.1, for example, is making use of a number of the Bing APIs and controls, plus the services powering these elements. And some of the recently announced Microsoft AppEx applications -- like the Health & Fitness one that's been announced for Windows 8.1 -- do, as well. The Bing search engine itself is powered by these services, too, company officials said.</div>
<div style="-webkit-font-smoothing: subpixel-antialiased; background-color: white; border: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.984375px; margin-top: 10px; outline: 0px; padding: 0px; vertical-align: baseline;">
Don't forget, it's <a href="http://www.zdnet.com/how-microsoft-aims-to-bring-bing-deeper-into-windows-blue-xbox-one-7000015818/" style="border: 0px; color: #2964bf; cursor: pointer; font-family: inherit; font-size: inherit; font-style: inherit; margin: 0px; outline: none; padding: 0px; text-decoration: none; vertical-align: baseline;">Bing that provides the responses when users search by voice via Kinect</a> for movies, TV shows and music. It's <a href="http://www.zdnet.com/blog/microsoft/microsoft-making-big-speech-bets-with-windows-8-bing/10303" style="border: 0px; color: #2964bf; cursor: pointer; font-family: inherit; font-size: inherit; font-style: inherit; margin: 0px; outline: none; padding: 0px; text-decoration: none; vertical-align: baseline;">Bing that's parsing the natural-language-query commands</a>, such as "Xbox, Snap Internet Explorer." Specifically, it's the Tellme voice technology, combined with social-graph information, plus Bing's search functionality.</div>
<div style="-webkit-font-smoothing: subpixel-antialiased; background-color: white; border: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.984375px; margin-top: 10px; outline: 0px; padding: 0px; vertical-align: baseline;">
In other developer-focused news this week, Microsoft announced <a href="http://weblogs.asp.net/scottgu/archive/2013/10/22/windows-azure-announcing-release-of-windows-azure-sdk-2-2-with-lots-of-goodies.aspx" style="border: 0px; color: #2964bf; cursor: pointer; font-family: inherit; font-size: inherit; font-style: inherit; margin: 0px; outline: none; padding: 0px; text-decoration: none; vertical-align: baseline;">availablity of the Windows Azure software development kit (SDK) 2.2</a>, which adds support of the final RTM release of Visual Studio 2013; integrated Azure sign-in support within Visual Studio; VS 2013 RTM VM images for MSDN subscribers; and a preview of Azure Management Libraries for .Net.</div>
<div style="-webkit-font-smoothing: subpixel-antialiased; background-color: white; border: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.984375px; margin-top: 10px; outline: 0px; padding: 0px; vertical-align: baseline;">
<i style="border: 0px; font-family: inherit; font-size: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">This story originally appeared as "<a href="http://www.zdnet.com/microsoft-enables-developers-to-add-speech-recognition-to-windows-8-apps-7000022301/" style="border: 0px; color: #2964bf; cursor: pointer; font-family: inherit; font-size: inherit; font-style: inherit; margin: 0px; outline: none; padding: 0px; text-decoration: none; vertical-align: baseline;">Microsoft enables developers to add speech recognition to Windows 8 apps</a>" on ZDNet.</i></div>
Aryantohttp://www.blogger.com/profile/18082049281071636850noreply@blogger.com0tag:blogger.com,1999:blog-6626872665054399212.post-44586725356379164132013-10-24T05:04:00.003+07:002013-10-24T05:04:36.855+07:00Microsoft Reportedly Testing Google Glass Competitor<div style="background-color: white; color: #555555; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; line-height: 22px; margin-bottom: 1.5em; margin-top: 0.75em;">
Google may not be the only tech giant developing smart glasses.</div>
<div style="background-color: white; color: #555555; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; line-height: 22px; margin-bottom: 1.5em; margin-top: 0.75em;">
<em><a href="http://online.wsj.com/news/articles/SB10001424052702304402104579150952302814782" style="color: #0c74a6; text-decoration: none;" target="_blank">The Wall Street Journal</a></em> reports that Microsoft is testing prototypes for a device similar to Google Glass, which includes a camera and Internet capabilities. Microsoft has reportedly been in contact with Asian manufacturers to supply components for the device, but the <em>Journal</em>'s source emphasized that the product may not come to the mass market.</div>
<a name='more'></a><br />
<div style="background-color: white; color: #555555; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; line-height: 22px; margin-bottom: 1.5em; margin-top: 0.75em;">
Microsoft did not immediately respond to our request for comment.</div>
<div class="see-also" style="background-color: white; color: #555555; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; font-weight: bold; line-height: 22px; text-transform: uppercase;">
<div style="margin-bottom: 1.5em; margin-top: 0.75em;">
SEE ALSO: <a data-crackerjax="#post-slider" href="http://mashable.com/2013/10/17/glass-firmware-update/" style="color: #0c74a6; text-decoration: none; text-transform: none;">Google Glass May Soon Call You a Car, Tune Your Instrument</a></div>
</div>
<div style="background-color: white; color: #555555; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; line-height: 22px; margin-bottom: 1.5em; margin-top: 0.75em;">
Earlier this year, Topeka Capital Markets analyst Brian White predicted that Microsoft would introduce Internet-connected wearable glasses by 2014. Despite being one of the first to introduce a smartwatch in the early 2000s, Microsoft has been relatively quiet on the wearable technology front.</div>
<div style="background-color: white; color: #555555; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; line-height: 22px; margin-bottom: 1.5em; margin-top: 0.75em;">
While Google Glass has received plenty of coverage this year, the market for smart glasses may not be as big as some think. Jeff Orr, an analyst with ABI Research, <a data-crackerjax="#post-slider" href="http://mashable.com/2013/09/05/smartwatch-market/" style="color: #0c74a6; text-decoration: none;">told <em>Mashable</em></a> last month that he expects there will be 140 million smartwatch shipments annually by 2018, but just 75 million smart glasses shipments by that year.</div>
<div style="background-color: white; color: #555555; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; line-height: 22px; margin-bottom: 1.5em; margin-top: 0.75em;">
<em>Image: David Becker/Getty</em></div>
<div style="background-color: white; color: #555555; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; line-height: 22px; margin-bottom: 1.5em; margin-top: 0.75em;">
<i>Source : </i>http://mashable.com/2013/10/22/microsoft-google-glass/</div>
Aryantohttp://www.blogger.com/profile/18082049281071636850noreply@blogger.com0tag:blogger.com,1999:blog-6626872665054399212.post-86438485654948754932012-12-22T05:52:00.000+07:002012-12-22T05:52:59.319+07:00The 89C51 PABX<b><span style="font-size: 13.5pt;">Introduction<br /></span></b><span style="font-family: Times New Roman, Times, serif;">This project is basically an eight line intercom from which you can call 1 to 8 <span class="GramE">number</span>. This system also support dialing and receiving telephone calls.</span><br />
<a name='more'></a><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZvtlMRm3RlE4bhD_3gbpmysy8d2mifzqcUBW7MC-9wqw4ShDFeNHbWvhPUkemSXix2-g1D00C5r2dlAiv1iQ9-ohRhVZvIYYJEoqtrD7W67HzKmE7oTj1SNAtY9b_NJ7C9-j10gS1FOLY/s1600/image002.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="330" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZvtlMRm3RlE4bhD_3gbpmysy8d2mifzqcUBW7MC-9wqw4ShDFeNHbWvhPUkemSXix2-g1D00C5r2dlAiv1iQ9-ohRhVZvIYYJEoqtrD7W67HzKmE7oTj1SNAtY9b_NJ7C9-j10gS1FOLY/s640/image002.gif" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<b style="font-size: 16px;"><span style="color: blue;">Figure 1: Block Diagram<o:p> of the 89C51 <span class="searchword" style="background-color: lightblue;">PABx</span></o:p></span></b></div>
<div class="separator" style="clear: both; text-align: center;">
<b style="font-size: 16px;"><span style="color: blue;"><o:p><span class="searchword" style="background-color: lightblue;"><br /></span></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt;">
<o:p> </o:p><b><span style="font-size: 13.5pt;">How to use</span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt;">
<b><span style="font-size: 13.5pt;"><br /><o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt;">
Pick your hand set, the dial tone will be <span class="GramE">listen</span> now dial 1 to 8 number if the busy tone listen put back your hand set and wait for free system. For a telephone call dial first 0 “Zero” number the system will connect your phone with telephone line, here you will listen the dial tone from telephone exchange this dial tone is differ from system dial tone now dial your required number just like a normal telephone line.</div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt;">
From out side, when you dial <span class="SpellE">PBx</span> line number the system hold the call after two bells and a melody is listening as a instruction message then dial required extension number.</div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRYj8kUZb3z8-OOByKfdeJ-gThR-vUxsiW0e_ejP8aCa52UAvwyNxq0FkthGZeemzCBp8KDKxkhf_GpUWFMyBnLDX8ktgu3IlBc0hh_bEhfs690KDODBzYQ9Bn-V6nZ9ZNpqBgFof8AuvH/s1600/image004.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRYj8kUZb3z8-OOByKfdeJ-gThR-vUxsiW0e_ejP8aCa52UAvwyNxq0FkthGZeemzCBp8KDKxkhf_GpUWFMyBnLDX8ktgu3IlBc0hh_bEhfs690KDODBzYQ9Bn-V6nZ9ZNpqBgFof8AuvH/s1600/image004.jpg" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<b style="font-size: 16px;"><span style="color: #000099;">Figure 2: Circuit Diagram of the <span class="searchword" style="background-color: lightblue;">PABx</span>-1 Note:- Add 10k pullup resistor to PORT0</span></b></div>
<div class="separator" style="clear: both; text-align: center;">
<b style="font-size: 16px;"><span style="color: #000099;"><br /></span></b></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFfxds8OGRKCmiY6CS12FybV0G2QIYYzzLsTx5jIBulIf63GBpC-CMYh3yos_9mGx4wTLrPzb7Kr966UK8HCIPOgklbxdeVTrSRkkwtTJAZlUmd-bS_TUXK2a0DZYYl3xdc6GhRDyPZeym/s1600/image006.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFfxds8OGRKCmiY6CS12FybV0G2QIYYzzLsTx5jIBulIf63GBpC-CMYh3yos_9mGx4wTLrPzb7Kr966UK8HCIPOgklbxdeVTrSRkkwtTJAZlUmd-bS_TUXK2a0DZYYl3xdc6GhRDyPZeym/s1600/image006.jpg" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<b style="font-size: 16px;"><span style="color: #000099;">Figure 3: Circuit Diagram of the <span class="searchword" style="background-color: lightblue;">PABx</span>-2</span></b></div>
<div class="separator" style="clear: both; text-align: center;">
<b style="font-size: 16px;"><span style="color: #000099;"><br /></span></b></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt; text-align: start;">
<b><span style="font-size: 13.5pt;">Circuit Description<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt; text-align: start;">
<br />Circuit consists of following stages.</div>
<ol start="1" style="margin-bottom: 0in; margin-top: 0in; text-align: start;" type="1">
<li class="MsoNormal" style="font-size: 12pt; margin: 0in 0in 0.0001pt;"><b>Microcontroller<o:p></o:p></b></li>
</ol>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: start;">
The heart of the system is <span class="SpellE">Atmel</span> AT89S51 microcontroller which is running on 12 MHz clock speed.</div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: start;">
<br /></div>
<ol start="2" style="margin-bottom: 0in; margin-top: 0in; text-align: start;" type="1">
<li class="MsoNormal" style="font-size: 12pt; margin: 0in 0in 0.0001pt;"><b>Power Supply<o:p></o:p></b></li>
</ol>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: start;">
<span style="font-family: TimesNewRoman;">The main power source is 220V AC, which is step-down into 24V and 72V. The18V DC is used for telephone system and 72V AC supply is used for ringing telephone bells which is controlled by RL10.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: start;">
<br /></div>
<ol start="3" style="margin-bottom: 0in; margin-top: 0in; text-align: start;" type="1">
<li class="MsoNormal" style="font-size: 12pt; margin: 0in 0in 0.0001pt;"><b>Ring Detector<o:p></o:p></b></li>
</ol>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: start;">
<span style="font-family: TimesNewRoman; font-size: 11.5pt;">This stage converts the incoming bell signals into pulses. These pulses are counted by Timer1 in the micro controller. The system hold the (Outer) call after two bells, two bells have 37 pulses.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: start;">
<br /></div>
<ol start="4" style="margin-bottom: 0in; margin-top: 0in; text-align: start;" type="1">
<li class="MsoNormal" style="font-size: 12pt; margin: 0in 0in 0.0001pt;"><b>Tone Generator</b><span style="font-family: TimesNewRoman; font-size: 11.5pt;"><o:p></o:p></span></li>
</ol>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: start;">
<span style="font-family: TimesNewRoman; font-size: 11.5pt;">This stage consists of CD4093. The gate <span style="color: blue;">A</span> oscillate on 440Hz and gate <span style="color: blue;">B</span> oscillate on low frequencies then gate <span style="color: blue;">C</span> <span style="color: blue;">“AND”</span> the output of <span style="color: blue;">A</span> and <span style="color: blue;">B</span> gate. This arrangement is done for generating dial tone and busy tone. Gate<span style="color: blue;">D</span> generate dial tone, dial tone is controlled by P3.6 and busy tone is controlled by P3.4.Dial tone is provided to speech bus and busy tone is provide on standby bus.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: start;">
<br /></div>
<ol start="5" style="margin-bottom: 0in; margin-top: 0in; text-align: start;" type="1">
<li class="MsoNormal" style="font-size: 12pt; margin: 0in 0in 0.0001pt;"><b>Call Holding Circuit<o:p></o:p></b></li>
</ol>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: start;">
<span style="font-family: TimesNewRoman; font-size: 11.5pt;">In this stage IC5 (<span class="SpellE">Opto-triac</span>) serves as hook switch, controlled by P1.6.This stage perform dual function. First hold incoming call <span style="color: blue;">(From out side)</span> and second transmit recorded voice massage <span style="color: blue;">(Melody)</span> on telephone line.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: start;">
<br /></div>
<ol start="6" style="margin-bottom: 0in; margin-top: 0in; text-align: start;" type="1">
<li class="MsoNormal" style="font-size: 12pt; margin: 0in 0in 0.0001pt;"><b>Message Player</b><span style="font-family: TimesNewRoman; font-size: 11.5pt;"><o:p></o:p></span></li>
</ol>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: start;">
<span style="font-family: TimesNewRoman; font-size: 11.5pt;">I decide to use <span style="color: blue;">“Voice recording/playing chip”</span> but unfortunately this was not available in local market, so I have used UM66 (Melody IC) instead of Voice recording chip which is controlled by P3.7.This melody transmit to holding circuit through C10. </span><span style="font-family: TimesNewRoman;">If possible let you use any voice Recording/Playing module with some changes.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: start;">
<br /></div>
<ol start="7" style="margin-bottom: 0in; margin-top: 0in; text-align: start;" type="1">
<li class="MsoNormal" style="font-size: 12pt; margin: 0in 0in 0.0001pt;"><b>Gyrator</b><span style="font-family: TimesNewRoman; font-size: 11.5pt;"><o:p></o:p></span></li>
</ol>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: start;">
<span style="font-family: TimesNewRoman; font-size: 11.5pt;">There are two supply sources are used through gyrator, one for speech bus and other for stand-by bus. This arrangement was necessary to make sure complete privacy during speech. If the same source was used for both buses, it was possible the speech transfer to the stand-by bus.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: start;">
<br /></div>
<ol start="8" style="margin-bottom: 0in; margin-top: 0in; text-align: start;" type="1">
<li class="MsoNormal" style="font-size: 12pt; margin: 0in 0in 0.0001pt;"><b>DTMF Decoder</b><span style="font-family: TimesNewRoman; font-size: 11.5pt;"><o:p></o:p></span></li>
</ol>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: start;">
<span style="font-family: TimesNewRoman; font-size: 11.5pt;">The heart of this stage is IC2 (MT 8870). This IC decodes the DTMF input in the binary format. The output of decoder is provided to Port1 of the microcontroller. <span class="GramE">When a valid DTMF receive MT8870 strobe for 20msec to microcontroller on P1.4.</span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: start;">
<br /></div>
<ol start="9" style="margin-bottom: 0in; margin-top: 0in; text-align: start;" type="1">
<li class="MsoNormal" style="font-size: 12pt; margin: 0in 0in 0.0001pt;"><b>Status Indicator</b><span style="font-family: TimesNewRoman;"><o:p></o:p></span></li>
</ol>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: start;">
<span style="font-family: TimesNewRoman;">There are eight indicators are used, one for each telephone set, all indicator are attached to Port2.When some one is pickup the hand set of his telephone, the current is flow from the telephone via R26, some voltage are dropped on the resistance, which activate the relevant transistor hence logic low occur on his collector. This logic is read by microcontroller on Port 2.</span><b><o:p></o:p></b></div>
<div align="center" class="MsoNormal" style="margin: 0in 0in 0.0001pt;">
<br /></div>
<h2 style="font-size: 18pt; margin-left: 0in; margin-right: 0in; text-align: start;">
<span style="font-family: Arial; font-size: 13.5pt;">Download</span></h2>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt; text-align: start;">
Block Diagram <a href="http://www.kmitl.ac.th/~kswichit/PABx/Download/Block-Dia.wmf" style="color: purple;">Block-<span class="SpellE">dia.wmf</span></a></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt; text-align: start;">
Schematic <a href="http://www.kmitl.ac.th/~kswichit/PABx/Download/PABx.pdf" style="color: purple;"><span class="SpellE"><span class="searchword" style="background-color: lightblue;">PABx</span>.pdf</span></a><br />Source Code <span style="color: blue;"><a href="http://www.kmitl.ac.th/~kswichit/PABx/Download/PABx.ASM" style="color: purple;"><span class="SpellE"><span class="searchword" style="background-color: lightblue;">PABx</span>.asm</span></a></span><br />HEX <span class="GramE">file</span> <a href="http://www.kmitl.ac.th/~kswichit/PABx/Download/PABx.HEX" style="color: purple;"><span class="SpellE"><span class="searchword" style="background-color: lightblue;">PABx</span>.hex</span></a></div>
<br />
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt;">
<br /></div>
Aryantohttp://www.blogger.com/profile/18082049281071636850noreply@blogger.com3tag:blogger.com,1999:blog-6626872665054399212.post-44740507037806365792012-08-25T11:03:00.002+07:002012-08-25T11:14:35.609+07:00Video Converter All in one<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<table border="0" style="background-color: white; font-family: verdana, tahoma, arial; width: 100%px;"><tbody>
<tr><td align="left" style="color: #212121; font-size: 11px;" valign="top" width="160"><div style="margin-top: 5px; text-align: center;">
<a href="https://secure.avangate.com/order/cart.php?PRODS=3122342&QTY=1&AFFILIATE=34175"><img src="https://secure.avangate.com/images/merchant/f499d34bd87b42948b3960b8f6b82e74/products/150px_b.jpg" /></a></div>
</td><td style="color: #212121; font-size: 11px;" valign="top" width="*"><h4 style="font-size: 12px; margin: 0px 0px 5px; padding-bottom: 0px;">
4Videosoft Video Converter Platinum</h4>
<div style="margin-bottom: 10px;">
Product ID: 3122342</div>
<table cellspacing="0" style="width: 100%px;"><tbody>
<tr class="aff_prod_row"><td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; color: #212121; font-size: 11px; padding: 2px;">Price:</td><td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; color: #212121; font-size: 11px; padding: 2px;" width="100%">31.81 EUR</td></tr>
<tr class="aff_prod_row"><td nowrap="" style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; color: #212121; font-size: 11px; padding: 2px;"><br /></td><td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; color: #212121; font-size: 11px; padding: 2px;"><br /></td></tr>
<tr class="aff_prod_row"><td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; color: #212121; font-size: 11px; padding: 2px;"><br /></td><td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; color: #212121; font-size: 11px; padding: 2px;"><br /></td></tr>
<tr class="aff_prod_row"><td nowrap="" style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; color: #212121; font-size: 11px; padding: 2px;">Vendor Name:</td><td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; color: #212121; font-size: 11px; padding: 2px;"><a href="https://secure.avangate.com/order/cart.php?PRODS=3122342&QTY=1&AFFILIATE=34175">4Videosoft Studio</a></td></tr>
<tr class="aff_prod_row"><td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; color: #212121; font-size: 11px; padding: 2px;">Website:</td><td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; color: #212121; font-size: 11px; padding: 2px;"><a href="https://secure.avangate.com/order/cart.php?PRODS=3122342&QTY=1&AFFILIATE=34175">4videosoft.com</a></td></tr>
<tr class="aff_prod_row"><td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; color: #212121; font-size: 11px; padding: 2px;">Last Update:</td><td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; color: #212121; font-size: 11px; padding: 2px;">24 Apr 2012</td></tr>
<tr class="aff_prod_row"><td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; color: #212121; font-size: 11px; padding: 2px;" valign="top">Category:</td><td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; color: #212121; font-size: 11px; padding: 2px;" valign="top">Audio & Video</td></tr>
</tbody></table>
</td><td style="color: #212121; font-size: 11px;" valign="top" width="61"><br /></td></tr>
<tr><td colspan="3" style="color: #212121; font-size: 11px;"><div style="color: #555555; padding: 5px;">
4Videosoft Video Converter Platinum can convert between any video formats including MPG, MPEG, MPEG2, MP4, SWF, FLV, VOB, MOD, M4V, AVI, etc, along with HD videos, like HD TS, HD MPG, HD MPEG, HD MP4, HD AVI, etc and extract audio from these videos.<br />
<a name='more'></a></div>
<div style="color: #555555; padding: 5px;">
<div style="background-color: #ededed; color: #222222; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 22px; margin-bottom: 7px; margin-top: 7px; padding: 0px;">
4Videosoft Video Converter is advanced <strong>Total Video Converter</strong> which can convert between any video formats including MPG, MPEG, MPEG2, MP4, FLV, MOD, M4V, AVI, WMV, MOV, DivX, XviD, etc., along with HD videos, like HD TS, HD MPG, HD MPEG, HD MP4, HD AVI, etc. It can also extract audio from video and convert between all audio formats including MP3, AAC, AC3, WAV, WMA, M4A, OGG, AIFF, FLAC, etc.</div>
<div style="background-color: #ededed; color: #222222; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 22px; margin-bottom: 7px; margin-top: 7px; padding: 0px;">
Apart from the main converting functions, 4Videosoft Video Converter possesses strong editing functions like Effect, Trim, Crop, Merge, Watermark, Take Snapshot. Therefore, to some extent, it is a professional video editor. Accompanied with the friendly and easily user-interface, this Video Converter can bring you brand-new visual perception.</div>
<ul style="background-color: #ededed; color: #222222; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 21px; list-style: none; margin: 0px; padding: 0px;">
<li style="background-image: url(http://www.4videosoft.com/style/images/li-dot.jpg); background-position: 0px 8px; background-repeat: no-repeat no-repeat; line-height: 17px; list-style: none; margin: 0px; padding: 0px 0px 10px 8px;">Convert all popular video formats</li>
<li style="background-image: url(http://www.4videosoft.com/style/images/li-dot.jpg); background-position: 0px 8px; background-repeat: no-repeat no-repeat; line-height: 17px; list-style: none; margin: 0px; padding: 0px 0px 10px 8px;">Extract audio from video and convert between audios</li>
<li style="background-image: url(http://www.4videosoft.com/style/images/li-dot.jpg); background-position: 0px 8px; background-repeat: no-repeat no-repeat; line-height: 17px; list-style: none; margin: 0px; padding: 0px 0px 10px 8px;">Comprehensive editing functions: Effect, Trim, Crop, Merge, Watermark</li>
<li style="background-image: url(http://www.4videosoft.com/style/images/li-dot.jpg); background-position: 0px 8px; background-repeat: no-repeat no-repeat; line-height: 17px; list-style: none; margin: 0px; padding: 0px 0px 10px 8px;">user-friendly interface and high conversion speed</li>
</ul>
<div style="background-color: #ededed; color: #222222; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 22px; margin-bottom: 7px; margin-top: 7px; padding: 0px;">
<span style="color: red; font-family: Tahoma, Geneva, sans-serif; font-size: 16px; font-weight: bold; line-height: 42px; padding: 0px;">Note:</span><strong> Now 6X faster conversion speed with <a href="http://www.4videosoft.com/cuda.html" style="color: #333333;">NVIDIA® CUDA™</a> and <a href="http://www.4videosoft.com/ati-technology.html" style="color: #333333;">AMD APP technology</a></strong></div>
</div>
</td></tr>
</tbody></table>
<a href="https://secure.avangate.com/order/cart.php?PRODS=3122342&QTY=1&AFFILIATE=34175"><img border="0" height="146" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJAJTmqBvShxWQIFcWrrJa1MXmSSH8XdZe-3JAeB1cs8o1L9vYr2zcEgDl1aeq7cJJ29V9BaqG2Rcw0LsWvK80DQnzWh5EBD13WWFYafkTG5owsjzOYLROrB-MMU4qLpSenHtwkxuvn0hT/s200/OrderNow-L.png" width="200" /></a>
Aryantohttp://www.blogger.com/profile/18082049281071636850noreply@blogger.com0tag:blogger.com,1999:blog-6626872665054399212.post-68003082307845477682012-08-02T21:50:00.001+07:002012-08-02T21:50:31.524+07:00Digital Image Sensors With CMOS<span style="font-family: ARIAL;"></span><br />
<span style="font-family: ARIAL;"> Adding vision to your projects needs not be a difficult task. Whether its machine vision for
robot control or the sampling and storage of images for security, CMOS images sensors can offer
many advantages over traditional CCD sensors. Just some of the technical advantages of CMOS
sensors are,</span><br />
<a name='more'></a><span style="font-family: ARIAL;">
<br />
<center>
<table width="80%"><tbody>
<tr><td>
<ul>
<li>No Blooming</li>
<li>Low power consumption. Ideal for battery operated devices</li>
<li>Direct digital output (Incorporates ADC and associated circuitry)</li>
<li>Small size and little support circuitry. Often just a crystal and some decoupling is all that is needed.</li>
<li>Simple to design with.</li>
</ul>
</td><td> <img src="http://retired.beyondlogic.org/imaging/sensor.gif" /> </td></tr>
</tbody></table>
</center>
There are many manufacturers making CMOS Image Sensors. Just some of the more notable ones are
<a href="http://retired.beyondlogic.org/imaging/camera.htm#Micron">Micron</a> who acquired Photobit,
<a href="http://retired.beyondlogic.org/imaging/camera.htm#OmniVision">OmniVision</a>,
<a href="http://retired.beyondlogic.org/imaging/camera.htm#ST">ST</a> who acquired VLSI Vision,
<a href="http://retired.beyondlogic.org/imaging/camera.htm#Mitsubishi">Mitsubishi</a> and
<a href="http://retired.beyondlogic.org/imaging/camera.htm#Kodak">Kodak</a>.
<br />
There are two different categories of CMOS Sensors based on their output. One type will have
a analog signal out encoded in a video format such as PAL, NTSC, S-Video etc which are designed
for camera on a chip applications. With these devices you simply supply power and feed the output
straight into you AV Equipment. Others will have a digital out, typically a 4/8 or 16 bit data bus.
These 'digital' sensors simplify designs, where once a traditional 'analog' camera was feed into a
video capture card for conversion to digital. Today, digital data can be pulled straight from
the sensor.
<br />
The main components to a Digital Video Camera design are
<br />
<table>
<tbody>
<tr><td>
<ul>
<li><b>CMOS Image Sensor</b>. The heart of the camera. It produces a digital/analog output representing each pixel.
It's support circuitry will normally include a Crystal Oscillator and power supply decoupling. Some sensors
may need a resistive bias network of some type. All of these components are normally surface mounted on the
back of the PCB and occupies very little real estate.</li>
<li><b>The lens Holder</b>. This will be either a plastic or metal mount which attaches to your PCB and allows
a standard size lens to be screwed in. The screw thread facilitates focusing for fixed lens systems.
The base of the lens mount may also have a IR (Infra Red) filter.</li>
<li><b>The Lens</b>. This will determine your Field of view among other things. Lenses range from fish-eye to
telescopic and need to be purchased to fit the parameters of your sensor and lens holder.</li>
</ul>
</td><td>
<img src="http://retired.beyondlogic.org/imaging/wtlens.gif" />
</td></tr>
</tbody></table>
Once you have completed the above, you have yourself a imaging system which constantly spits out a pixel
data stream synchronised to a pixel, frame and/or line clocks. Connecting this directly to a microcontroller/processor
system will cause headaches. Trying to clock this raw data in will use up great amounts of CPU time, if your
uC could do it in the first place. If you drop a pixel because an ISR is doing some thing more privileged,
then you have no ability to sample that location again, and thus no method of error correction.
<br />
While the frame rate on many devices can be slowed down by using internal divisors, it still doesn't reach
an acceptable speed nor allow random access to pixels. Reducing the master clock rate of the device will effect
exposure times and other time dependent settings, thus is not an option. Clearly some additional circuitry
will need to be designed.
<br />
<center>
<img src="http://retired.beyondlogic.org/imaging/dcamera.gif" /></center>
By using a CPLD/FPGA and RAM, you can program the CPLD to dump the data straight into RAM. Your micro could then read
this RAM through the PLD which could be memory mapped. If you really want performance (And budget is not a problem),
you could use Dual Port RAM. If however you only want to capture one frame, then the PLD could copy one frame into
memory and ignore subsequent pixel data until an event such as when your device has read all the data out of RAM.
Other options are to use a LVDS (Low Voltage Differential Signalling) serial bus, to relay your data over a few
metres or more. At a high enough clock rate, you won't wait all day for a frame.
<br />
The other thing you must not forget is how to control the sensor. Most of it's internal parameters are controlled
by a serial bus, typically I2C for the majority of sensors. This can either be controlled through a memory mapped
Register programmed into your PLD or via an I2C port straight from your uC. All up this makes quite a cheap way to
capture video. Ideal for your Embedded Linux Systems.
<br />
<a href="" name="OmniVision"><span style="font-family: Impact; font-size: large;"></span></a><span style="font-family: Impact; font-size: large;"><a href="http://www.ovt.com/i_products.html">OmniVision Technologies</a></span>
<hr />
</span><ul><span style="font-family: ARIAL;">
<span style="font-family: ARIAL; font-size: small;">
OmniVision not only develops CMOS Image Sensors, but also support device ICs such as the
OV-511 & OV-518 Advanced Camera to USB Bridge. OmniVision is one of the more popular manufacturers with
devices such as the <a href="http://www.ovt.com/cc7910P.html">OV7910</a>
NTSC/PAL Camera on a Chip being used in many small analog camera
modules around the world. This would be the recommended starting point
if you are starting out designing with CMOS Image Sensors.
<br />
</span>
</span><ul><span style="font-family: ARIAL;">
<span style="font-family: Arial; font-size: small;"><a href="http://www.ovt.com/cc9620.html"><b>OV9620</b></a><br />
<ul>
<li>SXGA 1280 x 1024 Colour (OV9620) or Monochrome (OV9121) (1.3 mega-pixel)</li>
<li>1/2" Optical Format</li>
<li>15 fps @ SXGA</li>
<li>10 bit Raw RGB Data Out</li>
<li>Requires 3.3V and 2.5V supplies</li>
<li>CLCC-48 Package</li>
</ul>
<span style="font-family: Arial; font-size: small;"><a href="http://www.ovt.com/cc8610.html"><b>OV8610</b></a><br />
<ul>
<li>SVGA 800 x 600 Colour</li>
<li>1/3" Optical Format</li>
<li>15 fps @ SVGA</li>
<li>10 bit Raw RGB Data Out</li>
<li>Requires single 3.3V supply < 30mA</li>
<li>CLCC-48 Package</li>
</ul>
<span style="font-family: Arial; font-size: small;"><a href="http://www.ovt.com/cc7640.html"><b>OV7640</b></a><br />
<ul>
<li>640 x 480 Colour (OV7640) or Monochrome (OV7141)</li>
<li>1/4" Optical Format</li>
<li>30fps @ VGA, 60fps @ QVGA</li>
<li>YUV/YCbCr 4:2:2, RGB 4:2:2 or Raw 8 bit RGB Outputs</li>
<li>2.5V Core & Analog Supply / 2.5 or 3.3V I/O supplies. Power Consumption under 40mW</li>
<li>PLCC-28 Package</li>
</ul>
<span style="font-family: Arial; font-size: small;"><a href="http://www.ovt.com/cc7620.html"><b>OV7620</b></a><br />
<ul>
<li>664 x 492 Colour (OV7620) or Monochrome (OV7110)</li>
<li>1/3" Optical Format</li>
<li>0.5 to 30 fps</li>
<li>YUV/YCbCr 4:2:2, RGB 4:2:2 or Raw 8 bit RGB Outputs</li>
<li>5V Supply <120mw li="li">
<li>48-pin LCC</li>
</120mw></li>
</ul>
<span style="font-family: Arial; font-size: small;"><a href="http://www.ovt.com/cc6630.html"><b>OV6630</b></a><br />
<ul>
<li>352 x 288 Colour (OV6630) or Monochrome (OV6130)</li>
<li>1/4" Optical Format</li>
<li>up to 60 fps</li>
<li>YUV/YCbCr 4:2:2, RGB 4:2:2 or Raw 8 bit RGB Outputs</li>
<li>3.3V Core < 20mA / 3.3V or 5V I/O</li>
<li>LCC-48 Package</li>
</ul>
</span></span></span></span></span></span></ul>
<span style="font-family: Arial; font-size: small;">
<table>
<tbody>
<tr><td>
OmniVision and some third party vendors (e.g. <a href="http://www.comedia.com.hk/">COMedia</a>) have
evaluation modules for the OmniVision sensors. This
allows you to get up to speed with the sensor, incorporating a PCB with de-coupling, a Lens and Lens
Holder. The majority of the sensor's signals are broken out to a header which you can use to interface
to your own designs. The evaluation modules in small quantities are normally much easier to obtain than
the sensors themselves, and are typically cheaper as a result.
<br />
</td><td>
<center>
<img src="http://retired.beyondlogic.org/imaging/ov7600.jpg" /><br />
<span>A picture of the M3188 Evaluation Module with<br />
the lens holder removed. The signals can be obtained <br />
from the 32 pin header on the top of the module</span></center>
</td></tr>
</tbody></table>
DIY Electronics (<a href="http://www.kitsrus.com/cmos.html">http://www.kitsrus.com</a>) are just one outlet which sells the third party evaluation boards.
<br />
<ul>
<li><a href="http://www.kitsrus.com/projects/d-m3188.pdf">1/3" B/W Camera VGA Module M3188 with Digital Output (OV7110 Sensor)</a></li>
<br />
<li><a href="http://www.kitsrus.com/projects/d-c3188.pdf">1/3" Colour Camera VGA Module C3188 with Digital Output (OV7610 Sensor)</a></li>
<br />
<li><a href="http://www.kitsrus.com/projects/d-c3185a.pdf">1/3" Colour Camera Module NTSC/PAL Out (OV7910 Sensor)</a></li>
</ul>
</span></ul>
<span style="font-family: Arial; font-size: small;">
<br />
<a href="" name="Kodak"><span style="font-family: Impact; font-size: large;"></span></a><span style="font-family: Impact; font-size: large;"><a href="http://www.kodak.com/go/imagers">Kodak</a></span>
<hr />
<ul>
<span style="font-family: ARIAL; font-size: small;">
In August 2001 Kodak launched it's first two CMOS Images to its Kodak Digital Science
range of image sensors. Kodak has been in the game of CCD Sensors for twenty plus years
with a wealth of imaging expertise and research.
<br />
</span>
<ul>
<span style="font-family: Arial; font-size: small;"><a href="http://www.kodak.com/US/en/digital/ccd/kac0311.shtml"><b>KAC-0311</b></a><br />
<ul>
<li>640 x 480 resolution</li>
<li>1/3" Optical Format</li>
<li>0 - 60 frames per second</li>
<li>Single 3.3V Supply <200mw li="li">
<li>48 pin ceramic LCC package</li>
</200mw></li>
</ul>
<span style="font-family: Arial; font-size: small;"><a href="http://www.kodak.com/US/en/digital/ccd/kac1310.shtml"><b>KAC-1310</b></a><br />
<ul>
<li>1.3 megapixel CMOS sensor, 1280 x 1024 resolution</li>
<li>1/2" Optical Format</li>
<li>15 frames a second at 20MHz Clock (Full SXGA)</li>
<li>Single 3.3V Supply, <250mw li="li">
<li>48-pin ceramic LCC package</li>
</250mw></li>
</ul>
</span></span></ul>
<span style="font-family: Arial; font-size: small;"><span style="font-family: Arial; font-size: small;">
</span></span></ul>
<span style="font-family: Arial; font-size: small;"><span style="font-family: Arial; font-size: small;">
<br />
<a href="" name="Mitsubishi"><span style="font-family: Impact; font-size: large;"></span></a><span style="font-family: Impact; font-size: large;"><a href="http://www.mitsubishichips.com/ar">Mitsubishi Chips</a></span>
<hr />
<ul>
<span style="font-family: ARIAL; font-size: small;">
Mitsubishi have broken the pack, to produce smaller resolution sensors. These sensors can typically be used
for a range of applications such as finger print sensing, motor detection, gaming, tracing of moving parts etc.
Just one application is the new optical mice flooding the market place. They use a low resolution Image Sensor
to track movement on a wide variety of surfaces.
<br />
Also unique to these sensors is in-built image processing. Both sensors can output edge enhanced or extracted
data, making them ideal for tracking on small robots, industrial control etc. The sensors can also process
2D images into 1D. The output of each pixel is by the means of a analog potential, thus this must be fed into
an ADC to return digital image data.
<br />
</span>
<ul>
<span style="font-family: Arial; font-size: small;"><a href="http://www.mitsubishichips.com/products/assps/a_retina/pdf/m64285fp.pdf"><b>M64285FP CMOS Image Sensor</b></a><br />
<ul>
<li>32 x 32 Pixel Black & White, 1/6" Optical Format</li>
<li>5V Supply < 15mW</li>
<li>In Built Edge Extraction</li>
<li>Max 5000 frames per second </li>
<li>Analog Output to uC ADC</li>
<li>10pin SO Package</li>
</ul>
</span></ul>
<span style="font-family: Arial; font-size: small;">
<ul>
<span style="font-family: Arial; font-size: small;"><a href="http://www.mitsubishichips.com/ar"><b>M64282FP Artificial Retina LSI</b></a><br />
<ul>
<li>128 x 128 Pixel Black & White, 1/4" Optical Format</li>
<li>5V Supply < 15mW</li>
<li>Positive and negative image output, Edge enhancement / extraction</li>
<li>10 to 30 frames per second </li>
<li>16pin TSOP Package</li>
</ul>
</span></ul>
<span style="font-family: Arial; font-size: small;">
</span></span></ul>
<span style="font-family: Arial; font-size: small;"><span style="font-family: Arial; font-size: small;">
<br />
<br />
<a href="" name="Micron"><span style="font-family: Impact; font-size: large;"></span></a><span style="font-family: Impact; font-size: large;"><a href="http://www.micron.com/imaging/">Micron</a></span>
<hr />
<ul>
<span style="font-family: ARIAL; font-size: small;">
Micron Imaging has aquired Photobit Corporation and inherited its IP and Image Sensors. CMOS APS (CMOS active
pixel sensor) was first created by a team of JPL engineers lead by Dr Eric Fossum. Dr Fossum is now Fellow at
Micron Tecnology Inc. Micron's Product range can be sought from <a href="http://www.micron.com/imaging/Products/index.html">Micron's Product Matrix</a>
<br />
</span>
<ul>
<span style="font-family: Arial; font-size: small;"><a href="http://www.micron.com/imaging/Products/MI-0111.html"><b>MI-0111</b></a><br />
<ul>
<li>CIF Resolution - 352 x 288 Colour</li>
<li>1/5 Inch Optical Format</li>
<li>0-30 Frames a Second</li>
<li>3.3V Supply, < 55mW</li>
<li>28-pin CLCC</li>
</ul>
<span style="font-family: Arial; font-size: small;"><a href="http://www.micron.com/imaging/Products/MI-0330.html"><b>MI-0330</b></a><br />
<ul>
<li>VGA Resolution - 640 x 480 Colour</li>
<li>1/4 Inch Optical Format</li>
<li>0-30 Frames a Second</li>
<li>3.3V Supply, <100mw li="li">
<li>48-pin CLCC</li>
</100mw></li>
</ul>
</span></span></ul>
<span style="font-family: Arial; font-size: small;"><span style="font-family: Arial; font-size: small;">
</span></span></ul>
<span style="font-family: Arial; font-size: small;"><span style="font-family: Arial; font-size: small;">
<br />
<a href="" name="ST"><span style="font-family: Impact; font-size: large;"></span></a><span style="font-family: Impact; font-size: large;"><a href="http://www.vvl.co.uk/products/image_sensors/home.htm">ST Microelectronics Imaging Division</a></span>
<hr />
<ul>
<span style="font-family: ARIAL; font-size: small;">
<a href="http://retired.beyondlogic.org/imaging/camera.htm#SpectronixModules">Spectronix</a>
have used the ST Sensors in their RoboCam Series. ST also offer a
couple of CoProcessors, a
STV0657 Digital CoProcessor, a STV0672 USB CoProcessor and a STV0680
DSC (Digital Still Camera) CoProcessor. The DSC CoProcessor offers an
RS-232 / USB Interface and on board SDRAM Storage.
<br />
</span>
<ul>
<span style="font-family: Arial; font-size: small;"><a href="http://www.vvl.co.uk/products/image_sensors/301/301.htm"><b>VV5301/VV6301</b></a><br />
<ul>
<li>VV5500 Monochrome / VV6500 Colour 648 x 484 VGA Sensor</li>
<li>10bit ADC Output RAW</li>
<li>3.3V-6.0V (Built In Regulator) <25ma li="li">
<li>48 LCC Package</li>
</25ma></li>
</ul>
</span></ul>
<span style="font-family: Arial; font-size: small;">
</span></ul>
<span style="font-family: Arial; font-size: small;">
</span></span></span></span></span></span></span></span>Aryantohttp://www.blogger.com/profile/18082049281071636850noreply@blogger.com0tag:blogger.com,1999:blog-6626872665054399212.post-87645185905181443212012-08-02T21:39:00.001+07:002012-08-02T21:39:38.736+07:00Circuit Falcom FSA03 Smart Antenna with uBlox 5 GPS Chipset<table><tbody>
<tr id="body"><td>
The <a href="http://www.falcom.de/products/gps-modules/fsa03/">Falcom FSA03</a> GPS module is an extremely cost effective GPS solution for
embedded systems. Retailing for about $50 USD in small quantities, the FSA03 includes an <a href="http://www.u-blox.com/">uBlox</a> 5 single
chip GPS module integrated with a <a href="http://www.sarantel.com/">Sarantel</a> quadrifilar helix antenna to make a tidy single board solution.
<br />
Official documentation from Falcom indicates the FSA03 has an asynchronous 3.3V serial port for communications using <a href="http://en.wikipedia.org/wiki/NMEA_0183">NMEA</a>
or UBX binary protocols, a time pulse output and reset input. What the
official documentation doesn't indicate is that a USB port and external
interrupt pin is routed out but recorded as N.C. (not connected) on the
documentation.<br />
<a name='more'></a>
<br />
<center>
<table>
<tbody>
<tr id="head"><td>No.</td><td>Name</td><td>Function</td></tr>
<tr id="row"><td>1</td><td>nReset</td><td>Input – External Reset. Pulled high with 3.3K.</td></tr>
<tr id="row"><td>2</td><td>CFG_GPS0 / PIO21</td><td></td></tr>
<tr id="row"><td>3</td><td>EXTINT0 / PIO7</td><td>External Interrupt In.</td></tr>
<tr id="row"><td>4</td><td>TM</td><td>Output – Timepulse (1PPS).</td></tr>
<tr id="row"><td>5</td><td>VBatt</td><td>VBatt Backup Supply (1.4V – 4.8 VDC).</td></tr>
<tr id="row"><td>6</td><td>GND</td><td>Ground.</td></tr>
<tr id="row"><td>7</td><td>VCC</td><td>Supply 3.3VDC +/-5%</td></tr>
<tr id="row"><td>8</td><td>GND</td><td>Ground</td></tr>
<tr id="row"><td>9</td><td>USB_DM</td><td>USB Data Negative.</td></tr>
<tr id="row"><td>10</td><td>USB_DP</td><td>USB Data Positive.</td></tr>
<tr id="row"><td>11</td><td>VDDUSB</td><td>USB Power Supply. (3.3V)</td></tr>
<tr id="row"><td>12</td><td>TX</td><td>Transmit – Serial Port 1.</td></tr>
<tr id="row"><td>13</td><td>RX</td><td>Receive – Serial Port 1. Pulled high with 330K.</td></tr>
</tbody></table>
</center>
<h3>
Documentation</h3>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrDlTWXeA2W3yLEIVJbIJnhOSZEup7DXRmKIc1FihDKTWPJNG7xy3WfRAM__LIwtcn2-LScxCU3yUWIRupRv7xWkajwHtR4nmeHhJjJcot28FXYn72_GfAIbZEMi-8iwtytqXUsWafTCN9/s1600/fsa03breakoutbrd_sml.gif" /></div>
<ul id="pdf">
<li id="pdf"><a href="http://www.beyondlogic.org/fsa03/FSA03_breakout_brd_schematics.pdf">Beyond logic FSA03 Breakout Board Schematics</a></li>
<li id="pdf"><a href="http://www.beyondlogic.org/fsa03/FSA03_flyer_v1.0.2_web_pre.pdf">Falcom FSA03 Brochure</a></li>
<li id="pdf"><a href="http://www.beyondlogic.org/fsa03/AppNote_FSA03_rev_1.0.2.pdf">Falcom FSA03 Application Note / Datasheet</a></li>
</ul>
</td></tr>
</tbody></table>
<a href="" name="Software"></a><br />
<h1>
<a href="" name="Software">C# Sample Application</a></h1>
The sample software below has been designed to work with any NMEA GPS receiver, such as the FSA03/uBlox 5. Released
as open source under the General Public Licence V2, it can be used as the foundations for your custom applications.
<br />
Once your GPS receiver has obtained a fix, you can display your location in Google Earth or Google Maps. The Google
Earth interface is via KML files, or <a href="http://code.google.com/apis/kml/documentation/">Keyhole Markup Language.</a>.
The Google Maps interface simply submits a http URL encoded with the coordinates as per this
<a href="http://code.google.com/apis/maps/documentation/staticmaps/">API</a>.
<br />
<br />
<center>
<img src="http://www.beyondlogic.org/fsa03/main.png" /><img src="http://www.beyondlogic.org/fsa03/googlemaps.png" /></center>
<br />
<center>
<img src="http://www.beyondlogic.org/fsa03/statistics.png" /><img src="http://www.beyondlogic.org/fsa03/config.png" /></center>
<br />
<h3>
Downloads</h3>
<ul id="zip">
<li id="zip"><a href="http://www.beyondlogic.org/fsa03/BeyondGPS.zip">Executable</a> (Requires <a href="http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=17851">.Net 4.0 Framework</a>)</li>
<li id="zip"><a href="http://www.beyondlogic.org/fsa03/BeyondGPS_source.zip">C# Source Code</a> (Source licenced under General Public Licence (GPL) V2)</li>
</ul>Aryantohttp://www.blogger.com/profile/18082049281071636850noreply@blogger.com0tag:blogger.com,1999:blog-6626872665054399212.post-90036629246850130942012-08-02T20:39:00.001+07:002012-08-02T20:41:19.798+07:00Article USB in a NutShell Part 5<br />
<ul>
Every USB device must respond to setup packets on the default pipe. The setup packets are used for detection and
configuration of the device and carry out common functions such as setting the USB device’s address, requesting a
device descriptor or checking the status of a endpoint. <a name='more'></a></ul>
<ul>
A USB compliant Host expects all requests to be processed within a maximum period of 5 seconds. It also specifies
stricter timing for specific requests :
<br />
<ul>
<li>Standard Device requests without a data stage must be completed in 50ms.</li>
<li>Standard Device requests with a data stage must start to return data 500ms after the request.</li>
<ul>
<li>Each data packet must be sent within 500ms of the successful transmission of the previous packet.</li>
<li>The status stage must complete within 50ms after the transmission of the last data packet.</li>
</ul>
<br />
<li>The SetAddress command (which contains a data phase) must process the command and return status within 50ms.
The device then has 2ms to change address before the next request is sent.</li>
</ul>
These timeout periods are quite acceptable for even the slowest of devices, but can be a restriction during
debugging. 50mS doesn't provide for many debugging characters to be sent at 9600bps on an asynchronous serial
port or for a In Circuit Debugger/Emulator to single step or to break execution to examine the internal
Registers. As a result, USB requires some different debugging methods to that of other microcontroller projects.
<br />
<ul>
<i>
Casually reading through the XP DDK, one may note the Host Controller Driver now has a USBUSER_OP_SEND_ONE_PACKET
command which is commented to read "This API is used to implement the 'single step' USB transaction development
tool." While such a tool has not been released yet, we can only hope to see one soon. </i>
<br />
</ul>
<ul><i><br /></i></ul>
Each request starts with a 8 byte long Setup Packet which has the following format,
<br />
<div align="CENTER">
</div>
<center>
<table cellpadding="7" cellspacing="2" width="536">
<tbody>
<tr id="head"><td height="24" valign="MIDDLE" width="10%">Offset</td>
<td height="24" valign="MIDDLE" width="22%">Field</td>
<td height="24" valign="MIDDLE" width="8%">Size</td>
<td height="24" valign="MIDDLE" width="14%">Value</td>
<td height="24" valign="MIDDLE" width="46%">Description</td>
</tr>
<tr id="row"><td valign="TOP">0</td>
<td valign="TOP">bmRequestType</td>
<td valign="TOP">1</td>
<td valign="TOP">Bit-Map</td>
<td valign="TOP"><span style="font-family: Arial; font-size: x-small;">
<b>D7 Data Phase Transfer Direction</b><br />
0 = Host to Device<br />
1 = Device to Host<br />
<b>D6..5 Type</b><br />
0 = Standard<br />
1 = Class<br />
2 = Vendor<br />
3 = Reserved<br />
<b>D4..0 Recipient</b><br />
0 = Device<br />
1 = Interface<br />
2 = Endpoint<br />
3 = Other<br />
4..31 = Reserved<br />
</span></td>
</tr>
<tr id="row"><td valign="MIDDLE">1</td>
<td valign="MIDDLE">bRequest</td>
<td valign="MIDDLE">1</td>
<td valign="MIDDLE">Value</td>
<td valign="MIDDLE"><span style="font-family: Arial; font-size: x-small;">Request</span></td>
</tr>
<tr id="row"><td height="30" valign="MIDDLE">2</td>
<td height="30" valign="MIDDLE">wValue</td>
<td height="30" valign="MIDDLE">2</td>
<td height="30" valign="MIDDLE">Value</td>
<td height="30" valign="MIDDLE"><span style="font-family: Arial; font-size: x-small;">Value</span></td>
</tr>
<tr id="row"><td height="30" valign="MIDDLE">4</td>
<td height="30" valign="MIDDLE">wIndex</td>
<td height="30" valign="MIDDLE">2</td>
<td height="30" valign="MIDDLE">Index or Offset</td>
<td height="30" valign="MIDDLE"><span style="font-family: Arial; font-size: x-small;">Index</span></td>
</tr>
<tr id="row"><td height="30" valign="MIDDLE">6</td>
<td height="30" valign="MIDDLE">wLength</td>
<td height="30" valign="MIDDLE">2</td>
<td height="30" valign="MIDDLE">Count</td>
<td height="30" valign="MIDDLE"><span style="font-family: Arial; font-size: x-small;">Number of bytes to transfer if there is a data phase</span></td>
</tr>
</tbody></table>
</center>
<br />
The <b>bmRequestType</b> field will determine the direction of the request, type of request and designated recipient.
The <b>bRequest</b> field determines the request being made. The bmRequestType is normally parsed and execution is
branched to a number of handlers such as a Standard Device request handler, a Standard Interface request handler,
a Standard Endpoint request handler, a Class Device request handler etc. How you parse the setup packet is entirely
up to your preference. Others may choose to parse the bRequest first and then determine the type and recipient based
on each request. </ul>
<ul><br />
Standard requests are common to all USB device's and are detailed in the next coming pages. Class requests are common
to classes of drivers. For example, all device conforming to the HID class will have a common set of class specific
requests. These will differ to a device conforming to the communications class and differ again to that of a device
conforming to the mass storage class. </ul>
<ul><br />
And last of all are the vendor defined requests. These are requests which you as the USB device designer can assign.
These are normally different from device to device, but this is all up to your implementation and imagination. </ul>
<ul><br />
A common request can be directed to different recipients and based on the recipient perform different functions. A
GetStatus Standard request for example, can be directed at the device, interface or endpoint. When directed to a
device it returns flags indicating the status of remote wakeup and if the device is self powered. However
if the same request is directed at the interface it always returns zero, or should it be directed at an endpoint
will return the halt flag for the endpoint. </ul>
<ul>
<br />The <b>wValue</b> and <b>wIndex</b> fields allow parameters to be passed with the request. <b>wLength</b> is
used the specify the number of bytes to be transferred should there be a data phase.
<br />
</ul>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="StandardRequests"></a><br />
<h1>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="StandardRequests">
Standard Requests</a></h1>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="StandardRequests">
</a>
<br />
<ul>
Section 9.4 of the USB specification details the "Standard Device" requests required to be implemented for
every USB device. The standard provides a single table grouping items by request. Considering most firmware will
parse the setup packet by recipient we will opt to break up the requests based by recipient for easier examination
and implementation.
</ul>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="StandardDeviceRequests"></a><br />
<h1>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="StandardDeviceRequests">
Standard Device Requests</a></h1>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="StandardDeviceRequests">
</a>
<br />
<ul>
There are currently eight Standard Device requests, all of which are detailed in the table below.
<br />
<div align="CENTER">
</div>
<center>
<table cellpadding="7" cellspacing="2" width="642">
<tbody>
<tr id="head"><td valign="TOP" width="17%">bmRequestType</td>
<td valign="TOP" width="24%">bRequest</td>
<td valign="TOP" width="15%">wValue</td>
<td valign="TOP" width="15%">wIndex</td>
<td valign="TOP" width="15%">wLength</td>
<td valign="TOP" width="15%">Data</td>
</tr>
<tr id="row"><td valign="MIDDLE" width="17%">1000 0000b </td>
<td valign="MIDDLE" width="24%">GET_STATUS (0x00)</td>
<td valign="MIDDLE" width="15%">Zero</td>
<td valign="MIDDLE" width="15%">Zero </td>
<td valign="MIDDLE" width="15%">Two</td>
<td valign="MIDDLE" width="15%">Device Status</td>
</tr>
<tr id="row"><td valign="MIDDLE" width="17%">0000 0000b</td>
<td valign="MIDDLE" width="24%">CLEAR_FEATURE (0x01)</td>
<td valign="MIDDLE" width="15%">Feature Selector</td>
<td valign="MIDDLE" width="15%">Zero</td>
<td valign="MIDDLE" width="15%">Zero</td>
<td valign="MIDDLE" width="15%">None</td>
</tr>
<tr id="row"><td valign="MIDDLE" width="17%">0000 0000b</td>
<td valign="MIDDLE" width="24%">SET_FEATURE (0x03)</td>
<td valign="MIDDLE" width="15%">Feature Selector</td>
<td valign="MIDDLE" width="15%">Zero</td>
<td valign="MIDDLE" width="15%">Zero</td>
<td valign="MIDDLE" width="15%">None</td>
</tr>
<tr id="row"><td valign="MIDDLE" width="17%"><a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="GetDescriptor"></a>
0000 0000b</td>
<td valign="MIDDLE" width="24%">SET_ADDRESS (0x05)</td>
<td valign="MIDDLE" width="15%">Device Address</td>
<td valign="MIDDLE" width="15%">Zero</td>
<td valign="MIDDLE" width="15%">Zero</td>
<td valign="MIDDLE" width="15%">None</td>
</tr>
<tr id="row"><td valign="MIDDLE" width="17%">1000 0000b</td>
<td valign="MIDDLE" width="24%">GET_DESCRIPTOR (0x06)</td>
<td valign="MIDDLE" width="15%">Descriptor Type & Index</td>
<td valign="MIDDLE" width="15%">Zero or Language ID</td>
<td valign="MIDDLE" width="15%">Descriptor Length</td>
<td valign="MIDDLE" width="15%">Descriptor</td>
</tr>
<tr id="row"><td valign="MIDDLE" width="17%">0000 0000b</td>
<td valign="MIDDLE" width="24%">SET_DESCRIPTOR (0x07)</td>
<td valign="MIDDLE" width="15%">Descriptor Type & Index</td>
<td valign="MIDDLE" width="15%">Zero or Language ID</td>
<td valign="MIDDLE" width="15%">Descriptor Length</td>
<td valign="MIDDLE" width="15%">Descriptor</td>
</tr>
<tr id="row"><td valign="MIDDLE" width="17%">1000 0000b</td>
<td valign="MIDDLE" width="24%">GET_CONFIGURATION (0x08)</td>
<td valign="MIDDLE" width="15%">Zero</td>
<td valign="MIDDLE" width="15%">Zero</td>
<td valign="MIDDLE" width="15%">1</td>
<td valign="MIDDLE" width="15%">Configuration Value</td>
</tr>
<tr id="row"><td valign="MIDDLE" width="17%">0000 0000b</td>
<td valign="MIDDLE" width="24%">SET_CONFIGURATION (0x09)</td>
<td valign="MIDDLE" width="15%">Configuration Value</td>
<td valign="MIDDLE" width="15%">Zero</td>
<td valign="MIDDLE" width="15%">Zero</td>
<td valign="MIDDLE" width="15%">None</td>
</tr>
</tbody></table>
</center>
<br />
<ul>
<li><i>The <b>Get Status</b> request directed at the device will return two bytes during the data stage with the
following format,</i><br />
<div align="CENTER">
</div>
<center>
<table cellpadding="7" cellspacing="2" width="600">
<tbody>
<tr id="head">
<td id="packet">D15</td>
<td id="packet">D14</td>
<td id="packet">D13</td>
<td id="packet">D12</td>
<td id="packet">D11</td>
<td id="packet">D10</td>
<td id="packet">D9</td>
<td id="packet">D8</td>
<td id="packet">D7</td>
<td id="packet">D6</td>
<td id="packet">D5</td>
<td id="packet">D4</td>
<td id="packet">D3</td>
<td id="packet">D2</td>
<td id="packet">D1</td>
<td id="packet">D0</td>
</tr>
<tr id="packet">
<td colspan="14" id="packet" valign="MIDDLE" width="87%">Reserved</td>
<td bgcolor="#ffffff" id="packet" valign="MIDDLE" width="6%">Remote Wakeup</td>
<td bgcolor="#ffffff" id="packet" valign="MIDDLE" width="6%">Self Powered</td>
</tr>
</tbody></table>
</center>
<br />
<i>If D0 is set, then this indicates the device is self powered. If clear, the device is bus powered. If D1 is
set, the device has remote wakeup enabled and can wake the host up during suspend. The remote wakeup bit can be by
the SetFeature and ClearFeature requests with a feature selector of DEVICE_REMOTE_WAKEUP (0x01)</i>
</li>
<li><i><b>Clear Feature</b> and <b>Set Feature</b> requests can be used to set boolean features. When the designated
recipient is the device, the only two feature selectors available are DEVICE_REMOTE_WAKEUP and TEST_MODE. Test mode
allows the device to exhibit various conditions. These are further documented in the USB Specification Revision 2.0.</i></li>
<li><i><b>Set Address</b> is used during enumeration to assign a unique address to the USB device. The address is
specified in wValue and can only be a maximum of 127. This request is unique in that the device does not set its
address until after the completion of the status stage. (See <a href="http://www.beyondlogic.org/usbnutshell/usb4.htm#Control">Control Transfers.</a>) All
other requests must complete before the status stage.</i></li>
<li><i><b>Set Descriptor/Get Descriptor</b> is used to return the
specified descriptor in wValue. A request for the configuration
descriptor will return the device descriptor and all interface and
endpoint descriptors in the one request.
</i><br />
<ul><i>
<li><a href="http://www.beyondlogic.org/usbnutshell/usb5.htm#EndpointDescriptors">Endpoint Descriptors</a> cannot be accessed directly by a GetDescriptor/SetDescriptor Request.</li>
<li><a href="http://www.beyondlogic.org/usbnutshell/usb5.htm#InterfaceDescriptors">Interface Descriptors</a> cannot be accessed directly by a GetDescriptor/SetDescriptor Request.</li>
<li><a href="http://www.beyondlogic.org/usbnutshell/usb5.htm#StringDescriptors">String Descriptors</a> include a Language ID in wIndex to allow for multiple language support.</li>
</i></ul>
</li>
<li><i><b>Get Configuration/Set Configuration</b> is used to request or set the current device configuration.
In the case of a Get Configuration request, a byte will be returned during the data stage indicating the devices
status. A zero value means the device is not configured and a non-zero value indicates the device is configured.
Set Configuration is used to enable a device. It should contain the value of bConfigurationValue of the desired
<a href="http://www.beyondlogic.org/usbnutshell/usb5.htm#ConfigurationDescriptors">configuration descriptor</a> in the lower byte of wValue to select
which configuration to enable.</i></li>
</ul>
</ul>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="StandardInterfaceRequests"></a><br />
<h1>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="StandardInterfaceRequests">
Standard Interface Requests</a></h1>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="StandardInterfaceRequests">
</a>
<br />
<ul>
The specification currently defines five Standard Interface requests
which are detailed in the table below. Interestingly enough, only two
requests do anything intelligible.
<br />
</ul>
<div align="CENTER">
</div>
<center>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="SetInterface"></a><table cellpadding="7" cellspacing="2" width="642">
<tbody>
<tr id="head"><td valign="TOP" width="17%">bmRequestType</td>
<td valign="TOP" width="24%">bRequest</td>
<td valign="TOP" width="15%">wValue</td>
<td valign="TOP" width="15%">wIndex</td>
<td valign="TOP" width="15%">wLength</td>
<td valign="TOP" width="15%">Data</td>
</tr>
<tr id="row"><td valign="MIDDLE" width="17%">1000 0001b</td>
<td valign="MIDDLE" width="24%">GET_STATUS (0x00)</td>
<td valign="MIDDLE" width="15%">Zero</td>
<td valign="MIDDLE" width="15%">Interface</td>
<td valign="MIDDLE" width="15%">Two</td>
<td valign="MIDDLE" width="15%">Interface Status</td>
</tr>
<tr id="row"><td valign="MIDDLE" width="17%">0000 0001b </td>
<td valign="MIDDLE" width="24%">CLEAR_FEATURE (0x01)</td>
<td valign="MIDDLE" width="15%">Feature Selector</td>
<td valign="MIDDLE" width="15%">Interface</td>
<td valign="MIDDLE" width="15%">Zero</td>
<td valign="MIDDLE" width="15%">None</td>
</tr>
<tr id="row"><td valign="MIDDLE" width="17%">0000 0001b</td>
<td valign="MIDDLE" width="24%">SET_FEATURE (0x03)</td>
<td valign="MIDDLE" width="15%">Feature Selector</td>
<td valign="MIDDLE" width="15%">Interface</td>
<td valign="MIDDLE" width="15%">Zero</td>
<td valign="MIDDLE" width="15%">None</td>
</tr>
<tr id="row"><td valign="MIDDLE" width="17%">1000 0001b</td>
<td valign="MIDDLE" width="24%">GET_INTERFACE (0x0A)</td>
<td valign="MIDDLE" width="15%">Zero</td>
<td valign="MIDDLE" width="15%">Interface</td>
<td valign="MIDDLE" width="15%">One</td>
<td valign="MIDDLE" width="15%">Alternate Interface</td>
</tr>
<tr id="row"><td valign="MIDDLE" width="17%">0000 0001b</td>
<td valign="MIDDLE" width="24%">SET_INTERFACE (0x11)</td>
<td valign="MIDDLE" width="15%">Alternative Setting</td>
<td valign="MIDDLE" width="15%">Interface</td>
<td valign="MIDDLE" width="15%">Zero</td>
<td valign="MIDDLE" width="15%">None</td>
</tr>
</tbody></table>
</center>
<br />
<ul>
<br />
<li><i><b>wIndex</b> is normally used to specify the referring interface for requests directed at the interface. Its format is shown below.</i><br />
<br />
<div align="CENTER">
</div>
<center>
<table cellpadding="7" cellspacing="2" width="600">
<tbody>
<tr id="head"><td valign="TOP" width="6%">D15</td>
<td valign="TOP" width="6%">D14</td>
<td valign="TOP" width="6%">D13</td>
<td valign="TOP" width="6%">D12</td>
<td valign="TOP" width="6%">D11</td>
<td valign="TOP" width="6%">D10</td>
<td valign="TOP" width="6%">D9</td>
<td valign="TOP" width="6%">D8</td>
<td valign="TOP" width="6%">D7</td>
<td valign="TOP" width="6%">D6</td>
<td valign="TOP" width="6%">D5</td>
<td valign="TOP" width="6%">D4</td>
<td valign="TOP" width="6%">D3</td>
<td valign="TOP" width="6%">D2</td>
<td valign="TOP" width="6%">D1</td>
<td valign="TOP" width="6%">D0</td>
</tr>
<tr>
<td colspan="8" valign="TOP" width="50%">Reserved</td>
<td bgcolor="#ffffff" colspan="8" valign="TOP" width="50%">Interface Number</td>
</tr>
</tbody></table>
</center>
</li>
<li><i><b>Get Status</b> is used to return the status of the
interface. Such a request to the interface should return two bytes of
0x00, 0x00. (Both bytes are reserved for future use)</i></li>
<li><i><b>Clear Feature</b> and <b>Set Feature</b> requests can be
used to set boolean features. When the designated recipient is the
interface, the current USB Specification Revision 2 specifies no
interface features.</i></li>
<li><i><b>Get Interface</b> and <b>Set Interface</b> set the <a href="http://www.beyondlogic.org/usbnutshell/usb5.htm#AlternateSetting">Alternative Interface</a> setting which is described in more detail under the <a href="http://www.beyondlogic.org/usbnutshell/usb5.htm#InterfaceDescriptors">Interface Descriptor</a>.</i></li>
</ul>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="StandardEndpointRequests"></a><br />
<h1>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="StandardEndpointRequests">
Standard Endpoint Requests</a></h1>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="StandardEndpointRequests">
</a>
<br />
<ul>
Standard Endpoint requests come in the four varieties listed below.
<br />
<div align="CENTER">
</div>
<center>
<table cellpadding="7" cellspacing="2" width="642">
<tbody>
<tr id="head"><td valign="TOP" width="17%">bmRequestType</td>
<td valign="TOP" width="24%">bRequest</td>
<td valign="TOP" width="15%">wValue</td>
<td valign="TOP" width="15%">Windex</td>
<td valign="TOP" width="15%">wLength</td>
<td valign="TOP" width="15%">Data</td>
</tr>
<tr id="row"><td valign="MIDDLE" width="17%">1000 0010b</td>
<td valign="MIDDLE" width="24%">GET_STATUS (0x00)</td>
<td valign="MIDDLE" width="15%">Zero</td>
<td valign="MIDDLE" width="15%">Endpoint</td>
<td valign="MIDDLE" width="15%">Two</td>
<td valign="MIDDLE" width="15%">Endpoint Status</td>
</tr>
<tr id="row"><td valign="MIDDLE" width="17%">0000 0010b</td>
<td valign="MIDDLE" width="24%">CLEAR_FEATURE (0x01)</td>
<td valign="MIDDLE" width="15%">Feature Selector</td>
<td valign="MIDDLE" width="15%">Endpoint</td>
<td valign="MIDDLE" width="15%">Zero</td>
<td valign="MIDDLE" width="15%">None</td>
</tr>
<tr id="row"><td valign="MIDDLE" width="17%">0000 0010b</td>
<td valign="MIDDLE" width="24%">SET_FEATURE (0x03)</td>
<td valign="MIDDLE" width="15%">Feature Selector</td>
<td valign="MIDDLE" width="15%">Endpoint</td>
<td valign="MIDDLE" width="15%">Zero</td>
<td valign="MIDDLE" width="15%">None</td>
</tr>
<tr id="row"><td valign="MIDDLE" width="17%">1000 0010b</td>
<td valign="MIDDLE" width="24%">SYNCH_FRAME (0x12)</td>
<td valign="MIDDLE" width="15%">Zero</td>
<td valign="MIDDLE" width="15%">Endpoint</td>
<td valign="MIDDLE" width="15%">Two</td>
<td valign="MIDDLE" width="15%">FrameNumber</td>
</tr>
</tbody></table>
</center>
<br />
<ul>
<li><i>The <b>wIndex</b> field is normally used to specify the
referring endpoint and direction for requests directed to an endpoint.
Its format is shown below.</i><br />
<br />
<div align="CENTER">
</div>
<center>
<table cellpadding="7" cellspacing="2" width="600">
<tbody>
<tr id="head">
<td id="packet">D15</td>
<td id="packet">D14</td>
<td id="packet">D13</td>
<td id="packet">D12</td>
<td id="packet">D11</td>
<td id="packet">D10</td>
<td id="packet">D9</td>
<td id="packet">D8</td>
<td id="packet">D7</td>
<td id="packet">D6</td>
<td id="packet">D5</td>
<td id="packet">D4</td>
<td id="packet">D3</td>
<td id="packet">D2</td>
<td id="packet">D1</td>
<td id="packet">D0</td>
</tr>
<tr>
<td colspan="8" id="packet" valign="TOP" width="50%">Reserved</td>
<td bgcolor="#ffffff" id="packet" valign="TOP" width="6%">Dir</td>
<td colspan="3" id="packet" valign="TOP" width="19%">Reserved</td>
<td bgcolor="#ffffff" colspan="4" id="packet" valign="TOP" width="25%">Endpoint Number</td>
</tr>
</tbody></table>
</center>
</li>
<li><i><b>Get Status</b> returns two bytes indicating the status
(Halted/Stalled) of a endpoint. The format of the two bytes returned is
illustrated below.</i><br />
<br />
<div align="CENTER">
</div>
<center>
<table cellpadding="7" cellspacing="2" width="600">
<tbody>
<tr id="head">
<td id="packet">D15</td>
<td id="packet">D14</td>
<td id="packet">D13</td>
<td id="packet">D12</td>
<td id="packet">D11</td>
<td id="packet">D10</td>
<td id="packet">D9</td>
<td id="packet">D8</td>
<td id="packet">D7</td>
<td id="packet">D6</td>
<td id="packet">D5</td>
<td id="packet">D4</td>
<td id="packet">D3</td>
<td id="packet">D2</td>
<td id="packet">D1</td>
<td id="packet">D0</td></tr>
<tr>
<td colspan="15" id="packet" valign="MIDDLE" width="94%">Reserved</td>
<td bgcolor="#ffffff" id="packet" valign="MIDDLE" width="6%">Halt</td>
</tr>
</tbody></table>
</center>
</li>
<li><i><b>Clear Feature</b> and <b>Set Feature</b> are used to set
Endpoint Features. The standard currently defines one endpoint feature
selector, ENDPOINT_HALT (0x00) which allows the host to stall and clear
an endpoint. Only endpoints other than the default endpoint are
recommended to have this functionality. </i></li>
<li><i>A <b>Synch Frame</b> request is used to report an endpoint synchronisation frame.</i></li>
</ul>
</ul>
<br />
<h3 class="post-title entry-title" style="background-color: white; border-bottom-color: rgb(230, 230, 230); border-bottom-style: solid; border-bottom-width: 1px; color: #3d81ee; font-family: Trebuchet, 'Trebuchet MS', Arial, sans-serif; font-size: 19px; line-height: 1.6em; margin: 0px 0px 16px 5px; padding: 0px 0px 3px; text-align: left;">
<a href="http://master-digitals.blogspot.com/2012/08/article-usb-in-nutshell-part-1.html" style="color: #3d81ee; text-decoration: none;">Article USB in a NutShell Part 1</a></h3>
<div style="background-color: white; color: #333333; font-family: Trebuchet, 'Trebuchet MS', Arial, sans-serif; font-size: 13px; line-height: 20px; text-align: left;">
<h3 class="post-title entry-title" style="border-bottom-color: rgb(230, 230, 230); border-bottom-style: solid; border-bottom-width: 1px; color: #3d81ee; font-size: 19px; line-height: 1.6em; margin: 0px 0px 16px 5px; padding: 0px 0px 3px;">
<a href="http://master-digitals.blogspot.com/2012/08/article-usb-in-nutshell-part-2.html" style="color: #3d81ee; text-decoration: none;">Article USB in a NutShell Part 2</a></h3>
</div>
<div style="background-color: white; color: #333333; font-family: Trebuchet, 'Trebuchet MS', Arial, sans-serif; font-size: 13px; line-height: 20px; text-align: left;">
<h3 class="post-title entry-title" style="border-bottom-color: rgb(230, 230, 230); border-bottom-style: solid; border-bottom-width: 1px; color: #3d81ee; font-size: 19px; line-height: 1.6em; margin: 0px 0px 16px 5px; padding: 0px 0px 3px;">
<a href="http://master-digitals.blogspot.com/2012/08/article-usb-in-nutshell-part-3.html" style="color: #3d81ee; text-decoration: none;">Article USB in a NutShell Part 3</a></h3>
</div>
<div style="background-color: white; color: #333333; font-family: Trebuchet, 'Trebuchet MS', Arial, sans-serif; font-size: 13px; line-height: 20px; text-align: left;">
<h3 class="post-title entry-title" style="border-bottom-color: rgb(230, 230, 230); border-bottom-style: solid; border-bottom-width: 1px; color: #3d81ee; font-size: 19px; line-height: 1.6em; margin: 0px 0px 16px 5px; padding: 0px 0px 3px;">
<a href="http://master-digitals.blogspot.com/2012/08/article-usb-in-nutshell-part-4.html" style="color: #3d81ee; text-decoration: none;">Article USB in a NutShell Part 4</a></h3>
</div>Aryantohttp://www.blogger.com/profile/18082049281071636850noreply@blogger.com0tag:blogger.com,1999:blog-6626872665054399212.post-90406285256628299782012-08-02T20:36:00.000+07:002012-08-02T20:36:23.684+07:00Article USB in a NutShell Part 4<br />
<h1>
USB Descriptors</h1>
<ul>
All USB devices have a hierarchy of descriptors which describe to the host information such as what the device is,
who makes it, what version of USB it supports, how many ways it can be configured, the number of endpoints and
their types etc
<br />
The more common USB descriptors are
<br />
<ul>
<li><b><a href="http://www.beyondlogic.org/usbnutshell/usb5.shtml#DeviceDescriptors">Device Descriptors</a></b></li>
<li><b><a href="http://www.beyondlogic.org/usbnutshell/usb5.shtml#ConfigurationDescriptors">Configuration Descriptors</a></b></li>
<li><b><a href="http://www.beyondlogic.org/usbnutshell/usb5.shtml#InterfaceDescriptors">Interface Descriptors</a></b></li>
<li><b><a href="http://www.beyondlogic.org/usbnutshell/usb5.shtml#EndpointDescriptors">Endpoint Descriptors</a></b></li>
<li><b><a href="http://www.beyondlogic.org/usbnutshell/usb5.shtml#StringDescriptors">String Descriptors<a name='more'></a></a></b></li>
</ul>
USB devices can only have one device descriptor. The device descriptor includes information such as what USB
revision the device complies to, the Product and Vendor IDs used to load the appropriate drivers and the number
of possible configurations the device can have. The number of configurations indicate how many configuration
descriptors branches are to follow.
<br />
The configuration descriptor specifies values such as the amount of power this particular configuration uses,
if the device is self or bus powered and the number of interfaces it has. When a device is enumerated, the host
reads the device descriptors and can make a decision of which configuration to enable. It can only enable one
configuration at a time.
<br />
For example, It is possible to have a high power bus powered configuration and a self powered configuration.
If the device is plugged into a host with a mains power supply, the device driver may choose to enable the
high power bus powered configuration enabling the device to be powered without a connection to the mains, yet
if it is connected to a laptop or personal organiser it could enable the 2nd configuration (self powered)
requiring the user to plug your device into the power point.
<br />
The configuration settings are not limited to power differences. Each configuration could be powered in the
same way and draw the same current, yet have different interface or endpoint combinations. However it should
be noted that changing the configuration requires all activity on each endpoint to stop. While USB offers
this flexibility, very few devices have more than 1 configuration.
<br />
<center>
<img src="http://www.beyondlogic.org/usbnutshell/desctree.gif" /></center>
The interface descriptor could be seen as a header or grouping of the endpoints into a functional group
performing a single feature of the device. For example you could have a multi-function fax/scanner/printer
device. Interface descriptor one could describe the endpoints of the fax function, Interface descriptor
two the scanner function and Interface descriptor three the printer function. Unlike the configuration
descriptor, there is no limitation as to having only one interface enabled at a time. A device could have
1 or many interface descriptors enabled at once.
<br />
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="AlternateSetting"></a>
Interface descriptors have a <b>bInterfaceNumber</b> field specifying the Interface number and a
<b>bAlternateSetting</b> which allows an interface to change settings on the fly. For example we could have a device
with two interfaces, interface one and interface two. Interface one has <b>bInterfaceNumber</b> set to
zero indicating it is the first interface descriptor and a <b>bAlternativeSetting</b> of zero.
<br />
Interface two would have a <b>bInterfaceNumber</b> set to one indicating it is the second interface
and a <b>bAlternativeSetting</b> of zero (default). We could then throw in another descriptor,
also with a <b>bInterfaceNumber</b> set to one indicating it is the second interface, but this time
setting the <b>bAlternativeSetting</b> to one, indicating this interface descriptor can be an
alternative setting to that of the other interface descriptor two.
<br />
When this configuration is enabled, the first two interface descriptors with <b>bAlternativeSettings</b>
equal to zero is used. However during operation the host can send a SetInterface request directed to that
of Interface one with a alternative setting of one to enable the other interface descriptor.
<br />
<center>
<img src="http://www.beyondlogic.org/usbnutshell/intftree.gif" /></center>
This gives an advantage over having two configurations, in that we can be transmitting data over interface
zero while we change the endpoint settings associated with interface one without effecting interface zero.
<br />
Each endpoint descriptor is used to specify the type of transfer, direction, polling interval and maximum
packet size for each endpoint. Endpoint zero, the default control endpoint is always assumed to be a control
endpoint and as such never has a descriptor.
<br />
</ul>
<h1>
Composition of USB Descriptors</h1>
<ul>
All descriptors are made up of a common format. The first byte specifies
the length of the descriptor, while the second byte indicates the
descriptor type. If the length of a descriptor is smaller than what the
specification defines, then the host shall ignore it. However if the
size is greater than expected the host will ignore the extra bytes and
start looking for the next descriptor at the end of actual length
returned.
<br />
<div align="CENTER">
</div>
<center>
<table cellpadding="7" cellspacing="2" width="642">
<tbody>
<tr id="head"><td valign="TOP" width="8%">Offset</td><td valign="TOP" width="22%">Field</td><td valign="TOP" width="7%">Size</td><td valign="TOP" width="12%">Value</td><td valign="TOP" width="50%">Description</td></tr>
<tr id="row"><td valign="TOP" width="8%">0</td><td valign="TOP" width="22%">bLength</td><td valign="TOP" width="7%">1</td><td valign="TOP" width="12%">Number</td><td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">Size of Descriptor in Bytes</span></td></tr>
<tr id="row"><td valign="TOP" width="8%">1</td><td valign="TOP" width="22%">bDescriptionType</td><td valign="TOP" width="7%">1</td><td valign="TOP" width="12%">Constant</td><td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">DescriptorType</span></td></tr>
<tr id="row"><td valign="TOP" width="8%">2</td><td valign="TOP" width="22%">...</td><td valign="TOP" width="7%">n</td><td valign="TOP" width="12%"></td><td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">Start of parameters for descriptor</span></td></tr>
</tbody></table>
</center>
<br />
</ul>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="DeviceDescriptors"></a><br />
<h1>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="DeviceDescriptors">
Device Descriptors</a></h1>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="DeviceDescriptors">
</a>
<br />
<ul>
The device descriptor of a USB device represents the entire device. As a result a USB device can
only have one device descriptor. It specifies some basic, yet important information about the
device such as the supported USB version, maximum packet size, vendor and product IDs and the
number of possible configurations the device can have. The format of the device descriptor is
shown below.
<br />
<div align="CENTER">
</div>
<center>
<table cellpadding="7" cellspacing="2" width="642">
<tbody>
<tr id="head"><td valign="TOP" width="9%">Offset</td>
<td valign="TOP" width="22%">Field</td>
<td valign="TOP" width="7%">Size</td>
<td valign="TOP" width="12%">Value</td>
<td valign="TOP" width="50%">Description</td>
</tr>
<tr id="row"><td valign="TOP" width="9%">0</td>
<td valign="TOP" width="22%">bLength</td>
<td valign="TOP" width="7%">1</td>
<td valign="TOP" width="12%">Number</td>
<td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">Size of the Descriptor in Bytes (18 bytes)</span></td>
</tr>
<tr id="row"><td valign="TOP" width="9%">1</td>
<td valign="TOP" width="22%">bDescriptorType</td>
<td valign="TOP" width="7%">1</td>
<td valign="TOP" width="12%">Constant</td>
<td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">Device Descriptor (0x01)</span></td>
</tr>
<tr id="row"><td valign="TOP" width="9%">2</td>
<td valign="TOP" width="22%">bcdUSB</td>
<td valign="TOP" width="7%">2</td>
<td valign="TOP" width="12%">BCD</td>
<td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">USB Specification Number which device complies too.</span></td>
</tr>
<tr id="row"><td valign="TOP" width="9%">4</td>
<td valign="TOP" width="22%">bDeviceClass</td>
<td valign="TOP" width="7%">1</td>
<td valign="TOP" width="12%">Class</td>
<td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">Class Code (Assigned by USB Org)<br />
If equal to Zero, each interface specifies it’s own class code<br />
If equal to 0xFF, the class code is vendor specified.<br />
Otherwise field is valid Class Code.</span></td>
</tr>
<tr id="row"><td valign="TOP" width="9%">5</td>
<td valign="TOP" width="22%">bDeviceSubClass</td>
<td valign="TOP" width="7%">1</td>
<td valign="TOP" width="12%">SubClass</td>
<td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">Subclass Code (Assigned by USB Org)</span></td>
</tr>
<tr id="row"><td valign="TOP" width="9%">6</td>
<td valign="TOP" width="22%">bDeviceProtocol</td>
<td valign="TOP" width="7%">1</td>
<td valign="TOP" width="12%">Protocol</td>
<td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">Protocol Code (Assigned by USB Org)</span></td>
</tr>
<tr id="row"><td valign="TOP" width="9%">7</td>
<td valign="TOP" width="22%">bMaxPacketSize</td>
<td valign="TOP" width="7%">1</td>
<td valign="TOP" width="12%">Number</td>
<td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">Maximum Packet Size for Zero Endpoint. Valid Sizes are 8, 16, 32, 64</span></td>
</tr>
<tr id="row"><td valign="TOP" width="9%">8</td>
<td valign="TOP" width="22%">idVendor</td>
<td valign="TOP" width="7%">2</td>
<td valign="TOP" width="12%">ID</td>
<td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">Vendor ID (Assigned by USB Org)</span></td>
</tr>
<tr id="row"><td valign="TOP" width="9%">10</td>
<td valign="TOP" width="22%">idProduct</td>
<td valign="TOP" width="7%">2</td>
<td valign="TOP" width="12%">ID</td>
<td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">Product ID (Assigned by Manufacturer)</span></td>
</tr>
<tr id="row"><td valign="TOP" width="9%">12</td>
<td valign="TOP" width="22%">bcdDevice</td>
<td valign="TOP" width="7%">2</td>
<td valign="TOP" width="12%">BCD</td>
<td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">Device Release Number</span></td>
</tr>
<tr id="row"><td valign="TOP" width="9%">14</td>
<td valign="TOP" width="22%">iManufacturer</td>
<td valign="TOP" width="7%">1</td>
<td valign="TOP" width="12%">Index</td>
<td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">Index of Manufacturer String Descriptor</span></td>
</tr>
<tr id="row"><td valign="TOP" width="9%">15</td>
<td valign="TOP" width="22%">iProduct</td>
<td valign="TOP" width="7%">1</td>
<td valign="TOP" width="12%">Index</td>
<td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">Index of Product String Descriptor</span></td>
</tr>
<tr id="row"><td valign="TOP" width="9%">16</td>
<td valign="TOP" width="22%">iSerialNumber</td>
<td valign="TOP" width="7%">1</td>
<td valign="TOP" width="12%">Index</td>
<td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">Index of Serial Number String Descriptor</span></td>
</tr>
<tr id="row"><td valign="TOP" width="9%">17</td>
<td valign="TOP" width="22%">bNumConfigurations</td>
<td valign="TOP" width="7%">1</td>
<td valign="TOP" width="12%">Integer</td>
<td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">Number of Possible Configurations</span></td>
</tr>
</tbody></table>
</center>
<br />
<ul>
<li><i>The <b>bcdUSB</b> field reports the highest version of USB the device supports. The value is in
binary coded decimal with a format of 0xJJMN where JJ is the major version number, M is the minor version
number and N is the sub minor version number. e.g. USB 2.0 is reported as 0x0200, USB 1.1 as 0x0110 and USB
1.0 as 0x0100.</i></li>
<li><i>The <b>bDeviceClass, bDeviceSubClass</b> and <b>bDeviceProtocol</b> are used by the operating
system to find a class driver for your device. Typically only the bDeviceClass is set at the device level.
Most class specifications choose to identify itself at the interface level and as a result set the
bDeviceClass as 0x00. This allows for the one device to support multiple classes. </i></li>
<li><i>The <b>bMaxPacketSize</b> field reports the maximum packet size for endpoint zero. All devices must support endpoint zero.</i></li>
<li><i>The <b>idVendor</b> and <b>idProduct</b> are used by the operating system to find a driver for your device. The Vendor ID is assigned by the <a href="http://www.usb.org/">USB-IF</a>.</i></li>
<li><i>The <b>bcdDevice</b> has the same format than the bcdUSB and is used to provide a device version number. This value is assigned by the developer.</i></li>
<li><i>Three string descriptors exist to provide details of the
manufacturer, product and serial number. There is no requirement to have
string descriptors. If no string descriptor is present, a index of zero
should be used.</i></li>
<li><i><b>bNumConfigurations</b> defines the number of configurations the device supports at its current speed.</i></li>
</ul>
</ul>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="ConfigurationDescriptors"></a><br />
<h1>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="ConfigurationDescriptors">
Configuration Descriptors</a></h1>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="ConfigurationDescriptors">
</a>
<br />
<ul>
A USB device can have several different configurations although the majority of devices are simple and
only have one. The configuration descriptor specifies how the device is powered, what the maximum power
consumption is, the number of interfaces it has. Therefore it is possible to have two configurations,
one for when the device is bus powered and another when it is mains powered. As this is a "header"
to the Interface descriptors, its also feasible to have one configuration using a different transfer mode
to that of another configuration.
<br />
Once all the configurations have been examined by the host, the host will send a SetConfiguration command
with a non zero value which matches the bConfigurationValue of one of the configurations. This is used to
select the desired configuration.
<br />
<div align="CENTER">
</div>
<center>
<table cellpadding="7" cellspacing="2" width="642">
<tbody>
<tr id="head"><td valign="TOP" width="8%">Offset</td>
<td valign="TOP" width="22%">Field</td>
<td valign="TOP" width="7%">Size</td>
<td valign="TOP" width="12%">Value</td>
<td valign="TOP" width="50%">Description</td>
</tr>
<tr id="row"><td valign="TOP" width="8%">0</td>
<td valign="TOP" width="22%">bLength</td>
<td valign="TOP" width="7%">1</td>
<td valign="TOP" width="12%">Number</td>
<td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">Size of Descriptor in Bytes</span></td>
</tr>
<tr id="row"><td valign="TOP" width="8%">1</td>
<td valign="TOP" width="22%">bDescriptorType</td>
<td valign="TOP" width="7%">1</td>
<td valign="TOP" width="12%">Constant</td>
<td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">Configuration Descriptor (0x02)</span></td>
</tr>
<tr id="row"><td valign="TOP" width="8%">2</td>
<td valign="TOP" width="22%">wTotalLength</td>
<td valign="TOP" width="7%">2</td>
<td valign="TOP" width="12%">Number</td>
<td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">Total length in bytes of data returned</span></td>
</tr>
<tr id="row"><td valign="TOP" width="8%">4</td>
<td valign="TOP" width="22%">bNumInterfaces</td>
<td valign="TOP" width="7%">1</td>
<td valign="TOP" width="12%">Number</td>
<td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">Number of Interfaces</span></td>
</tr>
<tr id="row"><td valign="TOP" width="8%">5</td>
<td valign="TOP" width="22%">bConfigurationValue</td>
<td valign="TOP" width="7%">1</td>
<td valign="TOP" width="12%">Number</td>
<td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">Value to use as an argument to select this configuration</span></td>
</tr>
<tr id="row"><td valign="TOP" width="8%">6</td>
<td valign="TOP" width="22%">iConfiguration</td>
<td valign="TOP" width="7%">1</td>
<td valign="TOP" width="12%">Index</td>
<td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">Index of String Descriptor describing this configuration</span></td>
</tr>
<tr id="row"><td valign="TOP" width="8%">7</td>
<td valign="TOP" width="22%">bmAttributes</td>
<td valign="TOP" width="7%">1</td>
<td valign="TOP" width="12%">Bitmap</td>
<td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">D7 Reserved, set to 1. (USB 1.0 Bus Powered)<br />
D6 Self Powered<br />
D5 Remote Wakeup<br />
D4..0 Reserved, set to 0.</span></td>
</tr>
<tr id="row"><td valign="TOP" width="8%">8</td>
<td valign="TOP" width="22%">bMaxPower</td>
<td valign="TOP" width="7%">1</td>
<td valign="TOP" width="12%">mA</td>
<td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">Maximum Power Consumption in 2mA units </span></td>
</tr>
</tbody></table>
</center>
<br />
<ul>
<li><i>When the configuration descriptor is read, it returns the
entire configuration hierarchy which includes all related interface and
endpoint descriptors. The <b>wTotalLength</b> field reflects the number of bytes in the hierarchy.</i><br />
<center>
<img src="http://www.beyondlogic.org/usbnutshell/confsize.gif" /></center>
</li>
<li><i><b>bNumInterfaces</b> specifies the number of interfaces present for this configuration.</i></li>
<li><i><b>bConfigurationValue</b> is used by the SetConfiguration request to select this configuration.</i></li>
<li><i><b>iConfiguration</b> is a index to a string descriptor describing the configuration in human readable form.</i></li>
<li><i><b>bmAttributes</b> specify power parameters for the
configuration. If a device is self powered, it sets D6. Bit D7 was used
in USB 1.0 to indicate a bus powered device, but this is now done by
bMaxPower. If a device uses any power from the bus, whether it be as a
bus powered device or as a self powered device, it must report its power
consumption in bMaxPower. Devices can also support remote wakeup which
allows the device to wake up the host when the host is in suspend.</i></li>
<li><i><b>bMaxPower</b> defines the maximum power the device will
drain from the bus. This is in 2mA units, thus a maximum of
approximately 500mA can be specified. The specification allows a high
powered bus powered device to drain no more than 500mA from Vbus. If a
device loses external power, then it must not drain more than indicated
in bMaxPower. It should fail any operation it cannot perform without
external power.</i></li>
</ul>
</ul>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="InterfaceDescriptors"></a><br />
<h1>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="InterfaceDescriptors">
Interface Descriptors</a></h1>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="InterfaceDescriptors">
</a>
<br />
<ul>
The interface descriptor could be seen as a header or grouping of the
endpoints into a functional group performing a single feature of the
device. The interface descriptor conforms to the following format,
<br />
<div align="CENTER">
</div>
<center>
<table cellpadding="7" cellspacing="2" width="642">
<tbody>
<tr id="head"><td valign="TOP" width="8%">Offset</td>
<td valign="TOP" width="22%">Field</td>
<td valign="TOP" width="7%">Size</td>
<td valign="TOP" width="12%">Value</td>
<td valign="TOP" width="50%">Description</td>
</tr>
<tr id="row"><td valign="TOP" width="8%">0</td>
<td valign="TOP" width="22%">bLength</td>
<td valign="TOP" width="7%">1</td>
<td valign="TOP" width="12%">Number</td>
<td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">Size of Descriptor in Bytes (9 Bytes)</span></td>
</tr>
<tr id="row"><td valign="TOP" width="8%">1</td>
<td valign="TOP" width="22%">bDescriptorType</td>
<td valign="TOP" width="7%">1</td>
<td valign="TOP" width="12%">Constant</td>
<td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">Interface Descriptor (0x04)</span></td>
</tr>
<tr id="row"><td valign="TOP" width="8%">2</td>
<td valign="TOP" width="22%">bInterfaceNumber</td>
<td valign="TOP" width="7%">1</td>
<td valign="TOP" width="12%">Number</td>
<td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">Number of Interface</span></td>
</tr>
<tr id="row"><td valign="TOP" width="8%">3</td>
<td valign="TOP" width="22%">bAlternateSetting</td>
<td valign="TOP" width="7%">1</td>
<td valign="TOP" width="12%">Number</td>
<td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">Value used to select alternative setting</span></td>
</tr>
<tr id="row"><td valign="TOP" width="8%">4</td>
<td valign="TOP" width="22%">bNumEndpoints</td>
<td valign="TOP" width="7%">1</td>
<td valign="TOP" width="12%">Number</td>
<td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">Number of Endpoints used for this interface</span></td>
</tr>
<tr id="row"><td valign="TOP" width="8%">5</td>
<td valign="TOP" width="22%">bInterfaceClass</td>
<td valign="TOP" width="7%">1</td>
<td valign="TOP" width="12%">Class</td>
<td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">Class Code (Assigned by USB Org)</span></td>
</tr>
<tr id="row"><td valign="TOP" width="8%">6</td>
<td valign="TOP" width="22%">bInterfaceSubClass</td>
<td valign="TOP" width="7%">1</td>
<td valign="TOP" width="12%">SubClass</td>
<td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">Subclass Code (Assigned by USB Org)</span></td>
</tr>
<tr id="row"><td valign="TOP" width="8%">7</td>
<td valign="TOP" width="22%">bInterfaceProtocol</td>
<td valign="TOP" width="7%">1</td>
<td valign="TOP" width="12%">Protocol</td>
<td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">Protocol Code (Assigned by USB Org)</span></td>
</tr>
<tr id="row"><td valign="TOP" width="8%">8</td>
<td valign="TOP" width="22%">iInterface</td>
<td valign="TOP" width="7%">1</td>
<td valign="TOP" width="12%">Index</td>
<td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">Index of String Descriptor Describing this interface</span></td>
</tr>
</tbody></table>
</center>
<br />
<ul>
<li><i><b>bInterfaceNumber</b> indicates the index of the interface
descriptor. This should be zero based, and incremented once for each new
interface descriptor.</i></li>
<li><i><b>bAlternativeSetting</b> can be used to specify <a href="http://www.beyondlogic.org/usbnutshell/usb5.shtml#AlternateSetting">alternative interfaces</a>. These alternative interfaces can be selected with the <a href="http://www.beyondlogic.org/usbnutshell/usb6.htm#SetInterface">Set Interface</a> request.</i></li>
<li><i><b>bNumEndpoints</b> indicates the number of endpoints used by
the interface. This value should exclude endpoint zero and is used to
indicate the number of endpoint descriptors to follow.</i></li>
<li><i><b>bInterfaceClass, bInterfaceSubClass</b> and <b>bInterfaceProtocol</b>
can be used to specify supported classes (e.g. HID, communications,
mass storage etc.) This allows many devices to use class drivers
preventing the need to write specific drivers for your device.</i></li>
<li><i><b>iInterface</b> allows for a string description of the interface.</i></li>
</ul>
</ul>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="EndpointDescriptors"></a><br />
<h1>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="EndpointDescriptors">
Endpoint Descriptors</a></h1>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="EndpointDescriptors">
</a>
<br />
<ul>
Endpoint descriptors are used to describe endpoints other than
endpoint zero. Endpoint zero is always assumed to be a control endpoint
and is configured before any descriptors are even requested. The host
will use the information returned from these descriptors to determine
the bandwidth requirements of the bus.<br />
<div align="CENTER">
</div>
<center>
<table cellpadding="7" cellspacing="2" width="642">
<tbody>
<tr id="head"><td valign="TOP" width="9%">Offset</td>
<td valign="TOP" width="22%">Field</td>
<td valign="TOP" width="7%">Size</td>
<td valign="TOP" width="12%">Value</td>
<td valign="TOP" width="50%">Description</td>
</tr>
<tr id="row"><td valign="TOP" width="9%">0</td>
<td valign="TOP" width="22%">bLength</td>
<td valign="TOP" width="7%">1</td>
<td valign="TOP" width="12%">Number</td>
<td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">Size of Descriptor in Bytes (7 bytes)</span></td>
</tr>
<tr id="row"><td valign="TOP" width="9%">1</td>
<td valign="TOP" width="22%">bDescriptorType</td>
<td valign="TOP" width="7%">1</td>
<td valign="TOP" width="12%">Constant</td>
<td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">Endpoint Descriptor (0x05)</span></td>
</tr>
<tr id="row"><td valign="TOP" width="9%">2</td>
<td valign="TOP" width="22%">bEndpointAddress</td>
<td valign="TOP" width="7%">1</td>
<td valign="TOP" width="12%">Endpoint</td>
<td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">Endpoint Address<br />
Bits 0..3b Endpoint Number.<br />
Bits 4..6b Reserved. Set to Zero<br />
Bits 7 Direction 0 = Out, 1 = In (Ignored for Control Endpoints)<br />
</span></td>
</tr>
<tr id="row"><td valign="TOP" width="9%">3</td>
<td valign="TOP" width="22%">bmAttributes</td>
<td valign="TOP" width="7%">1</td>
<td valign="TOP" width="12%">Bitmap</td>
<td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">
Bits 0..1 Transfer Type
</span><br />
<ul><span style="font-family: Arial; font-size: x-small;">
00 = Control<br />
01 = Isochronous<br />
10 = Bulk<br />
11 = Interrupt<br />
</span></ul>
<span style="font-family: Arial; font-size: x-small;">
Bits 2..7 are reserved. If Isochronous endpoint, <br />
Bits 3..2 = Synchronisation Type (Iso Mode)
<ul>
00 = No Synchonisation<br />
01 = Asynchronous<br />
10 = Adaptive<br />
11 = Synchronous<br />
</ul>
Bits 5..4 = Usage Type (Iso Mode)
<ul>
00 = Data Endpoint<br />
01 = Feedback Endpoint<br />
10 = Explicit Feedback Data Endpoint<br />
11 = Reserved<br />
</ul>
</span></td>
</tr>
<tr id="row"><td valign="TOP" width="9%">4</td>
<td valign="TOP" width="22%">wMaxPacketSize</td>
<td valign="TOP" width="7%">2</td>
<td valign="TOP" width="12%">Number</td>
<td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">Maximum Packet Size this endpoint is capable of sending or receiving</span></td>
</tr>
<tr id="row"><td valign="TOP" width="9%">6</td>
<td valign="TOP" width="22%">bInterval</td>
<td valign="TOP" width="7%">1</td>
<td valign="TOP" width="12%">Number</td>
<td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">Interval for polling endpoint data
transfers. Value in frame counts. Ignored for Bulk & Control
Endpoints. Isochronous must equal 1 and field may range from 1 to 255
for interrupt endpoints.</span></td>
</tr>
</tbody></table>
</center>
<br />
<ul>
<li><i><b>bEndpointAddress</b> indicates what endpoint this descriptor is describing.</i></li>
<li><i><b>bmAttributes</b> specifies the transfer type. This can either be <a href="http://www.beyondlogic.org/usbnutshell/usb4.htm#Control">Control</a>, <a href="http://www.beyondlogic.org/usbnutshell/usb4.htm#Interrupt">Interrupt</a>, <a href="http://www.beyondlogic.org/usbnutshell/usb4.htm#Isochronous">Isochronous</a> or <a href="http://www.beyondlogic.org/usbnutshell/usb4.htm#Bulk">Bulk Transfers</a>. If an Isochronous endpoint is specified, additional attributes can be selected such as the Synchronisation and usage types.</i></li>
<li><i><b>wMaxPacketSize</b> indicates the maximum payload size for this endpoint.</i></li>
<li><i><b>bInterval</b> is used to specify the polling interval of certain transfers. The units are
expressed in frames, thus this equates to either 1ms for low/full speed devices and 125us for high speed
devices. </i></li>
</ul>
</ul>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="StringDescriptors"></a><br />
<h1>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="StringDescriptors">
String Descriptors</a></h1>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="StringDescriptors">
</a>
<br />
<ul>
String descriptors provide human readable information and are optional. If they are not
used, any string index fields of descriptors must be set to zero indicating there
is no string descriptor available.
<br />
The strings are encoded in the <a href="http://www.unicode.org/">Unicode</a> format and
products can be made to support multiple languages. String Index 0 should return a list
of supported languages. A list of USB Language IDs can be found in
<a href="http://www.usb.org/developers/data/USB_LANGIDs.pdf">Universal Serial Bus Language
Identifiers (LANGIDs) version 1.0</a>
<br />
<div align="CENTER">
</div>
<center>
<table cellpadding="7" cellspacing="2" width="642">
<tbody>
<tr id="head"><td valign="TOP" width="8%">Offset</td>
<td valign="TOP" width="22%">Field</td>
<td valign="TOP" width="7%">Size</td>
<td valign="TOP" width="12%">Value</td>
<td valign="TOP" width="50%">Description</td>
</tr>
<tr id="row"><td valign="TOP" width="8%">0</td>
<td valign="TOP" width="22%">bLength</td>
<td valign="TOP" width="7%">1</td>
<td valign="TOP" width="12%">Number</td>
<td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">Size of Descriptor in Bytes</span></td>
</tr>
<tr id="row"><td valign="TOP" width="8%">1</td>
<td valign="TOP" width="22%">bDescriptorType</td>
<td valign="TOP" width="7%">1</td>
<td valign="TOP" width="12%">Constant</td>
<td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">String Descriptor (0x03)</span></td>
</tr>
<tr id="row"><td valign="TOP" width="8%">2</td>
<td valign="TOP" width="22%">wLANGID[0]</td>
<td valign="TOP" width="7%">2</td>
<td valign="TOP" width="12%">number</td>
<td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">Supported Language Code Zero<br />(e.g. 0x0409 English - United States)
</span></td>
</tr>
<tr id="row"><td valign="TOP" width="8%">4</td>
<td valign="TOP" width="22%">wLANGID[1]</td>
<td valign="TOP" width="7%">2</td>
<td valign="TOP" width="12%">number</td>
<td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">Supported Language Code One<br />(e.g. 0x0c09 English - Australian)
</span></td>
</tr>
<tr id="row"><td valign="TOP" width="8%">n</td>
<td valign="TOP" width="22%">wLANGID[x]</td>
<td valign="TOP" width="7%">2</td>
<td valign="TOP" width="12%">number</td>
<td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">Supported Language Code x<br />(e.g. 0x0407 German - Standard)
</span></td>
</tr>
</tbody></table>
</center>
<br />
The above String Descriptor shows the format of String Descriptor Zero. The host should read this
descriptor to determine what languages are available. If a language is supported, it can then
be referenced by sending the language ID in the wIndex field of a
<a href="http://www.beyondlogic.org/usbnutshell/usb6.htm#GetDescriptor">Get Descriptor(String)</a> request.
<br />
All subsequent strings take on the format below,
<br />
<div align="CENTER">
</div>
<center>
<table cellpadding="7" cellspacing="2" width="642">
<tbody>
<tr id="head"><td valign="TOP" width="8%">Offset</td>
<td valign="TOP" width="22%">Field</td>
<td valign="TOP" width="7%">Size</td>
<td valign="TOP" width="12%">Value</td>
<td valign="TOP" width="50%">Description</td>
</tr>
<tr id="row"><td valign="TOP" width="8%">0</td>
<td valign="TOP" width="22%">bLength</td>
<td valign="TOP" width="7%">1</td>
<td valign="TOP" width="12%">Number</td>
<td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">Size of Descriptor in Bytes</span></td>
</tr>
<tr id="row"><td valign="TOP" width="8%">1</td>
<td valign="TOP" width="22%">bDescriptorType</td>
<td valign="TOP" width="7%">1</td>
<td valign="TOP" width="12%">Constant</td>
<td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">String Descriptor (0x03)</span></td>
</tr>
<tr id="row"><td valign="TOP" width="8%">2</td>
<td valign="TOP" width="22%">bString</td>
<td valign="TOP" width="7%">n</td>
<td valign="TOP" width="12%">Unicode</td>
<td valign="TOP" width="50%"><span style="font-family: Arial; font-size: x-small;">Unicode Encoded String</span></td></tr>
</tbody></table>
</center>
</ul>
<br />
<h3 class="post-title entry-title" style="border-bottom-color: rgb(230, 230, 230); border-bottom-style: solid; border-bottom-width: 1px; color: #3d81ee; font-family: Trebuchet, 'Trebuchet MS', Arial, sans-serif; font-size: 19px; line-height: 1.6em; margin: 0px 0px 16px 5px; padding: 0px 0px 3px; text-align: left;">
<a href="http://master-digitals.blogspot.com/2012/08/article-usb-in-nutshell-part-1.html" style="color: #3d81ee; text-decoration: none;">Article USB in a NutShell Part 1</a></h3>
<div>
<h3 class="post-title entry-title" style="border-bottom-color: rgb(230, 230, 230); border-bottom-style: solid; border-bottom-width: 1px; color: #3d81ee; font-family: Trebuchet, 'Trebuchet MS', Arial, sans-serif; font-size: 19px; line-height: 1.6em; margin: 0px 0px 16px 5px; padding: 0px 0px 3px; text-align: left;">
<a href="http://master-digitals.blogspot.com/2012/08/article-usb-in-nutshell-part-2.html" style="color: #3d81ee; text-decoration: none;">Article USB in a NutShell Part 2</a></h3>
</div>
<div>
<h3 class="post-title entry-title" style="border-bottom-color: rgb(230, 230, 230); border-bottom-style: solid; border-bottom-width: 1px; color: #3d81ee; font-family: Trebuchet, 'Trebuchet MS', Arial, sans-serif; font-size: 19px; line-height: 1.6em; margin: 0px 0px 16px 5px; padding: 0px 0px 3px; text-align: left;">
<a href="http://master-digitals.blogspot.com/2012/08/article-usb-in-nutshell-part-3.html" style="color: #3d81ee; text-decoration: none;">Article USB in a NutShell Part 3</a></h3>
</div>
<div>
<h3 class="post-title entry-title" style="border-bottom-color: rgb(230, 230, 230); border-bottom-style: solid; border-bottom-width: 1px; color: #3d81ee; font-family: Trebuchet, 'Trebuchet MS', Arial, sans-serif; font-size: 19px; line-height: 1.6em; margin: 0px 0px 16px 5px; padding: 0px 0px 3px; text-align: left;">
<a href="http://master-digitals.blogspot.com/2012/08/article-usb-in-nutshell-part-4.html" style="color: #3d81ee; text-decoration: none;">Article USB in a NutShell Part 4</a></h3>
</div>Aryantohttp://www.blogger.com/profile/18082049281071636850noreply@blogger.com0tag:blogger.com,1999:blog-6626872665054399212.post-23357544701784438282012-08-02T20:33:00.000+07:002012-08-02T20:33:40.609+07:00Article USB in a NutShell Part 4<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="EndpointTypes"></a><br />
<h1>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="EndpointTypes">Endpoint Types</a></h1>
The Universal Serial Bus specification defines four transfer/endpoint types,
<br />
<ul>
<li><b><a href="http://www.beyondlogic.org/usbnutshell/usb4.shtml#Control">Control Transfers</a></b></li>
<li><b><a href="http://www.beyondlogic.org/usbnutshell/usb4.shtml#Interrupt">Interrupt Transfers</a></b></li>
<li><b><a href="http://www.beyondlogic.org/usbnutshell/usb4.shtml#Isochronous">Isochronous Transfers</a></b></li>
<li><b><a href="http://www.beyondlogic.org/usbnutshell/usb4.shtml#Bulk">Bulk Transfers<a name='more'></a></a></b></li>
</ul>
<h1>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="Control">Control Transfers</a></h1>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="Control">
</a>
<br />
<ul>
Control transfers are typically used for command and status operations. They are
essential to set up a USB device with all enumeration functions being performed using
control transfers. They are typically bursty, random packets which are initiated by
the host and use best effort delivery. The packet length of control transfers in low
speed devices must be 8 bytes, high speed devices allow a packet size of 8, 16, 32
or 64 bytes and full speed devices must have a packet size of 64 bytes.
<br />
A control transfer can have up to three stages.
<br />
<ul>
<li>The <b>Setup Stage</b> is where the request is sent. This consists of three packets.
The setup token is sent first which contains the address and endpoint number. The data packet
is sent next and always has a PID type of data0 and includes a <a href="http://www.beyondlogic.org/usbnutshell/usb6.htm#SetupPacket">setup packet</a>
which details the type of request. We detail the setup packet later. The last packet is a handshake
used for acknowledging successful receipt or to indicate an error. If the function successfully
receives the setup data (CRC and PID etc OK) it responds with ACK, otherwise it ignores the data
and doesn’t send a handshake packet. Functions cannot issue a STALL or NAK packet in response
to a setup packet.</li>
<center>
<table>
<tbody>
<tr><td><center>
<img src="http://www.beyondlogic.org/usbnutshell/contset.gif" /></center>
</td><td><center>
<img src="http://www.beyondlogic.org/usbnutshell/transkey.gif" /></center>
</td></tr>
</tbody></table>
</center>
<li>The optional <b>Data Stage</b> consists of one or multiple IN or OUT transfers. The setup request
indicates the amount of data to be transmitted in this stage. If it exceeds the maximum packet size,
data will be sent in multiple transfers each being the maximum packet length except for the last packet.<br />
The data stage has two different scenarios depending upon the direction of data transfer.<br />
<ul>
<li><b>IN:</b> When the host is ready to receive control data it issues
an IN Token. If the function receives the IN token with an error e.g.
the PID
doesn't match the inverted PID bits, then it ignores the packet. If the
token was received correctly, the device can either reply with a DATA
packet containing the control data to be sent, a stall packet indicating
the endpoint has had a error or a NAK packet indicating to the host
that the endpoint is working, but temporarily has no data to send. </li>
</ul>
<center>
<table>
<tbody>
<tr><td><center>
<img src="http://www.beyondlogic.org/usbnutshell/contdata.gif" /></center>
</td><td><center>
<img src="http://www.beyondlogic.org/usbnutshell/transkey.gif" /></center>
</td></tr>
</tbody></table>
</center>
<ul>
<li><b>OUT:</b> When the host needs to send the device a control data
packet, it issues an OUT token followed by a data packet containing the
control data as the payload. If any part of the OUT token or data packet
is corrupt then the function ignores the packet. If the function's
endpoint buffer was
empty and it has clocked the data into the endpoint buffer it issues an
ACK informing the host it has successfully received the data. If the
endpoint
buffer is not empty due to processing of the previous packet, then the
function returns a NAK. However if the endpoint has had a error and its
halt bit has been set, it returns a STALL. </li>
</ul>
<br />
</li>
<li><b>Status Stage</b> reports the status of the overall request and this once again varies due to direction of
transfer. Status reporting is always performed by the function.</li>
<ul>
<br />
<li><b>IN:</b> If the host sent IN token(s) during the data stage to receive data, then the host must acknowledge the
successful recept of this data. This is done by the host sending an OUT token followed by a zero length data packet.
The function can now report its status in the handshaking stage. An ACK indicates the function has completed
the command is now ready to accept another command. If an error occurred during the processing of this
command, then the function will issue a STALL. However if the function is still processing, it returns
a NAK indicating to the host to repeat the status stage later.
<br />
<center>
<table>
<tbody>
<tr><td><center>
<img src="http://www.beyondlogic.org/usbnutshell/contsta1.gif" /></center>
</td><td><center>
<img src="http://www.beyondlogic.org/usbnutshell/transkey.gif" /></center>
</td></tr>
</tbody></table>
</center>
<br />
</li>
<li><b>OUT:</b> If the host sent OUT token(s) during the data stage to transmit data, the function will
acknowledge the successful recept of data by sending a zero length packet in response to an IN token. However if
an error occurred, it should issue a STALL or if it is still busy processing data, it should issue a NAK asking the
host to retry the status phase later.
</li>
<center>
<table>
<tbody>
<tr><td><center>
<img src="http://www.beyondlogic.org/usbnutshell/contsta2.gif" /></center>
</td><td><center>
<img src="http://www.beyondlogic.org/usbnutshell/transkey.gif" /></center>
</td></tr>
</tbody></table>
</center>
</ul>
<br />
</ul>
</ul>
<h1>
Control Transfers : The bigger picture</h1>
<ul>
Now how does all this fit together? Let's say for example, the Host
wants to request a device descriptor during enumeration. The packets
which are sent are as follows.
<br />
The host will send the Setup token telling the function that the following packet is a Setup packet. The
Address field will hold the address of the device the host is requesting the descriptor from. The endpoint
number should be zero, specifying the default pipe. The host will then send a DATA0 packet. This will have
an 8 byte payload which is the <a href="http://www.beyondlogic.org/usbnutshell/usb6.htm#GetDescriptor">Device Descriptor Request</a> as outlined
in Chapter 9 of the USB Specification. The USB function then acknowledges the setup packet has been read
correctly with no errors. If the packet was received corrupt, the device just ignores this packet. The host
will then resend the packet after a short delay.
<br />
<div align="CENTER">
</div>
<table cellpadding="7" cellspacing="2" width="90%">
<tbody>
<tr>
<td width="20%"><b><span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><span style="font-family: Arial; font-size: x-small;"><b>1. Setup Token</b></span></td>
<td bgcolor="#C0C0C0" width="9%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>Sync</b></span></div>
</td>
<td bgcolor="#C0C0C0" width="7%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>PID</b></span></div>
</td>
<td bgcolor="#C0C0C0" width="9%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>ADDR</b></span></div>
</td>
<td bgcolor="#C0C0C0" width="9%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>ENDP</b></span></div>
</td>
<td bgcolor="#C0C0C0" width="9%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>CRC5</b></span></div>
</td>
<td bgcolor="#C0C0C0" width="9%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>EOP</b></span></div>
</td>
<td width="30%"><span style="font-family: Arial; font-size: x-small;"></span><span style="font-family: Arial; font-size: x-small;">Address & Endpoint Number</span></td>
</tr>
<tr><td colspan="8" height="10"></td></tr>
<tr>
<td width="20%"><b><span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><span style="font-family: Arial; font-size: x-small;"><b>2. Data0 Packet</b></span></td>
<td bgcolor="#C0C0C0" width="9%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>Sync</b></span></div>
</td>
<td bgcolor="#C0C0C0" width="7%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>PID</b></span></div>
</td>
<td bgcolor="#C0C0C0" colspan="2" width="17%"><b><span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>Data0</b></span></div>
</td>
<td bgcolor="#C0C0C0" width="9%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>CRC16</b></span></div>
</td>
<td bgcolor="#C0C0C0" width="9%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>EOP</b></span></div>
</td>
<td width="30%"><span style="font-family: Arial; font-size: x-small;"></span><span style="font-family: Arial; font-size: x-small;">Device Descriptor Request</span></td>
</tr>
<tr><td colspan="8" height="10"></td></tr>
<tr>
<td width="20%"><b><span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><span style="font-family: Arial; font-size: x-small;"><b>3. Ack Handshake</b></span></td>
<td bgcolor="#C0C0C0" width="9%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>Sync</b></span></div>
</td>
<td bgcolor="#C0C0C0" width="7%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>PID</b></span></div>
</td>
<td bgcolor="#C0C0C0" width="9%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>EOP</b></span></div>
</td>
<td colspan="3" width="26%"></td>
<td width="30%"><span style="font-family: Arial; font-size: x-small;"></span><span style="font-family: Arial; font-size: x-small;">Device Ack. Setup Packet</span></td>
</tr>
</tbody></table>
<br />
The above three packets represent the first USB transaction. The USB device will now decode the 8 bytes
received, and determine if it was a device descriptor request. The device will then attempt to send the
<a href="http://www.beyondlogic.org/usbnutshell/usb5.htm#DeviceDescriptors">Device Descriptor</a>, which will be the next USB transaction.
<br />
<div align="CENTER">
</div>
<table cellpadding="7" cellspacing="2" width="90%">
<tbody>
<tr>
<td width="20%"><b><span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><span style="font-family: Arial; font-size: x-small;"><b>1. In Token</b></span></td>
<td bgcolor="#C0C0C0" width="9%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>Sync</b></span></div>
</td>
<td bgcolor="#C0C0C0" width="7%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>PID</b></span></div>
</td>
<td bgcolor="#C0C0C0" width="9%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>ADDR</b></span></div>
</td>
<td bgcolor="#C0C0C0" width="9%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>ENDP</b></span></div>
</td>
<td bgcolor="#C0C0C0" width="9%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>CRC5</b></span></div>
</td>
<td bgcolor="#C0C0C0" width="9%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>EOP</b></span></div>
</td>
<td width="30%"><span style="font-family: Arial; font-size: x-small;"></span><span style="font-family: Arial; font-size: x-small;">Address & Endpoint Number</span></td>
</tr>
<tr><td colspan="8" height="10"></td></tr>
<tr>
<td width="20%"><b><span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><span style="font-family: Arial; font-size: x-small;"><b>2. Data1 Packet</b></span></td>
<td bgcolor="#C0C0C0" width="9%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>Sync</b></span></div>
</td>
<td bgcolor="#C0C0C0" width="7%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>PID</b></span></div>
</td>
<td bgcolor="#C0C0C0" colspan="2" width="17%"><b><span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>Data1</b></span></div>
</td>
<td bgcolor="#C0C0C0" width="9%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>CRC16</b></span></div>
</td>
<td bgcolor="#C0C0C0" width="9%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>EOP</b></span></div>
</td>
<td width="30%"><span style="font-family: Arial; font-size: x-small;"></span><span style="font-family: Arial; font-size: x-small;">First 8 Bytes of Device Descriptor</span></td>
</tr>
<tr><td colspan="8" height="10"></td></tr>
<tr>
<td width="20%"><b><span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><span style="font-family: Arial; font-size: x-small;"><b>3. Ack Handshake</b></span></td>
<td bgcolor="#C0C0C0" width="9%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>Sync</b></span></div>
</td>
<td bgcolor="#C0C0C0" width="7%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>PID</b></span></div>
</td>
<td bgcolor="#C0C0C0" width="9%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>EOP</b></span></div>
</td>
<td colspan="3" width="26%"></td>
<td width="30%"><span style="font-family: Arial; font-size: x-small;"></span><span style="font-family: Arial; font-size: x-small;">Host Acknowledges Packet</span></td>
</tr>
</tbody></table>
<br />
<div align="CENTER">
</div>
<table cellpadding="7" cellspacing="2" width="90%">
<tbody>
<tr>
<td width="20%"><b><span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><span style="font-family: Arial; font-size: x-small;"><b>1. In Token</b></span></td>
<td bgcolor="#C0C0C0" width="9%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>Sync</b></span></div>
</td>
<td bgcolor="#C0C0C0" width="7%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>PID</b></span></div>
</td>
<td bgcolor="#C0C0C0" width="9%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>ADDR</b></span></div>
</td>
<td bgcolor="#C0C0C0" width="9%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>ENDP</b></span></div>
</td>
<td bgcolor="#C0C0C0" width="9%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>CRC5</b></span></div>
</td>
<td bgcolor="#C0C0C0" width="9%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>EOP</b></span></div>
</td>
<td width="30%"><span style="font-family: Arial; font-size: x-small;"></span><span style="font-family: Arial; font-size: x-small;">Address & Endpoint Number</span></td>
</tr>
<tr><td colspan="8" height="10"></td></tr>
<tr>
<td width="20%"><b><span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><span style="font-family: Arial; font-size: x-small;"><b>2. Data0 Packet</b></span></td>
<td bgcolor="#C0C0C0" width="9%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>Sync</b></span></div>
</td>
<td bgcolor="#C0C0C0" width="7%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>PID</b></span></div>
</td>
<td bgcolor="#C0C0C0" colspan="2" width="17%"><b><span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>Data0</b></span></div>
</td>
<td bgcolor="#C0C0C0" width="9%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>CRC16</b></span></div>
</td>
<td bgcolor="#C0C0C0" width="9%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>EOP</b></span></div>
</td>
<td width="30%"><span style="font-family: Arial; font-size: x-small;"></span><span style="font-family: Arial; font-size: x-small;">Last 4 bytes + Padding</span></td>
</tr>
<tr><td colspan="8" height="10"></td></tr>
<tr>
<td width="20%"><b><span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><span style="font-family: Arial; font-size: x-small;"><b>3. Ack Handshake</b></span></td>
<td bgcolor="#C0C0C0" width="9%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>Sync</b></span></div>
</td>
<td bgcolor="#C0C0C0" width="7%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>PID</b></span></div>
</td>
<td bgcolor="#C0C0C0" width="9%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>EOP</b></span></div>
</td>
<td colspan="3" width="26%"></td>
<td width="30%"><span style="font-family: Arial; font-size: x-small;"></span><span style="font-family: Arial; font-size: x-small;">Host Acknowledges Packet</span></td>
</tr>
</tbody></table>
<br />
In this case, we assume that the maximum payload size is 8 bytes. The host sends the IN token, telling the
device it can now send data for this endpoint. As the maximum packet size is 8 bytes, we must split up
the 12 byte device descriptor into chunks to send. Each chunk must be 8 bytes except for the last transaction.
The host acknowledges every data packet we send it.
<br />
Once the device descriptor is sent, a status transaction follows. If the transactions were successful, the
host will send a zero length packet indicating the overall transaction was successful. The function then
replies to this zero length packet indicating its status.
<br />
<div align="CENTER">
</div>
<table cellpadding="7" cellspacing="2" width="90%">
<tbody>
<tr>
<td width="20%"><b><span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><span style="font-family: Arial; font-size: x-small;"><b>1. Out Token</b></span></td>
<td bgcolor="#C0C0C0" width="9%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>Sync</b></span></div>
</td>
<td bgcolor="#C0C0C0" width="7%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>PID</b></span></div>
</td>
<td bgcolor="#C0C0C0" width="9%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>ADDR</b></span></div>
</td>
<td bgcolor="#C0C0C0" width="9%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>ENDP</b></span></div>
</td>
<td bgcolor="#C0C0C0" width="9%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>CRC5</b></span></div>
</td>
<td bgcolor="#C0C0C0" width="9%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>EOP</b></span></div>
</td>
<td width="30%"><span style="font-family: Arial; font-size: x-small;"></span><span style="font-family: Arial; font-size: x-small;">Address & Endpoint Number</span></td>
</tr>
<tr><td colspan="8" height="10"></td></tr>
<tr>
<td width="20%"><b><span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><span style="font-family: Arial; font-size: x-small;"><b>2. Data1 Packet</b></span></td>
<td bgcolor="#C0C0C0" width="9%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>Sync</b></span></div>
</td>
<td bgcolor="#C0C0C0" width="7%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>PID</b></span></div>
</td>
<td bgcolor="#C0C0C0" colspan="2" width="17%"><b><span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>Data1</b></span></div>
</td>
<td bgcolor="#C0C0C0" width="9%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>CRC16</b></span></div>
</td>
<td bgcolor="#C0C0C0" width="9%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>EOP</b></span></div>
</td>
<td width="30%"><span style="font-family: Arial; font-size: x-small;"></span><span style="font-family: Arial; font-size: x-small;">Zero Length Packet</span></td>
</tr>
<tr><td colspan="8" height="10"></td></tr>
<tr>
<td width="20%"><b><span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><span style="font-family: Arial; font-size: x-small;"><b>3. Ack Handshake</b></span></td>
<td bgcolor="#C0C0C0" width="9%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>Sync</b></span></div>
</td>
<td bgcolor="#C0C0C0" width="7%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>PID</b></span></div>
</td>
<td bgcolor="#C0C0C0" width="9%"><b> <span style="font-family: Arial; font-size: x-small;"></span></b><span style="font-family: Arial; font-size: x-small;"></span><br />
<div align="CENTER">
<span style="font-family: Arial; font-size: x-small;"><b>EOP</b></span></div>
</td>
<td colspan="3" width="26%"></td>
<td width="30%"><span style="font-family: Arial; font-size: x-small;"></span><span style="font-family: Arial; font-size: x-small;">Device Ack. Entire Transaction</span></td>
</tr>
</tbody></table>
<br />
<br />
</ul>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="Interrupt"></a><br />
<h1>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="Interrupt">
Interrupt Transfers</a></h1>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="Interrupt">
</a>
<br />
<ul>
Any one who has had experience of interrupt requests on microcontrollers will know that interrupts are
device generated. However under USB if a device requires the attention of the host, it must wait until
the host polls it before it can report that it needs urgent attention!
<br />
<ul>
<b>Interrupt Transfers</b>
<ul>
<li>Guaranteed Latency</li>
<li>Stream Pipe - Unidirectional</li>
<li>Error detection and next period retry.</li>
</ul>
</ul>
Interrupt transfers are typically non-periodic, small device "initiated" communication
requiring bounded latency. An Interrupt request is queued by the device until the host polls
the USB device asking for data.
<br />
<ul>
<br />
<li>The maximum data payload size for low-speed devices is 8 bytes. </li>
<li>Maximum data payload size for full-speed devices is 64 bytes. </li>
<li>Maximum data payload size for high-speed devices is 1024 bytes. </li>
<br />
</ul>
<center>
<table width="80%">
<tbody>
<tr><td><center>
<img src="http://www.beyondlogic.org/usbnutshell/transint.gif" /></center>
</td><td><center>
<img src="http://www.beyondlogic.org/usbnutshell/transkey.gif" /></center>
</td></tr>
</tbody></table>
</center>
The above diagram shows the format of an Interrupt IN and Interrupt OUT transaction.
<br />
<ul>
<li><b>IN:</b> The host will periodically poll the interrupt endpoint. This rate of polling is
specified in the <a href="http://www.beyondlogic.org/usbnutshell/usb5.htm#EndpointDescriptors">endpoint descriptor</a> which is covered later. Each poll will involve the host
sending an IN Token. If the IN token is corrupt, the function ignores the packet and continues
monitoring the bus for new tokens.
<br />
If an interrupt has been queued by the device, the function will send a data packet containing
data relevant to the interrupt when it receives the IN Token. Upon successful reciept at the
host, the host will return an ACK. However if the data is corrupted, the host will return no
status. If on the other hand an interrupt condition was not present when the host polled the
interrupt endpoint with an IN token, then the function signals this state by sending a NAK.
If an error has occurred on this endpoint, a STALL is sent in reply to the IN token instead.
<br />
</li>
<li><b>OUT:</b> When the host wants to send the device interrupt data, it issues an OUT token followed
by a data packet containing the interrupt data. If any part of the OUT token or data packet is corrupt then the
function ignores the packet. If the function's endpoint buffer was empty and it has clocked the data into
the endpoint buffer it issues an ACK informing the host it has successfully received the data. If the endpoint
buffer is not empty due to processing of a previous packet, then the function returns a NAK. However if an error
occurred with the endpoint consequently and its halt bit has been set, it returns a STALL.
</li>
</ul>
<br />
</ul>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="Isochronous"></a><br />
<h1>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="Isochronous">
Isochronous Transfers</a></h1>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="Isochronous">
</a>
<br />
<ul>
Isochronous transfers occur continuously and periodically. They typically contain time sensitive
information, such as an audio or video stream. If there were a delay or retry of data in an audio
stream, then you would expect some erratic audio containing glitches. The beat may no longer be
in sync. However if a packet or frame was dropped every now and again, it is less likely to be
noticed by the listener.
<br />
<ul>
<b>Isochronous Transfers provide</b>
<ul>
<li>Guaranteed access to USB bandwidth.</li>
<li>Bounded latency.</li>
<li>Stream Pipe - Unidirectional</li>
<li>Error detection via CRC, but no retry or guarantee of delivery.</li>
<li>Full & high speed modes only.</li>
<li>No data toggling.</li>
</ul>
</ul>
The maximum size data payload is specified in the <a href="http://www.beyondlogic.org/usbnutshell/usb5.htm#EndpointDescriptors">endpoint descriptor</a> of
an Isochronous Endpoint. This can be up to a maximum
of 1023 bytes for a full speed device and 1024 bytes for a high speed device. As the maximum data payload
size is going to effect the bandwidth requirements of the bus, it is wise to specify a conservative payload
size. If you are using a large payload, it may also be to your advantage to specify a series of <a href="http://www.beyondlogic.org/usbnutshell/usb5.htm#AlternateSetting">alternative
interfaces</a> with varying isochronous payload sizes. If during enumeration, the host cannot enable your preferred
isochronous endpoint due to bandwidth restrictions, it has something to fall back on rather than just failing
completely. Data being sent on an isochronous endpoint can be less than the pre-negotiated size and may vary in length from
transaction to transaction.
<br />
<center>
<table width="80%">
<tbody>
<tr><td><center>
<img src="http://www.beyondlogic.org/usbnutshell/transiso.gif" /></center>
</td><td><center>
<img src="http://www.beyondlogic.org/usbnutshell/transkey.gif" /></center>
</td></tr>
</tbody></table>
</center>
The above diagram shows the format of an Isochronous IN and OUT transaction. Isochronous transactions
do not have a handshaking stage and cannot report errors or STALL/HALT conditions.
<br />
<br />
</ul>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="Bulk"></a><br />
<h1>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="Bulk">
Bulk Transfers</a></h1>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="Bulk">
</a>
<br />
<ul>
Bulk transfers can be used for large bursty data. Such examples could include a print-job sent to a
printer or an image generated from a scanner. Bulk transfers provide error correction in the form of
a CRC16 field on the data payload and error detection/re-transmission mechanisms ensuring data is
transmitted and received without error.
<br />
Bulk transfers will use spare un-allocated bandwidth on the bus after all other transactions have been
allocated. If the bus is busy with isochronous and/or interrupt then bulk data may slowly trickle over
the bus. As a result Bulk transfers should only be used for time insensitive communication as there
is no guarantee of latency.
<br />
<ul>
<b>Bulk Transfers</b>
<ul>
<li>Used to transfer large bursty data.</li>
<li>Error detection via CRC, with guarantee of delivery.</li>
<li>No guarantee of bandwidth or minimum latency.</li>
<li>Stream Pipe - Unidirectional</li>
<li>Full & high speed modes only.</li>
</ul>
</ul>
Bulk transfers are only supported by full and high speed devices. For full speed endpoints, the maximum
bulk packet size is either 8, 16, 32 or 64 bytes long. For high speed endpoints, the maximum packet size
can be up to 512 bytes long. If the data payload falls short of the maximum packet size, it doesn't need
to be padded with zeros. A bulk transfer is considered complete when it has transferred the exact amount
of data requested, transferred a packet less than the maximum endpoint size, or transferred a zero-length
packet.
<br />
<center>
<table width="80%">
<tbody>
<tr><td><center>
<img src="http://www.beyondlogic.org/usbnutshell/contdata.gif" /></center>
</td><td><center>
<img src="http://www.beyondlogic.org/usbnutshell/transkey.gif" /></center>
</td></tr>
</tbody></table>
</center>
The above diagram shows the format of a bulk IN and OUT transaction.
<br />
<ul>
<li><b>IN:</b> When the host is ready to receive bulk data it issues an IN Token. If the function receives
the IN token with an error, it ignores the packet. If the token was received correctly, the function can
either reply with a DATA packet containing the bulk data to be sent, or a stall packet indicating the
endpoint has had a error or a NAK packet indicating to the host that the endpoint is working, but
temporary has no data to send.
</li>
<li><b>OUT:</b> When the host wants to send the function a bulk data packet, it issues an OUT token followed
by a data packet containing the bulk data. If any part of the OUT token or data packet is corrupt then the
function ignores the packet. If the function's endpoint buffer was empty and it has clocked the data into
the endpoint buffer it issues an ACK informing the host it has successfully received the data. If the endpoint
buffer is not empty due to processing a previous packet, then the function returns an NAK. However if the
endpoint has had an error and its halt bit has been set, it returns a STALL.
</li>
</ul>
</ul>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="Bulk"></a><br />
<h1>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="Bulk">
Bandwidth Management</a></h1>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="Bulk">
</a>
<br />
<ul>
The host is responsible for managing the bandwidth of the bus. This is done at enumeration when
configuring Isochronous and Interrupt Endpoints and throughout the operation of the bus.
The specification places limits on the bus, allowing no more than 90% of any frame to be
allocated for periodic transfers (Interrupt and Isochronous) on a full speed bus. On high speed
buses this limitation gets reduced to no more than 80% of a microframe can be allocated for periodic
transfers.
<br />
So you can quite quickly see that if you have a highly saturated bus with periodic transfers, the
remaining 10% is left for control transfers and once those have been allocated, bulk transfers will
get their slice of what is left. </ul>
<br />
<h3 class="post-title entry-title" style="border-bottom-color: rgb(230, 230, 230); border-bottom-style: solid; border-bottom-width: 1px; color: #3d81ee; font-family: Trebuchet, 'Trebuchet MS', Arial, sans-serif; font-size: 19px; line-height: 1.6em; margin: 0px 0px 16px 5px; padding: 0px 0px 3px; text-align: left;">
<a href="http://master-digitals.blogspot.com/2012/08/article-usb-in-nutshell-part-1.html" style="color: #3d81ee; text-decoration: none;">Article USB in a NutShell Part 1</a></h3>
<div>
<h3 class="post-title entry-title" style="border-bottom-color: rgb(230, 230, 230); border-bottom-style: solid; border-bottom-width: 1px; color: #3d81ee; font-family: Trebuchet, 'Trebuchet MS', Arial, sans-serif; font-size: 19px; line-height: 1.6em; margin: 0px 0px 16px 5px; padding: 0px 0px 3px; text-align: left;">
<a href="http://master-digitals.blogspot.com/2012/08/article-usb-in-nutshell-part-2.html" style="color: #3d81ee; text-decoration: none;">Article USB in a NutShell Part 2</a></h3>
</div>
<div>
<h3 class="post-title entry-title" style="border-bottom-color: rgb(230, 230, 230); border-bottom-style: solid; border-bottom-width: 1px; color: #3d81ee; font-family: Trebuchet, 'Trebuchet MS', Arial, sans-serif; font-size: 19px; line-height: 1.6em; margin: 0px 0px 16px 5px; padding: 0px 0px 3px; text-align: left;">
<a href="http://master-digitals.blogspot.com/2012/08/article-usb-in-nutshell-part-3.html" style="color: #3d81ee; text-decoration: none;">Article USB in a NutShell Part 3</a></h3>
</div>Aryantohttp://www.blogger.com/profile/18082049281071636850noreply@blogger.com0tag:blogger.com,1999:blog-6626872665054399212.post-15873580157421660262012-08-02T20:26:00.001+07:002012-08-02T20:26:20.895+07:00Article USB in a NutShell Part 3<a href="" name="USBProtocols"></a><br />
<h1>
<a href="" name="USBProtocols">USB Protocols</a></h1>
Unlike RS-232 and similar serial interfaces where the format of data being sent is not defined, USB is made up of
several layers of protocols. While this sounds complicated, don’t give up now. Once you understand what is going
on, you really only have to worry about the higher level layers. In fact most USB controller I.C.s will take care
of the lower layer, thus making it almost invisible to the end designer.
<br />
Each USB transaction consists of a<br />
<a name='more'></a>
<br />
<ul>
<li>Token Packet (Header defining what it expects to follow), an</li>
<li>Optional Data Packet, (Containing the payload) and a</li>
<li>Status Packet (Used to acknowledge transactions and to provide a means of error correction)</li>
</ul>
As we have already discussed, USB is a host centric bus. The host initiates all transactions. The first packet,
also called a token is generated by the host to describe what is to follow and whether the data transaction will be a
read or write and what the device’s address and designated endpoint is. The next packet is generally a data packet
carrying the payload and is followed by an handshaking packet, reporting if the data or token was received
successfully, or if the endpoint is stalled or not available to accept data.
<br />
<a href="" name="CommonUSBPacketFields"><h1>
Common USB Packet Fields</h1>
</a>
Data on the USBus is transmitted LSBit first. USB packets consist of the following fields,
<br />
<ul>
<li><b>Sync</b></li>
All packets must start with a sync field. The sync field is 8 bits long at low and full speed or
32 bits long for high speed and is used to synchronise the clock of the receiver with that of the
transmitter. The last two bits indicate where the PID fields starts. <br />
<li><b>PID</b></li>
PID stands for Packet ID. This field is used to identify the type
of packet that is being sent. The following table shows the possible
values.<br />
<br />
<center>
<table>
<tbody>
<tr id="head"><td>Group</td><td>PID Value</td><td>Packet Identifier</td></tr>
<tr id="row"><td rowspan="4">Token</td><td>0001</td><td>OUT Token</td></tr>
<tr id="row"><td>1001</td><td>IN Token</td></tr>
<tr id="row"><td>0101</td><td>SOF Token</td></tr>
<tr id="row"><td>1101</td><td>SETUP Token</td></tr>
<tr id="row"><td rowspan="4">Data</td><td>0011</td><td>DATA0</td></tr>
<tr id="row"><td>1011</td><td>DATA1</td></tr>
<tr id="row"><td>0111</td><td>DATA2</td></tr>
<tr id="row"><td>1111</td><td>MDATA</td></tr>
<tr id="row"><td rowspan="4">Handshake</td><td>0010</td><td>ACK Handshake</td></tr>
<tr id="row"><td>1010</td><td>NAK Handshake</td></tr>
<tr id="row"><td>1110</td><td>STALL Handshake</td></tr>
<tr id="row"><td>0110</td><td>NYET (No Response Yet)</td></tr>
<tr id="row"><td rowspan="4">Special</td><td>1100</td><td>PREamble</td></tr>
<tr id="row"><td>1100</td><td>ERR</td></tr>
<tr id="row"><td>1000</td><td>Split</td></tr>
<tr id="row"><td>0100</td><td>Ping</td></tr>
</tbody></table>
</center>
<br />
There are 4 bits to the PID, however to insure it is received
correctly, the 4 bits are complemented and repeated, making an 8 bit PID
in total. The resulting format is shown below. <br />
<div align="CENTER">
</div>
<center>
<table cellpadding="7" cellspacing="2" width="415">
<tbody>
<tr id="packet">
<td id="packet" width="12%">PID<sub>0</sub></td>
<td id="packet" width="13%">PID<sub>1</sub></td>
<td id="packet" width="12%">PID<sub>2</sub></td>
<td id="packet" width="13%">PID<sub>3</sub></td>
<td id="packet" width="12%">nPID<sub>0</sub></td>
<td id="packet" width="12%">nPID<sub>1</sub></td>
<td id="packet" width="12%">nPID<sub>2</sub></td>
<td id="packet" width="12%">nPID<sub>3</sub></td>
</tr>
</tbody></table>
</center>
<br />
<li><b>ADDR</b></li>
The address field specifies which device the packet is designated
for. Being 7 bits in length allows for 127 devices to be supported.
Address 0 is not valid, as any device which is not yet assigned an
address must respond to packets sent to address zero.<br />
<li><b>ENDP</b></li>
The endpoint field is made up of 4 bits, allowing 16 possible endpoints. Low speed devices, however can only
have 2 additional endpoints on top of the default pipe. (4 endpoints max)<br />
<li><b>CRC</b></li>
Cyclic Redundancy Checks are performed on the data within the packet
payload. All token packets have a 5 bit CRC while data packets have a 16
bit CRC.<br />
<li><b>EOP</b></li>
End of packet. Signalled by a Single Ended Zero (SE0) for approximately 2 bit times followed by a J for 1 bit time.
<br />
</ul>
<a href="" name="USBPacketTypes"><h1>
USB Packet Types</h1>
</a>
USB has four different packet types. Token packets indicate the type of
transaction to follow, data packets contain the payload, handshake
packets are used for acknowledging data or reporting errors and start of
frame packets indicate the start of a new frame.
<br />
<ul>
<li><b>Token Packets</b></li>
There are three types of token packets,<br />
<ul>
<li><b>In</b> - Informs the USB device that the host wishes to read information.</li>
<li><b>Out</b> - Informs the USB device that the host wishes to send information.</li>
<li><b>Setup</b> - Used to begin control transfers.</li>
</ul>
Token Packets must conform to the following format,<br />
<div align="CENTER">
</div>
<center>
<table cellpadding="7" cellspacing="3" width="331">
<tbody>
<tr id="packet">
<td id="packet" width="18%"><b>Sync</b></td>
<td id="packet" width="13%"><b>PID</b></td>
<td id="packet" width="17%"><b>ADDR</b></td>
<td id="packet" width="17%"><b>ENDP</b></td>
<td id="packet" width="17%"><b>CRC5</b></td>
<td id="packet" width="17%"><b>EOP</b></td>
</tr>
</tbody></table>
</center>
<br />
<li><b>Data Packets</b></li>
There are two types of data packets each capable of transmitting up to 1024 bytes of data.<br />
<ul>
<li>Data0</li>
<li>Data1</li>
</ul>
High Speed mode defines another two data PIDs, DATA2 and MDATA.<br />
Data packets have the following format,<br />
<div align="CENTER">
</div>
<center>
<table cellpadding="7" cellspacing="2" width="331">
<tbody>
<tr id="packet">
<td id="packet" width="18%"><b>Sync</b></td>
<td id="packet" width="13%"><b>PID</b></td>
<td id="packet" width="35%"><b>Data</b></td>
<td id="packet" width="17%"><b>CRC16</b></td>
<td id="packet" width="17%"><b>EOP</b></td>
</tr>
</tbody></table>
</center>
<br />
<br />
<ul>
<li>Maximum data payload size for low-speed devices is 8 bytes.</li>
<li>Maximum data payload size for full-speed devices is 1023 bytes.</li>
<li>Maximum data payload size for high-speed devices is 1024 bytes.</li>
<li>Data must be sent in multiples of bytes.</li>
</ul>
<br />
<li><b>Handshake Packets</b></li>
There are three type of handshake packets which consist simply of the PID<br />
<ul>
<li><b>ACK</b> - Acknowledgment that the packet has been successfully received.</li>
<li><b>NAK</b> - Reports that the device temporary cannot send or
received data. Also used during interrupt transactions to inform the
host there is no data to send.</li>
<li><b>STALL</b> - The device finds its in a state that it requires intervention from the host.</li>
</ul>
Handshake Packets have the following format,<br />
<div align="CENTER">
</div>
<center>
<table cellpadding="7" cellspacing="2" width="160">
<tbody>
<tr id="packet">
<td id="packet" width="37%"><b>Sync</b></td>
<td id="packet" width="27%"><b>PID</b></td>
<td id="packet" width="35%"><b>EOP</b></td>
</tr>
</tbody></table>
</center>
<br />
<li><b>Start of Frame Packets</b></li>
The SOF packet consisting of an 11-bit frame number is sent by the host every 1ms
<span style="font-family: Symbol;">±</span> 500ns on a full speed bus or every 125 µs
<span style="font-family: Symbol;">±</span> 0.0625 µs on a high speed bus.<br />
<div align="CENTER">
</div>
<center>
<table cellpadding="7" cellspacing="2" width="331">
<tbody>
<tr id="packet">
<td id="packet" width="18%"><b>Sync</b></td>
<td id="packet" width="13%"><b>PID</b></td>
<td id="packet" width="35%"><b>Frame Number</b></td>
<td id="packet" width="17%"><b>CRC5</b></td>
<td id="packet" width="17%"><b>EOP</b></td>
</tr>
</tbody></table>
</center>
<br />
</ul>
<a href="" name="USBFunctions"><h1>
USB Functions</h1>
</a>
When we think of a USB device, we think of a USB peripheral, but a USB device
could mean a USB transceiver device used at the host or peripheral, a USB
Hub or Host Controller IC device, or a USB peripheral device. The standard
therefore makes references to USB functions which can be seen as USB devices
which provide a capability or function such as a Printer, Zip Drive, Scanner,
Modem or other peripheral.
<br />
<br />
So by now we should know the sort of things which make up a USB packet. No?
You're forgotten how many bits make up a PID field already? Well don't be too
alarmed. Fortunately most USB functions handle the low level USB protocols up
to the transaction layer (which we will cover next chapter) in silicon. The
reason why we cover this information is most USB function controllers will
report errors such as PID Encoding Error. Without briefly covering this, one
could ask what is a PID Encoding Error? If you suggested that the last four
bits of the PID didn't match the inverse of the first four bits then you would
be right.
<br />
<center>
<img src="http://www.beyondlogic.org/usbnutshell/endpoint.gif" /></center>
Most functions will have a series of buffers, typically 8 bytes long. Each buffer
will belong to an endpoint - EP0 IN, EP0 OUT etc. Say for example, the host sends
a device descriptor request. The function hardware will read the setup packet and
determine from the address field whether the packet is for itself, and if so will
copy the payload of the following data packet to the appropriate endpoint buffer
dictated by the value in the endpoint field of the setup token. It will then send a
handshake packet to acknowledge the reception of the byte and generate an internal
interrupt within the semiconductor/micro-controller for the appropriate endpoint
signifying it has received a packet. This is typically all done in hardware.
<br />
The software now gets an interrupt, and should read the contents of the endpoint
buffer and parse the device descriptor request.
<br />
<a href="" name="Endpoints"><h1>
Endpoints</h1>
</a>
Endpoints can be described as sources or sinks of data. As the bus is host centric, endpoints
occur at the end of the communications channel at the USB function. At the software layer, your
device driver may send a packet to your devices EP1 for example. As the data is flowing out
from the host, it will end up in the EP1 OUT buffer. Your firmware will then at its leisure
read this data. If it wants to return data, the function cannot simply write to the bus as
the bus is controlled by the host. Therefore it writes data to EP1 IN which sits in the buffer
until such time when the host sends a IN packet to that endpoint requesting the data. Endpoints
can also be seen as the interface between the hardware of the function device and the firmware
running on the function device.
<br />
<br />
All devices must support endpoint zero. This is the endpoint which receives all of the devices
control and status requests during enumeration and throughout the duration while the device is
operational on the bus.
<br />
<a href="" name="Pipes"><h1>
Pipes</h1>
</a>
While the device sends and receives data on a series of endpoints, the client software transfers
data through pipes. A pipe is a logical connection between the host and endpoint(s). Pipes will
also have a set of parameters associated with them such as how much bandwidth is allocated to it, what
transfer type (Control, Bulk, Iso or Interrupt) it uses, a direction of data flow and maximum
packet/buffer sizes. For example the default pipe is a bi-directional pipe made up of endpoint zero
in and endpoint zero out with a control transfer type.
<br />
USB defines two types of pipes
<br />
<ul>
<li><b>Stream Pipes</b> have no defined USB format, that is you can send
any type of data down a stream pipe and can retrieve the data out the
other end. Data flows sequentially and has a pre-defined direction,
either in or out. Stream pipes will support bulk, isochronous and
interrupt transfer types. Stream pipes can either be controlled by the
host or device.</li>
<br /><br />
<li><b>Message Pipes</b> have a defined USB format. They are host
controlled, which are initiated by a request sent from the host. Data is
then transferred in the desired direction, dictated by the request.
Therefore message pipes allow data to flow in both directions but will
only support control transfers.</li>
</ul>
<div>
<h3 class="post-title entry-title" style="border-bottom-color: rgb(230, 230, 230); border-bottom-style: solid; border-bottom-width: 1px; color: #3d81ee; font-family: Trebuchet, 'Trebuchet MS', Arial, sans-serif; font-size: 19px; line-height: 1.6em; margin: 0px 0px 16px 5px; padding: 0px 0px 3px; text-align: left;">
<a href="http://master-digitals.blogspot.com/2012/08/article-usb-in-nutshell-part-1.html" style="color: #3d81ee; text-decoration: none;">Article USB in a NutShell Part 1</a></h3>
</div>
<div>
<h3 class="post-title entry-title" style="border-bottom-color: rgb(230, 230, 230); border-bottom-style: solid; border-bottom-width: 1px; color: #3d81ee; font-family: Trebuchet, 'Trebuchet MS', Arial, sans-serif; font-size: 19px; line-height: 1.6em; margin: 0px 0px 16px 5px; padding: 0px 0px 3px; text-align: left;">
<a href="http://master-digitals.blogspot.com/2012/08/article-usb-in-nutshell-part-2.html" style="color: #3d81ee; text-decoration: none;">Article USB in a NutShell Part 2</a></h3>
</div>Aryantohttp://www.blogger.com/profile/18082049281071636850noreply@blogger.com0tag:blogger.com,1999:blog-6626872665054399212.post-80599254592420852352012-08-02T20:23:00.003+07:002012-08-02T20:24:06.754+07:00Article USB in a NutShell Part 2<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="Connectors"></a><br />
<h1>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="Connectors">Connectors</a></h1>
All devices have an upstream connection to the host and all hosts have a downstream connection to the device.
Upstream and downstream connectors are not mechanically interchangeable, thus eliminating illegal loopback
connections at hubs such as a downstream port connected to a downstream port. There are commonly two types of
connectors, called type A and type B which are shown below.
<br />
<center>
<table width="60%">
<tbody>
<tr><td width="50%"><center>
<img src="http://www.beyondlogic.org/usbnutshell/contypea.gif" /></center>
</td><td width="50%"><center>
<img src="http://www.beyondlogic.org/usbnutshell/contypeb.gif" /></center>
</td></tr>
<tr><td><br />
<center>
Type A USB Connector</center>
</td><td><br />
<center>
Type B USB Connector</center>
</td></tr>
</tbody></table>
<a name='more'></a>
</center>
Type A plugs always face upstream. Type A sockets will typically find themselves on hosts and hubs. For example
type A sockets are common on computer main boards and hubs. Type B plugs are always connected downstream and
consequently type B sockets are found on devices.
<br />
<br />
It is interesting to find type A to type A cables wired straight through and an array
of USB gender changers in some computer stores. This is in contradiction of the USB specification. The only
type A plug to type A plug devices are bridges which are used to connect two computers together. Other
prohibited cables are <a href="http://master-digitals.blogspot.com/2012/08/article-usb-in-nutshell-part-1.html">USB extensions</a> which has a plug on one end (either type A or type B) and a socket on the
other. These cables violate the cable length requirements of USB.
<br />
<br />
USB 2.0 included errata which introduces mini-usb B connectors. The details on these connectors can be
found in <a href="http://www.usb.org/developers/data/ecn1.pdf">Mini-B Connector Engineering Change Notice</a>
The reasoning behind the mini connectors came from the range of miniature electronic devices such as mobile phones
and organisers. The current type B connector is too large to be easily integrated into these devices.
<br />
<br />
Just recently released has been the <a href="http://www.beyondlogic.org/usb/otghost.htm">On-The-Go specification</a> which adds
peer-to-peer functionality to USB. This introduces USB hosts into mobile phone and electronic organisers,
and thus has included a specification for mini-A plugs, mini-A receptacles, and mini-AB receptacles. I
guess we should be inundated with mini USB cables soon and a range of mini to standard converter cables.
<br />
<br />
<br />
<center>
<table>
<tbody>
<tr id="head"><td>Pin Number</td><td>Cable Colour</td><td>Function</td></tr>
<tr id="row"><td>1</td><td>Red</td><td>V<sub>BUS</sub> (5 volts)</td></tr>
<tr id="row"><td>2</td><td>White</td><td>D-</td></tr>
<tr id="row"><td>3</td><td>Green</td><td>D+</td></tr>
<tr id="row"><td>4</td><td>Black</td><td>Ground</td></tr>
</tbody></table>
</center>
<br />
Standard internal wire colours are used in USB cables, making it easier to identify wires from manufacturer
to manufacturer. The standard specifies various electrical parameters for the cables. It is interesting to read
the detail the original USB 1.0 spec included. You would understand it specifying electrical attributes, but
paragraph 6.3.1.2 suggested the recommended colour for overmolds on USB cables should be frost white - how boring!
USB 1.1 and USB 2.0 was relaxed to recommend Black, Grey or Natural.
<br />
PCB designers will want to reference chapter 6 for standard foot prints and pinouts.
<br />
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="Electrical"></a><br />
<h1>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="Electrical">
Electrical</a></h1>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="Electrical">
</a>
Unless you are designing the silicon for a <a href="http://master-digitals.blogspot.com/2012/08/article-usb-in-nutshell-part-1.html">USB device/transceiver</a> or USB host/hub, there is not all that much you
need to know about the electrical specifications in chapter 7. We briefly address the essential points here.
<br />
<br />
As we have discussed, USB uses a differential transmission pair for data. This is encoded using NRZI and is bit
stuffed to ensure adequate transitions in the data stream. On low and full speed devices, a differential ‘1’ is
transmitted by pulling D+ over 2.8V with a 15K ohm resistor pulled to ground and D- under 0.3V with a 1.5K ohm
resistor pulled to 3.6V. A differential ‘0’ on the other hand is a D- greater than 2.8V and a D+ less than 0.3V
with the same appropriate pull down/up resistors.
<br />
<br />
The receiver defines a differential ‘1’ as D+ 200mV greater than D- and a differential ‘0’ as D+ 200mV less
than D-. The polarity of the signal is inverted depending on the speed of the bus. Therefore the terms ‘J’ and
‘K’ states are used in signifying the logic levels. In low speed a ‘J’ state is a differential 0. In high speed
a ‘J’ state is a differential 1.
<br />
<br />
USB transceivers will have both differential and single ended outputs. Certain bus states are indicated by
single ended signals on D+, D- or both. For example a single ended zero or SE0 can be used to signify a
device reset if held for more than 10mS. A SE0 is generated by holding both D- and D+ low (< 0.3V). Single
ended and differential outputs are important to note if you are using a transceiver and FPGA as your USB device.
You cannot get away with sampling just the differential output.
<br />
<br />
The low speed/full speed bus has a characteristic impedance of 90 ohms +/- 15%. It is therefore important to
observe the datasheet when selecting impedance matching series resistors for D+ and D-. Any good datasheet
should specify these values and tolerances.
<br />
High Speed (480Mbits/s) mode uses a 17.78mA constant current for signalling to reduce noise.
<br />
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="SpeedIdentification"></a><br />
<h1>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="SpeedIdentification">
Speed Identification</a></h1>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="SpeedIdentification">
</a>
A USB device must indicate its speed by pulling either the D+ or D- line high to 3.3 volts. A full speed device,
pictured below will use a pull up resistor attached to D+ to specify itself as a full speed device. These pull
up resistors at the device end will also be used by the host or hub to detect the presence of a device connected
to its port. Without a pull up resistor, USB assumes there is nothing connected to the bus. Some devices have this
resistor built into its silicon, which can be turned on and off under firmware control, others require an external
resistor.
<br />
<br />
For example Philips Semiconductor has a SoftConnect<sup>TM</sup> technology. When first connected to the bus, this allows
the microcontroller to initialise the USB function device before it enables the pull up speed identification resistor,
indicating a device is attached to the bus. If the pull up resistor was connected to V<sub>bus</sub>, then this would indicate a
device has been connected to the bus as soon as the plug is inserted. The host may then attempt to reset the device
and ask for a descriptor when the microprocessor hasn’t even started to initialise the usb function device.
<br />
<br />
Other vendors such as Cypress Semiconductor also use a programmable resistor for Re-Numeration<sup>TM</sup> purposes
in their EzUSB devices where the one device can be enumerated for one function such as In field programming then be
disconnected from the bus under firmware control, and enumerate as another different device, all without the user
lifting an eyelid. Many of the EzUSB devices do not have any Flash or OTP ROM to store code. They are bootstraped
at connection.
<br />
<center>
<table width="60%">
<tbody>
<tr><td width="50%"><center>
<img src="http://www.beyondlogic.org/usbnutshell/fspullup.gif" /></center>
</td></tr>
<tr><td><br />
<center>
Figure 2 : Full Speed Device with pull up resistor connected to D+</center>
</td></tr>
<tr>
</tr>
<tr><td width="50%"><center>
<img src="http://www.beyondlogic.org/usbnutshell/lspullup.gif" /></center>
</td></tr>
<tr><td><br />
<center>
Figure 3 : Low Speed Device with pull up resistor connected to D-</center>
</td></tr>
</tbody></table>
</center>
You will notice we have not included speed identification for High Speed mode. High speed devices will start by
connecting as a full speed device (1.5k to 3.3V). Once it has been attached, it will do a high speed chirp during
reset and establish a high speed connection if the hub supports it. If the device operates in high speed mode,
then the pull up resistor is removed to balance the line.
<br />
<br />
A USB 2.0 compliant device is not required to support high-speed mode. This allows cheaper devices to be produced
if the speed isn’t critical. This is also the case for a low speed USB 1.1 devices which is not required to support
full speed.
<br />
However a high speed device must not support low speed mode. It should only support full speed mode needed to connect
first, then high speed mode if successfully negotiated later. A USB 2.0 compliant downstream facing device
(Hub or Host) must support all three modes, high speed, full speed and low speed.
<br />
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="PowerVbus"></a><br />
<h1>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="PowerVbus">
Power (V<sub>BUS</sub>)</a></h1>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="PowerVbus">
</a>
One of the benefits of USB is bus-powered devices - devices which obtain its power from the bus and requires no
external plug packs or additional cables. However many leap at this option without first considering all the
necessary criteria.
<br />
<br />
A USB device specifies its power consumption expressed in 2mA units in the configuration descriptor which we will
examine in detail later. A device cannot increase its power consumption, greater than what it specifies during
enumeration, even if it looses external power. There are three classes of USB functions,
<br />
<ul>
<li>Low-power bus powered functions</li>
<li>High-power bus powered functions</li>
<li>Self-powered functions</li>
</ul>
Low power bus powered functions draw all its power from the V<sub>BUS</sub> and cannot draw any more than one
unit load. The USB specification defines a unit load as 100mA. Low power bus powered functions must also be
designed to work down to a V<sub>BUS</sub> voltage of 4.40V and up to a maximum voltage of 5.25V measured at
the upsteam plug of the device. For many 3.3V devices, LDO regulators are mandatory.
<br />
<br />
High power bus powered functions will draw all its power from the bus and cannot draw more than one unit
load until it has been configured, after which it can then drain 5 unit loads (500mA Max) provided it asked for
this in its descriptor. High power bus functions must be able to be detected and enumerated at a minimum 4.40V.
When operating at a full unit load, a minimum V<sub>BUS</sub> of 4.75 V is specified with a maximum of 5.25V.
Once again, these measurements are taken at the upstream plug.
<br />
<br />
Self power functions may draw up to 1 unit load from the bus and derive the rest of it’s power from an external
source. Should this external source fail, it must have provisions in place to draw no more than 1 unit load from
the bus. Self powered functions are easier to design to specification as there is not so much of an issue with
power consumption. The 1 unit bus powered load allows the detection and enumeration of devices without mains/secondary
power applied.
<br />
<br />
No USB device, whether bus powered or self powered can drive the V<sub>BUS</sub> on its upstream facing port. If
V<sub>BUS</sub> is lost, the device has a lengthy 10 seconds to remove power from the D+/D- pull-up resistors used
for speed identification.
<br />
<br />
Other V<sub>BUS</sub> considerations are the Inrush current which must be limited. This is outlined in the USB
specification paragraph 7.2.4.1 and is commonly overlooked. Inrush current is contributed to the amount of
capacitance on your device between V<sub>BUS</sub> and ground. The spec therefore specifies that the maximum
decoupling capacitance you can have on your device is 10uF. When you disconnect the device after current is
flowing through the inductive USB cable, a large flyback voltage can occur on the open end of the cable.
To prevent this, a 1uF minimum V<sub>BUS</sub> decoupling capacitance is specified.
<br />
<br />
For the typical bus powered device, it can not drain any more than 500mA which is not unreasonable. So what
is the complication you ask? Perhaps Suspend Mode?
<br />
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="SuspendCurrent"></a><br />
<h1>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="SuspendCurrent">
Suspend Current</a></h1>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="SuspendCurrent">
</a>
Suspend mode is mandatory on all devices. During suspend, additional constrains come into force. The maximum
suspend current is proportional to the unit load. For a 1 unit load device (default) the maximum suspend
current is 500uA. This includes current from the pull up resistors on the bus. At the hub, both D- and D+
have pull down resistors of 15K ohms. For the purposes of power consumption, the pull down resistor at the
device is in series with the 1.5K ohms pull up, making a total load of 16.5K ohms on a V<sub>TERM </sub>of
typically 3.3v. Therefore this resistor sinks 200uA before we even start.<br />
<br />
Another consideration for many devices is the 3.3V regulator. Many of the USB devices run on 3.3V. The
PDIUSBD11 is one such example. Linear regulators are typically quite inefficient with average quiescent
currents in the order of 600uA, therefore more efficient and thus expensive regulators are called for.
In the majority of cases, you must also slow down or stop clocks on microcontrollers to fall within the
500uA limit.
<br />
Many developers ask in the USB Implementor's Forum, what are the complications of exceeding this limit? It
is understood, that most hosts and hubs don’t have the ability to detect such an overload of this magnitude
and thus if you drain maybe 5mA or even 10mA you should still be fine, bearing in mind that at the end of
the day, your device violates the USB specification. However in normal operation, if you try to exceed the
100mA or your designated permissible load, then expect the hub or host to detect this and disconnect your
device, in the interest of the integrity of the bus.
<br />
<br />
Of course these design issues can be avoided if you choose to design a self powered device. Suspend currents
may not be a great concern for desktop computers but with the introduction of the On-The-Go Specification we
will start seeing USB hosts built into mobile phones and mobile organisers. The power consumption pulled from
these devices will adversely effect the operating life of the battery.
<br />
<h1>
Entering Suspend Mode</h1>
A USB device will enter suspend when there is no activity on the bus for greater than 3.0ms. It then has a
further 7ms to shutdown the device and draw no more than the designated suspend current and thus must be only
drawing the rated suspend current from the bus 10mS after bus activity stopped. In order to maintain connected
to a suspended hub or host, the device must still provide power to its pull up speed selection resistors during
suspend.
<br />
<br />
USB has a start of frame packet or keep alive sent periodically on the bus. This prevents an idle bus from
entering suspend mode in the absence of data.
<br />
<ul>
<li>A high speed bus will have micro-frames sent every 125.0 µs ±62.5 ns.</li>
<li>A full speed bus will have a frame sent down each 1.000 ms ±500 ns. </li>
<li>A low speed bus will have a keep alive which is a EOP (End of Packet) every 1ms only in the absence of
any low speed data.</li>
</ul>
The term "Global Suspend" is used when the entire <a href="http://master-digitals.blogspot.com/2012/08/article-usb-in-nutshell-part-1.html">USB bus</a> enters suspend mode collectively. However
selected devices can be suspended by sending a command to the hub that the device is connected too. This is referred
to as a "Selective Suspend."
<br />
The device will resume operation when it receives any non idle signalling. If a device has remote wakeup enabled
then it may signal to the host to resume from suspend.
<br />
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="DataSignallingRate"></a><br />
<h1>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="DataSignallingRate">
Data Signalling Rate</a></h1>
<a href="http://www.blogger.com/blogger.g?blogID=6626872665054399212" name="DataSignallingRate">
</a>
Another area which is often overlooked is the tolerance of the USB clocks. This is specified in the
USB specification, section 7.1.11.
<br />
<ul>
<li>High speed data is clocked at 480.00Mb/s with a data signalling tolerance of ± 500ppm.</li>
<li>Full speed data is clocked at 12.000Mb/s with a data signalling tolerance of ±0.25% or 2,500ppm. </li>
<li>Low speed data is clocked at 1.50Mb/s with a data signalling tolerance of ±1.5% or 15,000ppm. </li>
</ul>
This allows resonators to be used for low cost low speed devices, but rules them out for full or high speed devices.<br />
<br />
<br />
<h3 class="post-title entry-title" style="border-bottom-color: rgb(230, 230, 230); border-bottom-style: solid; border-bottom-width: 1px; color: #3d81ee; font-family: Trebuchet, 'Trebuchet MS', Arial, sans-serif; font-size: 19px; line-height: 1.6em; margin: 0px 0px 16px 5px; padding: 0px 0px 3px; text-align: left;">
<a href="http://master-digitals.blogspot.com/2012/08/article-usb-in-nutshell-part-1.html" style="color: #3d81ee; text-decoration: none;">Article USB in a NutShell Part 1</a></h3>
<br />Aryantohttp://www.blogger.com/profile/18082049281071636850noreply@blogger.com0tag:blogger.com,1999:blog-6626872665054399212.post-83651928148030979752012-08-02T20:16:00.001+07:002012-08-02T20:16:16.360+07:00Article USB in a NutShell Part 1<br />
<h2>
Making sense of the USB standard</h2>
Starting out new with USB can be quite daunting. With the <a href="http://www.usb.org/developers/docs/usb_20.zip">USB
2.0 specification</a> at 650 pages one could easily be put off just by the sheer size of the standard. This is only the
beginning of a long list of associated standards for USB. There are <a href="http://www.usb.org/developers/devclass/">USB Class
Standards</a> such as the HID Class Specification which details the common operation of devices (keyboards, mice etc)
falling under the HID (Human Interface Devices) Class - only another 97 pages. If you are designing a USB Host, then you
have three Host Controller Interface Standards to choose from. None of these are detailed in the USB 2.0 Spec.<br />
<a name='more'></a>
<br />
<br />
The good news is you don’t even need to bother
reading the entire USB standard. Some chapters were churned out by marketing, others aimed at the lower link layer
normally taken care off by your USB controller IC and a couple aimed at host and hub developers. Lets take a little
journey through the various chapters of the USB 2.0 specification and briefly introduce the key points.
<br />
<br />
<center>
<a href="" name="USB2Spec"></a>
<table>
<tbody>
<tr id="head"><td>Chapter</td><td>Name</td><td>Description</td><td>Pages</td></tr>
<tr id="row"><td>1</td><td>Introduction</td><td>Includes the motivation
and scope for USB. The most important piece of information in this
chapter is to make reference to the Universal Serial Bus Device Class
Specifications. No need reading this chapter.</td><td>2</td></tr>
<tr id="row"><td>2</td><td>Terms and Abbreviations</td><td>This chapter is self-explanatory and a necessary evil to any standard.</td><td>8</td></tr>
<tr id="row"><td>3</td><td>Background</td><td>Specifies the goals of USB which are Plug’n’Play and simplicity to the end user (<i>not developer</i>). Introduces Low, Full and High Speed ranges with a feature list straight from marketing. No need reading this chapter either.</td><td>4</td></tr>
<tr id="row"><td>4</td><td>Architectural Overview</td><td>This is where
you can start reading. This chapter provides a basic overview of a USB
system including topology, data rates, data flow types, basic electrical
specs etc.</td><td>10</td></tr>
<tr id="row"><td>5</td><td>USB Data Flow Model</td><td>This chapter
starts to talk about how data flows on a Universal Serial Bus. It
introduces terms such as endpoints and pipes then spends most of the
chapter on each of the data flow types (Control, Interrupt, Isochronous
and Bulk). While it’s important to know each transfer type and its
properties it is a little heavy on for a first reader.</td><td>60</td></tr>
<tr id="row"><td>6</td><td>Mechanical</td><td>This chapter details the
USB’s two standard connectors. The important information here is that a
type A connector is oriented facing downstream and a type B connector
upstream. Therefore it should be impossible to plug a cable into two
upstream ports. All detachable cables must be full/high speed, while any
low speed cable must be hardwired to the appliance. Other than a quick
look at the connectors, you can skip this chapter unless you intend to
manufacture USB connectors and/or cables. PCB designers can find
standard footprints in this chapter.</td><td>33</td></tr>
<tr id="row"><td>7</td><td>Electrical</td><td>This chapter looks at low
level electrical signalling including line impedance, rise/fall times,
driver/receiver specifications and bit level encoding, bit stuffing etc.
The more important parts of this chapter are the device speed
identification by using a resistor to bias either data line and bus
powered devices vs self powered devices. Unless you are designing USB
transceivers at a silicon level you can flip through this chapter. Good
USB device datasheets will detail what value bus termination resistors
you will need for bus impedance matching.</td><td>75</td></tr>
<tr id="row"><td>8</td><td>Protocol Layer</td><td>Now we start to get
into the protocol layers. This chapter describes the USB packets at a
byte level including the sync, pid, address, endpoint, CRC fields. Once
this has been grasped it moves on to the next protocol layer, USB
packets. Most developers still don’t see these lower protocol layers as
their USB device IC’s take care of this. However a understanding of the
status reporting and handshaking is worthwhile.</td><td>45</td></tr>
<tr id="row"><td>9</td><td>USB Device Frame Work</td><td>This is the
most frequently used chapter in the entire specification and the only
one I ever bothered printing and binding. This details the bus
enumeration and request codes (set address, get descriptor etc) which
make up the most common protocol layer USB programmers and designers
will ever see. This chapter is a must read in detail.</td><td>36</td></tr>
<tr id="row"><td>10</td><td>USB Host Hardware and Software</td><td>This
chapter covers issues relating to the host. This includes frame and
microframe generation, host controller requirements, software mechanisms
and the universal serial bus driver model. Unless you are designing
Hosts, you can skip this chapter.</td><td>23</td></tr>
<tr id="row"><td>11</td><td>Hub Specification</td><td>Details the
workings of USB hubs including hub configuration, split transactions,
standard descriptors for hub class etc. Unless you are designing Hubs,
you can skip this chapter.<br /></td><td>143</td></tr>
</tbody></table>
</center>
So now we can begin to read the parts of the standard relevant to our needs. If you develop drivers (Software) for
USB peripherals then you may only need to read chapters,
<br />
<ul>
<li>4 - Architectural Overview</li>
<li>5 - USB Data Flow Model</li>
<li>9 - USB Device Frame Work, and</li>
<li>10 - USB Host Hardware and Software.</li>
</ul>
Peripheral hardware (Electronics) designers on the other hand may only need to read chapters,
<br />
<ul>
<li>4 - Architectural Overview</li>
<li>5 - USB Data Flow Model</li>
<li>6 - Mechanical, and</li>
<li>7 - Electrical.</li>
</ul>
<br />
<h1>
USB in a NutShell for Peripheral Designers</h1>
Now lets face it, (1) most of us are here to develop USB peripherals and (2) it's common to read a standard and still
have no idea how to implement a device. So in the next 7 chapters we focus on the relevant parts needed to develop a USB
device. This allows you to grab a grasp of USB and its issues allowing you to further research the issues specific to
your application.
<br />
The USB 1.1 standard was complex enough before High Speed was thrown into USB 2.0. In order to help understand the
fundamental principals behind USB, we omit many areas specific to High Speed devices.
<br />
<a href="" name="Introduction"><h1>
Introducing the Universal Serial Bus</h1>
</a>
USB version 1.1 supported two speeds, a full speed mode of 12Mbits/s and a low speed mode of 1.5Mbits/s. The
1.5Mbits/s mode is slower and less susceptible to EMI, thus reducing the cost of ferrite beads and quality components. For
example, crystals can be replaced by cheaper resonators. USB 2.0 which is still yet to see day light on mainstream
desktop computers has upped the stakes to 480Mbits/s. The 480Mbits/s is known as High Speed mode and was a tack
on to compete with the Firewire Serial Bus.
<br />
<b>USB Speeds</b><ul>
<li>High Speed - 480Mbits/s</li>
<li>Full Speed - 12Mbits/s</li>
<li>Low Speed - 1.5Mbits/s</li>
</ul>
The Universal Serial Bus is host controlled. There can only be one host per bus. The specification in itself, does
not support any form of multimaster arrangement. However the <a href="http://www.beyondlogic.org/usb/otghost.htm">On-The-Go specification</a>
which is a tack on standard to USB 2.0 has introduced a Host Negotiation Protocol which allows two devices negotiate
for the role of host. This is aimed at and limited to single point to point connections such as a mobile phone and
personal organiser and not multiple hub, multiple device desktop configurations. The USB host is responsible for
undertaking all transactions and scheduling bandwidth. Data can be sent by various transaction methods using a
token-based protocol.
<br />
<br />
In my view the bus topology of USB is somewhat limiting. One of the original intentions of USB was to reduce the
amount of cabling at the back of your PC. Apple people will say the idea came from the Apple Desktop Bus, where both
the keyboard, mouse and some other peripherals could be connected together (daisy chained) using the one cable.
<br />
<br />
However USB uses a tiered star topology, simular to that of 10BaseT Ethernet. This imposes the use of a hub
somewhere, which adds to greater expense, more boxes on your desktop and more cables. However it is not as bad
as it may seem. Many devices have USB hubs integrated into them. For example, your keyboard may contain a hub
which is connected to your computer. Your mouse and other devices such as your digital camera can be plugged
easily into the back of your keyboard. Monitors are just another peripheral on a long list which commonly have
in-built hubs.
<br />
<br />
This tiered star topology, rather than simply daisy chaining devices together has some benefits. Firstly power
to each device can be monitored and even switched off if an overcurrent condition occurs without disrupting
other USB devices. Both high, full and low speed devices can be supported, with the hub filtering out high
speed and full speed transactions so lower speed devices do not receive them.
<br />
<br />
Up to 127 devices can be connected to any one USB bus at any one given time. Need more devices? - simply add
another port/host. While most earlier USB hosts had two ports, most manufacturers have seen this as limiting
and are starting to introduce 4 and 5 port host cards with an internal port for hard disks etc. The early hosts
had one USB controller and thus both ports shared the same available USB bandwidth. As bandwidth requirements
grew, we are starting to see multi-port cards with two or more controllers allowing individual channels.
<br />
<br />
The USB host controllers have their own specifications. With USB 1.1, there were two Host Controller Interface
Specifications, <a href="http://developer.intel.com/design/USB/UHCI11D.htm">UHCI (Universal Host Controller
Interface)</a> developed by Intel which puts more of the burden on software (Microsoft) and allowing for
cheaper hardware and the <a href="http://www.compaq.com/productinfo/development/openhci.html">OHCI (Open Host
Controller Interface)</a> developed by Compaq, Microsoft and National Semiconductor which places more of the
burden on hardware(Intel) and makes for simpler software. Typical hardware / software engineer relationship. . .
<br />
With the introduction of USB 2.0 a new Host Controller Interface Specification was needed to describe the
register level details specific to USB 2.0. The <a href="http://developer.intel.com/technology/usb/ehcispec.htm">
EHCI (Enhanced Host Controller Interface)</a> was born. Significant Contributors include Intel, Compaq, NEC,
Lucent and Microsoft so it would hopefully seem they have pooled together to provide us one interface standard
and thus only one new driver to implement in our operating systems. Its about time.
<br />
<br />
USB as its name would suggest is a serial bus. It uses 4 shielded wires of which two are power (+5v & GND). The
remaining two are twisted pair differential data signals. It uses a NRZI (Non Return to Zero Invert) encoding
scheme to send data with a sync field to synchronise the host and receiver clocks.
<br />
USB supports plug’n’plug with dynamically loadable and unloadable drivers. The user simply plugs the device into
the bus. The host will detect this addition, interrogate the newly inserted device and load the appropriate driver
all in the time it takes the hourglass to blink on your screen provided a driver is installed for your device. The
end user needs not worry about terminations, terms such as IRQs and port addresses, or rebooting the computer. Once
the user is finished, they can simply lug the cable out, the host will detect its absence and automatically unload
the driver.
<br />
<br />
The loading of the appropriate driver is done using a PID/VID (Product ID/Vendor ID) combination. The VID is supplied
by the USB Implementor's forum at a cost and this is seen as another sticking point for USB. The latest info on fees
can be found on the <a href="http://www.usb.org/developers/vendor.html">USB Implementor’s Website</a>
<br />
Other standards organisations provide a extra VID for non-commercial activities such as teaching, research or fiddling
(The Hobbyist). The USB Implementors forum has yet to provide this service. In these cases you may wish to use one
assigned to your development system's manufacturer. For example most chip manufacturers will have a VID/PID combination
you can use for your chips which is known not to exist as a commercial device. Other chip manufacturers can even sell
you a PID to use with their VID for your commercial device.
<br />
<br />
Another more notable feature of USB, is its transfer modes. USB supports Control, Interrupt, Bulk and Isochronous
transfers. While we will look at the other transfer modes later, Isochronous allows a device to reserve a defined
amount of bandwidth with guaranteed latency. This is ideal in Audio or Video applications where congestion may cause
loss of data or frames to drop. Each transfer mode provides the designer trade-offs in areas such as error detection
and recovery, guaranteed latency and bandwidth.<br />Aryantohttp://www.blogger.com/profile/18082049281071636850noreply@blogger.com0tag:blogger.com,1999:blog-6626872665054399212.post-13707277790515507682012-08-01T08:49:00.002+07:002012-08-01T08:49:58.633+07:00About of MP3 Player<br />
The Bottom Line Quite a few developments have occurred since I've written my two how to choose an MP3 player and CD-MP3 player essays. Time to reevaluate the market!<br />
<br />
MP3 player technology has become cheaper with new products and breakthroughs on the horizon. Time to reevaluate the market and consider whether it's time to wait for the new technology or is it okay to buy now?<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
What's here now?<br />
<a name='more'></a><br />
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSUyWVl4jy5RDNKUXDlQPwHxi4wG4mrwkO1HuBTq5Fh1GIAkRrDNps0lk9tLg13hZMDXKiY_SO5RQPDsEeVz7E4xuemE8rIFC_2mrnfUJJraEoy0u6QQ4NLoPZqDVvFDlo9HWBhF3umIt4/s1600/mp3-players.jpg" style="text-align: center;" />
<br />
There are several products already out in the market and quite a few just on the horizon as well as a few new technologies that we have high hopes for.<br />
<br />
Recently, we are seeing more combinations units in the market like digital cameras with a MP3 player (Kodak's mc3 and Fuji's FinePix 4700), PDA's (Pocket PCs and Sony's CLIE-N710), and cellular phones (Samsung's recent offerrings.) There are still more on the horizon. For the most part, there are alot of advantages to combination units... like the fact that you only have to carry one device instead of multiple popular devices. Many people carry cellular phones and PDAs these days... why burden yourself with multiple devices?<br />
<br />
The pros of combination devices also include overall cheaper cost of ownership... you may pay more for the single combination device but it's still cheaper than buying all the individual units. Second, you don't have to fiddle around with different memory formats of various devices since you only have one device to worry about.<br />
<br />
Honestly, there are disadvantages to these combination devices... I personally felt that many of these combination devices were sometimes hard to use (Sony CLIE-N710 Palm MP3 software) or didn't perform well in their multiple personalities (Kodak's mc3). It is the price that you can pay for having a combination player. Discriminating users can very well be unhappy with the performance of these all-in-one devices. Other disadvantages that have cropped up include loss of functionality (Samsung's cell phone/MP3 player has a fixed amount of memory for MP3 storage) and confusing control layouts. My quick takes on some of these devices...<br />
Fuji's FinePix 4700 does a decent job as both a digital camera and MP3 player... will likely make most users satisfied.<br />
Kodak's mc3 is great as an all-in-one toy but that's it... it really excels at none of its functions.<br />
Sony's CLIE-N710 is a great device but it tries to do too much with too little. The 8MB of internal memory and the included 8MB memory stick limit an otherwise promising product! Even if you purchase a larger memory card, the 8MB of internal memory causes you to choose exactly what the Sony CLIE-N710 must be one or two of the following instead of the unit being interchangable between PDA, MP3, and video viewer.<br />
Samsung's Uproar cell phone/MP3 combo works as a good cell phone but is still limited on the MP3 player end. It is a very good product but may be too limited for some users due to the unexpandable memory size of 64MB.<br />
<br />
Other trends... MP3 flash memory players are becoming smaller and memory cards are currently at rock bottom prices. Look at the RCA Kazoo MP3 players and even some of the upcoming Samsung Yepp players... heck even the SD Panasonic players are absolutely the tiniest unit out on the market these days. The Kazoo is a 2 x 2 x 1 inch player! It has 32 MB of internal memory and accomodates MMC cards up to 96MB. One Panasonic SD unit is a set of headphones with an SD slot on the headphones itself for MP3 playing. The Rio 800, Nomad II MG, and Intel Pocket Concert units look like giants in comparison. Prices have still been spiralling downwards as competition continues to appear on the MP3 market.<br />
<br />
Memory card prices are hitting all time lows! Look at the price of SmartMedia cards... at the beginning of the year, the lowest price for a 64MB SM card that I could find was $55. Now, the prices are as low as $34 for a 64 MB SM card. MultiMedia Card (MMC) media is also being picked up as a standard these days... and the media has slowly started dipping in price. A 64 MB MMC card was close to $120-140 at the beginning of the year. Now you can find prices as low as $75 for a 64 MB MMC card with relatively little difficulty. Even SonicBlue's propriatary Rio Backpacks have come under pricing pressures due to this competition! These pricing pressures make many older but high quality and reliable players much more attractive buys as well as spur the development of smaller MP3 units with smaller sized media (like MMC and SD).<br />
<br />
MP3 players have more function that ever before... look at the iRock MP3 player. Ever wanted Karoke? Well, the iRock unit has it... It even stores your great (or should I say worse) performance of your favorite MP3 songs and plays it back to you... over and over again!<br />
<br />
What's on the horizon?<br />
<br />
Competing audio formats like WMA, AAC, and even the new MP3Pro format offer better compression with less loss of audio quality. WMA and AAC are fairly widely accepted. The MP3Pro format has been heard of but just released. Some people has issues with the quality of MP3s... but with these new standards and future upgrades, how long will that be a factor?<br />
<br />
Smaller CD-MP3 players... remember the 3 inch CD format. Phillips eXpandium 401 unit and an upcoming Compaq iPaq CD-MP3 player will use only this smaller 3 inch CDs for MP3 playback. The smaller discs obviously hold less data than a standard sized CD-R/RW but the difference in the player size may justifiy it. CD-MP3 players won't be bulky for long!<br />
<br />
Smaller hard drive unit MP3 players... ready for this? The Creative Nomad Pocket Jukebox! Holding between 6 to 10 Gigs of space but still portable in your pocket! The newest Nomad Jukebox will have all the features of its older predecesor but takes up less than half the space. Is your mouth watering at this thought... here's another tidbit on it... the price is rumored to be in the $399 or less range!<br />
<br />
The DataPlay disc technology... what's about the size of a nickel and holds 500MB of data. The DataPlay disc... a new storage medium that is not currently out yet but looks very promising. A medium that is not much bigger than current MMC cards but holds 8-9 times the data can fit into any number of MP3 player designs as well as other equipment... it may even lead to better combination device as well. There are a few question on this new medium such as the size of the reading and writing equipment, the speed of the drive, and the cost of the device (which is rumored to be low... but nothing concrete to date).<br />
<br />
It's nice that you're writing all of this, but how does it help me in purchasing a MP3 player?!<br />
<br />
Well, if you're not set in getting a MP3 player, then it helps to know what is already out there and what is coming out soon. The size of players and the amount of storage on the players are huge factors... as well as the overall portability and cost of memory upgrades. If you're not set in getting a player now, it may pay to wait a few more months to see current player prices drop and to play with the newer models of MP3 players that are about to come out. You all have an idea of what you want out of your MP3 player, so you need to know what is out there and how well they fit your desires in a MP3 player. MP3 players have definitely come a long way, but they're not for everyone and the best is still yet to come!<br />Aryantohttp://www.blogger.com/profile/18082049281071636850noreply@blogger.com0tag:blogger.com,1999:blog-6626872665054399212.post-51409708927590885392012-07-31T07:50:00.001+07:002012-07-31T08:11:05.195+07:00Consumer electronics<br />
Consumer electronics are electronic equipment intended for everyday use, most often in entertainment, communications and office productivity. Radio broadcasting in the early 20th century brought the first major consumer product, the broadcast receiver. Later products include personal computers, telephones, MP3 players, audio equipment, televisions, calculators, GPS automotive electronics, digital cameras and players and recorders using video media such as DVDs, VCRs or camcorders. Increasingly these products have become based on digital technologies, and have largely merged with the computer industry in what is increasingly referred to as the consumerization of information technology.<br />
<a name='more'></a><br />
The CEA (Consumer Electronics Association) estimates 2007 US Consumer Electronics sales at 150 billion dollars.<br />
Consumer electronics are manufactured throughout the world, although there is a particularly high concentration of headquarters, factories, research and development activity in East Asia, especially in Japan. The latest consumer electronics are previewed yearly at the Consumer Electronics Show in Las Vegas, Nevada, at which many industry pioneers speak.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-a6RVsTi0N6aMutgBIFUL48envhAomFScQx4RTydhvSCirLf_nxqckEEUiIQQlOiZA1z67Vk43jlHVT7iRmzqliWETP2LSWCnbPyp7Hcks3FuaPuCoHvgyr_Obaqd829sqdvpACpKn6LX/s1600/220px-Jvc_gz-mg555-02.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-a6RVsTi0N6aMutgBIFUL48envhAomFScQx4RTydhvSCirLf_nxqckEEUiIQQlOiZA1z67Vk43jlHVT7iRmzqliWETP2LSWCnbPyp7Hcks3FuaPuCoHvgyr_Obaqd829sqdvpACpKn6LX/s1600/220px-Jvc_gz-mg555-02.jpg" /></a></div>
<br />
One overriding characteristic of consumer electronic products is the trend of ever-falling prices. This is driven by gains in manufacturing efficiency and automation, lower labor costs as manufacturing has moved to lower-wage countries, and improvements in semiconductor design. Semiconductor components benefit from Moore's Law, an observed principle which states that, for a given price, semiconductor functionality doubles every two years.<br />
<br />
While consumer electronics continues in its trend of convergence, combining elements of many products, consumers face different decisions when purchasing. There is an ever increasing need to keep product information updated and comparable, for the consumer to make an informed choice. Style, price, specification and performance are all relevant. There is a gradual shift towards e-commerce web-storefronts.<br />
<br />
Many products include Internet connectivity using technologies such as Wi-Fi, Bluetooth or Ethernet. Products not traditionally associated with computer use (such as TVs or Hi-Fi equipment) now provide options to connect to the Internet or to a computer using a home network to provide access to digital content. The desire for High definition (HD) content has led the industry to develop a number of technologies, such as WirelessHD or ITU-T G.hn, which are optimized for distribution of HD content between CE devices in a home.<br />
<br />
Standby power used by consumer electronics and appliance while they are turned off accounts for 5 to 10% of household energy consumption, adding an estimated $3 billion to annual energy costs in the USA. "In the average home, 75% of the electricity used to power home electronics is consumed while the products are turned off.Aryantohttp://www.blogger.com/profile/18082049281071636850noreply@blogger.com0tag:blogger.com,1999:blog-6626872665054399212.post-60274976525082379552012-04-06T07:47:00.003+07:002012-04-06T08:04:31.153+07:00Data Transfer 80C51Internal RAM<br />Table 3 shows the menu of instructions that are available for moving data around within the internal memory spaces, and the addressing modes that can be used with each one. With a 12MHz clock, all of these instructions execute in either 1 or 2ms. The MOV [dest], [src]<dest> <src> instruction allows data to be transferred between any two internal RAM or SFR locations without going through the Accumulator. <a name='more'></a> Remember, the Upper 128 bytes of data RAM can be accessed only by indirect addressing, and SFR space only by direct addressing.The Data Transfer instructions include a 16-bit MOV that can be used to initialize the Data Pointer (DPTR) for look-up tables in Program Memory, or for 16-bit external Data Memory accesses.<br /><br />Table 1.4.3. MCS-51 Data Transfer Instruction<br /><table border="1" width="99%"><tbody><tr><td rowspan="2" width="16%"><div align="center"><strong>Mnemonic</strong></div> </td> <td rowspan="2" width="20%"><div align="center"><strong>Operation</strong></div> </td> <td colspan="4"> <div align="center"><strong>Addressing Mode</strong></div></td> <td width="19%"><div align="center"><strong>Exect.</strong></div></td> </tr> <tr> <td width="8%"><div align="center"><strong>Dir</strong></div></td> <td width="10%"><div align="center"><strong>Ind</strong></div></td> <td width="12%"><div align="center"><strong>Reg</strong></div></td> <td width="15%"><div align="center"><strong>Imm</strong></div></td> <td><div align="center"><strong>Timer uS</strong></div></td> </tr> <tr> <td><span style="font-size:85%;">Mov A,[src]<src></src></span></td> <td><span style="font-size:85%;">A=[src]<src></src></span></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">1</span></div></td> </tr> <tr> <td><span style="font-size:85%;">Mov <dest>[dest],A</dest></span></td> <td><span style="font-size:85%;"><dest>[dest]=A</dest></span></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">1</span></div></td> </tr> <tr> <td><span style="font-size:85%;">Mov <dest>[dest],[src] <src></src></dest></span></td> <td><span style="font-size:85%;"><dest>[dest]=[src]<src></src></dest></span></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">1</span></div></td> </tr> <tr> <td><span style="font-size:85%;">Mov DPTR,#data16</span></td> <td><span style="font-size:85%;">DPTR=16 bit immediate const</span></td> <td colspan="4"> <div align="center"><span style="font-size:85%;">Accumulator Only</span></div></td> <td><div align="center"><span style="font-size:85%;">1</span></div></td> </tr> <tr> <td><span style="font-size:85%;">Push [src]<src></src></span></td> <td><span style="font-size:85%;">Inc SP</span></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><br /></td> <td><div align="center"><span style="font-size:85%;">1</span></div></td> </tr> <tr> <td><span style="font-size:85%;">Pop [src]<src></src></span></td> <td><span style="font-size:85%;">Dec SP</span></td> <td colspan="4"> <div align="center"><span style="font-size:85%;">Data Pointer Only</span></div></td> <td><div align="center"><span style="font-size:85%;">2</span></div></td> </tr> <tr> <td><span style="font-size:85%;">Xch A, [byte]<byte></byte></span></td> <td><span style="font-size:85%;">Acc and [byte] <byte>exchange data</byte></span></td> <td colspan="4"> <div align="center"><span style="font-size:85%;">Accumulator Only</span></div></td> <td><div align="center"><span style="font-size:85%;">1</span></div></td> </tr> <tr> <td><span style="font-size:85%;">Xchd A,@Ri</span></td> <td><span style="font-size:85%;">Acc and @Ri exchange low nibbles</span></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><br /></td> <td><div align="center"><span style="font-size:85%;">1</span></div></td></tr></tbody></table><blockquote>;Lesson 1.4.1.<br /><br /> Org 0h<br />Start:Mov A,#1 ; put 1 into the accumulator<br /> ADD A,#2 ; add the constant 2 to Accumulator (1+2)<br /> Mov 78h,#3 ; put 3 into internal RAM 78h<br /> ADD A, 78h ; add Acc and RAM 78h content<br /> Mov R0, #79h; put 79 into R0<br /> Mov @R0, #4 ; put 4 into RAM 79h<br /> ADD A,@R0 ; add Acc and RAM 79h content<br /> Mov R5, #5 ; put 5 into R5<br /> ADD A,R5 ; add Acc and R5<br /> end<br /> <br /><br />;Lesson 1.4.2.<br /><br /> Org 0h<br />Start:Mov 78h,#34h ; [ 78h ] = 34h<br /> Mov 79h,#12h ; [ 79h ] =12h<br /> Mov 7Ah,#0EFh; [ 7Ah ] = EFh<br /> Mov 7Bh,#12h ; [ 7Bh ] = 12h<br /> Mov A,78h ; A = [ 78h ]<br /> Add A,7Ah ; A = A + [ 78h ]<br /> Mov 78h,A ; [ 78h ] = A<br /> Mov A,79h ; A = [ 79h ]<br /> ADDC A,7Bh ; A = A + [ 7Bh ] + C<br /> Mov 79h,A ; [ 79h ] = A<br /> end</blockquote></src></dest>Aryantohttp://www.blogger.com/profile/18082049281071636850noreply@blogger.com0tag:blogger.com,1999:blog-6626872665054399212.post-12799495519647282522012-04-06T07:39:00.002+07:002012-04-06T08:01:34.819+07:00Instruction Set of 80C51Arithmetic Instructions<br />The menu of arithmetic instructions is listed in Table 1.4.1 The table indicates the addressing modes that can be used with each instruction to access the <byte> operand.<br />For example, the ADD A,<byte> instruction can be written as: <a name='more'></a><br /><blockquote> ADD a, 7FH (direct addressing)<br /> ADD A, @R0 (indirect addressing)<br /> ADD a, R7 (register addressing)<br /> ADD A, #127 (immediate constant) </blockquote>The MUL AB instruction multiplies the Accumulator by the data in the B register and puts the 16-bit product into the concatenated B and Accumulator registers.<br /><br />The DIV AB instruction divides the Accumulator by the data in the B register and leaves the 8-bit quotient in the Accumulator, and the 8-bit remainder in the B register.<br /><br />Table 1.4.1. MCS-51 Arithmetic Instruction<br /><table border="1" width="99%"><tbody><tr><td rowspan="2" width="16%"><div align="center"><strong>Mnemonic</strong></div> </td> <td rowspan="2" width="20%"><div align="center"><strong>Operation</strong></div> </td> <td colspan="4"> <div align="center"><strong>Addressing Mode</strong></div></td> <td width="19%"><div align="center"><strong>Exect.</strong></div></td> </tr> <tr> <td width="8%"><div align="center"><strong>Dir</strong></div></td> <td width="10%"><div align="center"><strong>Ind</strong></div></td> <td width="12%"><div align="center"><strong>Reg</strong></div></td> <td width="15%"><div align="center"><strong>Imm</strong></div></td> <td><div align="center"><strong>Timer uS</strong></div></td> </tr> <tr> <td><span style="font-size:85%;">Add A,</span><span style="font-size:85%;">[byte]</span></td> <td><span style="font-size:85%;">A=A+</span><span style="font-size:85%;">[byte]</span></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">1</span></div></td> </tr> <tr> <td><span style="font-size:85%;">Addc A,</span><span style="font-size:85%;">[byte]</span></td> <td><span style="font-size:85%;">A=A+<byte></byte></span><span style="font-size:85%;">[byte]</span><span style="font-size:85%;"><byte>+C</byte></span></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">1</span></div></td> </tr> <tr> <td><span style="font-size:85%;">Subb A,</span><span style="font-size:85%;">[byte]</span></td> <td><span style="font-size:85%;">A=A-</span><span style="font-size:85%;">[byte]</span><span style="font-size:85%;"><byte>-C</byte></span></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">1</span></div></td> </tr> <tr> <td><span style="font-size:85%;">Inc A</span></td> <td><span style="font-size:85%;">A=A+1</span></td> <td colspan="4"> <div align="center"><span style="font-size:85%;">Accumulator Only</span></div></td> <td><div align="center"><span style="font-size:85%;">1</span></div></td> </tr> <tr> <td><span style="font-size:85%;">Inc </span><span style="font-size:85%;">[byte]</span></td> <td><span style="font-size:85%;">[byte]</span><span style="font-size:85%;"><byt>=<byt></byt></byt></span><span style="font-size:85%;">[byte]</span><span style="font-size:85%;"><byt><byt>+1</byt></byt></span></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><br /></td> <td><div align="center"><span style="font-size:85%;">1</span></div></td> </tr> <tr> <td><span style="font-size:85%;">Inc DPTR</span></td> <td><span style="font-size:85%;">DPTR=DPTR+1</span></td> <td colspan="4"> <div align="center"><span style="font-size:85%;">Data Pointer Only</span></div></td> <td><div align="center"><span style="font-size:85%;">2</span></div></td> </tr> <tr> <td><span style="font-size:85%;">Dec A</span></td> <td><span style="font-size:85%;">A=A-1</span></td> <td colspan="4"> <div align="center"><span style="font-size:85%;">Accumulator Only</span></div></td> <td><div align="center"><span style="font-size:85%;">1</span></div></td> </tr> <tr> <td><span style="font-size:85%;">Dec </span><span style="font-size:85%;">[byte]</span></td> <td><span style="font-size:85%;">[byte]</span><span style="font-size:85%;"><byt>=</byt></span><span style="font-size:85%;">[byte]</span><span style="font-size:85%;"><byt><byt>-1</byt></byt></span></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><br /></td> <td><div align="center"><span style="font-size:85%;">1</span></div></td> </tr> <tr> <td><span style="font-size:85%;">Mul AB</span></td> <td><span style="font-size:85%;">B:A=BxA</span></td> <td colspan="4"><div align="center"><span style="font-size:85%;">Accumulator and B Only</span></div> </td> <td><div align="center"><span style="font-size:85%;">4</span></div></td> </tr> <tr> <td height="26"><span style="font-size:85%;">Div AB</span></td> <td><p>A=Int[A/B]<br /> B=Mod[A/B]<br /> </p></td> <td colspan="4"><div align="center">Accumulator and B only</div> </td> <td><div align="center">4</div></td> </tr> <tr> <td>DA A</td> <td><span style="font-size:85%;">Dec Adjust</span></td> <td colspan="4"> <div align="center"><span style="font-size:100%;">Accumulator Only</span></div></td> <td><div align="center"><span style="font-size:85%;">1</span></div></td></tr></tbody></table>Logical Instructions<br />Table 1.4.2 shows the list of 80C51 logical instructions. The instructions that perform Boolean operations (AND, OR, Exclusive OR, NOT) on bytes perform the operation on a bit-by-bit basis. That is, if the Accumulator contains 00110101B and byte contains 01010011B, then:<br /><br />Table 1.4.2. MCS-51 Logical Instructions<br /><table border="1" width="100%"><tbody><tr><td rowspan="2" width="19%"><div align="center"><strong>Mnemonic</strong></div> </td> <td rowspan="2" width="23%"><div align="center"><strong>Operation</strong></div> </td> <td colspan="4"> <div align="center"><strong>Addressing Mode</strong></div></td> <td width="17%"><div align="center"><strong>Exect.</strong></div></td> </tr> <tr> <td width="9%"><div align="center"><strong>Dir</strong></div></td> <td width="10%"><div align="center"><strong>Ind</strong></div></td> <td width="10%"><div align="center"><strong>Reg</strong></div></td> <td width="12%"><div align="center"><strong>Imm</strong></div></td> <td><div align="center"><strong>Timer uS</strong></div></td> </tr> <tr> <td><span style="font-size:85%;">Anl A,</span><span style="font-size:85%;">[byte]</span></td> <td><span style="font-size:85%;">A=A and </span><span style="font-size:85%;">[byte]</span></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">1</span></div></td> </tr> <tr> <td><span style="font-size:85%;">Anl </span><span style="font-size:85%;">[byte]</span><span style="font-size:85%;"><byte>,A</byte></span></td> <td><span style="font-size:85%;">[byte]</span><span style="font-size:85%;"><byte>=</byte></span><span style="font-size:85%;">[byte]</span> <span style="font-size:85%;"><byte><byte>anl A</byte></byte></span></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">1</span></div></td> </tr> <tr> <td><span style="font-size:85%;">Anl</span><span style="font-size:85%;"> </span><span style="font-size:85%;">[byte]</span><span style="font-size:85%;"><byte>,#data</byte></span></td> <td><span style="font-size:85%;">[byte]</span><span style="font-size:85%;"><byte>=</byte></span><span style="font-size:85%;">[byte]</span> <span style="font-size:85%;"><byte><byte>and#data</byte></byte></span></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">1</span></div></td> </tr> <tr> <td><span style="font-size:85%;">Orl</span><span style="font-size:85%;"> A,</span><span style="font-size:85%;">[byte]</span></td> <td><span style="font-size:85%;">A=A or </span><span style="font-size:85%;">[byte]</span></td> <td colspan="4"> <div align="center"><span style="font-size:85%;">Accumulator Only</span></div></td> <td><div align="center"><span style="font-size:85%;">1</span></div></td> </tr> <tr> <td><span style="font-size:85%;">Orl </span><span style="font-size:85%;">[byte]</span><span style="font-size:85%;"> <byte>,A</byte></span></td> <td><span style="font-size:85%;">[byte]</span><span style="font-size:85%;"><byt>=</byt></span><span style="font-size:85%;">[byte]</span><span style="font-size:85%;"><byt><byt>orl A</byt></byt></span></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><br /></td> <td><div align="center"><span style="font-size:85%;">1</span></div></td> </tr> <tr> <td><span style="font-size:85%;">Orl </span><span style="font-size:85%;">[byte]</span><span style="font-size:85%;"><byte>,#data</byte></span></td> <td><span style="font-size:85%;">[byte]</span><span style="font-size:85%;"><byte>=</byte></span><span style="font-size:85%;">[byte]</span><span style="font-size:85%;"><byte><byte> or #data</byte></byte></span></td> <td colspan="4"> <div align="center"><span style="font-size:85%;">Data Pointer Only</span></div></td> <td><div align="center"><span style="font-size:85%;">2</span></div></td> </tr> <tr> <td>Xrl A,<span style="font-size:85%;">[byte]</span><byte></byte></td> <td><span style="font-size:85%;">A=A xor </span><span style="font-size:85%;">[byte]</span></td> <td colspan="4"> <div align="center"><span style="font-size:85%;">Accumulator Only</span></div></td> <td><div align="center"><span style="font-size:85%;">1</span></div></td> </tr> <tr> <td><span style="font-size:85%;">Xrl<byte> </byte></span><span style="font-size:85%;">[byte]</span><span style="font-size:85%;"><byte>,A</byte></span></td> <td><span style="font-size:85%;">[byte]</span><span style="font-size:85%;"><byt>=</byt></span><span style="font-size:85%;">[byte]</span> <span style="font-size:85%;"><byt><byt>xor A</byt></byt></span></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><div align="center"><span style="font-size:85%;">V</span></div></td> <td><br /></td> <td><div align="center"><span style="font-size:85%;">1</span></div></td> </tr> <tr> <td><span style="font-size:85%;">Xrl </span><span style="font-size:85%;">[byte]</span><span style="font-size:85%;"> <byte>,#data</byte></span></td> <td><span style="font-size:85%;">[byte]</span><span style="font-size:85%;"><byte>=</byte></span><span style="font-size:85%;">[byte]</span> <span style="font-size:85%;"><byte><byte>xor#data</byte></byte></span></td> <td colspan="4"><div align="center"><span style="font-size:85%;">Accumulator and B Only</span></div> </td> <td><div align="center"><span style="font-size:85%;">4</span></div></td> </tr> <tr> <td height="23">CLR A</td> <td><p>A=00h<br /> </p></td> <td colspan="4"><div align="center">Accumulator only</div></td> <td><div align="center">1</div></td> </tr> <tr> <td>CPL A</td> <td>A= not A</td> <td colspan="4"><div align="center">Accumulator only</div></td> <td><div align="center">1</div></td> </tr> <tr> <td>RL A</td> <td>Rotate A left 1 bit</td> <td colspan="4"><div align="center">Accumulator only</div></td> <td><div align="center">1</div></td> </tr> <tr> <td>RLC A</td> <td>Rotate A left trough Carry</td> <td colspan="4"><div align="center">Accumulator only</div></td> <td><div align="center">1</div></td> </tr> <tr> <td>RR A</td> <td>Rotate A right 1 bit</td> <td colspan="4"><div align="center">Accumulator only</div></td> <td><div align="center">1</div></td> </tr> <tr> <td>RRC</td> <td>Rotate A right trough carry</td> <td colspan="4"><div align="center">Accumulator only</div></td> <td><div align="center">1</div></td> </tr> <tr> <td>SWAP A</td> <td>Swap nibbles in A</td> <td colspan="4"><div align="center">Accumulator only</div></td> <td><div align="center">1</div></td></tr></tbody></table><br /></byte></byte>Aryantohttp://www.blogger.com/profile/18082049281071636850noreply@blogger.com0tag:blogger.com,1999:blog-6626872665054399212.post-39280059750526485562012-04-06T07:31:00.004+07:002012-04-06T07:37:43.972+07:00Addressing modes in the 80C51The addressing modes in the 80C51 instruction set are as follows:<br />An "addressing mode" refers to how you are addressing a given memory location. In summary, the addressing modes are as follows, with an example of each: <a name='more'></a><br /><blockquote> Immediate Addressing MOV A,#20h<br /> Direct Addressing MOV A,30h<br /> Indirect Addressing MOV A,@R0<br /> External Direct MOVX A,@DPTR<br /> Code Indirect MOVC A,@A+DPTR </blockquote>Immediate Addressing<br /><br />Immediate addressing is so-named because the value to be stored in memory immediately follows the operation code in memory. That is to say, the instruction itself dictates what value will be stored in memory.<br />For example, the instruction:<br /><blockquote>;Lesson 1.3.1<br />;===========================================<br />;This instruction uses Immediate Addressing because the<br />;Accumulator will be loaded with the value that immediately<br />;follows in this case 20 (hexidecimal).<br />;=========================================== <br /> org 0h<br />start:MOV A,#20h; put constant 20 into Acc<br /> end<br /><br />;Lesson 1.3.2<br /> org 0h<br />Start:MOV A, #0h;<br /> MOV A,#11h;<br /> MOV B,#27h;<br /> end<br />;<br />;Lesson 1.3.3<br /> Org 0h<br />Start:MOV 70h,#0h; put constant 0 into RAM 70h<br /> MOV 71h,#1h;<br /> MOV 72h,#2h;<br /> end<br /><br />;<br />;Lesson 1.3.4<br /> Org 0h<br />Start:MOV DPTR,#1234h;put constant 1234 into DPTR<br /> end<br />;<br />;Lesson 1.3.5<br /> Org 0h<br />Start:MOV PSW,#0; Select register bank 0<br /> MOV R0,#0; put 0 into register 0<br /> MOV R1,#1; put 1 into register 1<br /> MOV R2,#2; put 2 into register 2<br /> MOV R3,#3; put 3 into register 3<br /> MOV R4,#4; put 4 into register 4<br /> MOV R5,#5; put 5 into register 5<br /> MOV R6,#6; put 6 into register 6<br /> MOV R7,#7; put 7 into register 7<br /> end<br />;<br />;Lesson 1.3.6<br /> org 0h<br />Start:MOV PSW,#8; Select register bank 1<br /> MOV R0,#0; put 0 into register 0<br /> MOV R1,#1; put 1 into register 1<br /> MOV R2,#2; put 2 into register 2<br /> MOV R3,#3; put 3 into register 3<br /> MOV R4,#4; put 4 into register 4<br /> MOV R5,#5; put 5 into register 5<br /> MOV R6,#6; put 6 into register 6<br /> MOV R7,#7; put 7 into register 7<br /> end</blockquote>Immediate addressing is very fast since the value to be loaded is included in the instruction. However, since the value to be loaded is fixed at compile-time it is not very flexible.<br /><br />Direct Addressing<br /><br />Direct addressing is so-named because the value to be stored in memory is obtained by directly retrieving it from another memory location. For example:<br /><blockquote>;Lesson 1.3.7<br />;============================================<br />;This This instruction will read the data out of Internal<br />;RAM address 30 (hexidecimal) and store it in the<br />;Accumulator.<br />;============================================<br />;<br /> org 0h<br />Start:MOV A,30h;<br /> end<br />;<br />;Lesson 1.3.8<br /> Org 0h<br />Start:Mov 70h,#1;put constant 1 into RAM 70h<br /> Mov A, 70h;copy RAM 70 content into Acc<br /> Mov A,#0 ;put constant 0 into Acc<br /> Mov 90h,A ;copy Acc content into RAM 90h<br /> end<br />;<br />;Lesson 1.3.9<br /> Inbyte equ 70h<br /> Port1 equ 90h<br /> Org 0h<br />Start: Mov Inbyte,#3;put constant 3 into RAM 70h<br /> Mov A,Inbyte ;copy RAM 70h content into Acc<br /> Mov A,#0 ;Clear accumulator<br /> Mov Port1,A ;copy Acc content into RAM 90h<br /> end</blockquote><blockquote>;<br />Percobaan 2.5.3:<br /> Org 0h<br /> Mov DPTR,#Character<br />Start:Mov A, #0<br /> Inc DPTR<br /> Movc A, @A+DPTR<br /> Mov R0,A<br /> Sjmp Start<br />Character:<br />DB 0,1,2,3,4,5,6,7,8,9</blockquote>Direct addressing is generally fast since, although the value to be loaded isn’t included in the instruction, it is quickly accessable since it is stored in the 8051’s Internal RAM. It is also much more flexible than Immediate Addressing since the value to be loaded is whatever is found at the given address--which may be variable. Also, it is important to note that when using direct addressing any instruction which refers to an address between 00h and 7Fh is referring to Internal Memory. Any instruction which refers to an address between 80h and FFh is referring to the SFR control registers that control the 8051 microcontroller itself. The obvious question that may arise is, "If direct addressing an address from 80h through FFh refers to SFRs, how can I access the upper 128 bytes of Internal RAM that are available on the 8052?" The answer is: You can’t access them using direct addressing. As stated, if you directly refer to an address of 80h through FFh you will be referring to an SFR. However, you may access the 8052’s upper 128 bytes of RAM by using the next addressing mode, "indirect addressing."<br /><br />Indirect Addressing<br /><br />Indirect addressing is a very powerful addressing mode which in many cases provides an exceptional level of flexibility. Indirect addressing is also the only way to access the extra 128 bytes of Internal RAM found on an 8052.<br /><br />Indirect addressing appears as follows:<br /><blockquote> MOV A,@R0 </blockquote>This instruction causes the 8051 to analyze the value of the R0 register. The 8051 will then load the accumulator with the value from Internal RAM which is found at the address indicated by R0.<br />For example, let’s say R0 holds the value 40h and Internal RAM address 40h holds the value 67h. When the above instruction is executed the 8051 will check the value of R0. Since R0 holds 40h the 8051 will get the value out of Internal RAM address 40h (which holds 67h) and store it in the Accumulator. Thus, the Accumulator ends up holding 67h. Indirect addressing always refers to Internal RAM; it never refers to an SFR. Thus, in a prior example we mentioned that SFR 99h can be used to write a value to the serial port. Thus one may think that the following would be a valid solution to write the value ‘1’ to the serial port:<br /><blockquote>MOV R0,#99h ;<br />MOV @R0,#01h;</blockquote>This is not valid. Since indirect addressing always refers to Internal RAM these two instructions would write the value 01h to Internal RAM address 99h on an 8052. On an 8051 these two instructions would produce an undefined result since the 8051 only has 128 bytes of Internal RAM.<br /><blockquote>;Percobaan 2.5.1:<br /> Org 0h<br />Start:Mov PSW, #0 ; choose register bank 0<br /> Mov R0, #78h; put constant 78h into R0<br /> Mov @R0, #1 ; put contanta 1 into 78h<br /> end<br />;<br />;Percobaan 2.5.2:<br /> Org 0h<br />Start:Mov PSW,#0; pilih register bank 1<br /> Mov R0,90h; copy RAM 90h content into R0<br /> Mov @R0,#1; put constant 1 into 90h<br /> End<br />; <br /></blockquote>External Direct<br /><br />External Memory is accessed using a suite of instructions which use what I call "External Direct" addressing. I call it this because it appears to be direct addressing, but it is used to access external memory rather than internal memory.There are only two commands that use External Direct addressing mode:<br /> <blockquote>MOVX A,@DPTR<br /> MOVX @DPTR,A<br /></blockquote>As you can see, both commands utilize DPTR. In these instructions, DPTR must first be loaded with the address of external memory that you wish to read or write. Once DPTR holds the correct external memory address, the first command will move the contents of that external memory address into the Accumulator. The second command will do the opposite: it will allow you to write the value of the Accumulator to the external memory address pointed to by DPTR.<br /><br />External Indirect<br /><br />External memory can also be accessed using a form of indirect addressing which I call External Indirect addressing. This form of addressing is usually only used in relatively small projects that have a very small amount of external RAM. An example of this addressing mode is:<br /> <blockquote>MOVX @R0,A</blockquote>Once again, the value of R0 is first read and the value of the Accumulator is written to that address in External RAM. Since the value of @R0 can only be 00h through FFh the project would effectively be limited to 256 bytes of External RAM. There are relatively simple hardware/software tricks that can be implemented to access more than 256 bytes of memory using External Indirect addressing; however, it is usually easier to use External Direct addressing if your project has more than 256 bytes of External RAM.Aryantohttp://www.blogger.com/profile/18082049281071636850noreply@blogger.com0tag:blogger.com,1999:blog-6626872665054399212.post-56679774546637396632012-04-06T07:23:00.003+07:002012-04-06T07:28:51.468+07:00Special Function Register MicrocontrollerA Map of the on-chip memory area called the Special Function Register (SFR) space is shown in Figure 1.2.1. Note that in the SFRs not all of the addresses are occupied. Unoccupied addresses are not implemented on the chip. Read accesses to these addresses will in general return random data, and write accesses will have no effect. <a name='more'></a> User software should not write 1s to these unimplemented locations, since they may be used in other 80C51 Family derivative products to invoke new features. The functions of the SFRs are described in the text that follows.<br /><br /><img style="cursor:pointer; cursor:hand;width: 400px; height: 359px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhus2x5Xe93KXGsxvdYc-2eDAVy79nDroJl3yIeBiOE4sjRfj7wyYOBDqsAS_VLy4TlRkxr1jvCrpIhm27pD7kMJN9J4UH8XNFjuecL3CvKBwrNWgindZ9m01GUlfDABWWmvCIvrWh2y79x/s400/intro8.gif" alt="" id="BLOGGER_PHOTO_ID_5728077474290569778" border="0" /><br />Figure 1.2.1. MCS-51 SFR Memory Map<br /><br />Accumulator<br />ACC is the Accumulator register. The mnemonics for Accumulator-Specific instructions, however, refer to the Accumulator simply as A.<br /><br />B Register<br />The B register is used during multiply and divide operations. For other instructions it can be treated as another scratch pad register.<br /><br />Program Status Word<br />The PSW register contains program status information as detailed in Tabel 1.2.1<br /><br />Stack Pointer<br />The Stack Pointer register is 8 bits wide. It is incremented before data is stored during PUSH and CALL executions. While the stack may reside anywhere in on-chip RAM, the Stack Pointer is initialized to 07H after a reset. This causes the stack to begin at locations 08H.<br /><br />Data Pointer<br />The Data Pointer (DPTR) consists of a high byte (DPH) and a low byte (DPL). Its intended function is to hold a 16-bit address. It may be manipulated as a 16-bit register or as two independent 8-bit registers.<br /><br />Ports 0 to 3<br />P0, P1, P2, and P3 are the SFR latches of Ports 0, 1, 2, and 3, respectively. Writing a one to a bit of a port SFR (P0, P1, P2, or P3) causes the corresponding port output pin to switch high. Writing a zero causes the port output pin to switch low. When used as an input, the external state of a port pin will be held in the port SFR (i.e., if the external state of a pin is low, the corresponding port SFR bit will contain a 0; if it is high, the bit will contain a 1).<br /><br /><br />Serial Data Buffer<br />The Serial Buffer is actually two separate registers, a transmit buffer and a receive buffer. When data is moved to SBUF, it goes to the transmit buffer and is held for serial transmission. (Moving a byte to SBUF is what initiates the transmission.) When data is moved from SBUF, it comes from the receive buffer.<br /><br />Timer Registers<br />Register pairs (TH0, TL0), and (TH1, TL1) are the 16-bit Counting registers for Timer/Counters 0 and 1, respectively.<br /><br />Control Register<br />Special Function Registers IP, IE, TMOD, TCON, SCON, and PCON contain control and status bits for the interrupt system, the Timer/Counters, and the serial port. They are described in later sections.<br /><br />Table 1.2.1 Program Status Word<br /><table border="1" width="99%"><tbody><tr><td><div align="center">MSB</div></td> <td colspan="6"><br /></td> <td><div align="center">LSB</div></td> </tr> <tr> <td><div align="center">CY</div></td> <td><div align="center">AC</div></td> <td><div align="center">F0</div></td> <td><div align="center">RS1</div></td> <td><div align="center">RS0</div></td> <td><div align="center">OV</div></td> <td><div align="center">-</div></td> <td><div align="center">P</div></td> </tr> </tbody></table> <p> </p> <table border="1" width="99%"><tbody><tr> <td width="14%"><div align="center"><strong>BIT</strong></div></td> <td width="17%"><div align="center"><strong>SYMBOL</strong></div></td> <td width="69%"><div align="center"><strong>FUNCTION</strong></div></td> </tr> <tr> <td><div align="center">PSW.7</div></td> <td><div align="center">CY</div></td> <td>Carry flag.</td> </tr> <tr> <td><div align="center">PSW.6</div></td> <td><div align="center">AC</div></td> <td>Auxilliary Carry flag. (For BCD operations.)</td> </tr> <tr> <td><div align="center">PSW.5</div></td> <td><div align="center">F0</div></td> <td>Flag 0. (Available to the user for general purposes.)</td> </tr> <tr> <td><div align="center">PSW.4</div></td> <td><div align="center">RS1</div></td> <td><div align="justify">Register bank select control bit 1.<br /> Set/cleared by software to determine working register bank. (See Note.)</div></td> </tr> <tr> <td><div align="center">PSW.3</div></td> <td><div align="center">RS0</div></td> <td><div align="justify">Register bank select control bit 0.<br /> Set/cleared by software todetermine working register bank. (See Note.)</div></td> </tr> <tr> <td><div align="center">PSW.2</div></td> <td><div align="center">OV</div></td> <td>Overflow flag.</td> </tr> <tr> <td><div align="center">PSW.1</div></td> <td><div align="center">-</div></td> <td>User-definable flag.</td> </tr> <tr> <td><div align="center">PSW.0</div></td> <td><div align="center">P</div></td> <td><div align="justify">Parity flag.<br /> Set/cleared by hardware each instruction cycle to indicate an odd/even number of “one” bits in the Accumulator, i.e., even parity.</div></td></tr></tbody></table><br />Program Status Word<br />The Program Status Word (PSW) contains several status bits that reflect the current state of the CPU. The PSW, shown in Figure 10, resides in the SFR space. It contains the Carry bit, the Auxiliary Carry (for BCD operations), the two register bank select bits, the Overflow flag, a Parity bit, and two user-definable status flags. The Carry bit, other than serving the function of a Carry bit in arithmetic operations, also serves as the “Accumulator” for a number of Boolean operations.<br /><br />The bits RS0 and RS1 are used to select one of the four register banks shown in Figure 1.7. A number of instructions refer to these RAM locations as R0 through R7. The selection of which of the four is being referred to is made on the basis of the RS0 and RS1 at execution time.<br /><br />The Parity bit reflects the number of 1s in the Accumulator: P = 1 if the Accumulator contains an odd number of 1s, and P = 0 if the Accumulator contains an even number of 1s. Thus the number of 1s in the Accumulator plus P is always even. Two bits in the PSW are uncommitted and may be used as general purpose status flags.Aryantohttp://www.blogger.com/profile/18082049281071636850noreply@blogger.com0tag:blogger.com,1999:blog-6626872665054399212.post-63272902626253093042012-04-06T07:07:00.008+07:002012-04-06T07:22:12.361+07:00Microcontroller MCS-51 ArchitectureMemory Organization<br /><br />All 80C51 devices have separate address spaces for program and data memory, as shown in Figures 1.1.1 and 1.1.2. The logical separation of program and data memory allows the data memory to be accessed by 8-bit addresses, which can be quickly stored and <a name='more'></a> manipulated by an 8-bit CPU. Nevertheless, 16-bit data memory addresses can also be generated through the DPTR register. Program memory (ROM, EPROM) can only be read, not written to. There can be up to 64k bytes of program memory. In the 89s51, the lowest 4k bytes of program are on-chip. In the ROMless versions, all program memory is external. The read strobe for external program memory is the PSEN (program store enable).<br /><img style="cursor:pointer; cursor:hand;width: 400px; height: 298px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8QOhDMmTZiSIbs6IElNP4lDkKsLpgnfJLKQOuAQ9V2SRUlPEuThD1CWXuN0FFaJphoBE074QB7mqdVNZPKGLkDL6oHJ80HEIhBYbDpc2PhKsBaMcOW_D1K6SgIrNwqpsurSDgcA4sLq1F/s400/intro1.gif" alt="" id="BLOGGER_PHOTO_ID_5728073699205601042" border="0" /><br />Figure 1.1.1 89s51 Block Diagram<br />Data Memory (RAM) occupies a separate address space from Program Memory. In the 80C51, the lowest 128 bytes of data memory are on-chip. Up to 64k bytes of external RAM can be addressed in the external Data Memory space. In the ROMless version, the lowest 128 bytes are on-chip. The CPU generates read and write signals, RD and WR, as needed during external Data<br />Memory accesses. External Program Memory and external Data Memory may be combined if desired by applying the RD and PSEN signals to the inputs of an AND gate and using the output of the gate as the read strobe to the external Program/Data memory.<br /><br />Program Memory<br />Figure 1.1.4 shows a map of the lower part of the Program Memory. After reset, the CPU begins execution from location 0000H. As shown in Figure 1.1.4, each interrupt is assigned a fixed location in Program Memory. The interrupt causes the CPU to jump to that location, where it commences execution of the service routine. External Interrupt 0, for example, is assigned to location 0003H. If External Interrupt 0 is going to be used, its service routine must begin at location 0003H. If the interrupt is not going to be used, its service location is available as general purpose Program Memory.<br /><br /><img style="cursor:pointer; cursor:hand;width: 236px; height: 281px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBBri-dKWZhteWhpsKfODDKH27SzHhuM2Hw7H4T39rw-ch2O1ycSg7qswNMpV_ZzdAmeHsCZHMGqatEK6R_22LxJbDsseDMnv_f2yPHrMN583gIhklglyyapQXQ7v9NxoZdoxrbjNhQ7tB/s400/intro2.gif" alt="" id="BLOGGER_PHOTO_ID_5728074225922801282" border="0" /><br />Figure 1.1.2. Memory Program Structure<br /><br /><img style="cursor:pointer; cursor:hand;width: 228px; height: 188px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQ2_AB3f1YQozMPyX3o-ofi4wy2kk9VajkoWCX6x9Siw1gOzZbZ18r6eWBVZ94pzJ8dYpBgo4Rd1i6XD8wsWQNqnt2y7Qp7A9JqVnO6kDa_Nz-kd1fZptRU1t0dkJvrE6h52JaYUj5NxT-/s400/intro4.gif" alt="" id="BLOGGER_PHOTO_ID_5728074458084118594" border="0" /><br />Figure 1.1.3. Interrupt Location<br /><br />Data Memory<br />The right half of Figure 1.4 shows the internal and external Data Memory spaces available to the 80C51 user.The CPU generates RD and WR signals as needed during external RAM accesses. Internal Data Memory is mapped in Figure1.5. The memory space is shown divided into three blocks, which are generally referred to as the Lower 128, the Upper 128, and SFR space.<br /><br /><img style="cursor:pointer; cursor:hand;width: 236px; height: 285px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfYdyd8FZMaOPeIllqjhW59F9zWDP1ykkNvJFkDcSrsaNL10i1hKgBw1dU2vkpnppsBfP1jHOEZWo92dfDPpz1mVr0EKzJyjjL451SN75oRbKUW3cIpB_7AIKkRAUONOcnB-CesIlA-ZwG/s400/intro3.gif" alt="" id="BLOGGER_PHOTO_ID_5728074954595835554" border="0" /><br />Figure 1.1.4. Memory Data Structure<br /><br />Internal Data Memory addresses are always one byte wide, which implies an address space of only 256 bytes. However, the addressing modes for internal RAM can in fact accommodate 384 bytes, using a simple trick. Direct addresses higher than 7FH access one memory space, and indirect addresses higher than 7FH access a different memory space. Thus Figure 1.1.5. shows the Upper 128 and SFR space occupying the same block of addresses, 80H through FFH, although they are physically separate entities.<br /><br /><img style="cursor:pointer; cursor:hand;width: 289px; height: 251px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8cfUogAd8gq35NCHCzT_42riYtvOPDxYzzhsS5_i0SjVL49noMIaLRfEyarqnk16DXY_-x1H0UPDpXYLvdxGLOP5YRO4e1ECpRRs7aLyRhmZkZMsDByp0IlZpZVCx09zXsHAe91240bkP/s400/intro5.gif" alt="" id="BLOGGER_PHOTO_ID_5728075264782461202" border="0" /><br /><br />Figure 1.5. Internal Data Memory<br /><br />The Lower 128 bytes of RAM are present in all 80C51 devices as mapped in Figure 1.1.6. The lowest 32 bytes are grouped into 4 banks of 8 registers. Program instructions call out these registers as R0 through R7. Two bits in the Program Status Word (PSW) select which register bank is in use. This allows more efficient use of code space, since register instructions are shorter than instructions that use direct addressing.<br /><br /><img style="cursor:pointer; cursor:hand;width: 388px; height: 329px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEUDkS6hzmMejHxpGZ3t2tBgfXr0IpXpi6teGAbLtinW1cbLakh2LRzy0T_o-NRsgaaSt1F8iuWJpIyjj8g1bQ_ZiXSrS73or68mfS28io-rnmppOC5XGsPDeHUb6Q6cIyzCNObS4d6mi0/s400/intro6.gif" alt="" id="BLOGGER_PHOTO_ID_5728075891019814162" border="0" /><br />Figure 1.1.6. Lower 128 bytes of internal RAM<br /><br />All of the bytes in the Lower 128 can be accessed by either direct or indirect addressing. The Upper 128 (Figure 1.1.7) can only be accessed by indirect addressing.<br /><br /><img style="cursor:pointer; cursor:hand;width: 172px; height: 232px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEia9VorvnYJVRDXye4ZxOH1gG4KyKdMRnZAPrirGS5lSpb0BmO3icggQPoX8QAUwFEMqy1MtfW4UoHuy1LXz1PZWWjYW5gHVl5lrPHGH5pqYSghO9aLNwYZMXShEYUpJSTFSuzmfEd5ZcDs/s400/intro7.gif" alt="" id="BLOGGER_PHOTO_ID_5728076225107712546" border="0" /><br />Figure 1.1.7.Upper 128 Bytes of Internal RAMAryantohttp://www.blogger.com/profile/18082049281071636850noreply@blogger.com0tag:blogger.com,1999:blog-6626872665054399212.post-50294249612664010732009-02-11T05:28:00.007+07:002010-07-04T12:34:28.199+07:005-BAND GRAPHIC EQUALISERBy <a href="http://master-digital.net78.net/">aRie eMDee</a><br />This equaliser uses low-cost op-amps. Good-quality opamps powered by a single voltage supply are readily available in the market. The op-amp should have a noise density of less than 24nV/√Hz, slew rate of more than 5V/µs and gainbandwidth product greater than 3MHz. The NE5532 or LM833 used in this circuit meets these requirements. Equaliser circuits typically divide the audio spectrum into separate frequency bands and have independent gain control for each band. <a name='more'></a><br /><br />The output of each band is mixed at IC4(A) and then fed to an audio power amplifier.Proper quality factor (Q) needs to be selected to avoid overlap in adjacent bands as this introduces<br />colouration into the audio signal.<br /><br />We have used the multiple-feedback bandpass filter topology shown in left-most corner at the bottom of the figure. This is a circuit for single-channel<br />bandpass filter. If the capacitors are<br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.ziddu.com/downloadlink/3479745/5-BANDGRAPHICEQUALISER.PDF"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 366px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2Jh7ihOTSdoRzxSiNFpvKwgVwqveCDh1bMwaDXPB6Z_B_A9KAYR-nrW1UUT9pL2MhyWgNob1WQp-ARH2be-02XvfJwO3bRoDIre3u_ppaLcexFMqkGAOwIHmPr4sM1a_ADL_na21Wmu8t/s400/eQualiser.GIF" alt="DownLoad Equaliser Scematic" id="BLOGGER_PHOTO_ID_5301300286440573042" border="0" /></a><a href="http://www.ziddu.com/downloadlink/3479745/5-BANDGRAPHICEQUALISER.PDF"> Download MOdul Equaliser</a><br /></div><br />of the same value, the calculations are fairly simple. For calculating the component values, use the following formulae:<br />Centre frequency (fo) : 1/2πC√(Ra||Rb)Rc<br />Bandwidth (B) : 1/πCRc<br />Quality factor (Q) : fo/B = πfoCRc<br />Gain (A) : –Rc/2Ra<br />These can be combined to give the<br />following formulae:<br />Ra = Q/2πfoAC<br />Rb = Q/2πfoC (2Q2–A)<br />Rc = Q/πfoC<br />Begin the calculations by choosing a large value of capacitance (~0.1F) and smaller value of resistances. Increasing the capacitance decreases resistances (Ra, Rb and Rc). Care must be taken to avoid overloading on the input buffer op-amp. Note that stray capacitances<br />on the board reduces the value of ‘C.’ The bandwidth and gain do not depend on Rb. Hence, Rb can be used to modify the mid-frequency without affecting the bandwidth and gain.<br /><br />For equalisers, there are standard mid-frequencies that are normally used. The exact frequencies depend on the octave division, application and some degree of manufacturers’ preference, but nearly all share the basic octave boundaries that are based on a centre frequency of 1000 Hz.<br /><br />A balance between the number of filters and bandwidth need to be observed.It is possible to use a wider bandwidth and fewer filters, or narrower bandwidth and more filters. Anything narrower than 1/3 octave is rare, since the complexity of the filters increases for higher values of ‘Q.’ This can get rather expensive and in reality is of limited use for most applications in audio systems.<br /><br />National Semiconductor lists the following mid-frequencies for a 10-band graphic equaliser: 32,64, 125, 250,500, 1k, 2k, 4k, 8k and 16k. It also recommends a ‘Q’ of 1.7 for equalisers.<br />The table lists the component values for different centre frequencies of the equaliser. We used ‘Q’ of 1.7 and gain (A) of 4.The circuit for the 5-band equaliser uses IC1 (A) LM833 as the buffer stage for the equaliser. It is a non-inverting amplifier with a gain of ‘2.’ The input signal is divided by ‘2’ by the resistive network comprising R3 and R4. Hence the net gain of this amplifier is unity.<br /><br />Two 100k resistors (R1 and R2) are used as a voltage divider and the junction voltage is fed to its positive input through R6. This divider has enough power to feed all other op-amps directly. Resistor Ro (R8=R12=R16=R20=R24=R28=R30=100Ω) has the dual function of noise reduction<br />and resistive isolation of capacitive load. It may be varied between 50 and 150 ohms depending on the noise in the circuit.<br /><br />The potmeters (VR1 through VR5) are in the signal path and hence should be of the best quality possible. Wrap the body of the pots with bare copper wire and solder the other end of the wire to ground. Since the filters are very sensitive, all resistances should be metal-film type and the capacitors should be polyester type.<br /><br />Each stage of the op-amp needs to be capacitively coupled to the next stage so that the DC does not get propagated and amplified. For a good low-frequency response, this coupling capacitor should be greater than 1 µF.<br /><br />A 10µF, 16V capacitor is used in each stage of the circuit here. The circuit is powered by a 12V<br />DC regulated supply. A well-regulated supply using 7812 is recommended. Ground the Vcc pin of each op-amp with a 0.1µF ceramic disk capacitor to bypass the noise.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.ziddu.com/downloadlink/3479745/5-BANDGRAPHICEQUALISER.PDF"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 152px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2EPyG1AXP1sCryb7Ksw9Xy-MSsaZ5Y37iyF_PDm0CV_6qcOtEiZMeYGRCYvbar6t_1F3Oary1j7fIBZFFL_IoJH1TCkjZahC5PgqmckcJ5WB6dThU3uK3q2KV_8IcWHJT4AtLN3QC7Uf8/s400/Componen-equa.JPG" alt="Componen Equaliser" id="BLOGGER_PHOTO_ID_5301304960741977090" border="0" /></a>Aryantohttp://www.blogger.com/profile/18082049281071636850noreply@blogger.com0tag:blogger.com,1999:blog-6626872665054399212.post-9388202503463706032009-01-23T21:14:00.003+07:002010-07-04T12:37:09.398+07:00A Cmos 4060 Burglar AlarmCircuit: <a href="http://www.blogger.com/profile/18082049281071636850">Aryanto</a><br /><br />Description:<br />This is a single zone alarm - with automatic exit, entry and siren cut-off timers. It will accommodate all the usual types of normally-closed input devices - such as magnetic-reed contacts - foil tape - PIRs etc. <a name='more'></a><br /><br />When the alarm is activated - the siren will sound for a fixed length of time. Then it will switch off - and remain off. The alarm will not re-activate.<br /><br />I've used a 12-volt supply in the drawing - but the circuit will work at anything from 5 to 15-volts. All you need do is select a siren, buzzer, and relay to suit the voltage you're using.<br />Schematic Diagram:<br /><span style="display: block;" id="formatbar_Buttons"><span class="on" style="display: block;" id="formatbar_Add_Image" title="Tambah Gambar" onmouseover="ButtonHoverOn(this);" onmouseout="ButtonHoverOff(this);" onmouseup="addImage();" onmousedown="CheckFormatting(event);;ButtonMouseDown(this);"></span></span><br /><a href="http://emdee.jw.lt/picturescematics/Cmos4060alarm.JPG"><img fix="fixed" title="cmos4060alarm" src="http://emdee.jw.lt/picturescematics/Cmos4060alarm.JPG" alt="" width="300" height="217" /></a><br /><br />Notes:<br />When you switch the alarm on - the buzzer will sound eight times. This is the exit delay. Before the end of the eighth beep - you can leave the building without activating the alarm.<br /><br />R6 controls the length and speed of the beeps. It can be adjusted to give an exit delay of anything from about ten seconds - up to about a minute. After the eighth beep - the buzzer should stop sounding. This confirms that the loop has been restored within the time allowed.<br /><br />If the buzzer does not stop - but changes instead to a continuous beep - the loop is open and the building isn't secure. When this happens - you should switch off the alarm - and check for open doors, windows etc.<br /><br />When you return and open the door - the buzzer will sound again - and the entry delay will start. The entry delay is the same length as the exit delay. But to distinguish it from the exit delay - the buzzer will sound continuously.<br /><br />If the buzzer is sounding continuously - the alarm has been activated - and the entry delay has begun. If you don't switch the alarm off before the entry delay expires - the siren will sound.<br /><br />The siren will sound only once. Just as R6 sets the lengths of the exit and entry delays - it also sets the siren cutoff time. The siren cut-off delay is 30 times the length of the exit delay. With the exit delay set at 30-seconds - the siren will sound for about 15-minutes. Then it will switch off - and remain off.<br /><br />Of course - you can stop the noise at any time by switching off the alarm.<br /><br />After the cut-off timer has switched the siren off - the buzzer will continue to sound. So when you return - if the buzzer is sounding - you'll know that the alarm has been activated.<br /><br />Note that D10 is optional. Its job is to sound the buzzer constantly during the entry delay. It's also responsible for keeping the buzzer going after the siren has stopped.<br /><br />If you leave out D10 - the buzzer will beep eight times during both the exit and entry delays. And - when the siren cuts-off - the buzzer will cut off also.<br /><br />Alternative Capacitor:<br /><br />A regular electrolytic capacitor is polarised. If the charge on its plates is the wrong way round - DC current will flow through the capacitor. If the current is high enough - the capacitor will heat up and explode. The presence of R5 in the circuit means that this is not going to happen. But if you use a polarised capacitor - it may mean that the oscillator won't run - or won't run reliably.<br /><br />While the oscillator is running - the polarity of the charge on C4 keeps reversing. So C4 needs to be nonpolarised. However - you can simulate a non-polarised 10uF capacitor by connecting two 22uF polarised capacitors back to back - as shown.<br /><br />How and why this works is explained in the Support Material - which also includes a photograph of the prototype<br />- a detailed circuit description - a parts list - a step-by-step guide to construction - and more.<br /><br />Because non-polarised capacitors aren't widely available - the prototype was built using two polarised capacitors.<br />Veroboard Layout:<br /><br /><a href="http://emdee.jw.lt/picturescematics/Cmos4060alarm2.JPG"><img fix="fixed" title="Cmos4060alarm2" src="http://emdee.jw.lt/picturescematics/Cmos4060alarm2.JPG" alt="" width="300" height="216" /></a><br /><br /><a href="http://master-digitals.blogspot.com/2009/01/download-scematic-diagram.html"><img fix="fixed" style="cursor: pointer; width: 176px; height: 57px;" src="http://i29.tinypic.com/34zcd5e.jpg" alt="Download Now" id="BLOGGER_PHOTO_ID_5375761926607181426" border="0" /></a><br /><br />To add a normally open loop contact, <a href="http://www.blogger.com/profile/18082049281071636850">aryanto</a> +628562501188 on aRie web siteAryantohttp://www.blogger.com/profile/18082049281071636850noreply@blogger.com2tag:blogger.com,1999:blog-6626872665054399212.post-79636270238417697372009-01-21T21:05:00.002+07:002010-07-04T12:40:39.600+07:00Direct-to-Home TV: All channels without a cableDTH services will bring an era of competition for cable TV operators and force them to improve quality. Users will have access to high quality programming on pay channels while persons in far-flung areas where cable operators are yet to reach will be able to use the dish antennas for receiving channels. <a name='more'></a><br /><br />After a long pause, the Union Cabinet (government of India) has finally approved the much-awaited DTH (Direct-to-Home) broadcasting service. The service will become a reality in India in coming months. Without going deep into the notification issued by the government, let us answer the queries that may have popped up in your mind.<br /><br />Q. What exactly is DTH?<br /><br />A. DTH (direct-to-home) basically is a distribution platform for multichannel TV programmes on Ku (high frequency of 11.7 to 14.55 Gigahertz) band by using a satellite system that will be transmits directly to subscriber premises.<br /><br />Q. What is the difference between Ku-band and the present form of cable transmission in India?<br /><br />A. The basic difference between Ku-band and the present C-band transmission (3.4 to 6.65 GHz.) lies in the fact that Ku-band signals require a very small dish antenna of 30 to 48 cm (12 to 18 inch) diameter while lower C-band requires a large dish antenna of 2.4-to 4.9 metre (8 to 16 feet) diameter. The Ku-band DTH service offers greater and direct connectivity to the viewer providing over 100 channels through a small dish antenna, doing away with intermediaries like cable operators. Moreover, this will have a better control over the revenue.<br /><br />Q. What is the USP (unique selling point) of the service?<br /><br />A. The subscribers can directly receive and view an array of channels available globally, doing away with intermediate cable-operators.<br /><br />Q. Is the direct-to-home broadcasting legal in India?<br /><br />A. After the removal of the existing three-year ban DTH broadcasting has been made legal from November 3, 2000 in India. The government has approved the service, reversing the 1997 prohibition of instituting measures for regulation of content and prevent monopoly.<br /><br />Q. What will be the cost for an end-user?<br /><br />A. The users will not have to pay much to view channels of their interest. A nominal investment of approximately Rs25,000 will link them to the multi-channel platform. This will include a pizza-sized 30 to 48 cm (12 to 18 inch) dish antenna for Rs.10,000 along with the TV set-top box, a digital decoder, for Rs. I5,000. Users will be provided with 'channel cards' which will act as pre-paid debit cards.<br /><br />Q. What amount a subscriber will have to pay for the service?<br /><br />A. All channels will be 'pay' channels and the subscriber will have to pay the fee to the service provider. Since DTH is now legal in India, the companies will recover the cost from the revenue accumulated via the 'channel cards'.<br /><br />Q. What is the entry fee for DTH?<br /><br />A. The applicants are bound to pay an initial deposit of Rs. 100 million beside Rs. 400 million as the bank guarantee for a licence from the government to provide DTH service. Out of this a minimum of ten percent of the total revenue collected by the platform owner will be shared with the government.<br /><br />Q. Do we have the same investment policy for the foreign applicants?<br /><br />A. Foreign investment in DTH companies has been capped at 49 per cent, which includes 20 per cent foreign direct investment. NRIs, FIIs and OCBs can invest up to 29 per cent. Broadcast and cable companies cannot own more than 20 per cent equity.<br /><br />Q. What are the other terms and conditions that need to be followed?<br /><br />A. The licencee will have to establish the uplink Earth Station in India within 12 months of issue of licence. It is mandatory for all the DTH service providers to get registered under the Indian Company Act (ICA) and the Indian Management Control (IMC) with majority representatives from the Indian board. The CEO should be an Indian resident. The companies will have to preserve the recordings for at least 90 days so that any complaint filed could be checked out.<br /><br />Q. How many and for how long will the licence be issued?<br /><br />A. At present there exists no restriction on the number of licences issued by the I&B (Information and Broadcasting) ministry for a period of ten years. Thus the licence issued will need to be renewed only after ten years from its issue date.<br /><br />Q. Who all will be the DTH broadcasters?<br /><br />A. From the current indications it appears that other than Doordarshan the other TV broadcasters such as Star TV, Zee TV, ESPN etc., are keen to join the direct-to-home bandwagon. But this will be subject to the regulatory supervision on the account of security concerns.<br /><br />Q. What will happen if a broadcaster violates DTH notification?<br /><br />A. In case of violation of rules, apart from the cancellation of licence issued the company will have to shell out a penalty of Rs. 500 million.<br /><br />Q. What is the future of the DTH broadcasting in India?<br /><br />A. Its too premature to comment on the conditions prevailing but it is true that DTH is definitely a step towards convergence. DTH has definitely got more power than Pokhran.Aryantohttp://www.blogger.com/profile/18082049281071636850noreply@blogger.com0tag:blogger.com,1999:blog-6626872665054399212.post-78636767944138107092009-01-20T05:33:00.001+07:002010-07-04T12:42:40.027+07:00Direct to home tv Enjoy more channels with better quality!<span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:x-small;" ><strong><span style="color: rgb(130, 135, 157);">The recently approved direct-to-home (DTH) TV obviates the requirement of cable-wallahs and enables viewers to access error-free programmes with better picture- and audio-quality</span></strong></span> <a name='more'></a><br /><br /><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:xx-small;" >The union cabinet has finally ap- proved direct-to-home (DTH) TV broadcasting, about three years after enthusiastic Indian TV viewers were tantalised by the prospect of access to hundreds of global channels.</span><br /><br /><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:xx-small;" >DTH is a concept whereby high-density TV signals in the Ku band from the satellite are beamed directly to the home of the viewer, obviating the need of a cable operator. Using 30cm to 46cm diameter small dish antennae and TV set-top boxes, subscribers are able to decode channels and view a plethora of programmes. Users are provided with channel cards that are essentially prepaid debit cards.</span><br /><br /><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:xx-small;" >The price of set-top box and antenna varies from Rs 10,000 to Rs 25,000. However, the actual cost to a subscriber can be lower. In the countries where DTH is legal, satellite channels sell the system at a subsidised price to the consumers. Service providers recover their costs through the subscription fee that accrues to them from the sales of channel cards. The DTH operator offers a bouquet of channels, once the subscriber purchases the SIM card.</span><br /><br /><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:xx-small;" >The elite class in the metropolitan cities is on the upbeat mode. Their kids would now be able to watch more Cartoon and Discovery type channels in English. Foreign diplomats, businessmen, and MNCs can watch channels of their choice in their own language. Users will have direct access to high-quality programmes on pay channels such as Star Movies. People in far flung areas,where cable operators are yet to provide the service, can use dish antennae for receiving channels. DTH can also provide satellite-based radio services.<br /><br /></span><div style="text-align: center;"><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:xx-small;" ><a href="http://emdee.jw.lt/picturescematics/DTH.jpg"><img fix="fixed" title="DTH" src="http://emdee.jw.lt/picturescematics/DTH.jpg" alt="" width="300" height="205" /></a></span><br /></div><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:xx-small;" ></span><p style="text-align: center;"></p><p style="text-align: center;">Regulatory issues</p><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:xx-small;" >The government has allowed DTH with certain safeguards. DTH players will have to beam from the home soil through earth stations within the country and adhere to the laid down programme and advertisement codes. The CEO and a majority of directors of DTH companies would have to be resident Indians. To obviate creation of monopolies, existing broadcasting companies and cable network owners are restricted to 20 per cent share in DTH ventures.</span><br /><br /><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:xx-small;" >The companies will have to furnish an initial deposit of Rs 100 million and Rs 400 million as bank guarantee for the 10-year licence period. At least 10 per cent of the revenue generated will have to be shared with the government. There is a 49 per cent limit on foreign equity. Of this, up to 20 per cent is to be foreign direct investment (FDI) and the balance from institutional investors, overseas corporates, and NRI investments.</span><br /><br /><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:xx-small;" >DTH operators are allowed to set up the satellite earth station only on Indian soil. The earth station will act as the nerve centre for receiving and distributing signals from the satellites. It will enable government agencies to monitor the programme content to ensure that it conforms to the country’s parameters of security and decency. “No porn channels or tobacco/liquor ads” is the first rule of DTH in India.<br /></span><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:xx-small;" >Content will have to pass through the common encryption and conditional access system located within the earth station. DTH operators will provide access to all facilities, including equipment, records, and systems, to government agencies. They will provide access to all content providers and channels on a non-discriminatory basis, but shall not carry prohibited channels.</span><br /><br /><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:xx-small;" >The DTH is barred from being used for other means of communication, such as voice, fax, and data. In other words, DTH operators will not be able to provide the Internet and voice communication services, as of now. They are bound to carry all channels of Prasar Bharti on the most favoured financial terms extended to other channels.</span><br /><div><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:x-small;" ><strong> Pros and cons</strong></span></div><br /><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:xx-small;" >Many cable subscribers are unhappy with the erratic cable TV services that keep on shifting the channels, at the expense of other channels, without any prior notification. Archiac hardware, cable wires, poor-quality reception, electrical disturbances, etc are irritating. DTH obviates the requirement of cable-wallahs altogether and enables viewers to access error-free programmes with better picture- and audio-quality. It allows the broadcasters to tap homes in rural and remote uncabled areas. One can choose from as many as 300 to 800 channels.</span><br /><br /><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:xx-small;" >Pay channels will have direct and better control over revenues. Broadcasters, particularly of pay channels, feel that cable operators misrepresent the number of actual subscribers, resulting in revenue leaks. Pay channels can now monitor how many homes are watching their channels, and collect their revenue accordingly. DTH enables people with niche interests to view channels that are normally not available with the cable operators.</span><br /><br /><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:xx-small;" >Because of the high investment of Rs 10,000 to Rs 25,000 for pizza-sized satellite-dish and digital decoder, along with monthly fee of about Rs 1,000, this service may not be affordable for most of the existing cable homes. But, if one pays the premium, one is the recipient of better picture quality with a wider choice.<br /></span><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:xx-small;" >DTH also promises to benefit hardware manufacturers as increase in subscriber base would lead to increase in demand and supply of DTH components.</span><br /><br /><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:xx-small;" >Cable operators claim that they can also provide the Internet, interactive facilities on TV, and video-on-demand. But subscribers cannot call up the DTH providers and ask them to repeat their favourite Bollywood blockbusters on TV.</span><br /><br /><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:xx-small;" >Technically, the only drawback to DTH is the effect caused by the various modes of interference like rain, sun, adjacent satellites, and terrestrial interference. Moisture blocks signals and also absorbs some of them. Sun spots, the magnetic storm on the sun’s surface, can directly affect satellites placed outside the ionsphere. Users need a clear and unobstructed view of the satellite, and the dish must be aligned accurately.</span><br /><br /><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:xx-small;" >Commercial viability and the tremendous expense involved for both service providers as well as subscribers are the other major deterrents to DTH.</span><br /><div><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:x-small;" ><strong>Enabling innovations</strong></span></div><br /><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:xx-small;" >The idea to launch satellites for direct diffusion of TV programmes to ordinary people appeared economically realisable at the beginning of the 1970s. WARC (World Administration Radiocomm-unication Conference) defined the frequency bands, transponder power, and polarisation to be used, and allocated orbital positions, channels, and EIRP contours to each of the participating countries. The attributed frequency band (11.700 to 12.500 GHz), known as the direct broadcast satellite (DBS) band, was chosen, since it allows well delimited service areas with relatively small transmission antennae of less than 3m diameter on the satellite and does not suffer too much from meteorological conditions.</span><br /><br /><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:xx-small;" >The specifications of DTH TV satellites have evolved considerably since then. The reception heads, the LNBs (low-noise boosters), have made enormous progress, with average noise fac</span><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:xx-small;" >tors in the range of 1.5 to 1.8 dB in 1990 and 0.8 to 1.1 dB in 1998, compared to 3 to 5 dB in 1977. This ensures the same service area with much smaller transmission power (50 to 100W instead of 200W) at identical or smaller antenna dimensions.</span><br /><br /><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:xx-small;" >The increase in useful load of the satellite-launching rockets allowed an important increase in the total electrical power available, which, coupled with the satellite transponder power reduction, allowed the number of transponders per satellite to be increased by a factor of four. These satellites now have sufficient electrical autonomy to ensure an uninterrupted and normal service during equinox solar eclipses. The lifetime of satellites has doubled, approximately to 15 years, partly due to the better accuracy of the launches, which strongly influences the quantity of remaining propellent necessary for position control of the satellite.</span><br /><br /><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:xx-small;" >Circular polarisation is preferred over the linear polarisation used by telecommunication satellites. This is because, for circular polarisation, the orientation of the reception head (LNB) around the propogation axis is unimportant, and therefore does not require any precise adjustment. This point is especially important for motorised antennae which, with linear polarisation, require a polarisation adjustment for each different satellite.</span><br /><br /><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:xx-small;" >In the early 1980s, the home satellite systems started sprouting up all over the US. Japan became the first country to launch a DTH service in 1984. Subsequent innovative developments over the years started modernising and changing the lifestyles of people. DTH transmission has been operational in most Western countries since 1986.</span><br /><br /><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:xx-small;" >Although the US had a long history of DTH satellite reception on large ‘TV receive only’ (TVRO) satellite antennae, it was not until the launch of theHughes DBS-I satellite in December 1993, and subsequent availability of diminutive satellite dishes with digital receivers, that the services started developing. The year 1994 brought a breakthrough in the debut of the first DBS service. In June 1994, consumers in Jackson, Mississipi, USA became the first Amercians to purchase the 45.7cm satellite dish and digital satellite receiver, enabling DBS reception.</span><br /><br /><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:xx-small;" >By the end of 1994, over one million homes had subscribed to DBS multichannel services. Hughes developed DirectTV, a high-power DBS, to supply digitally compressed TV to the home. Contracts were issued to Thomson Consumer Electronics for the supply of antennae, home receiving equipment, and digital compression hardware. Individual antenna reception of TV was used in most homes in nine out of sixteen European countries, including the UK, France, Italy, and Spain—containing 70 million TV homes and 55 per cent of all Europe. These homes formed the target for DTH satellite broadcasting. The number of individual satellite receiving antennae and receivers increased dramatically in the UK and Germany, and higher power transmitted by satellites were receivable by antennae as small as 30 cm in diameter.</span><br /><br /><strong><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:x-small;" >Functioning </span></strong><br /><br /><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:xx-small;" >A DTH network includes a broadcasting centre, one or more high-power satellites, and DTH receivers. Broadcasting centre, the hub of the network, is a complex production/playback studio with satellite uplink facility, subscriber management/access control system, and access network management system in the case of interactive and data services. Analogue or digital video programmes are received through satellite contribution links, fibre-optics, or microwave terrestrial connections. Audio-video(AV) programmes are also available through tape library or CD/DAT media. In case data or the Internet services are offered, connections to servers are used via cable or satellite links.</span><br /><br /><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:xx-small;" >AV programmes are edited at the edit suite and final control centre (FCC). The final control centre consists of a mixing desk in which video, audio, and data programme scheduling and management are performed, with the insertion of commercials and promotionals, as required.</span><br /><br /><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:xx-small;" >A typical DTH service provider leases Ku-band transponders from the satellite, accommodating the TV channels using compression techniques, after he has negotiated with different broadcasters (A1, A2, A3, A4) for these channels. The source of analogue signals from these channels could be camera, tape, or disk. Video, audio, data, or text signals are converted into digital format by encoder and mixed in multiplexer. Different programmes from various channels are mixed on a DTH platform. Subscriber management system manages various requests for different channels from the users.</span><br /><br /><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:xx-small;" >Each decoder with the subscriber can be controlled individually at the multiplxer. A modulator superimposes the information on an RF carrier for transmission to the earth station. The earth station uplinks the signals to the satellite transponder for subsequent downlinking to individual households, apartments, hotels, and cable head-ends. Small-diameter antannae on the rooftops (or flats’ outer walls) transmit the signals to the integrated receiver decoder (IRD). A smart card inserted into the IRD completes the conditional access progress, enabling the system to descramble the encrypted signals. The IRD is connected to the TV set.</span><br /><div align="center"><b><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:85%;" ><u>DTH vs Cable</u></span></b><br /> </div> <table style="color: rgb(153, 153, 153);" width="77%" align="center" border="1" cellpadding="0" cellspacing="0"><tbody><tr> <td width="23%"> <div align="center"><span style="font-size:85%;"><b><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Installation cost</span></b></span></div> </td> <td width="51%"><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:78%;" >Rs 10,000 for 30cm Rs antenna + Rs 10,000 to 15,000 for decoder</span></td> <td width="21%"><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:78%;" >150 for wiring </span></td> </tr> <tr> <td width="23%"> <div align="center"><span style="font-size:85%;"><b><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Monthly charges</span></b></span></div> </td> <td width="51%"><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:78%;" >Rs 500-1,000</span></td> <td width="21%"><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:78%;" >Rs 100-200</span></td> </tr> <tr> <td width="23%"> <div align="center"><span style="font-size:85%;"><b><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Number of channels</span></b></span></div> </td> <td width="51%"><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:78%;" >More than 200</span></td> <td width="21%"><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:78%;" >50-100</span></td> </tr> <tr> <td width="23%" height="25"> <div align="center"><span style="font-size:85%;"><b><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Reception quality</span></b></span></div> </td> <td width="51%" height="25"><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:78%;" >Excellent</span></td> <td width="21%" height="25"><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:78%;" >Average to good</span></td> </tr> <tr> <td width="23%" height="17"> <div align="center"><span style="font-size:85%;"><b><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Other services</span></b></span></div> </td> <td width="51%" height="17"><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:78%;" >Fax, Internet, teleshopping time </span></td> <td width="21%" height="17"><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:78%;" >Not available for being</span></td></tr></tbody></table><br /><strong><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:x-small;" >Digital TV decoder/receiver</span></strong><br /><br /><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:xx-small;" >Signal frequencies ranging from 10.7 to 12.75 GHz received from the satellite are amplified and down-converted into the 950MHz to 2,150MHz range by the LNB. The tuner selects the required RF channel in this range and converts it into a 480MHz IF. This signal is then</span><br /><br /><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:xx-small;" >amplified and demodulated. The analogue signals are converted by A-to-D converter and error correction is realised by forward error correction (FEC) block.<br /></span><span style=";font-family:Verdana,Arial,Helvetica,sans-serif;font-size:xx-small;" >Selection and descrambling of the packets for the required programme are performed by the descrambler under the control of the conditional access device that includes smart card readers. The demultiplxer selects the packets corresponding to the programme selected by the user, using programmable filters. The audio and video outputs of the demultiplexer are applied to the MPEG block that combines MPEG AV and graphic-control functions for the electronic programme guide. MPEG decoding generally requires at least 16 Mbps of DRAM and SDRAM. Video signals reconstructed by the MPEG decoder are then applied to digital video recorder for conversion and subsequent display on a TV set. A 32-bit microprocessor controls the circuitry, interprets user commands from the remote control, and manages the smart card readers and the communications interfaces. Software is located in a Flash-EPROM.</span>Aryantohttp://www.blogger.com/profile/18082049281071636850noreply@blogger.com0tag:blogger.com,1999:blog-6626872665054399212.post-50782542696577248752009-01-17T05:00:00.001+07:002010-07-04T12:44:01.040+07:00Security MonitorCircuit : Aryanto<br />Email : arie.emdee@yahoo.com<br /><br />Description:<br />A remote listening circuit. The area to be monitored is connected via a cable and allows remote audio listening. <a name='more'></a><br /><br /><a href="http://emdee.jw.lt/pictureelectronics/security_mon.gif"><img title="security_monitor" src="http://emdee.jw.lt/pictureelectronics/security_mon.gif" alt="" width="447" height="215" /></a><br />Click on the image to view the full<br /><br />Notes:<br />You can use this in your garden and listen for any unusual sounds, or maybe just wildlife noises. If you have a car parked in a remote location, the microphone will also pick up any sounds od activity in this area. The cable may be visible or hidden, screened cable is not necessary and you can use bellwire or speaker cable if desired.<br /><br />Circuit Description:<br />Starting from the right hand side, the power supply. I have used 12V as a standard power supply voltage, or a 12V car battery may be used. The circuit is in two halves, a remote microphone preamp, and an audio amplifier based around the National Semiconductor LM386 audio amplifier.<br /><br />The remote preamp uses an ECM microphone to monitor sound. A direct coupled 2 stage amplifier built around Q1 and Q2 amplify the weak microphone signal. Preset resistor R2 acts as a gain control, and C1 provides some high frequency roll off to the overall audio response. Q1 is run at a low collector current for a high signal to noise ratio, whilst Q2 collector is biased to around half the supply voltage for maximum dynamic range.<br /><br />The power supply for this preamp is fed via R10 and R6 from the 12V supply. C4 ensures that the preamp power supply is decoupled and no ac voltages are present on the power lines. The amplified audio output from Q2 collector is fed onto the supply lines via C6 a 220u capacitor. The output impedance of Q2 is low, hence the relatively high value of C6. C6 also has a second purpose of letting the output audio signals pass, whilst blocking the dc voltage of the power supply.<br /><br />At the opposite end, C7 a 10u capacitor, brings home the amplified audio to the listening location. The signal is first further amplifier by a x10 voltage gain amplified using the TL071. C8, a 22p capacitor again rolls off some high frequency response above 100kHz. This is necessary as long wires may pick up a little radio interference.<br /><br />After amplification by the op-amp, the audio is finally passed to the LM386 audio amplifier. R14 acts as volume control. R13 and C12 prevent possible instability in the LM386 and are recommended by the manufacturer.<br /><br />Audio output is around 1 watt into an 8 ohm loudspeaker, distortion about 0.2%. If preferred headphones could be used, although I'd recommend a series resistor of the same value impedance as the headphones.Aryantohttp://www.blogger.com/profile/18082049281071636850noreply@blogger.com0tag:blogger.com,1999:blog-6626872665054399212.post-44292430476314908902009-01-16T13:08:00.001+07:002010-07-04T12:46:57.461+07:00AUTOMATIC SCHOOL BELLConsider that a school has a total of eight periods with a lunch break after the fourth period. Each period is 45 minutes long, while the duration of the lunch break is 30 minutes. To ring this automatic school bell to start the first period, the peon needs to momentarily press switch S1. Thereafter, the bell sounds every 45 minutes to indicate the end of consecutive periods, except<br />immediately after the fourth period,when it sounds after 30 minutes to indicate that the lunch break is over. <a name='more'></a><br /><br /><div style="text-align: left;"><a href="http://emdee.jw.lt/pictureelectronics/AutomaticScoolBell.JPG"><img title="automaticscoolbell" src="http://emdee.jw.lt/pictureelectronics/AutomaticScoolBell.JPG" alt="" width="229" height="196" /></a><br /><br />When the last period is over, LED2 glows to indicate that the bell circuit should now be switched off manually.In case the peon has been late to start the school bell, the delay in minutes can be adjusted by advancing the time using switch S3. Each pushing of switch S3 advances the time by 4.5 minutes. If the school is closed early, the peon can turn the bell circuit off by momentarily pressing switch S2.The bell circuit contains timer IC NE555 (IC1), two CD4017 decade counters (IC2 and IC3) and AND gate CD4081 (IC4). Timer IC1 is wired as an astable multivibrator, whose clock output pulses are fed to IC2. IC2 increases the time periods of IC1 (4.5 and 3 minutes) by ten times to provide a clock pulse to IC3 every 45 minutes or after 30 minutes, respectively.<br /></div><br />When the class periods are going on, the outputs of IC3 switch on transistors<br />T1 and T2 via diodes D4 through D12. Resistors R4 and R5 connected in series to the emitter of npn transistor T2 decide the 4.5-minute time period of IC1. The output of IC1 is further connected to pin 14 of IC2 to provide a period with a duration of 45 minutes. Similarly, resistors<br />R2 and R3 connected in series to the emitter of npn transistor T1 decide the 3minute time period of IC1, which is further given to IC2 to provide the lunchbreak duration of 30 minutes.<br />Initially, the circuit does not ground to perform its operation when 12V power supply is given to the circuit. When switch S1 is pressed momentarily, a high enough voltage to fire silicon controlled resistor SCR1 appears at its gate. When SCR1 is fired, it provides ground path to operate the circuit after resetting both decade counters IC2 and IC3. At the same time, LED1 glows to indicate that school bell is now active. When switch S2 is pressed momentarily,the anode of SCR1 is again grounded and the circuit stops operating.<br /><br />In this condition, both LED1 and LED2 don’t glow.When the eighth period is over, Q9<br />output of IC3 goes high. At this time, transistors T1 and T2 don’t get any voltage through the outputs of IC2. As a result, the astable multivibrator (IC1) stops working.The school bell sounds for around 8 seconds at the end of each period. One can increase/decrease the ringing time of the bell by adding/removing diodes connected in series across pins 6 and 7 of IC1.<br /><br />The terminals of the 230V AC electric bell are connected to the normally open (N/O) contact of relay RL1.The circuit works off a 12V regulated power supply. However, a battery source for back-up in case the power fails is also recommended.<br /><br /><a href="http://www.ziddu.com/download/3200734/AUTOMATICSCHOOLBELL.pdf"><img fix="fixed" style="cursor: pointer; width: 176px; height: 57px;" src="http://i29.tinypic.com/34zcd5e.jpg" alt="Download Now" id="BLOGGER_PHOTO_ID_5375761926607181426" border="0" /></a>Aryantohttp://www.blogger.com/profile/18082049281071636850noreply@blogger.com2