CHAPTER 2: PULSE COUNTER BLOCK 2.1.Basic logic circuits.. IC 7490 is a counter IC commonly used in digital circuits for MOD-10 counting applications and in frequency dividers.. - Ain CLK
Trang 1BỘ GIÁO DỤC VÀ ĐÀO TẠO
TRƯỜNG ĐẠI HỌC SƯ PHẠM KỸ THUẬT TP HỒ CHÍ MINH
Final report
Digital system report:
Automatic clock using IC 7490
Subject: Digital system
Student name: Hoàng Đình Thái Student ID: 19151012
Ho Chi Minh City, June, 2021
Trang 2INTRODUCTION 2
I Motivation: 2
II Target: 2
III Result and conclusion: 2
PART I: BASIC THEORETICAL 2
CHAPTER 1:OSCILATE BLOCK 2
1.1 Oscillator IC: IC 555 2
1.2 Functions of the pins: 3
1.3 Operation of IC 555 4
1.4 Design and calculate a 1Hz oscillator circuit 5
CHAPTER 2: PULSE COUNTER BLOCK 6
2.1 Basic logic circuits 6
2.2 Count IC - IC 7490 8
CHAPTER 3: DECODER BLOCK 11
3.1 Generally 11
3.2 IC 74LS47 7-segment decoding IC 12
PART II: OPERATION MATHEMATICAL 14
CHAPTER I: Operation of day-month-year counter block: 14
1 Time-minutes-seconds: 14
INTRODUCTION
I.Motivation:
Trang 3As a student, to apply the knowledge that we have learn in Digital System class and review for the final report Though we have learned and practiced a lot
in class, but it is still only a small part of theorical to the actual knowledge today
So to apply what I have learned into practice and learn Therefore, after considering and consulting, we chose the topic "Automatic calendar and clock using IC 7490" Which can help us to understand deeper about how electronics operate and apply in our daily life
II.Target:
Our group has set up a target that create and simulate a complete calendar that be able to count exactly the same with the ordinary time in real life that have
24 hours per day, months that has 30 and 31 days and distinguishable Leap year for 28/29 days in February
System compliments:
+ IC 7490 for logic count, beside that we also use the
+ Ram to memorize the time
+ compare IC to make a alarm
III Result and conclusion:
Overall, we have designed a product according to its original intentions A device capable to modify a full funtion clock and calendar with RAM for memory and compare IC to make alarm
PART I: BASIC THEORETICAL
CHAPTER 1:OSCILATE BLOCK
1.1 Oscillator IC: IC 555
This is an 8-pin type IC used very commonly: monostable circuit, multi-harmonic oscillator circuit, frequency divider, delay circuit, etc
Trang 4But in this circuit, IC 555 is used as a pulse generator The time is set by the external R, C timer circuit Effective action time ranges from a few microseconds
to several hours This IC can be directly connected to IC types: TTL/ CMOS/ DTL
1.2 Functions of the pins:
+ Pin 1 : ( GND ) Grounded
+ Pin 2 : ( TRIGGER ) Input pulse to change status
+ Pin 3 : ( OUT ) Output
+ Pin 4 : ( RESET ) Returns the initial state (0)
+ Pin 5 : ( CONTROL VOLTAGE ) Take the oscillation frequency to control voltage
+ Pin 6 : ( THRESHOLD ) Set threshold level for comparison
+ Pin 7 : ( DISCHARGE ) Discharge path for capacitors in timing circuit + Pin 8 : ( Vcc ) Connect to source
Trang 51.3 Operation of IC 555
The symbol 0 is a low equal to 0V, 1 is a high close to VCC The FF circuit is an
RS Flip-flop type
.At S = [1] thus Q = [1] and = [0].0
Then, when S = [0] thus Q = [1] and = [0].0
At R = [1] thus = [1] and Q = [0].Ọ
In short: when S = [1], then Q = [1] and when R = [1], then Q = [0], O = [1], the transistor is on, the C terminal is grounded So the voltage does not charge into the capacitor C, the voltage at pin 6 does not exceed V2 Since the output of Op-amp 2 is 0, the FF does not reset
- Output stage at level 1:
When the trigger switch is pressed, pin 2 is at 0 Since the voltage at pin 2(V-) is less than V1(V+), the output of Op-amp 1 is at 1, so S = [1], Q = [1] and 0= [0] IC's output is at 1 When 0= [0], the transistor turns off, the capacitor C continues to charge through R, the voltage across the capacitor increases When the switch is released, amp 1 has V- = [1] larger than V+, so the output of Op-amp 1 is at 0, S = [0], Q and 0 remain unchanged While the capacitor voltage C
is less than V2, FF remains in that state
- Output stage at 0:
Trang 6When the capacitor C is loaded, Op-amp 2 has a larger V+ than V- (= 2/3 VCC), R = [1] so Q = [0] and 0= [1] IC's output is at 0 Because 0= [1], the transistor is open, Op-amp2 has V+ = [0] less than V-, the output of Op-amp 2 is
at 0 So Q and Q remain unchanged, capacitor C discharges through transistors Final result: The OUT output has a square wave oscillating signal with a stable period
1.4 Design and calculate a 1Hz oscillator circuit
Picture 1.1: Oscilator circuit
Picture 1.2: output pulse
Trang 7- Fomula:
+ Tm = ln(2) ( R + R ) C : high level voltage time 1 2 1
+ Ts = ln(2) R C : high level voltage time.2 1
+ T = Tm + Ts : full period
Oscillation frequency:
We choose C =13uF, R =10K, R =50K 1 1 2
So we have an output pulse with period: T = ln(2) 13.10-6 (10.103 + 2.50.103)
~ 1(s)
CHAPTER 2: PULSE COUNTER BLOCK
2.1.Basic logic circuits
2.1.1 General information
Basic logic gates are elements that play a major role in performing the simplest logic functions in logic diagrams (which are diagrams that perform a certain logic function)
Trang 8People often use electrical signals to represent input and output data of logic gates in particular and logic circuits in general They can be pulse and potential signals
* Represented by voltage signal:
Using two different voltage levels to represent two values True (1) and False (0), there are two methods to represent these two values:
- Positive logic method:
+ The higher and positive voltage is (1)
+ The lower or negative voltage is (0)
2.1.2 Logic gate
a EX-OR Gate
Used to generate a level 0 signal when the inputs are in the same state
Figure 2.1: Symbol and port state table EX-OR Comment: The EX-OR gate output is at 1 when the inputs are upstream of the logic level Some ICs contain EX-OR gates: 74HC86, 4070
Figure 2.2: IC 74HC86
Trang 92.2 Count IC - IC 7490.
In applied digital circuits, the counting application occupies a relatively large part IC 7490 is a counter IC commonly used in digital circuits for MOD-10 counting applications and in frequency dividers a) Operation map (datasheet)
Figure 2.3: IC 7490 pinout
Figure 2.4: 7490 IC structure
2.2.1 Characteristics
- 7490 is a decimal counter with 2 counters: Mod- 2 (counter A) and mod-5 (3 counters B, C, D) Qa, Qb, Qc, Qd are outputs
- The IC consists of 14 pins, the NC symbols are unused pins
- Four set pins: R0(1), R0(2), R9(1), R9(2) work as follows:
Trang 10+ When R0(1) = R0(2)= '1', the counter is cleared to 0 and the outputs are low So these two pins will be used to reset the counter to the original count value.( Reset Pin)
+ When R9(1) = R9(2)='1', the counter will be set to "9", these two must have 1 low level and 2 R0(1) and R0(2) ) are not both high, then the counter will start counting.(Set Pin)
- Pins QA, QB, QC, QD: are the output pins of the counter
- Ain (CLKA): used to input the signal into counter 2
- Bin (CLKB): used to put signal into counter 5
- When connecting QA to Bin (CLKB) and putting signal into Ain (CLKA), we have a counter of 10
- The counter outputs change when there is a negative side of the input signal pulse of the counter, or the counter only counts the negative sides of the signal pulse
2.2.2 Principle of operation
Using IC 7490, we can do one of two ways of counting:
- 2x5 counter: Connect Q to input B, pulse counter (Ck) to input A
- 5x2 counter circuit: Connect Q to input A, counting pulse (Ck) to input B The two ways give different counting results but the same counting period 10 The signal frequency at the last output is equal to 1/10
of the pulse frequency Ck (but the output is different)
Below are two state tables for the two aforementioned cases:
The waveforms at the outputs of the two circuits both count to 10, but the two count modes are different:
Trang 11- 2x5 count mode for asymmetrical Q output.
- 5x2 counting mode for output at symmetric Q
In the structure of IC 7490, we see more Reset0 and Reset9 inputs
The table of values of IC 7490 according to the Reset inputs is shown
in Figure 2.31:
Reset Inputs: Input activate Reset pin
H: High
L: Low
Table 2.5: Input table for Reset IC 7490
CHAPTER 3: DECODER BLOCK
3.1 Generally
This block has the reverse function of the encoder, that is, from the second set of n bits it is necessary to find 1 of the N corresponding symbols or instructions
- BCD to decimal decoder
Trang 12The BCD to Decimal decoder is a combinational circuit with 4 binary inputs and 10 decimal outputs The input is a BCD code and will trigger the output corresponding to the input
- 7 bar BCD decoder
7 bar lights are used to display data processed by digital electronics They can display the numbers 0 to 9 and the letters A to F and a few other characters This encoder has 4 inputs corresponding to 4 bits of BCD code and 7 outputs, each of which will control one bar of a 7-segment lamp The 7-segment display light consists of small lines (segments) They can represent up to 16 characters which is 10 numbers and 6 letters as shown in figure
Figure 3.1: Numbers displayed by 7-SEG LED
+ Input codes from 0 - 9 display decimal digits
+ Input codes 9 - 14 for special symbols as mentioned, while code 15 will turn off all bar
+ The 8th bright segment of the display light is the decimal point (dp)
3.2 IC 74LS47 7-segment decoding IC
The TTL 74LS47 IC is a commonly used display-controller This chip has inverting outputs so use with common anode LEDs
The 74LS47 7-segment decoder is a 16-pin IC used to decode from BCD code to 7-segment code to display on 7-segment led
3.2.1 Pinout and pin function
Trang 13Figure 3.2: IC 74LS47 PIN
Figure 3.3: Logic connection of IC 7447
The function of IC 74LS47 pins is as follows:
+ Pin 8 is the ground pin (0V)
+ Pin 16 is the power supply pin (VCC)
+ Pins 1, 2, 6, 7 are the input signal pins of BCD
+ Pins 9, 10, 11, 12, 13, 14, 15 are output pins
+ Pins 3,4,5 are IC test pins
Trang 14The LT (Lamp Test) pin is used to check the operating status (live
or die) of the LED lines; while the RB (Ripper Blanking) pin is used to turn off all bars when required in a no display state
PART II: OPERATION MATHEMATICAL
CHAPTER I: Operation of day-month-year counter block:
1 Time-minutes-seconds:
a) Seconds counter and minute counter :
+ Using counter IC 7490, encoder IC for LED 7-SEG
At block seconds we display the value from "00" to "59" to count Mod-60, so with 2 Mod-10 counters we set 1 Mod-10 counter as the unit for Mod-6
The CLK state of the 7490 is a low active state, so pin Q3 when counting to 9 (1111) will switch to state 0 and change the state of tens to 1 step
Trang 15Continuing at tens of blocks of seconds, we count Mod 6 and select the 7th state as the Reset state for the seconds block and at the same time do the CLK for the minute block
Because we also count to 60 minutes, we move 1 hour, so the minute part has a completely similar way of wiring to the block of seconds and the operation is the same
Truth table of 2 counter block (second and minute):
Trang 165 0 1 0 1 0
Karnaugh map:
BA
DC
SOP:
RESET = B (dozen) C(dozen)
(dozens of both seconds and minutes counter)
CLK (giờ) = C (minute)
CLK (phút) = C (second)
b) Hour counter block
The hour block is responsible for displaying the value from “00” to
“23” When the hour block counts to the value “23” and after the next 1 clock cycle, the count value is automatically reset to “00” and at the same time gives a pulse to the date block
The date counter is Mod-24, which chooses the 25th state as an intermediate state to reset the timer to "00".CLK of hours counter unit is from C of dozen minutes
Truth table of hours counter block Reset:
+ Dozens:
Trang 17+ Units:
Karnaugh map:
+ Dozens:
BA
DC
SOP = B
+ Units:
BA
DC
SOP = C
RESET (hour) = B (hourdozen).C(hourunit)