Lab Assignment #1, Due July 8, 2002
Due electronically by 1pm
Introduction: The main objective of this Lab assignment is to help you get used to the tools you will be using during this course. This lab assignment consists of three parts. In the first part, you will implement the alarm clock in example 1.1 in the textbook (Principles of Digital Design, Gajski) by using LogicWorks. In the second part of the experiment, you will upgrade the alarm clock by adding a second alarm and comparator: thus you will be able to set 2 different alarm times. In the 3rd and final part of the assignment, you will have to open the Clock component from the CSE140L library that we are providing and modify it, in order to implement realistic time keeping.
For this design you will need 5 and 4 bit comparators, which are not available in the basic LogicWorks libraries, but available in the CSE140L library that you can download from the class home page. Additionally you will find in the library 2 other useful components, Alarm and Clock. Alarm is used to set up the alarm time, while Clock has the basic functions of regular clock with no date and alarm settings. They have A(adjust), AM(minute adjust), AH(hour adjust) inputs that can be used to set both the clock time and the alarm time.
Part 1: The alarm clock
The alarm clock that you will implement first will measure time in a different scale than the one given in your book. Hours and minutes in the first part will be rather short (!) and will consist of 16 units each; days will still be divided into 24 units though. (You will use 5 bit counters for this implementation. You can count from 0 up to 15 by using a 4-bit counter, and up to 32 by using a 5-bit counter.) A full description of the expected implementation can be found in the structural representation in figure 1.4, page 6, Principles of Digital Design, Gajski.
Part 2: Upgrade the Alarm Clock
The modified alarm clock should have two different alarm times, so you will have to modify your project and add another Alarm component (from the library), comparators and some extra (simple!) logic.
Part 3: Inside the Clock
In this part, you will have to open the Clock component from the library and modify it; the NEW hour should now consist of 48 minutes; each day still has 24 hours and each minute 16 seconds.
As a hint, examine the 5-bit counter used in the design provided for days,
which count up to 24. The counters are reset when their binary outputs reach
24dec (011000bin). Then modify the counter used for the hour in order to reset it
when it reaches 48dec (110000bin), instead of 16dec (100000bin).
Additional information:
About Logic Works: In order to be able to implement the alarm clock, you will need to use some logic components, such as counters, comparators, display units, etc. There are various libraries provided by LogicWorks. Each library contains components relevant to the name of the library. For example, the library primio contains HexDisplay, BinarySwitch, BinaryProbe, clock, etc. The library primlogi contains adders, counters, buffers, registers, decoders, etc. The library primgate contains AND, OR, NOR, XOR, NOT, and other gates. We will additionally be adding components relevant to particular labs in the CSE140L library; please check it through the quarter for useful components.
Some useful hints:
In order to be able to start the
simulation you need to put a clock in your design sheet. In this case, you will
need to connect the clock to the counters in order to be able to increment them.
Be aware of the fact that even if some lines seem to be connected, they may
not be in actuality connected. One way to check is moving the components to see
whether the lines connecting them move together with the component.