Lecture Notes on the Use of Logic Works (Version 4) - Eagle.cs ...
Lecture Notes on the Use of Logic Works (Version 4) - Eagle.cs ...
Lecture Notes on the Use of Logic Works (Version 4) - Eagle.cs ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Lab1:<br />
Objective: To practice working <strong>on</strong> and be familiar with <strong>Logic</strong><strong>Works</strong>4. You will learn how to use <strong>the</strong> clock<br />
and <strong>the</strong> trigger functi<strong>on</strong>, and how to read and interpret <strong>the</strong> timing window.<br />
Problem: You are to modify <strong>the</strong> previous example at <strong>the</strong> end <strong>of</strong> <strong>the</strong> tutorial so it works automatically, not<br />
depending <strong>on</strong> <strong>the</strong> input from <strong>the</strong> binary switches.<br />
Procedure:<br />
1- Delete <strong>the</strong> binary switches used in <strong>the</strong> example and replace <strong>the</strong>m with 2 clock devices. The clock is in<br />
under <strong>the</strong> Demolib.clf library.<br />
2- Change <strong>the</strong> clocks period by going to <strong>the</strong> Simulati<strong>on</strong> Params under <strong>the</strong> Simulati<strong>on</strong> menu (refer to<br />
secti<strong>on</strong> 4.4.4.) Set <strong>the</strong> period <strong>of</strong> <strong>the</strong> first clock (X) to a 100 ns for both high and low, and <strong>the</strong> period <strong>of</strong><br />
<strong>the</strong> sec<strong>on</strong>d clock (Y) to 45 ns for both high and low.<br />
3- If you haven’t d<strong>on</strong>e that already, name <strong>the</strong> first signal (X) and <strong>the</strong> sec<strong>on</strong>d (Y). Be careful when you<br />
name <strong>the</strong> signal you put <strong>the</strong> text cursor <strong>on</strong> <strong>the</strong> red wire, not <strong>the</strong> out pin <strong>of</strong> <strong>the</strong> clock. Once you’ve d<strong>on</strong>e<br />
that, you will see <strong>the</strong> name <strong>of</strong> <strong>the</strong> signals in <strong>the</strong> timing window if it’s open (secti<strong>on</strong> 5.1.1.1) and if <strong>the</strong><br />
opti<strong>on</strong> Add Automatically under <strong>the</strong> Simulati<strong>on</strong> menu. Name <strong>the</strong> output <strong>of</strong> <strong>the</strong> OR gate as (X xor Y).<br />
Again, it should appear in <strong>the</strong> timing window.<br />
4- Arrange your signals in <strong>the</strong> timing window so it shows X, Y, X xor Y respectively from top to bottom.<br />
Right-click <strong>on</strong> <strong>the</strong> signal name in <strong>the</strong> timing window and use To Top or To Bottom opti<strong>on</strong>s to arrange<br />
<strong>the</strong>m, or drag and drop.<br />
5- Now that everything is in place, you may try to run <strong>the</strong> simulati<strong>on</strong> by pressing <strong>on</strong> <strong>the</strong> Run Simulator<br />
key in <strong>the</strong> simulati<strong>on</strong> toolbar (secti<strong>on</strong> 5.1.3). The simulati<strong>on</strong> will run very fast as you can see in <strong>the</strong><br />
Counter and <strong>the</strong> Timing Window. You may slow it down using <strong>the</strong> slidebar.<br />
6- Stop <strong>the</strong> simulator and reset <strong>the</strong> simulator (secti<strong>on</strong> 5.1.1.6).<br />
7- Since <strong>the</strong> simulati<strong>on</strong> is repeated over and over again, it is enough to examine a porti<strong>on</strong> <strong>of</strong> <strong>the</strong> time that<br />
covers all <strong>the</strong> possibilities <strong>of</strong> <strong>the</strong> output and <strong>the</strong>n stop <strong>the</strong> simulati<strong>on</strong>. We can do that using <strong>the</strong><br />
Triggers functi<strong>on</strong> (secti<strong>on</strong> 5.1.1.3). Click <strong>on</strong> <strong>the</strong> Triggers butt<strong>on</strong> <strong>on</strong> <strong>the</strong> simulati<strong>on</strong> toolbar, <strong>the</strong><br />
simulati<strong>on</strong> Trigger window shows up.<br />
8- In <strong>the</strong> Acti<strong>on</strong>s secti<strong>on</strong> check beside <strong>the</strong> Stop opti<strong>on</strong>. In <strong>the</strong> Timing C<strong>on</strong>diti<strong>on</strong> secti<strong>on</strong> choose “=” and<br />
type 200 in <strong>the</strong> time box. Click OK. This means that if you reset <strong>the</strong> simulator and start from time t=0<br />
<strong>the</strong> simulati<strong>on</strong> will run until t = 200 ns and <strong>the</strong>n stops.