<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>XJTAG Blog &#187; Dominic Plunkett</title>
	<atom:link href="http://blog.xjtag.com/author/dominic/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.xjtag.com</link>
	<description>XJTAG boundary scan solutions for the whole product lifecycle</description>
	<lastBuildDate>Wed, 26 May 2010 07:10:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>TCK Termination</title>
		<link>http://blog.xjtag.com/2010/02/tck-termination/</link>
		<comments>http://blog.xjtag.com/2010/02/tck-termination/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 08:00:54 +0000</pubDate>
		<dc:creator>Dominic Plunkett</dc:creator>
				<category><![CDATA[Board Design]]></category>
		<category><![CDATA[XJLink2]]></category>

		<guid isPermaLink="false">http://blog.xjtag.com/?p=169</guid>
		<description><![CDATA[We all pay close attention to the termination of high speed signals, especially clock signals. However in many of the designs I see this doesn&#8217;t seem to have happened for the JTAG clock signal TCK. But TCK is a clock signal just like any other clock signal.

Some people believe that because JTAG is only for [...]]]></description>
			<content:encoded><![CDATA[<p>We all pay close attention to the termination of high speed signals, especially clock signals. However in many of the designs I see this doesn&#8217;t seem to have happened for the JTAG clock signal TCK. But TCK is a clock signal just like any other clock signal.<br />
<span id="more-169"></span><br />
Some people believe that because JTAG is only for test it doesn&#8217;t matter. Other people think that you can just reduce the clock frequency during testing to solve problems. But terminating the TCK signal correctly really does matter! High speed JTAG interfaces have a need to have fast rise and fall times to ensure good signal quality. It is these fast edges that cause problems with poorly terminated boards. The usual problem is a reflection causing an extra clock pulse. If you want to try and have a look at this on a scope you will need a fast scope (500MHz or greater bandwidth), a good probe and a very short ground connection (&lt;1 inch). Turn up the timebase and look at the rising edge of the clock. In a good system the edge will rise continuously and have no dips on the way up to the logic 1 level. A poorly terminated system will have a rising edge and then a dip and continue rising again. This dip can cause an extra clock edge. JTAG interfaces with slow rise and fall times mask poorly terminated boards. This is why sometimes cheap low speed JTAG interfaces work and high speed ones don&#8217;t.</p>
<h2>Correct TCK Termination</h2>
<p>To correctly terminate a board, place a 100R resistor to ground at the end of the TCK net on the circuit board. Track the TCK net as a 100R track to each device in turn with out any stubs etc.<br />
If you buffer the TCK signal, remember to terminate the TCK signal at the input to the buffer. Also each output of the buffer will need termination as above.</p>
<h2>Dealing with poorly terminated boards</h2>
<p>XJLink2 helps you to run tests on poorly terminated boards in two ways:</p>
<p>1) XJLink2 enables variable source termination impedances to match your board.<br />
2) Variable Slew rates.</p>
<p>Variable source termination impedance match enable the XJLink2 to better match the termination on you board so if a 220R resistor is fitted for instance then you can select 220R as the source impedance. If you have no termination fitted then there is a &#8220;none&#8221; option as well.</p>
<p>The variable Slew rates enable the rise and fall times to be adjusted to improve the signal quality of the TCK. The slower the Slew rate the better the signal quality will be but the lower the maximum TCK frequency will be as well.</p>
<p>By adjusting the Source termination impedance and the Slew rate, XJLink2 can provide high quality signals across long cables into poorly terminated systems. For example, we recommend only using 15cm of JTAG cable; we have however used XJLink2 with over 4metres of cable at 20MHz, which was greater than the devices on the board were rated at.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.xjtag.com/2010/02/tck-termination/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Voltage Measurements with XJLink2</title>
		<link>http://blog.xjtag.com/2010/02/voltage-measurements-with-xjlink2/</link>
		<comments>http://blog.xjtag.com/2010/02/voltage-measurements-with-xjlink2/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 08:00:05 +0000</pubDate>
		<dc:creator>Dominic Plunkett</dc:creator>
				<category><![CDATA[Board Design]]></category>
		<category><![CDATA[XJLink2]]></category>

		<guid isPermaLink="false">http://blog.xjtag.com/?p=166</guid>
		<description><![CDATA[One of the exciting new features of XJLink2 is the ability to measure a number of voltages. Via the 20-way XJlink2 connector you can measure up to 18 different voltages. This means supply rail voltages can be measured before (and during) JTAG testing, and analogue measurements are now simple to make during your tests.

Many modern [...]]]></description>
			<content:encoded><![CDATA[<p>One of the exciting new features of XJLink2 is the ability to measure a number of voltages. Via the 20-way XJlink2 connector you can measure up to 18 different voltages. This means supply rail voltages can be measured before (and during) JTAG testing, and analogue measurements are now simple to make during your tests.<br />
<span id="more-166"></span><br />
Many modern boards have a number of supply rails. Some of these need to be quite accurate to ensure stable operation. The XJLink2 is +/-( 0.2% + 10 mV) accurate, which is easily good enough to test supplies that have to be within 1% tolerance &#8211; we find most supplies have to be within 5%.</p>
<p>The input voltage range of the XJlink2 is 0 to 5 V. If you have a higher voltage rail then, then a potential divider will be required.</p>
<p>To use the voltage measurement you simply have to make sure the voltages / supply rails you would like to measure are brought out to  spare pins on the XJLink2 connector.</p>
<p>You can take this a step further, If you what to check the current though an LED this becomes easy with XJLink2. Most LEDs have a series resistor to limit the current. If this resistor is between ground and the LED, you just need to measure the voltage across the resistor and do a little bit of maths with the resistor value to calculate the current in the LED ( V=IR ). If the LED takes the correct current then it is very likely to be working. LEDs not fitted / fitted the wrong way round / open circuit or short circuit will almost always give very different reading from the correct value. This might enable you to test the LED without asking the test operator if the LED lights.</p>
<p>This an example of how XJTAG can save you time and reduce the amount of test equipment you need during production testing and board bring up.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.xjtag.com/2010/02/voltage-measurements-with-xjlink2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XJLink2 Frequency Measurement</title>
		<link>http://blog.xjtag.com/2010/01/xjlink2-frequency-measurement/</link>
		<comments>http://blog.xjtag.com/2010/01/xjlink2-frequency-measurement/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 08:00:48 +0000</pubDate>
		<dc:creator>Dominic Plunkett</dc:creator>
				<category><![CDATA[Board Design]]></category>
		<category><![CDATA[XJLink2]]></category>

		<guid isPermaLink="false">http://blog.xjtag.com/?p=237</guid>
		<description><![CDATA[XJLink2 is the only JTAG interface that can accurately measure frequency.
Why Measure Frequencies?
Often in products oscillators are used, for instance in USB you require an oscillator to be within 100 ppm. With crystals this is seen as easy, but it can be a little harder than you expect. A standard crystal may be accurate to [...]]]></description>
			<content:encoded><![CDATA[<p>XJLink2 is the only JTAG interface that can accurately measure frequency.<span id="more-237"></span></p>
<h2>Why Measure Frequencies?</h2>
<p>Often in products oscillators are used, for instance in USB you require an oscillator to be within 100 ppm. With crystals this is seen as easy, but it can be a little harder than you expect. A standard crystal may be accurate to +/- 30 ppm with a temperature stability of +/- 50 ppm and an ageing of +/-5 ppm per year. So in the worst case we are at 85 ppm after the first year. Now add on the effects from tolerances of the load capacitors (often 22 pF or 33 pF) and you might be over the limit! </p>
<p>Low power devices often use crystals which specify lower load capacitances but which are as a result more sensitive to errors in load capacitance. These errors can come from the capacitors themselves (tolerance), track layout and IC capacitance. At manufacture you might want to check the crystal is operating at the correct frequency or close to it. XJLink2 is able to measure up to 18 frequencies with an accuracy of 10 ppm. In fact, typically at room temperature this is 2 ppm.</p>
<p>For the above USB case we might in the factory be happy with a product that is +/-40 ppm. This still gives a little margin for temperature and ageing of the crystal. Frequency measurement will find errors such as wrong load capacitors or crystal used. If a wrong crystal is fitted it could be the wrong frequency part or more subtly could be a 12 pF load capacitance crystal used instead of a 33 pF load capacitance crystal.</p>
<p>If you have the wrong crystal (not frequency but load capacitance) the oscillator may not even start. More likely is the situation in which it will oscillate but at the wrong frequency. If it does this in the USB case the product may not enumerate correctly on all PCs to which the product is connected to, which might cause a customer support issue.</p>
<p>&#160;</p>
<h2>Measuring Frequencies </h2>
<p>To measure a frequency all you need to do is connect up the signal you would like to measure to a spare IO pin on the XJLink2 connector. Don&#8217;t connect the crystal directly to the connector because the capacitive loading of the cable will change the frequency. Fortunately most devices that use crystals can output a frequency. It doesn&#8217;t have to be the same frequency as the crystal to measure the ppm error, so if for instance a processor has a crystal oscillating at 24 MHz but can output 48 MHz this will be fine for measuring the ppm error.</p>
<p>For EMC reasons you might like to turn off the output when not testing the product. You might use another spare output from the XJLink2 if required to enable the frequency only during testing. </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.xjtag.com/2010/01/xjlink2-frequency-measurement/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Bench Power Supplies</title>
		<link>http://blog.xjtag.com/2009/09/bench-power-supplies/</link>
		<comments>http://blog.xjtag.com/2009/09/bench-power-supplies/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 07:00:43 +0000</pubDate>
		<dc:creator>Dominic Plunkett</dc:creator>
				<category><![CDATA[Electronics Tips]]></category>

		<guid isPermaLink="false">http://blog.xjtag.com/?p=233</guid>
		<description><![CDATA[I bet most of you haven&#8217;t considered how you wire up a bench power supply &#8211; you just set the voltage and current limit and off you go.
Some supplies have voltage sense inputs which are usually tied to the output terminals with a metal shorting link. When not using the voltage sense you should connect [...]]]></description>
			<content:encoded><![CDATA[<p>I bet most of you haven&#8217;t considered how you wire up a bench power supply &#8211; you just set the voltage and current limit and off you go.</p>
<p><span id="more-233"></span>Some supplies have voltage sense inputs which are usually tied to the output terminals with a metal shorting link. When not using the voltage sense you should connect the load to the sense terminals and not the output terminals. The reason is that if the shorting link on the terminals isn&#8217;t tight the output voltage can rise. Internally in the PSU the sense and output terminals are often linked with diodes to prevent the voltage rising beyond 0.6v per terminal, so if both links are loose the output could be 1.2v too high which might be enough to damage the unit under test.</p>
<p>I would recommend that you always connect the load to the sense terminals as these are the reference points for the PSU. So if you set 1.5v output voltage, and the PSU is running within its limits, it will provide 1.5v across the sense terminals even if the links are loose.</p>
<p>Also while I&#8217;m talking about PSUs -  if you have a multi output PSU, try and run a separate ground wiring to your board for each rail. Don&#8217;t be tempted to just link all the grounds at the PSU as the voltage drop across the ground cable can be considerable and can upset the other rails.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.xjtag.com/2009/09/bench-power-supplies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XJEase: The SET Statement</title>
		<link>http://blog.xjtag.com/2009/09/xjease-the-set-statement/</link>
		<comments>http://blog.xjtag.com/2009/09/xjease-the-set-statement/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 07:00:21 +0000</pubDate>
		<dc:creator>Dominic Plunkett</dc:creator>
				<category><![CDATA[XJEase]]></category>

		<guid isPermaLink="false">http://blog.xjtag.com/?p=239</guid>
		<description><![CDATA[In XJEASE the SET statement is the command to access pins via a JTAG device. XJEase works out via the BSDL files and netlist how to access a pin on a non JTAG device from a JTAG device.

The SET statement can perform both reading and writing of the pins. So:


SET nCE := 1;   [...]]]></description>
			<content:encoded><![CDATA[<p>In XJEASE the <tt><strong><span style="color: #0000ff">SET</span></strong></tt> statement is the command to access pins via a JTAG device. XJEase works out via the BSDL files and netlist how to access a pin on a non JTAG device from a JTAG device.</p>
<p><span id="more-239"></span>
<p>The SET statement can perform both reading and writing of the pins. So:</p>
<div style="border-right: silver 1px solid; padding-right: 4px; border-top: silver 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: silver 1px solid; width: 97.5%; cursor: text; direction: ltr; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: silver 1px solid; font-family: &#39;Courier New&#39;, courier, monospace; background-color: #f4f4f4; text-align: left">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none">
<pre><tt><strong><span style="color: #0000ff">SET</span></strong> nCE <span style="color: #990000">:</span><span style="color: #990000">=</span> <span style="color: #993399">1</span><span style="color: #990000">;</span>          <em><span style="color: #9a1900">//</span></em><em><span style="color: #9a1900">set the nCE pin to a logic 1</span></em>
<strong><span style="color: #0000ff">SET</span></strong> DATA <span style="color: #990000">:</span><span style="color: #990000">=</span> <span style="color: #993399">0xAA</span><span style="color: #990000">;</span>      <em><span style="color: #9a1900">//</span></em><em><span style="color: #9a1900">set the data bus ( DATA ) to the HEX value 0xAA</span></em>
<strong><span style="color: #0000ff">SET</span></strong> readvalue <span style="color: #990000">:</span><span style="color: #990000">=</span> DATA<span style="color: #990000">;</span> <em><span style="color: #9a1900">//</span></em><em><span style="color: #9a1900">read the current value on the DATA bus into readvalue</span></em></tt></pre>
</pre>
</div>
<p>
  <br />Any signals which aren&#8217;t changed on a SET statement remain in the same state. All <tt><strong><span style="color: #0000ff">SET</span></strong></tt> statements take one JTAG scan except if you are changing the direction of a bus from writing to reading:</p>
<p></p>
<div style="border-right: silver 1px solid; padding-right: 4px; border-top: silver 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: silver 1px solid; width: 97.5%; cursor: text; direction: ltr; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: silver 1px solid; font-family: &#39;Courier New&#39;, courier, monospace; background-color: #f4f4f4; text-align: left">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none">
<pre><tt><strong><span style="color: #0000ff">SET</span></strong> DATA <span style="color: #990000">:</span><span style="color: #990000">=</span> <span style="color: #993399">0xAA</span><span style="color: #990000">;</span>      <em><span style="color: #9a1900">//</span></em><em><span style="color: #9a1900">write takes one JTAG scan </span></em>
<strong><span style="color: #0000ff">SET</span></strong> readValue <span style="color: #990000">:</span><span style="color: #990000">=</span> DATA<span style="color: #990000">;</span> <em><span style="color: #9a1900">//</span></em><em><span style="color: #9a1900">read statement after write takes 2 scans </span></em></tt></pre>
</pre>
</div>
<p>
  <br />You can set a bus to be tristate by doing the following:</p>
<p></p>
<div style="border-right: silver 1px solid; padding-right: 4px; border-top: silver 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: silver 1px solid; width: 97.5%; cursor: text; direction: ltr; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: silver 1px solid; font-family: &#39;Courier New&#39;, courier, monospace; background-color: #f4f4f4; text-align: left">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none">
<pre><tt><strong><span style="color: #0000ff">SET</span></strong> DATA <span style="color: #990000">:</span><span style="color: #990000">=</span> <strong><span style="color: #0000ff">I</span></strong><span style="color: #990000">;</span> <em><span style="color: #9a1900">//</span></em><em><span style="color: #9a1900"> sets the data bus into read mode</span></em></tt></pre>
</pre>
</div>
<p>
  </p>
<p>
  </p>
<h2>Optimisations</h2>
<p>Once a pin is in a state, setting it again is optimised away. So the following code only takes one JTAG scan:</p>
<div style="border-right: silver 1px solid; padding-right: 4px; border-top: silver 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: silver 1px solid; width: 97.5%; cursor: text; direction: ltr; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: silver 1px solid; font-family: &#39;Courier New&#39;, courier, monospace; background-color: #f4f4f4; text-align: left">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none">
<pre><tt><strong><span style="color: #0000ff">SET</span></strong> nCS <span style="color: #990000">:</span><span style="color: #990000">=</span><span style="color: #993399">0</span><span style="color: #990000">;</span>
<strong><span style="color: #0000ff">SET</span></strong> nCS <span style="color: #990000">:</span><span style="color: #990000">=</span><span style="color: #993399">0</span><span style="color: #990000">;</span>
<strong><span style="color: #0000ff">SET</span></strong> nCS <span style="color: #990000">:</span><span style="color: #990000">=</span><span style="color: #993399">0</span><span style="color: #990000">;</span></em></tt></pre>
</pre>
</div>
<p>
  <br />You can combine accesses so that they all happen on the same JTAG scan by using a comma:</p>
<p></p>
<div style="border-right: silver 1px solid; padding-right: 4px; border-top: silver 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: silver 1px solid; width: 97.5%; cursor: text; direction: ltr; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: silver 1px solid; font-family: &#39;Courier New&#39;, courier, monospace; background-color: #f4f4f4; text-align: left">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none">
<pre><tt><strong><span style="color: #0000ff">SET</span></strong> nCS <span style="color: #990000">:</span><span style="color: #990000">=</span> <span style="color: #993399">0</span><span style="color: #990000">,</span> nOE <span style="color: #990000">:</span><span style="color: #990000">=</span> <span style="color: #993399">0</span><span style="color: #990000">,</span> DATA <span style="color: #990000">:</span><span style="color: #990000">=</span><strong><span style="color: #0000ff">I</span></strong> <span style="color: #990000">;        </span><em><span style="color: #9a1900">//</span></em><em><span style="color: #9a1900"> All happen on the same JTAG scan</span></em>
<strong><span style="color: #0000ff">SET</span></strong> nCS <span style="color: #990000">:</span><span style="color: #990000">=</span> <span style="color: #993399">1</span><span style="color: #990000">,</span> nOE <span style="color: #990000">:</span><span style="color: #990000">=</span> <span style="color: #993399">1</span><span style="color: #990000">,</span> readvalue <span style="color: #990000">:</span><span style="color: #990000">=</span> DATA<span style="color: #990000">;</span><em><span style="color: #9a1900">//</span></em><em><span style="color: #9a1900"> All happen on the same JTAG scan</em></tt></pre>
</pre>
</div>
<p>
  </p>
<p>In the example above all the access happen on the same JTAG scan. There is however a difference in timing between the reading and writing. “readvalue <span style="color: #990000">:</span><span style="color: #990000">=</span> DATA<span style="color: #990000">;”</span> happens first during the &quot;Capture&quot; State in the JTAG state machine. The actual outputting of nCS happens later. This delay is the delay of scanning the JTAG chain and moving the JTAG state machine to the &quot;Update&quot; state. This on a device with 300 bits in the scan chain and running at 10MHz will be about 30μs.</p>
<p>
  </p>
<p>
  </p>
<h2>The Write-to-Write time</h2>
<p>Providing the JTAG chain speed isn&#8217;t restricted due to lack of data then the write-to-write time is just over 30μs (it is a slightly longer path through the JTAG state machine):</p>
<div style="border-right: silver 1px solid; padding-right: 4px; border-top: silver 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: silver 1px solid; width: 97.5%; cursor: text; direction: ltr; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: silver 1px solid; font-family: &#39;Courier New&#39;, courier, monospace; background-color: #f4f4f4; text-align: left">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none">
<pre><tt><strong><span style="color: #0000ff">SET</span></strong> nCS <span style="color: #990000">:</span><span style="color: #990000">=</span> <span style="color: #993399">1</span><span style="color: #990000">; </span><em><span style="color: #9a1900">//</span></em><em><span style="color: #9a1900">t =0 </span></em>
<strong><span style="color: #0000ff">SET</span></strong> nOE <span style="color: #990000">:</span><span style="color: #990000">=</span> <span style="color: #993399">1</span><span style="color: #990000">; </span><em><span style="color: #9a1900">//</span></em><em><span style="color: #9a1900">t = 31us </span></em></tt></pre>
</pre>
</div>
<p>
  </p>
<p>
  </p>
<h2>The Write-to-Read time</h2>
<p>The time between writing to one pin and reading another on the following scan is much faster as the time between the &quot;Update&quot; (write) and the &quot;Capture&quot; (Read) is only a few JTAG cycles around the state machine (about 0.3μs in our example). But as explained earlier &#8211; if the pin/bus being read is the one which was just written it will take a further complete scan to read the data.</p>
<p>So for SRAM based devices you could have the following read cycle:</p>
<div style="border-right: silver 1px solid; padding-right: 4px; border-top: silver 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: silver 1px solid; width: 97.5%; cursor: text; direction: ltr; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: silver 1px solid; font-family: &#39;Courier New&#39;, courier, monospace; background-color: #f4f4f4; text-align: left">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none">
<pre><tt><strong><span style="color: #0000ff">SET</span></strong> nWE <span style="color: #990000">:</span><span style="color: #990000">=</span> <span style="color: #993399">1</span><span style="color: #990000">;</span> <em><span style="color: #9a1900">//</span></em><em><span style="color: #9a1900"> not always needed</span></em>
<strong><span style="color: #0000ff">SET</span></strong> DATA <span style="color: #990000">:</span><span style="color: #990000">=</span> <strong><span style="color: #0000ff">I</span></strong><span style="color: #990000">;</span>
<strong><span style="color: #0000ff">SET</span></strong> ADDRESS <span style="color: #990000">:</span><span style="color: #990000">=</span> Address_To_Read_From<span style="color: #990000">;</span>
<strong><span style="color: #0000ff">SET</span></strong> nCS <span style="color: #990000">:</span><span style="color: #990000">=</span> <span style="color: #993399">0</span><span style="color: #990000">;</span>
<strong><span style="color: #0000ff">SET</span></strong> nOE <span style="color: #990000">:</span><span style="color: #990000">=</span> <span style="color: #993399">0</span><span style="color: #990000">;</span>
<strong><span style="color: #0000ff">SET</span></strong> Readvalue <span style="color: #990000">:</span><span style="color: #990000">=</span> DATA<span style="color: #990000">;</span>
<strong><span style="color: #0000ff">SET</span></strong> nOE <span style="color: #990000">:</span><span style="color: #990000">=</span> <span style="color: #993399">1</span><span style="color: #990000">;</span>
<strong><span style="color: #0000ff">SET</span></strong> nCS <span style="color: #990000">:</span><span style="color: #990000">=</span> <span style="color: #993399">1</span><span style="color: #990000">;</span>
<strong><span style="color: #0000ff">SET</span></strong> nWE <span style="color: #990000">:</span><span style="color: #990000">=</span> <span style="color: #993399">1</span><span style="color: #990000">;</span>  <em><span style="color: #9a1900">//</span></em><em><span style="color: #9a1900"> not always needed</span></em></tt></pre>
</pre>
</div>
<p>
  <br />The above takes a large number of JTAG scans. You can make it much quicker by combining SET statements:</p>
<p></p>
<div style="border-right: silver 1px solid; padding-right: 4px; border-top: silver 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: silver 1px solid; width: 97.5%; cursor: text; direction: ltr; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: silver 1px solid; font-family: &#39;Courier New&#39;, courier, monospace; background-color: #f4f4f4; text-align: left">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none">
<pre><tt><strong><span style="color: #0000ff">SET</span></strong> nWE <span style="color: #990000">:</span><span style="color: #990000">=</span> <span style="color: #993399">1</span><span style="color: #990000">;</span>
<strong><span style="color: #0000ff">SET</span></strong> DATA <span style="color: #990000">:</span><span style="color: #990000">=</span> <strong><span style="color: #0000ff">I</span></strong><span style="color: #990000">,</span> ADDRESS <span style="color: #990000">:</span><span style="color: #990000">=</span> Address_To_Read_From<span style="color: #990000">,</span> nCS <span style="color: #990000">:</span><span style="color: #990000">=</span> <span style="color: #993399">0</span><span style="color: #990000">,</span> nOE <span style="color: #990000">:</span><span style="color: #990000">=</span> <span style="color: #993399">0</span><span style="color: #990000">;</span>
<strong><span style="color: #0000ff">SET</span></strong> Readvalue <span style="color: #990000">:</span><span style="color: #990000">=</span> DATA<span style="color: #990000">,</span> nOE <span style="color: #990000">:</span><span style="color: #990000">=</span> <span style="color: #993399">1</span> <span style="color: #990000">,</span> nCS <span style="color: #990000">:</span><span style="color: #990000">=</span> <span style="color: #993399">1</span><span style="color: #990000">,</span> nWE <span style="color: #990000">:</span><span style="color: #990000">=</span><span style="color: #993399">1</span><span style="color: #990000">;</span> </tt></pre>
</pre>
</div>
<p>
  <br />If you can be sure nWE is logic 1 before starting then the first <tt><strong><span style="color: #0000ff">SET</span></strong></tt> can be removed.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.xjtag.com/2009/09/xjease-the-set-statement/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pull Resistors</title>
		<link>http://blog.xjtag.com/2009/07/pull-resistors/</link>
		<comments>http://blog.xjtag.com/2009/07/pull-resistors/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 07:00:18 +0000</pubDate>
		<dc:creator>Dominic Plunkett</dc:creator>
				<category><![CDATA[Board Design]]></category>
		<category><![CDATA[Electronics]]></category>

		<guid isPermaLink="false">http://blog.webtest.ctg.local/?p=12</guid>
		<description><![CDATA[Many of us have been designing electronics for years and haven&#8217;t really considered pull up and down resistor values. We just use the same old values like 10K. With some new silicon the leakage currents are higher than we have been used too. This means the pull resistors might not being doing the task we [...]]]></description>
			<content:encoded><![CDATA[<p>Many of us have been designing electronics for years and haven&#8217;t really considered pull up and down resistor values. We just use the same old values like 10K. With some new silicon the leakage currents are higher than we have been used too. This means the pull resistors might not being doing the task we require. When there is a need to reduce power consumption, again these values need to be looked at in greater detail. XJTAG often finds resistors on boards that don&#8217;t actually perform the task intended.</p>
<p><span id="more-12"></span></p>
<h3>Back to basics</h3>
<p>In most case a range of values will work fine for pull resistors, which is why we don&#8217;t give them much consideration. There are two limits for the range of values that will work correctly.</p>
<h4>The lower limit on resistance can be calculated as follows:</h4>
<ul>
<li>V<sub>supply</sub> = 1.8 V</li>
<li>V<sub>OL</sub> = 0.4 V the worst case ( highest output voltage when an output is driven low)</li>
<li>I<sub>OL</sub> = 12 mA the worst case drive current for the worst case driver on the net</li>
</ul>
<p>Using V = IR ( R= V/I)</p>
<ul>
<li>R= (1.8 &#8211; 0.4) / 0.012 = 116 Ω</li>
</ul>
<p>So a pull up resistor which is stronger (i.e. lower value ) than 116 Ω many not work reliably.</p>
<h4>The upper limit on resistance can be calculated as follows:</h4>
<ul>
<li>V<sub>supply</sub> = 1.8 V</li>
<li>V<sub>IH</sub> = 1.17 V ( lowest V<sub>IH</sub> off all the devices on the net)</li>
<li>I<sub>leakage</sub> = 20 μA Sum of all the worst case leakage currents</li>
</ul>
<p>and therefore</p>
<ul>
<li>R= (1.8 &#8211; 1.17) / 0.000020 = 31.5 kΩ</li>
</ul>
<p>So a pull up resistor which is weaker (i.e. greater value) than 31.5 kΩ many not work reliably.</p>
<h3>So what should I use?</h3>
<p>Most datasheets specify the values across temperature, voltage and process. So the above limits should also work across temperature, voltage and process. You may however want to adjust the limits slightly to take into account resistor tolerances. So where in the above range should you choose?</p>
<p>For lowest power, choose 31.5 kΩ. Apart from that it doesn&#8217;t really matter. If the last milliWatt isn&#8217;t important it can be useful to choose a value that is used elsewhere on the board. E.g. in the PSU the feedback resistor might be 27 kΩ so use that instead of the standard 10 kΩ that you might have chosen.</p>
<p><strong>NB.</strong> One last thing: some internal pull resistors are very strong, especially on the Spartan3 devices. If you are trying to overcome them the effective leakage current is much stronger &#8211; in the mA range is possible.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.xjtag.com/2009/07/pull-resistors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
