Download Counters

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
[ECEN 1400]
Introduction to Digital and Analog Electronics
R. McLeod
HW #6: Counters and Binary Math
1
Conversion Practice (5pts)
• Fill in the table by writing the same number in each row using the bases specified.
• Use a subscript indicates the base.
• For example 102 = 210 = 216 and 100002 = 1610 = 1016
Binary
Decimal
9910
Hexadecimal
1110112
E716
19510
101010102
2
Same Problem, Two Bases (5pts)
Square the number 110011002 by doing long multiplication in binary. That is, multiply each element in one number
by a single digit in the other number and write the result shifted left by the position of the digit, then add the
columns with appropriate carry. (3 pts).
Then convert the original number and the answer to decimal (2 pts) and check the result.
3
Mixed Base Multiplication and Division (5pts)
Perform the specified operation and write the result in the specified base.
a
100110102
10102
10102
3210
101100102
4
Operation
÷
×
×
÷
×
b
210
410
1016
1016
1610
=
In Base
2
2
16
2
16
Cascaded 74161 Counters (35pts)
Create a 4 bit counter in multisim using the 74HC163N 4V counter (CMOS → 74HC 4V → 74HC163N 4V).
This is not precisely the chip we will use the in the lab, but has sufficiently similar processes. Look at the datasheet
and the lecture notes to understand the function of the chip. Connect pins 7, 10, 9 and 1 to +5V and a function
generator (Simulate → Instruments → Function generator) to pin 2, the clock. Set the function generator
to a 32 KHz square wave with 2.5 Vp (not peak to peak) amplitude and 2.5 V offset such that the voltage is
swinging from 0 to 5V. Wire Common to ground and + to the counter clock input. Your function generator dialog
box should look like:
Version 3.2, October 15, 2014
Page 1
[ECEN 1400]
Introduction to Digital and Analog Electronics
R. McLeod
Show your circuit with a screen shot. Examine the outputs of QA, QB, QC, QD with a scope (Simulate →
Instuments, then pick your favorite; The Tek scope has 4 inputs, which is nice) to confirm that they are at the
expected frequencies relative to the clock input. Examine the input clock, QA, QD and RCO. Can you write a
logic expression for RCO? Is this chip triggered on the falling or rising edge of the clock?
Now copy and paste a second counter to the right of the first, wiring pints 1,9,10 and 7 the same way. Connect
QD from counter 1 to CLK (pin 2) of the new counter. Now examine the outputs QA, QB, QC, QD of counter 2
and again confirm that they are at the expected frequencies. The simulation will run a bit slowly give the large
range of time-scales in the circuit.
How many effective bits are in your combined counter? How many clock cycles occur before RCO on the
second counter signals that this counter has rolled over?
Version 3.2, October 15, 2014
Page 2