<?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>Embedded Components and Tools Blog Center &#187; LTspice/SwitcherCAD III</title>
	<atom:link href="http://www.embeddedcomponents.com/blogs/category/component-projects/ltspiceswitchercad-iii/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.embeddedcomponents.com/blogs</link>
	<description>The Home For Smart Reusable Code &#38; Circuits</description>
	<lastBuildDate>Sat, 04 Feb 2012 05:09:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Dual-Channel Digital Volume Control Circuit Simulation</title>
		<link>http://www.embeddedcomponents.com/blogs/2012/01/volume-control/</link>
		<comments>http://www.embeddedcomponents.com/blogs/2012/01/volume-control/#comments</comments>
		<pubDate>Thu, 12 Jan 2012 04:22:30 +0000</pubDate>
		<dc:creator>Ron Fredericks</dc:creator>
				<category><![CDATA[LTspice/SwitcherCAD III]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.embeddedcomponents.com/blogs/?p=657</guid>
		<description><![CDATA[Ron Fredericks writes: In today&#8217;s post, I will demonstrate the value in using LTspice to simulate a complete circuit. In several previous LTspice posts I described how to use the simulator as a test jig for single IC&#8217;s and gates. Each block in a circuit should be tested within LTspice before creating a multi-circuit simulation [...]]]></description>
			<content:encoded><![CDATA[<p>Ron Fredericks writes: In today&#8217;s post, I will demonstrate the value in using LTspice to simulate a complete circuit.</p>
<p>In several previous LTspice posts I described how to use the simulator as a test jig for single IC&#8217;s and gates. Each block in a circuit should be tested within LTspice before creating a multi-circuit simulation to verify performance against expected results. The test jig process included downloading a custom gate, IC, and spice code for the cd4066 bi-polar analogue switch from the yahoo LTspice user group, and the creation of my own 74LS193 pre-setable up/down counter from primitive logic gates.  Ltspice is very flexible. Most discrete components are readily available in the library, with a great support group from on yahoo. There are a wide variety of spice and pspice models to important from many Internet sources as well..</p>
<h3>The Circuit to Simulate</h3>
<p>I came across this digital volume control circuit during a web search.  The circuit seems to be fairly popular as it shows up in <a href="http://www.google.com/#q=%22dual-channel+digital+volume+control%22+circuit&#038;hl=en&#038;prmd=imvnsb&#038;ei=9IULT_f9DYSpiQLpz-j1Aw&#038;sqi=2&#038;start=90&#038;sa=N&#038;bav=on.2,or.r_gc.r_pw.,cf.osb&#038;fp=cb5f4aec6a892e36&#038;biw=1108&#038;bih=605">thousands of places on the web</a>.  I thought it would be a good place to start my investigation of digital volume control even though there are many industry specific chips out there to manage some of these functions as well as chips that offer much larger feature sets. With this circuit I hope to expand on the features to create new volume control and measurement circuits &#8211; perhaps while investigating the value in using an more advanced volume control chip.</p>
<blockquote><p>
This circuit could be used for replacing your manual volume control in a stereo amplifier. In this circuit, push-to-on switch S1 controls the forward (volume increase) operation of both channels while a similar switch S2 controls reverse (volume decrease) operation of both channels.<br />
Here IC1 timer 555 is configured as an astable flip-flop to provide low-frequency pulses to up/down clock input pins of pre-setable up/down counter 74LS193 (IC2) via push-to-on switches S1 and S2. To vary the pulse width of pulses from IC1, one may replace timing resistor R1 with a variable resistor.</p>
<p>Operation of switch S1 (up) causes the binary output to increment while operation of S2 (down) causes the binary output to decrement. The maximum count being 15 (all outputs logic 1) and minimum count being 0 (all outputs logic 0), it results in maximum and minimum volume respectively. </p>
<p>The active high outputs A, B, C and D of the counter are used for controlling two quad bi-polar analogue switches in each of the two CD4066 ICs (IC3 and IC4). Each of the output bits, when high, short a part of the resistor network comprising series resistors R6 through R9 for one channel and R10 through R13 for the other channel, and thereby control the output of the audio signals being fed to the inputs of stereo amplifier. Push-to-on switch S3 is used for resetting the output of counter to 0000, and thereby turning the volume of both channels to the minimum level. &#8212; Sheena K. for <a href="http://www.electronicsforu.com/electronicsforu/lab/freecircuitslist.asp?id=25&#038;title=Dual-Channel%20Digital%20Volume%20Control">electronicsforu magazine</a>
</p></blockquote>
<div id="attachment_675" class="wp-caption aligncenter" style="width: 1034px"><a href="http://www.embeddedcomponents.com/blogs/wp-content/uploads/2012/01/dual-channel-digital-volume_controller.png"><img src="http://www.embeddedcomponents.com/blogs/wp-content/uploads/2012/01/dual-channel-digital-volume_controller-1024x309.png" alt="" title="click to enlarge" width="420" height="126" class="size-large wp-image-675" /></a><p class="wp-caption-text">Dual-Channel Digital Volume Control Circuit (click to enlarge)</p></div>
<h3>The LTspice Simulation</h3>
<p><b>The Circuit</b></p>
<div id="attachment_717" class="wp-caption aligncenter" style="width: 430px"><a href="http://www.embeddedcomponents.com/blogs/wp-content/uploads/2012/01/LTspice_schematic_1280x287.jpg"><img src="http://www.embeddedcomponents.com/blogs/wp-content/uploads/2012/01/LTspice_schematic_420x94.jpg" alt="" title="click to enlarge" width="420" height="94" class="size-full wp-image-717" /></a><p class="wp-caption-text">Volume Controller Schematic in LTspice (click to enlarge)</p></div>
<p><b>The Simulation Results</b></p>
<div id="attachment_725" class="wp-caption aligncenter" style="width: 460px"><a href="http://www.embeddedcomponents.com/blogs/wp-content/uploads/2012/01/volume_control_simulation_results_1280x985.jpg"><img src="http://www.embeddedcomponents.com/blogs/wp-content/uploads/2012/01/volume_control_simulation_results_450x346.jpg" alt="" title="click to enlarge" width="420" height="323" class="size-full wp-image-725" /></a><p class="wp-caption-text">LTspice Simulation Results (click to enlarge)</p></div>

<!-- start wp-tags-to-technorati 1.02 -->

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://www.embeddedcomponents.com/blogs/2012/01/volume-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simulating the CD4066 Quad Bilateral Switch With LTspice</title>
		<link>http://www.embeddedcomponents.com/blogs/2011/12/cd4066-ltspice-simulation/</link>
		<comments>http://www.embeddedcomponents.com/blogs/2011/12/cd4066-ltspice-simulation/#comments</comments>
		<pubDate>Mon, 12 Dec 2011 14:00:23 +0000</pubDate>
		<dc:creator>Ron Fredericks</dc:creator>
				<category><![CDATA[Component Technology]]></category>
		<category><![CDATA[Electronic Components]]></category>
		<category><![CDATA[LTspice/SwitcherCAD III]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bilateral switch]]></category>
		<category><![CDATA[cd4007]]></category>
		<category><![CDATA[CD4066]]></category>
		<category><![CDATA[Helmut Sennewald]]></category>
		<category><![CDATA[ltspice]]></category>
		<category><![CDATA[simulation]]></category>

		<guid isPermaLink="false">http://www.embeddedcomponents.com/blogs/?p=179</guid>
		<description><![CDATA[Ron Fredericks writes: Today is Robert Norton Noyce&#8217;s birthday (born 12/12/1927) &#8211; co-inventor of the integrated circuit (IC). So I thought I would take a few minutes and document my work modeling the CD4066 quad bilateral switch with the LTspice simulator. In this post I describe how flexible LTspice can be as a general SPICE [...]]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript"><!--
google_ad_client = "ca-pub-4184215318352482";
/* 468_60_v1 */
google_ad_slot = "6370068834";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
Ron Fredericks writes: Today is Robert Norton Noyce&#8217;s birthday (born 12/12/1927) &#8211; co-inventor of the integrated circuit (IC). So I thought I would take a few minutes and document my work modeling the CD4066 quad bilateral switch with the LTspice simulator.</p>
<p>In this post I describe how flexible LTspice can be as a general SPICE circuit simulator, and how accurate its behavior can be in comparing LTspice test results with the physical IC&#8217;s datasheet.  In this example I use the CD4066B as the IC to model. I test the model using its characteristic  &#8220;on&#8221; resistance curves under various voltage and current operating conditions. I conclude by using a standard CD4066 datasheet to verify the accuracy of the model. </p>
<p>Meanwhile this is the last IC I need to simulate the analog section of the digital volume control circuit using LTspice I mentioned in two of my previous blog entries:
<ul>
<li>Digital volume control&#8217;s heart beat: <a href="http://www.embeddedcomponents.com/blogs/2008/03/simulating-the-555-ic-with-ltspice/">Simulating the 555 IC with LTspice</a> and </li>
<li>Digital volume control&#8217;s logic: <a href="http://www.embeddedcomponents.com/blogs/2008/04/74hc193-for-ltspice-switchercadiii/">Introducing 74HC193 Simulation to LTspice</a>.</li>
</ul>
<h3>Define one of four bilateral switches on CD4066 for LTspice</h3>
<p>&nbsp;</p>
<p>To get the CD4066 IC into my circuit simulation, I first created a symbol for one of the four bilateral switches in this package, and defined a SPICE subcircuit definition for the switch using existing SPICE CD4007 gate models as the starting point.</p>
<p><strong>Symbol for one of four bilateral switches on the CD4066 IC</strong></p>
<p>&nbsp;</p>
<div id="attachment_587" class="wp-caption alignnone" style="width: 310px"><a href="http://www.embeddedcomponents.com/blogs/wp-content/uploads/2011/12/CD4066LRG.png"><img src="http://www.embeddedcomponents.com/blogs/wp-content/uploads/2011/12/CD4066LRG-300x280.png" alt="" title="CD4066LRG" width="300" height="280" class="size-medium wp-image-587" /></a><p class="wp-caption-text">LTspice symbol for one of four bilateral switches on cd4066 (click to enlarge)</p></div>
<p><strong>LTspice Subcircuit Definition for CD4066</strong><br />
Note the LTspice implementation of the SPICE language is highlighted (below) using my own <a href="http://qbnz.com/highlighter/" title="Jump to the official website for GeSHi">GeSHi</a> language highlighter library with key sections of the language (.model and .subcircuit)  hyper-linked into SPICE language definitions that I have created on the contributor pages of this website.  SPICE is a difficult language to highlight using GeSHi because many of the SPICE language constructs are so short that they overlap with longer language constructs.  I plan to add more language definitions in the future as my circuit models need them, and I continue to find unique look-up algorithms to match GeSHi language highlighter categories.</p>
<p>&nbsp;</p>
<div class="ch_code_container" style="font-family: monospace;height:300px;">
<div style="">Code (ltspice)</div>
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">* CD4066 Analog Switch</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">* SYM=CD4066</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">* Transistor models are from LTspice group member kcin_melnick</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">* See message number 16897, http://tech.groups.yahoo.com/group/LTspice/</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">* Analog Switch Control In Out Vdd Vss</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.embeddedcomponents.com/blogs/scad3/dotcommands/SUBCKT/"><span style="color: #0000ff;">.SUBCKT</span></a> CD4066 <span style="color: #000000;">2</span> <span style="color: #000000;">11</span> <span style="color: #000000;">4</span> <span style="color: #000000;">10</span> <span style="color: #000000;">7</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #999900;">X1</span> <span style="color: #000000;">2</span> <span style="color: #000000;">6</span> <span style="color: #000000;">10</span> <span style="color: #000000;">7</span> INVERT</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #999900;">X2</span> <span style="color: #000000;">6</span> <span style="color: #000000;">1</span> <span style="color: #000000;">10</span> <span style="color: #000000;">7</span> INVERT</div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #999900;">M1</span> <span style="color: #000000;">14</span> <span style="color: #000000;">6</span> <span style="color: #000000;">7</span> <span style="color: #000000;">7</span> CD4007N</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #999900;">M7</span> <span style="color: #000000;">11</span> <span style="color: #000000;">6</span> <span style="color: #000000;">14</span> <span style="color: #000000;">10</span> CD4007P</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #999900;">M3</span> <span style="color: #000000;">11</span> <span style="color: #000000;">1</span> <span style="color: #000000;">14</span> <span style="color: #000000;">14</span> CD4007N</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #999900;">M4</span> <span style="color: #000000;">11</span> <span style="color: #000000;">1</span> <span style="color: #000000;">4</span> <span style="color: #000000;">14</span> CD4007N</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #999900;">M8</span> <span style="color: #000000;">11</span> <span style="color: #000000;">6</span> <span style="color: #000000;">4</span> <span style="color: #000000;">10</span> CD4007P</div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.embeddedcomponents.com/blogs/scad3/dotcommands/SUBCKT/"><span style="color: #0000ff;">.SUBCKT</span></a> INVERT <span style="color: #000000;">1</span> <span style="color: #000000;">2</span> <span style="color: #000000;">3</span> <span style="color: #000000;">4</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">* Inverter In Out Vcc Vss</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #999900;">M1</span> <span style="color: #000000;">2</span> <span style="color: #000000;">1</span> <span style="color: #000000;">3</span> <span style="color: #000000;">3</span> CD4007P</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #999900;">M2</span> <span style="color: #000000;">2</span> <span style="color: #000000;">1</span> <span style="color: #000000;">4</span> <span style="color: #000000;">4</span> CD4007N</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.embeddedcomponents.com/blogs/scad3/dotcommands/ENDS/"><span style="color: #0000ff;">.ENDS</span></a></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.embeddedcomponents.com/blogs/scad3/dotcommands/MODEL/"><span style="color: #0000ff;">.MODEL</span></a> CD4007N NMOS <span style="color: #66cc66;">&#40;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">+ <span style="color: #cc0000;">LEVEL</span>=<span style="color: #000000;">1</span> <span style="color: #cc0000;">VTO</span>=<span style="color: #000000;">1.44</span> <span style="color: #cc0000;">KP</span>=320u <span style="color: #cc0000;">L</span>=10u <span style="color: #cc0000;">W</span>=30u <span style="color: #cc0000;">GAMMA</span>=<span style="color: #000000;">0</span> <span style="color: #cc0000;">PHI</span>=.<span style="color: #000000;">6</span> <span style="color: #cc0000;">LAMBDA</span>=10m</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">+ <span style="color: #cc0000;">RD</span>=<span style="color: #000000;">23.2</span> <span style="color: #cc0000;">RS</span>=<span style="color: #000000;">90.1</span> <span style="color: #cc0000;">IS</span>=<span style="color: #000000;">16</span>.64p <span style="color: #cc0000;">CBD</span>=<span style="color: #000000;">2</span>.0p <span style="color: #cc0000;">CBS</span>=<span style="color: #000000;">2</span>.0p <span style="color: #cc0000;">CGSO</span>=<span style="color: #000000;">0</span>.1p <span style="color: #cc0000;">CGDO</span>=<span style="color: #000000;">0</span>.1p</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">+ <span style="color: #cc0000;">PB</span>=.<span style="color: #000000;">8</span> <span style="color: #cc0000;">TOX</span>=1200n<span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.embeddedcomponents.com/blogs/scad3/dotcommands/MODEL/"><span style="color: #0000ff;">.MODEL</span></a> CD4007P PMOS <span style="color: #66cc66;">&#40;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">+ <span style="color: #cc0000;">LEVEL</span>=<span style="color: #000000;">1</span> <span style="color: #cc0000;">VTO</span>=<span style="color: #000000;">-1.2</span> <span style="color: #cc0000;">KP</span>=110u <span style="color: #cc0000;">L</span>=10U <span style="color: #cc0000;">W</span>=60U <span style="color: #cc0000;">GAMMA</span>=<span style="color: #000000;">0</span> <span style="color: #cc0000;">PHI</span>=.<span style="color: #000000;">6</span> <span style="color: #cc0000;">LAMBDA</span>=40m</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">+ <span style="color: #cc0000;">RD</span>=<span style="color: #000000;">21.2</span> <span style="color: #cc0000;">RS</span>=<span style="color: #000000;">62.2</span> <span style="color: #cc0000;">IS</span>=<span style="color: #000000;">16</span>.64P <span style="color: #cc0000;">CBD</span>=<span style="color: #000000;">4</span>.0P <span style="color: #cc0000;">CBS</span>=<span style="color: #000000;">4</span>.0P <span style="color: #cc0000;">CGSO</span>=<span style="color: #000000;">0</span>.2P <span style="color: #cc0000;">CGDO</span>=<span style="color: #000000;">0</span>.2P</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">+ <span style="color: #cc0000;">PB</span>=.<span style="color: #000000;">8</span> <span style="color: #cc0000;">TOX</span>=1200N<span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.embeddedcomponents.com/blogs/scad3/dotcommands/ENDS/"><span style="color: #0000ff;">.ENDS</span></a></div>
</li>
</ol>
</div>
<h3>Testing the CD4066 Circuit in LTspice</h3>
<p>Finally, I dragged the symbol with subcircuit models into my LTspice program and ran a series of tests to demonstrate the &#8220;on&#8221; resistance characteristics associated with the switch at various voltage and current values.  Note the multicolored graph showing the resistance curves at various VI levels.</p>
<p>&nbsp;</p>
<div id="attachment_591" class="wp-caption alignnone" style="width: 310px"><a href="http://www.embeddedcomponents.com/blogs/wp-content/uploads/2011/12/VIcurvesLRG.png"><img src="http://www.embeddedcomponents.com/blogs/wp-content/uploads/2011/12/VIcurvesLRG-300x240.png" alt="" title="VIcurvesLRG" width="300" height="240" class="size-medium wp-image-591" /></a><p class="wp-caption-text">VI curves and circuit schematic for cd4066 bilateral switch under test (click to enlarge)</p></div>
<h3>Get these files from LTspice Yahoo Group</h3>
<p>The 4 main files used to create this demo circuit can be obtained from LTspice Yahoo Group. Special thanks to Helmut Sennewald</p>
<p>See the figure below&#8230;<br />
<div id="attachment_649" class="wp-caption alignnone" style="width: 310px"><a href="http://www.embeddedcomponents.com/blogs/wp-content/uploads/2011/12/files_from_LTspice_yahoo_group.png"><img src="http://www.embeddedcomponents.com/blogs/wp-content/uploads/2011/12/files_from_LTspice_yahoo_group-300x196.png" alt="" title="files_from_LTspice_yahoo_group" width="300" height="196" class="size-medium wp-image-649" /></a><p class="wp-caption-text">LTspice Yahoo Group File List (click to enlarge)</p></div></p>
<h3>Comparison of LTspice circuit simulation with datasheet</h3>
<p>The TI datasheet compares favorably with my simulations.  The LTspice &#8220;on&#8221; resistance curves and values are nearly exactly the same as those shown in figures 2,3, and 4 of TI&#8217;s datasheet (page 6) for the range I tested. </p>
<p>At this stage of development in simulating the analog path for my automatic volume control circuit, I see that the &#8220;on&#8221; resistance curve may create an unstable signal path under normal audio conditions unless the operating voltage (Vcc ) is much higher than the original circuit&#8217;s proposed 5 VDC power supply. </p>
<h3>References</h3>
<p>Linear Technologies LTspice Landing Page</p>
<p><a href="http://www.ti.com/lit/ds/symlink/cd4066b.pdf" title="open the TI datasheet PDF file in a separate window" target="_blank">Texas Instruments datasheet for the CD4066B</a> </p>
<p>What&#8217;s All This CD4007 Stuff, Anyhow?<br />
Bob Pease  |   ED Online ID #6073  |   April 5, 1999<br />
<a href="http://electronicdesign.com/Articles/ArticleID/6073/6073.html">http://electronicdesign.com/Articles/ArticleID/6073/6073.html</a></p>
<p>Fault in CD4066 Model<br />
kcin_melnick | LTspice Yahoo Tech Group Message #16897 | June 24, 2007<br />
<a href="http://tech.groups.yahoo.com/group/LTspice/message/16897">http://tech.groups.yahoo.com/group/LTspice/message/16897</a></p>
<p>Technorati Claim Tag<br />
SH66YHJAPDBA</p>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/bilateral+switch' rel='tag' target='_self'>bilateral switch</a>, <a class='technorati-link' href='http://technorati.com/tag/cd4007' rel='tag' target='_self'>cd4007</a>, <a class='technorati-link' href='http://technorati.com/tag/CD4066' rel='tag' target='_self'>CD4066</a>, <a class='technorati-link' href='http://technorati.com/tag/Helmut+Sennewald' rel='tag' target='_self'>Helmut Sennewald</a>, <a class='technorati-link' href='http://technorati.com/tag/ltspice' rel='tag' target='_self'>ltspice</a>, <a class='technorati-link' href='http://technorati.com/tag/simulation' rel='tag' target='_self'>simulation</a></p>

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://www.embeddedcomponents.com/blogs/2011/12/cd4066-ltspice-simulation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing 74HC193 Simulation to LTspice</title>
		<link>http://www.embeddedcomponents.com/blogs/2008/04/74hc193-for-ltspice-switchercadiii/</link>
		<comments>http://www.embeddedcomponents.com/blogs/2008/04/74hc193-for-ltspice-switchercadiii/#comments</comments>
		<pubDate>Mon, 21 Apr 2008 20:52:45 +0000</pubDate>
		<dc:creator>Ron Fredericks</dc:creator>
				<category><![CDATA[Component Projects]]></category>
		<category><![CDATA[Component Technology]]></category>
		<category><![CDATA[Electronic Components]]></category>
		<category><![CDATA[LTspice/SwitcherCAD III]]></category>
		<category><![CDATA[circuit]]></category>
		<category><![CDATA[ltspice]]></category>
		<category><![CDATA[schematic]]></category>
		<category><![CDATA[simulation]]></category>

		<guid isPermaLink="false">http://www.embeddedcomponents.com/blogs/2008/04/74hc193-for-ltspice-switchercadiii/</guid>
		<description><![CDATA[Ron Fredericks writes: I have completed the design and test of a new component for LTspice/SwitcherCAD III circuit simulation and schematic capture. In a previous post I discussed my interest in the 74193 presettable synchronous 4-bit binary up/down counter IC for a digital volume control circuit I am building. The circuit simulation described below focuses [...]]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript"><!--
google_ad_client = "ca-pub-4184215318352482";
/* 468_60_v1 */
google_ad_slot = "6370068834";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p>Ron Fredericks writes: I have completed the design and test of a new component for LTspice/SwitcherCAD III circuit simulation and schematic capture.  In a <a href="http://www.embeddedcomponents.com/blogs/2008/04/new-gate-design-using-ltspiceswitchercad-iii/" title="Simulating the 555 IC with LTspice">previous post</a> I discussed my interest in the 74193 presettable synchronous 4-bit binary up/down counter IC for a digital volume control circuit I am building.  The circuit simulation described below focuses on how to simulate the 74HC193 IC, but timing and voltage parameters built into this design allow a designer to easily simulate other variants of this IC from high speed Si-gate CMOS HC and HCT devices to low power Schottky TTL devices. </p>
<p>All circuits related to this 74HC193 simulation are available <a href="http://www.embeddedcomponents.com/blogs/2008/04/74hc193-for-ltspice-switchercadiii/#download">here&gt;</a></p>
<h3>The 74HC193 Component</h3>
<p>See figure 1 below for a screen shot of the completed design. The circuit was built from the digital gates in the component library supplied with the original Linear Technology&#8216;s free LTspice tool.  </p>
<table width="200" border="0" cellspacing="2" cellpadding="2">
<tr>
<td><img id="image167" height="360" alt="74HC193 Circuit and Related Components" border="2" src="http://www.embeddedcomponents.com/blogs/wp-content/uploads/2008/04/74hc193.png" /></td>
</tr>
<tr>
<td><span style="color:#999999">Figure 1 &#8211; 74HC193 Circuit and Related Components</span></td>
</tr>
<tr>
<td>View <a href="http://www.embeddedcomponents.com/blogs/wp-content/uploads/2008/04/74hc193circuit.htm">larger image&gt;</a></td>
</tr>
</table>
<p>
To keep the design looking like the original data sheet logic diagram, as published by companies that include NXP Semiconductors and Texas Instruments, a custom &#8220;T notS-R FlipFlop&#8221; subcomponent and corresponding assembly file was first created. This subcomponent was reused 4 times in the main IC logic diagram. An assembly file called 74hc193.asy was also created. It includes all pins used on the commercial IC except ground and Vcc. The ICâ€™s internal power supply is not simulated by the Linear Technologies&#8217; gates, and so they are not used or required in this design either.  </p>
<p>
Each gate within the design has a few variables assigned to them so that the IC remains flexible and easy to reuse in new projects:</p>
<ul>
<li><strong>tdgate</strong> <img src="http://www.embeddedcomponents.com/blogs/wp-content/plugins/wpmathpub/phpmathpublisher/img/math_994.5_17fb99174b442102b6a6847dc6665fb4.png" style="vertical-align:-5.5px; display: inline-block ;" alt="right" title="right"/> td (propagation time delay assigned to each gate)</li>
<li><strong>tdgate2</strong> <img src="http://www.embeddedcomponents.com/blogs/wp-content/plugins/wpmathpub/phpmathpublisher/img/math_994.5_17fb99174b442102b6a6847dc6665fb4.png" style="vertical-align:-5.5px; display: inline-block ;" alt="right" title="right"/> td (propagation time delay assigned to the D FlipFlop)</li>
<li><strong>tripdtgate</strong> <img src="http://www.embeddedcomponents.com/blogs/wp-content/plugins/wpmathpub/phpmathpublisher/img/math_994.5_17fb99174b442102b6a6847dc6665fb4.png" style="vertical-align:-5.5px; display: inline-block ;" alt="right" title="right"/> tripdt (td&#8217;s accuracy band assigned to each gate including the D FlipFlop)</li>
<li><strong>vhighgate</strong> <img src="http://www.embeddedcomponents.com/blogs/wp-content/plugins/wpmathpub/phpmathpublisher/img/math_994.5_17fb99174b442102b6a6847dc6665fb4.png" style="vertical-align:-5.5px; display: inline-block ;" alt="right" title="right"/> logical high value for each gate and D FlipFlop</li>
<li><strong>vlowgate</strong> <img src="http://www.embeddedcomponents.com/blogs/wp-content/plugins/wpmathpub/phpmathpublisher/img/math_994.5_17fb99174b442102b6a6847dc6665fb4.png" style="vertical-align:-5.5px; display: inline-block ;" alt="right" title="right"/> logical low value for each gate and D FlipFlop</li>
</ul>
<p>These variables can be assigned their corresponding time and voltage values using a .param statement placed in the main circuit. These values are then within scope for automatic reuse by the 74HC193 component and flipflop subcomponent simulations. Below is an example of how parameter assignment can be made (as used in the test circuit described next):</p>
<p><strong>.param tdgate=10n tdgate2=3*tdgate tripdtgate=1n vhighgate=5v vlowgate=0v</strong></p>
<p><span id="more-166"></span></p>
<h3>The Test Circuit</h3>
<p>See figure 2 below for a screen shot of the completed simulation test circuit. </p>
<table width="200" border="0" cellspacing="2" cellpadding="2">
<tr>
<td><img id="image170" height="360" alt="74HC193 Simulation Test Circuit and Truth Table Waveform Analysis" border="2" src="http://www.embeddedcomponents.com/blogs/wp-content/uploads/2008/04/74hc193_test.png" /></td>
</tr>
<tr>
<td><span style="color:#999999">Figure 2 &#8211; 74HC193 Test Circuit and Truth Table Waveforms</span></td>
</tr>
<tr>
<td>View <a title="74HC193 Simulation Test Circuit and Annotated Waveform Analysis (larger view)" href="http://www.embeddedcomponents.com/blogs/wp-content/uploads/2008/04/74hc193test.htm">larger image&gt;</a></td>
</tr>
</table>
<p>The test circuit demonstrates the use of the 74HC193 component assembly.  </p>
<p>Individual pulse voltages are applied to the component&#8217;s input pins to validate the new device:</p>
<ul>
<li><img src="http://www.embeddedcomponents.com/blogs/wp-content/plugins/wpmathpub/phpmathpublisher/img/math_995.5_6d82183393711c9b1ab6b0e3102185b9.png" style="vertical-align:-4.5px; display: inline-block ;" alt="MR" title="MR"/> (asynchronous master reset) <img src="http://www.embeddedcomponents.com/blogs/wp-content/plugins/wpmathpub/phpmathpublisher/img/math_995.5_f91752b3b400fe4c1d1c2bdc0dceb0e1.png" style="vertical-align:-4.5px; display: inline-block ;" alt="right" title="right"/> pulsed high at the beginning and end of simulation. Unlike the waveform often shown in the 74xx193 IC&#8217;s datasheet <a href="http://www.nxp.com/acrobat_download/datasheets/74HC_HCT193_3.pdf">sequence diagram</a> (see page 7 of 29 in this version published by NXP), the second reset pulse was added to insure that Q0 to Q3 output values really do reset. </li>
<li><img src="http://www.embeddedcomponents.com/blogs/wp-content/plugins/wpmathpub/phpmathpublisher/img/math_995.5_45326aefb78d2502a16491dc449562a7.png" style="vertical-align:-4.5px; display: inline-block ;" alt="overline{PL}" title="overline{PL}"/> (asynchronous parallel load) <img src="http://www.embeddedcomponents.com/blogs/wp-content/plugins/wpmathpub/phpmathpublisher/img/math_995.5_f91752b3b400fe4c1d1c2bdc0dceb0e1.png" style="vertical-align:-4.5px; display: inline-block ;" alt="right" title="right"/> pulsed low near beginning of simulation to set flip-flop outputs (Q0 to Q3) to the data input values (D0 to D3).</li>
<li><img src="http://www.embeddedcomponents.com/blogs/wp-content/plugins/wpmathpub/phpmathpublisher/img/math_995_d9e52d1c6acb120f13bdf78a0b5d6ac3.png" style="vertical-align:-5px; display: inline-block ;" alt="CPU" title="CPU"/> (rising edge triggered count up clock) <img src="http://www.embeddedcomponents.com/blogs/wp-content/plugins/wpmathpub/phpmathpublisher/img/math_995.5_f91752b3b400fe4c1d1c2bdc0dceb0e1.png" style="vertical-align:-4.5px; display: inline-block ;" alt="right" title="right"/> pulsed low several times to demonstrate both the count up behavior of the flip-flop outputs and the terminal count up, or carry, (<img src="http://www.embeddedcomponents.com/blogs/wp-content/plugins/wpmathpub/phpmathpublisher/img/math_995_af0e9973b5aa0259b7b56820755e15c2.png" style="vertical-align:-5px; display: inline-block ;" alt="overline{TCU}" title="overline{TCU}"/>) output.</li>
<li><img src="http://www.embeddedcomponents.com/blogs/wp-content/plugins/wpmathpub/phpmathpublisher/img/math_995_7499df48f6355f9e9c3882c5a1944355.png" style="vertical-align:-5px; display: inline-block ;" alt="CPD" title="CPD"/> (rising edge triggered count down clock) <img src="http://www.embeddedcomponents.com/blogs/wp-content/plugins/wpmathpub/phpmathpublisher/img/math_995.5_f91752b3b400fe4c1d1c2bdc0dceb0e1.png" style="vertical-align:-4.5px; display: inline-block ;" alt="right" title="right"/> pulsed low several times to demonstrate both the count down behavior of the flip-flop outputs and the terminal count down, or borrow, (<img src="http://www.embeddedcomponents.com/blogs/wp-content/plugins/wpmathpub/phpmathpublisher/img/math_995_5475adbefa3d9f7708302e8b715ef6f4.png" style="vertical-align:-5px; display: inline-block ;" alt="overline{TCD}" title="overline{TCD}"/>) output.</li>
<li><img src="http://www.embeddedcomponents.com/blogs/wp-content/plugins/wpmathpub/phpmathpublisher/img/math_995.5_0f9d76428568fcad70cb130b20f4638e.png" style="vertical-align:-4.5px; display: inline-block ;" alt="D0" title="D0"/> to <img src="http://www.embeddedcomponents.com/blogs/wp-content/plugins/wpmathpub/phpmathpublisher/img/math_995.5_17df00d6eeb8028d6540e0edf03d02c4.png" style="vertical-align:-4.5px; display: inline-block ;" alt="D3" title="D3"/> (data input pins) <img src="http://www.embeddedcomponents.com/blogs/wp-content/plugins/wpmathpub/phpmathpublisher/img/math_995.5_f91752b3b400fe4c1d1c2bdc0dceb0e1.png" style="vertical-align:-4.5px; display: inline-block ;" alt="right" title="right"/> tied to either logic-high or logic-low for this simulation. The logic-low is constructed from a zero voltage component instead of simply being tied to the LTspice global circuit common node (ground). This is because of the LTspice gate component&#8217;s special behavior in removing the simulation of individual gate pins tied to the common node ground.</li>
</ul>
<p>All voltage sources are referenced using the same high and low voltages described in the previous section: <strong>vhighgate</strong> and <strong>vlowgate</strong>. These values can be reassigned to all gates, all at once, using the .param statement discussed above. </p>
<p><a name="download"> </a></p>
<h3>Download the Circuits</h3>
<p>The 74HC193 component, subcomponent, assemblies, test circuits, and plot control files can all be downloaded without restriction in their use. The datasheet supplied does have some licensed use restrictions, as defined in its last page. The reference to the 74HC193 data sheet from NXP Semiconductors is in no way an endorsement of the company or its products, but it is the most recent and best documented behavior for this device that I have found.</p>
<ol>
<li>74hc193.74hct193.pdf 74HC193 data sheet published by NXP Semiconductors in Adobe Acrobat PDF format</li>
<li>74HC193_test.asc test circuit as shown in figure above</li>
<li>74HC193_test.plt plot control file used by the test circuit above</li>
<li>74HC103_test2.asc debug circuit used to debug errors in original design</li>
<li>74HC103_test2.plt plot control file used by the test2 circuit above</li>
<li>74HC193.asc circuit component</li>
<li>74HC193.asy circuit component assembly used in the test circuit above</li>
<li>TnotSRFlipFlopFromD.asc circuit subcomponent used by 74HC193.asc file above</li>
<li>TnotSRFlipFlopFromD.asy circuit subcomponent used by 74HC193.asc file above</li>
<li>The screenshots saved as png files &#8211; as shown in this blog post</li>
<li>readme.txt text file granting a license to use the 74HC193 simulation files listed above without restriction and without warranty</li>
</ol>
<p>Download the files listed above for your LTspice designs <a id=p173 href="http://www.embeddedcomponents.com/blogs/wp-content/uploads/2008/04/74hc193_5v.zip">all in one zipped directory.</a></p>
<p>Technorati Tags: <a href="http://technorati.com/tagRon+Fredericks" rel="tag">Ron Fredericks</a>, <a href="http://technorati.com/tagcomponent" rel="tag">component</a>, <a href="http://technorati.com/tagLTspice" rel="tag">LTspice</a>, <a href="http://technorati.com/tagSwitcherCAD+III" rel="tag">SwitcherCAD III</a>, <a href="http://technorati.com/tagcircuit+simulation" rel="tag">circuit simulation</a>, <a href="http://technorati.com/tagschematic+capture" rel="tag">schematic capture</a>, <a href="http://technorati.com/tag74193" rel="tag">74193</a>, <a href="http://technorati.com/tagIC" rel="tag">IC</a>, <a href="http://technorati.com/tagcircuit" rel="tag">circuit</a>, <a href="http://technorati.com/tagsimulation" rel="tag">simulation</a>, <a href="http://technorati.com/tagtiming" rel="tag">timing</a>, <a href="http://technorati.com/tagvoltage" rel="tag">voltage</a>, <a href="http://technorati.com/tagCMOS" rel="tag">CMOS</a>, <a href="http://technorati.com/tagSchottky" rel="tag">Schottky</a>, <a href="http://technorati.com/tagTTL" rel="tag">TTL</a>, <a href="http://technorati.com/tagLinear+Technology" rel="tag">Linear Technology</a></p>
<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/circuit' rel='tag' target='_self'>circuit</a>, <a class='technorati-link' href='http://technorati.com/tag/ltspice' rel='tag' target='_self'>ltspice</a>, <a class='technorati-link' href='http://technorati.com/tag/schematic' rel='tag' target='_self'>schematic</a>, <a class='technorati-link' href='http://technorati.com/tag/simulation' rel='tag' target='_self'>simulation</a></p>

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://www.embeddedcomponents.com/blogs/2008/04/74hc193-for-ltspice-switchercadiii/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>New Gate Design Using LTspice/SwitcherCAD III</title>
		<link>http://www.embeddedcomponents.com/blogs/2008/04/new-gate-design-using-ltspiceswitchercad-iii/</link>
		<comments>http://www.embeddedcomponents.com/blogs/2008/04/new-gate-design-using-ltspiceswitchercad-iii/#comments</comments>
		<pubDate>Tue, 15 Apr 2008 08:24:05 +0000</pubDate>
		<dc:creator>Ron Fredericks</dc:creator>
				<category><![CDATA[Component Projects]]></category>
		<category><![CDATA[Component Technology]]></category>
		<category><![CDATA[Electronic Components]]></category>
		<category><![CDATA[LTspice/SwitcherCAD III]]></category>

		<guid isPermaLink="false">http://www.embeddedcomponents.com/blogs/2008/04/new-gate-design-using-ltspiceswitchercad-iii/</guid>
		<description><![CDATA[Ron Fredericks writes: recently I discovered that I was going to have to create my own IC component and symbol for my on-going digital volume control circuit simulation. My first step was to check in with the LTspice forum on yahoo groups. On the forum I requested any previous design for the IC I needed. [...]]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript"><!--
google_ad_client = "ca-pub-4184215318352482";
/* 468_60_v1 */
google_ad_slot = "6370068834";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
Ron Fredericks writes: recently I discovered that I was going to have to create my own IC component and symbol for my on-going digital volume control circuit simulation.  My first step was to check in with the LTspice <a href="http://tech.groups.yahoo.com/group/LTspice/">forum on yahoo groups</a>. On the forum I requested any previous design for the IC I needed. I also asked the group&#8217;s readership if they thought it was correct to build a new IC from existing low level digital gates &#8211; gates that are already supplied with the LTspice distribution by Linear Technologies.</p>
<p>Well, I did not find a previous inventor for my IC simulation, but I did get confirmation that the gate build-up was a common strategy. And, this same forum engineer supplied me with a copy of an IC simulation of his own &#8211; one very similar to my IC requirement &#8211; he supplied a symbol and sample test bed to accelerate my learning curve.  Here is a <a href="http://tech.groups.yahoo.com/group/LTspice/message/21510">link</a> to my support dialog.</p>
<blockquote><p>I would like to thank Helmut Sennewald for his time and excellent service to the LTspice yahoo forum. It is his effort and many others who make this forum such a valuable community resource. This forum in turn, has made the LTspice/SwitcherCAD III circuit capture and spice tool a viable design tool for many embedded component users and EE designers.</p></blockquote>
<h3>Introducing the T S-R Flip-Flop</h3>
<p>To build my new IC, I had to build a new digital logic block. This component is a Toggle Flip-Flop with Set and Reset functions added. In this blog post I introduce my readers to this new component and share the simulation circuit for others to use and learn from.  </p>
<p>See the figure below for an initial design of the T S-R Flip-Flop, including a truth table in the form of a waveform diagram, the circuit, a pulse detector sub-circuit and their related assemblies.  This circuit is just an initial design because it uses an S-R Flip-Flop and a simple pulse detector sub-circuit for its clock.</p>
<p><img id="image154" height="360" alt="T S-R Flip-Flop and releated sub-circuits and assemblies" src="http://www.embeddedcomponents.com/blogs/wp-content/uploads/2008/04/tsrflipflop_test.png" /></p>
<p>View <a href="http://www.embeddedcomponents.com/blogs/wp-content/uploads/2008/04/t-s-r_circuit.htm">larger image></a></p>
<h3>Final Design for the T S-R Flip-Flop</h3>
<p>This section of my post is an update, thanks to a review by Helmut Sennewald. See figure below for my final design of the Toggle S-R Flip-Flop. This design overcomes two problems in my initial design, both resolved by starting with the D Flip-Flop with its built-in clock. The reuse of this more full-featured LT supplied component in my design eliminated the home-brew pulse maker sub-circuit. And in so doing, the slower S-R Flip-Flop. Slower because I had to set the SpiceLine time delay to a minimum of 20 nanoseconds (or td >= 2x the gate time delay) to support the simulation of my simple pulse maker sub-circuit. The D Flip-Flop has an internal clock so I could eliminate the pulse maker sub-circuit. End result: one less sub-circuit and faster Flip-Flop simulation using a time delay set to a minimum of 10 nanoseconds (or td >= 1x the gate time delay). </p>
<p><img id="image163" height="360" alt="T S-R Flip-Flop (final design)" src="http://www.embeddedcomponents.com/blogs/wp-content/uploads/2008/04/tsrflipflopfromd_test.png" /></p>
<p>View <a href="http://www.embeddedcomponents.com/blogs/wp-content/uploads/2008/04/t-s-r_circuitfromd.htm">larger image></a></p>
<h3>Download</h3>
<p>To test my knowledge of digital design using the LTspice tool, I created a number of similar flip-flop components which are included in the download:</p>
<ol>
<li>S-R Flip-Flop test circuit</li>
<li>S-R Flip-Flop with Enable gate and test circuit</li>
<li>S-R Flip-Flop with rising edge clock and test circuit</li>
<li>J-K Flip-Flop with rising edge clock and test circuit</li>
<li>D Flip-Flop with Enable gate and test circuit</li>
<li>T S-R Flip-Flop from S-R Flip-Flop and test circuit (initial design)</li>
<li>Rising Edge Pulse Detector (not high performance design)</li>
<li>T S-R Flip-Flop from D Flip-Flop and test circuit (final design)</li>
</ol>
<p>Download the components listed above for your LTspice designs all in <a id="p155" title="LTspice circuits and assemblies" href="http://www.embeddedcomponents.com/blogs/wp-content/uploads/2008/04/tflipflop.zip">one zipped directory.</a></p>
<p>Technorati Tags: <a href="http://technorati.com/tagRon+Fredericks" rel="tag">Ron Fredericks</a>, <a href="http://technorati.com/tagcomponent" rel="tag">component</a>, <a href="http://technorati.com/tagcircuit" rel="tag">circuit</a>, <a href="http://technorati.com/tagsimulation" rel="tag">simulation</a>, <a href="http://technorati.com/tagLTspice" rel="tag">LTspice</a>, <a href="http://technorati.com/tagLinear+Technologies" rel="tag">Linear Technologies</a>, <a href="http://technorati.com/tagHelmut+Sennewald" rel="tag">Helmut Sennewald</a>, <a href="http://technorati.com/tagembedded" rel="tag">embedded</a></p>
<!-- start wp-tags-to-technorati 1.02 -->

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://www.embeddedcomponents.com/blogs/2008/04/new-gate-design-using-ltspiceswitchercad-iii/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Simulating the 555 IC with LTspice</title>
		<link>http://www.embeddedcomponents.com/blogs/2008/03/simulating-the-555-ic-with-ltspice/</link>
		<comments>http://www.embeddedcomponents.com/blogs/2008/03/simulating-the-555-ic-with-ltspice/#comments</comments>
		<pubDate>Thu, 27 Mar 2008 06:53:30 +0000</pubDate>
		<dc:creator>Ron Fredericks</dc:creator>
				<category><![CDATA[Component Projects]]></category>
		<category><![CDATA[Component Technology]]></category>
		<category><![CDATA[Electronic Components]]></category>
		<category><![CDATA[LTspice/SwitcherCAD III]]></category>

		<guid isPermaLink="false">http://www.embeddedcomponents.com/blogs/2008/03/simulating-the-555-ic-with-ltspice/</guid>
		<description><![CDATA[Ron Fredericks writes: I was designing a simple CMOS timer circuit around a 555 chip this evening. It might be the heart beat for a new digital volume control I have been thinking about. Normally I look for my breadboard and parts box but this time I thought I would try out Linear Technologies LTspice/SwitcherCAD [...]]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript"><!--
google_ad_client = "ca-pub-4184215318352482";
/* 468_60_v1 */
google_ad_slot = "6370068834";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
Ron Fredericks writes: I was designing a simple CMOS timer circuit around a 555 chip this evening. It might be the heart beat for a new digital volume control I have been thinking about. Normally I look for my breadboard and parts box but this time I thought I would try out Linear Technologies <a href="http://www.linear.com/designtools/software/index.jsp#Spice">LTspice/SwitcherCAD III </a>workbench instead.</p>
<h3>SwCAD III First Time Use</h3>
<p>The tool is free and comes with a lot of <a href="http://tech.groups.yahoo.com/group/LTspice/">support</a>. I downloaded the software and installed it very easily on my Windows XP PC. It includes a graphical schematic design tool with lots of ready made simulated components, including an NE555 for my initial project.  Designing the circuit with the built-in CAD tool works very intuitively.  While the LTspice simulation took a bit of head scratching before it worked for me.  </p>
<p>I was able to configure and run the simulation using the drop down tools menu and the little &#8220;running person&#8221; icon on the tool bar. But all I could get out of the simulation was a black screen with voltage and timing ticks along the left and bottom edges. So my first problem was in realizing that the visual display would remain black and traceless until I put the mouse cursor over a wire then click. When the little instrument probe showed up as my mouse icon, I realized what was going on here. With the mouse click, waveform tracings would appear in the black panel. </p>
<p>My second problem was that the circuit would not oscillate. Not good for an oscillator design.  First, I forgot to connect the 555&#8242;s threshold + trigger pins to the R2-C2 node using the wire tool. But still no oscillation, just flat line traces were observed. Now I already know that getting circuits to oscillate follows Murphy&#8217;s Laws: <em>Oscillators remain stable, Amplifies and Buffers oscillate, whenever possible</em>.  I found a note on the <a href="http://www.oldschoolhacker.com/" title="Simulating Oscillators">Old School Hacker</a> blog with a fine solution. You must simulate the circuit with a power supply starting from 0 volts rather than just have an instant on  Vcc power supply.  </p>
<blockquote><p>In hind sight dah, its the initial transient response from the circuit&#8217;s components that kicks the oscillator into oscillating.</p></blockquote>
<p>After a little practice I improved the schematic diagram with the use of named nodes and seperation of the temporary load resistors R3 and R load from the more permanent circuit components. The load resistors are just place holders for a real load to be added to the circuit schematic next.  Look for my next blog post on this subject.</p>
<p>Finally, I used the cursor measurement facility built into the LTspice window (trace window). With this feature, I was able to make &#8220;real&#8221; measurements on the waveform for frequency and duty cycle.</p>
<h3>Circuit</h3>
<p>Here is what I was able to generate using the LTspice/SwitcherCAD III tool:</p>
<p><img id="image144" height="360" border="2" alt="LTspice/SwitcherCAD III circuit diagram and waveforms" src="http://www.embeddedcomponents.com/blogs/wp-content/uploads/2008/04/ltspice_555_astable-flipflo.png" /></p>
<p>View <a id="p147" href="http://www.embeddedcomponents.com/blogs/wp-content/uploads/2008/03/555_circuit.htm">larger image></a><br />
<a id="p148" href="http://www.embeddedcomponents.com/blogs/wp-content/uploads/2008/04/555astableflipflop.zip" title="Download file for reuse in your LTspice/switcherCAD III workbench">Download 555 Astable Flip-Flop Schematic Circuit Diagram></a></p>
<p>Referring to the figure above:<br />
&nbsp;&nbsp;&nbsp;<span style="color:green">Green Trace</span> -> Output (IC 555 pin 3)<br />
&nbsp;&nbsp;&nbsp;<span style="color:blue">Blue Trace</span> -> Trigger / Threshold (IC 555 pins 2 &#038; 6)<br />
&nbsp;&nbsp;&nbsp;<span style="color:red">Red Trace</span> -> Discharge (IC 555 pin 7)</p>
<h3>The Astable Multivibrator</h3>
<p>The circuit shown above will trigger itself and free run as a multivibrator. The capacitor C<sub>2</sub> charges through resistors R<sub>1</sub> and R<sub>2</sub> yet discharges through R<sub>2</sub> only. Thus, the duty cycle (D) may be precisely set by the ratio of these two resistors. The capacitor charges and discharges between 1/3 Vcc and 2/3 Vcc. But the initial pulse charges C<sub>2</sub> starting from 0 Vcc and so this first pulse duty cycle is unique. Since the charge rate and the threshold levels are directly proportional to the supply voltage Vcc, the frequency of oscillation (f) is independent of the supply voltage.</p>
<table width="450" border="0" cellspacing="7" cellpadding="1">
<tr>
<th scope="col">Frequency Calculation</th>
<th scope="col">Duty Cycle Calculation</th>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td><img src="http://www.embeddedcomponents.com/blogs/wp-content/plugins/wpmathpub/phpmathpublisher/img/math_937_0a4fc1759fafb7a7634b3fc77ceeb31b.png" style="vertical-align:-63px; display: inline-block ;" alt="f = 1.38/{(R_1 + 2R_2)C_2}" title="f = 1.38/{(R_1 + 2R_2)C_2}"/></td>
<td><img src="http://www.embeddedcomponents.com/blogs/wp-content/plugins/wpmathpub/phpmathpublisher/img/math_975_ed669965d82f3bbcb24fbc9463a9a5ae.png" style="vertical-align:-25px; display: inline-block ;" alt="D = {tau}/T = {R_1 + R_2}/{R_1 + 2R_2}" title="D = {tau}/T = {R_1 + R_2}/{R_1 + 2R_2}"/></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td><img src="http://www.embeddedcomponents.com/blogs/wp-content/plugins/wpmathpub/phpmathpublisher/img/math_968_44b46a0eca31826e1f16b281718e56c1.png" style="vertical-align:-32px; display: inline-block ;" alt="1.7 hertz=1.38*10^3/{(150 + 2*332) ohm farads}" title="1.7 hertz=1.38*10^3/{(150 + 2*332) ohm farads}"/></td>
<td><img src="http://www.embeddedcomponents.com/blogs/wp-content/plugins/wpmathpub/phpmathpublisher/img/math_986_8b408382389e657bb36d9d66ca8d11d1.png" style="vertical-align:-14px; display: inline-block ;" alt="0.59~={150 + 332}/{150 + 2*332}" title="0.59~={150 + 332}/{150 + 2*332}"/></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>Measured = 1.8 hertz</td>
<td>Measured = 0.60</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>Where:<br />
&nbsp;&nbsp;&nbsp;&nbsp;<img src="http://www.embeddedcomponents.com/blogs/wp-content/plugins/wpmathpub/phpmathpublisher/img/math_994.5_8039b4e0e6fe78bee7d3e5cfbfa343f0.png" style="vertical-align:-5.5px; display: inline-block ;" alt="f" title="f"/> is frequency in hertz<br />
&nbsp;&nbsp;&nbsp;&nbsp;<img src="http://www.embeddedcomponents.com/blogs/wp-content/plugins/wpmathpub/phpmathpublisher/img/math_994.5_e7ad657626a39bcafcc8ce7c53d3901b.png" style="vertical-align:-5.5px; display: inline-block ;" alt="C" title="C"/> is capacitance in farads<br />
&nbsp;&nbsp;&nbsp;&nbsp;<img src="http://www.embeddedcomponents.com/blogs/wp-content/plugins/wpmathpub/phpmathpublisher/img/math_994.5_1688316d15ac9218146e0f4ba5fc8d4f.png" style="vertical-align:-5.5px; display: inline-block ;" alt="R" title="R"/> is resistance in ohms</td>
<td>Where:<br />
&nbsp;&nbsp;&nbsp;&nbsp;<img src="http://www.embeddedcomponents.com/blogs/wp-content/plugins/wpmathpub/phpmathpublisher/img/math_994.5_75b573a2a80f7d1f54f711b89d1a80fa.png" style="vertical-align:-5.5px; display: inline-block ;" alt="D" title="D"/> is duty cycle<br />
&nbsp;&nbsp;&nbsp;&nbsp;<img src="http://www.embeddedcomponents.com/blogs/wp-content/plugins/wpmathpub/phpmathpublisher/img/math_994.5_fd5d70b980ec9c9c74f509da54de7e95.png" style="vertical-align:-5.5px; display: inline-block ;" alt="tau" title="tau"/> is non-zero output duration<br />
&nbsp;&nbsp;&nbsp;&nbsp;<img src="http://www.embeddedcomponents.com/blogs/wp-content/plugins/wpmathpub/phpmathpublisher/img/math_994.5_72963b0e4d3e9a1c0e511dfb1ec25aab.png" style="vertical-align:-5.5px; display: inline-block ;" alt="T" title="T"/> is the period of the output<br />
&nbsp;&nbsp;&nbsp;&nbsp;<img src="http://www.embeddedcomponents.com/blogs/wp-content/plugins/wpmathpub/phpmathpublisher/img/math_994.5_1688316d15ac9218146e0f4ba5fc8d4f.png" style="vertical-align:-5.5px; display: inline-block ;" alt="R" title="R"/> is resistance</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
<h3>Reference</h3>
<ul>
<li>555 Datasheet <a href="http://ics.nxp.com/products/interface/datasheet/icm7555.pdf" title="General purpose CMOS timer">icm7555.pdf</a></li>
<li>Linear Technology&#8217;s SwitcherCADâ„¢ III <a href="http://www.linear.com/designtools/software/index.jsp#Spice" title="a free Spice III simulator, schematic capture and waveform viewer">Landing Page</a></li>
</ul>
<p>Technorati Tags: <a href="http://technorati.com/tagRon+Fredericks" rel="tag">Ron Fredericks</a>, <a href="http://technorati.com/tagschematic" rel="tag">schematic</a>, <a href="http://technorati.com/tagLTspice" rel="tag">LTspice</a>, <a href="http://technorati.com/tagSwitcherCAD+III" rel="tag">SwitcherCAD III</a>, <a href="http://technorati.com/tagsimulator" rel="tag">simulator</a>, <a href="http://technorati.com/tagSpice" rel="tag"> Spice</a>, <a href="http://technorati.com/tagCAD" rel="tag"> CAD</a></p>

<!-- start wp-tags-to-technorati 1.02 -->

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://www.embeddedcomponents.com/blogs/2008/03/simulating-the-555-ic-with-ltspice/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

