Está en la página 1de 118

Chng 1 ...............................................................................................................

5
I S BOOLE V CC LINH KIN IN T S ......................................... 5
1.1 Mt s khi nim c bn .................................................................................. 5
1.1.1 Bin logic ................................................................................................. 5
1.1.2. Tp hp bin logic ................................................................................... 5
1.1.3. Hm logic ................................................................................................ 5
1.2. Cc hm logic c bn...................................................................................... 5
1.2.1 Hm V - AND ....................................................................................... 5
1.2.2 Hm HOC OR ..................................................................................... 6
1.2.3 Hm O - NOT ..................................................................................... 6
1.2.4. Hm Hoc tuyt i - XOR ...................................................................... 7
1.2.5 Hm hoc o - NOR ................................................................................ 7
1.2.6 Hm V o - NAND................................................................................ 8
1.2.7 Hm XNOR .............................................................................................. 9
1.3 Cc Phng php biu din hm logic ........................................................... 10
1.3.1. Dng Bng chn l (Trust Table) ........................................................... 10
1.3.2. Dng biu thc i s ............................................................................ 10
1.4. Cc biu thc i s Boole............................................................................ 11
1.5 Ti thiu ha hm logic ................................................................................. 12
Chng 2 ............................................................................................................. 13
Thit k mch logic ............................................................................................. 13
2.1. Mch logic l g ............................................................................................ 13
2.2. Quy trnh thit k .......................................................................................... 13
2.3. Thit k mt s mch logic thng dng......................................................... 14
2.3.1. Thit k mch cng/tr hai s 8 bit ............................................................ 14
2.3.2. Thit k mch so snh 2 s 8 bit................................................................. 17
2.3.3. Thit k mch dn knh ............................................................................. 18
2.3.3.1. Khi nim ............................................................................................... 19
2.3.3.2. Mch dn knh 4 sang 1 ...................................................................... 19

2.3.3.4. ng dng ............................................................................................ 23


2.3.4. Mch tch knh .......................................................................................... 26
2.3.4.1. Khi nim ........................................................................................... 26
2.3.4.2 Mch tch knh 1 sang 4 ...................................................................... 27
2.3.4.3 Mt s IC gii m tch knh hay dng ................................................. 30
2.3.4.4. ng dng ............................................................................................ 33
2.3.5. Thit k mch m ha ................................................................................ 37
2.3.5.1. Thit k mch m ha 8 ng sang 3 ng...................................... 37
2.3.5.2. Thit k mch m ha 10 ng sang 4 ng.................................... 38
2.3.5.3. Thit k mch m ha u tin ............................................................. 39
2.3.6. Thit k mch gii m ................................................................................ 40
2.3.6.1 Gii m 3 sang 8 .................................................................................. 41
2.3.6.2 Mch gii m BCD sang thp phn ...................................................... 42
2.3.6.3 Gii m BCD sang led 7 on .............................................................. 44
2.3.7. Thit k mch iu khin ma trn LED 5x7 ............................................... 51
2.3.7.1. Cu to ma trn LED 5x7 .................................................................... 51
2.3.7.2. iu khin ma trn LED ..................................................................... 51
2.3.7.3. V d ................................................................................................... 51
Chng 3 MCH TUN T .............................................................................. 53
3.1 Cc khi nim c bn..................................................................................... 53
3.2. Mch cht ..................................................................................................... 54
3.2.1. Mch cht cng NAND ......................................................................... 54
3.2.2 Cht cng NOR ...................................................................................... 55
3.2.3. ng dng ca mch cht:....................................................................... 56
3.3. Cht NAND khi c xung ng h ................................................................. 57
3.4. Tng quan v flip flop (FF) ........................................................................... 58
3.5. Cc loi FF ................................................................................................... 59
3.6. Flip flop khi c thm ng vo trc tip ..................................................... 63
3.7. ng dng ca FF .......................................................................................... 64

3.7.1. Mch m khng ng b ...................................................................... 64


Mch m xung ................................................................................................. 69
3.7.1.2. Mch m khng ng b khng theo h nh phn (chia 2) ................. 72
3.8. Mch m ng b ....................................................................................... 78
3.8.1 m ln chia 16 ...................................................................................... 78
3.8.2 m ng b ln xung .......................................................................... 81
3.8.3 m ng b khng theo h nh phn ..................................................... 81
3.8.4 m t trc s m ............................................................................. 82
3.8.5 Mt s IC m ng b ........................................................................... 83
3.9. Mch m vng ............................................................................................ 85
3.9.1 m vng ............................................................................................... 85
3.9.2 m Johnson (m vng xon) ............................................................... 86
3.10. Thit k mch m ...................................................................................... 88
3.10. ng dng mch m ................................................................................... 95
3.10.1 m nhiu hng hay chia tn s lin tip .............................................. 96
3.10.2 Mch m s kin ................................................................................. 97
3.10.3 Mch m tn ....................................................................................... 98
3.10.4 ng h s:......................................................................................... 100
3.11. Thanh ghi.................................................................................................. 102
3.11.1. Gii thiu ........................................................................................... 102
3.11.2. Cu to............................................................................................... 102
3.11.3. Hot ng .......................................................................................... 103
3.11.4 Cc loi thanh ghi ............................................................................... 103
3.11.5 Mt s loi IC ghi dch........................................................................ 107
3.11.5. ng dng ........................................................................................... 109
Phn II ............................................................................................................... 113
CHNG 4 ...................................................................................................... 113
THIT K MCH TNG T ....................................................................... 113
4.1 Khi nim mch tng t ............................................................................ 113

4.2. Quy trnh thit k mch tng t ................................................................ 113


4.3 Thit k mt s mch tng t thng dng .................................................. 113
4.3.1. Thit k mch khuch i..................................................................... 113
4.3.2. Thit k mch np acquy ...................................................................... 113
4.3.3. Thit k mch iu khin motor DC ..................................................... 113
4.3.4. Thit k mch iu khin chung tr chi ............................................ 113
4.3.5. Thit k mch iu khin n giao thng ............................................. 113
4.3.6. Thit k mch dao ng ....................................................................... 113
4.3.7 B to dao ng 555 v ng dng ......................................................... 113

Chng 1
I S BOOLE V CC LINH KIN IN T S
1.1 Mt s khi nim c bn
1.1.1 Bin logic
Mt bin x c gi l bin logic khi x ch ly mt trong hai gi tr 0 hoc 1
1.1.2. Tp hp bin logic
Nu c n bin logic th c 2n t hp gi tr khc nhau. Gi tr thp phn tng
ng biu din cc gi tr ny l 02n -1
1.1.3. Hm logic
Mt hm s f c gi l hm logic khi cc bin ca hm l cc bin logic v
hm f ch nhn mt trong hai gi tr 0 hoc 1
1.2. Cc hm logic c bn
1.2.1 Hm V - AND
Phng trnh
Y=A.B

Bng chn l
A
0
0
1
1

B
0
1
0
1

K hiu v s chn

Y
0
0
0
1

i vi hm V gi tr ca hm ch bng 1 khi cc bin ca n u bng 1; hay ch


cn c mt bin bng 0 hm s c gi tr bng 0
Cc IC AND thng dng

AND 3 li vo

AND 3 li vo

AND 2 li vo

AND 4 li vo

1.2.2 Hm HOC OR
Phng trnh
Y=A+B

Bng chn l

A
0
0
1
1

B
0
1
0
1

K hiu v s chn

Y
0
1
1
1

i vi hm HOC gi tr ca hm ch bng 0 khi cc bin ca n u bng 0; hay


ch cn c mt bin bng 1 hm s c gi tr bng 1
Cc IC OR thng dng khc

AND 2 li vo

AND 3 li vo

AND 4 li vo

1.2.3 Hm O - NOT
phng trnh

Bng chn l

K hiu v s chn

Y=
A
0
1

Y
1
0

i vi hm NOT gi tr ca hm s l o ca gi tr bin. Khi bin c gi tr


bng 0 th hm bng 1 ngc li khi bin bng 1 th hm c gi tr bng 0.
1.2.4. Hm Hoc tuyt i - XOR
phng trnh

Bng chn l
A
0
0
1
1

B
0
1
0
1

K hiu v s chn

Y
0
1
1
0

Ta thy gi tr ca hm s bng 1 khi cc bin c gi tr khc nhau. Ngc li gi tr


ca hm c gi tr bng 0 khi gi tr ca cc bin l bng nhau (cng bng 0 hay 1)
1.2.5 Hm hoc o - NOR
phng trnh

Bng chn l

K hiu v s chn

A
0
0
1
1

B
0
1
0
1

Y
1
0
0
0

i vi hm NOR gi tr ca hm s bng 1 khi ton b gi tr ca bin bng 0.


Ngc li, mt trong cc gi tr ca bin bng 1 gi tr ca hm c gi tr bng 0. Hay
ni khc i n l hm o ca hm OR.
Mt s IC NOR khc

NOR 3 li vo

NOR 2 li vo

NOR 4 li vo

NOR 3 li vo

NOR 8 li vo

1.2.6 Hm V o - NAND
phng trnh

K hiu v s chn

Bng chn l
A
0
0
1
1

B
0
1
0
1

Y
1
1
1
0

i vi hm NAND gi tr ca hm s bng 0 khi ton b gi tr ca bin bng 1.


Ngc li, mt trong cc gi tr ca bin bng 0 gi tr ca hm c gi tr bng 1. Hay
ni khc i n l hm o ca hm AND

1.2.7 Hm XNOR
phng trnh

K hiu v s chn

Bng chn l
A
0
0
1
1

B
0
1
0
1

Y
1
0
0
1

i vi hm XNOR nu cc gi tr ca bin l bng nhau (u bng 1 hay bng 0)


th gi tr ca hm s l 1 ngc li hm c gi tr bng 0.
Thc cht 7 hm trn ch c 3 hm u tin l cc hm c bn, 4 hm cn li c th
xy dng t 3 hm trn.
V d:
+ Hm NOR l s kt hp ca hm NOR v hm NOT.

Hm NOR
S kt hp ca hm NOR v NOT
+ Hm NAND l s kt hp ca hm AND v NOT

Hm NAND
S kt hp ca hm AND v NOT
+ Hm XOR l s kt hp ca cc hm NAND hoc hm NOR

Hm XOR

S kt hp ca hm NAND

Hm XOR
S kt hp ca hm NOR
Tuy nhin vic tch hp cc mch c bn to ra cc hm khc s rt hu ch
trong vic thit k mch. N s lm gim i s lng IC trn mt bo mch, dn n
lm gim chi ph cho mch v mt IC XOR (74LS86) c cha 4 phn t XOR cng c
gi thnh nh mt IC NAND hay IC NOR.

1.3 Cc Phng php biu din hm logic


1.3.1. Dng Bng chn l (Trust Table)
Bng chn l l mt bng lit k cc kh nng c th c (cc gi tr t hp) ca n
bin u vo v gi tr ca hm tng ng.
Nh vy mt hm logic c n bin, khi biu din bng bng chn l th s c n+1
ct v 2n dng.
1.3.2. Dng biu thc i s
Biu thc i s biu din hm logic c 2 dng chun tc tuyn v chun tc hi
+ Chun tc tuyn (CTT): Hm logic c biu din di dng tng ca cc tch.
Vi mi mt tch, t hp cc bin u vo lm cho hm c gi tr bng 1.
K hiu cho biu din CTT l
V d:

Hy dng bng chn l biu din hm trn.


+ Chun tc hi (CTH): Hm logic c biu din di dng tch ca cc tng.
Mi mt s hng trong tch l tng ca gi tr o cc bin ti hm c gi tr bng
0.
K hiu cho biu din CTH l

V d:
A
0
0
0
0
1
1
1
1

B
0
0
1
1
0
0
1
1

C
0
1
0
1
0
1
0
1

Y
0
1
1
1
0
1
0
1

T bng chn l ta thy ti dng s 1 hm c gi tr bng 0 nh vy s hng


u tin trong biu din l (A+B+C)
Tng t dng s 5 s l (+B+C); dng s 7 l (

1.4. Cc biu thc i s Boole


1. Lut giao hon
2. Lut kt hp
3. Lut phn phi
4. Lut ng nht
5. Lut tri
6. Lut b
7. Lut ly ng

A+B=B+A
A.B=B.A
(A.B).C=A.(B.C)
(A+B)+C=A+(B+C)
A(B+C)=AB+AC
A+BC=(A+B)(A+C)
A.1=A
A+0=A
A+1=1
A.0=0
A.=0
A+=1
A.A=A
A+A=A

8. Lut De Morgan
9. Lut ph nh ca ph nh
10. Lut hp th (lut ht)

A.(A+B)=A
A+A.B=A

1.5 Ti thiu ha hm logic


Ti thiu ha hm logic l phng php a hm logic v dng n gin nht c
th, hoc a hm logic v dng thun li nht cho vic thit k mch, em li li ch
kinh t nht c th. C nhiu phng php ti thiu ha hm logic.
+ Dng cc biu thc i s boole
+ Dng bng Karnaugh
Hoc c th kt hp c hai phng php trn.
V d: ti thiu ha hm
1

ch dng hm NOR
1

1
1

Chng 2
Thit k mch logic
2.1. Mch logic l g
Mch x l cc tn hiu logic gi l mch logic. Thng thng mch logic ch
gm cc phn t logic, thng gi l cc IC s. Tuy nhin trong mt vi trng hp
mch logic cng c cha cc phn t tng t.

2.2. Quy trnh thit k


Quy trnh thit k mch logic nh sau:
+ Xy dng phng trnh logic s dng cc phng trnh theo CTT, hay CTH
hoc c th s dng bng chn l biu din
+ S dng bng karnaugh hoc cc phng php i s ti thiu ha hm
logic hoc a hm logic v dng m d thit k mch
+Thit k mch cho chy th
+ nh gi tnh n nh ca mch
V d:
S dng hm NOR hai li vo thit k mch thc hin chc nng nh sau:

T bng Karnaugh ta c phng trnh rt gn nh sau:

S thit k
Theo s ta ch dng 2 phn t NOR. Vic ch s dng 2phn t NOR ht sc c
ngha v thc t ta cng ch dng c 1 IC NOR. Ngc li nu ta dng kt hp vi
cc IC khc th ta s thy mch logic khi thit k xong thc t s khng kinh t bng
mch ta ch dng NOR nh trn.
Tng t nh trn thit k mch ch dng hm NAND. So snh trong hai trng
hp ch dng NAND v ch dng NOR hai li vo.
2.3. Thit k mt s mch logic thng dng
2.3.1. Thit k mch cng/tr hai s 8 bit
thit k mch cng hai s 8 bit ta i xy dng mch cng ton phn hai s 1 bit.
A
0
0
0
0
1
1
1
1

B
0
0
1
1
0
0
1
1

Sau khi rt gn hm S ta c

Sau khi rt gn ta c

Cin
0
1
0
1
0
1
0
1

S
0
1
1
0
1
0
0
1

Cout
0
0
0
1
0
1
1
1

Nh vy l ta c mt b tng ton phn (FA Full Adder). S khi ca mt


FA cho nh hnh di y.

Nh vy thc hin php cng hai s 8 bit ta s dng 8 b FA ni tip vi nhau


nh s di y

Theo s thit k trn th chn Cin ca FA u tin (FA c trng s thp nht)
c ni t v hai bit thp nht khi cng vi nhau s khng c bt nh ca php cng
trc . Trong khi cc bit Cin ca cc FA sau phi c ni vi bit trn Cout (bit nh)
ca cc FA trc , nh vy kt qu ca FA sau khng ch ph thuc vo gi tr ca
hai bit u vo A, B m cn ph thuc vo kt qu ca FA trc , iu ny l logic
vi php cng ton phn hai s nhiu bit.
Vic thit k mch tr hai s 8 bit ta cng lm tng t nh php cng bng vic thit
k mch tr hai s 1 bit (FS) sau ni li vi nhau. Tuy nhin ta c th thc hin
mch tr thng qua mch cng bng php ton a-b=a+(-b)

Ta i tm s -b:
S -b chnh l s b 2 ca s b. S b 2 ca b c tm bng cch ta ly o tt c cc
bit ca s b (bit c gi tr 0 thnh bit c gi tr 1 v ngc li) sau cng thm 1.
V d s b c gi tr l 10101011 (171) th s b 2 ca b c tm nh sau
+ Ly o cc bit ca b ta c s 01010100
+ Cng thm 1 ta c s 01010101 (85)
Theo cch trn th ta c s mch tr hai s 8 bit c thit k thng qua mch cng
hai s 8 bit bng cch mc thm cc phn t o vo chn B, c bit chn Cin u tin
c ni ln mc 1 (v cng thm 1)

T hai s trn ta xy dng mt mch va thc hin c php tnh cng va thc
hin php tnh tr. lm c iu ny ta phi c mt chn iu khin chn php
tnh, gi thit chn iu khin mc thp th mch thc hin php cng, ngc li
chn iu khin mc cao th mch s hot ng ch tr A cho B.
Nhn vo hai s cng v tr ta thy im khc nhau ca hai mch ny l chn Cin
u tin v cc chn vo B. i vi mch cng chn Cin u tin bng 0 v cc chn B
gi nguyn gi tr. Trong khi mch tr chn Cin u tin bng 1 v cc li vo B b
o.
Nh vy chn Cin ca FA u tin c th ni trc tip ti chn iu khin chn php
ton. Cn cc li vo B ta c bng chn l sau
O
B
B
0
0
0
0
1
1
1
0
1
1
1
0
Trong O l bit la chn php ton, B l B l bit a trc tip vo b FA.
T bng chn l ta c B=B O
Nh vy ta phi mc thm 8 mch XOR trc li vo B ca cc FA. Cc u vo ca
cc mch XOR ny l bit iu khin chn php ton, u vo cn li l bit ca s hng
B tng ng.

2.3.2. Thit k mch so snh 2 s 8 bit


thit k mch so snh hai s 8 bit ta s thit k mch so snh hai s 1 bit.
Vic so snh hai s 1 bit tc l so snh hai bit a, b vi nhau, kt qu ca vic so
snh s cho ta ba kt qu nh sau: a>b, a<b, a=b ta t kt qu ca php so snh ny
ln lt l S1, S2, S3
a
b
S1
S2
0
0
0
0
0
1
0
1
1
0
1
0
1
1
0
0
T bng chn l ta c cc phng trnh sau
;

S3
1
0
0
1

Dng cc phn t logic ta d dng thit k c mch so snh hai s 1 bit hay so
snh hai bit nh trn.
Tuy nhin mch so snh trn khng th pht trin so snh nhiu bit c. Mun
so snh hai s nhiu bit th ta phi tun theo trnh t so snh t bit cao nht trc (bit
c nhiu ngha nht MSB) nu s no c MSB ln hn s ln hn v kt thc vic
so snh. Nu hai MSB bng nhau th so snh tip hai bit thp hn, c nh vy cho n
bit thp nht, hai s bng nhau nu tt c cc bit tng ng ca hai s u bng nhau.
Li vo iu khin
C1
C2
C3
a>b
a<b
a=b
1
0
0
0
1
0
0
0
1
0
0
1
0
0
1
0
0
1
T bng chn l ta c
;

Li vo d liu
a

x
x
0
0
1
1

x
x
0
1
0
1
;

Li ra
S1
a>b
1
0
0
0
1
0

S2
a<b
0
1
0
1
0
0

S3
a=b
0
0
1
0
0
1

Ta d dng c c mch so snh 2 bit c iu khin nh cc phng trnh biu


din trn.

T mch so snh 2 bit trn ta c s khi ca mch nh sau

T s khi ca mch ta c mch so snh 2 s 8 bit nh sau:

S trn l mch so snh 2 s 8 bit vi s A = 11000011 v s B= 10110101.


Trn hnh ta thy n S1 sng nh vy chng minh l A>B. Mch ta xy dng hot
ng ng.

2.3.3. Thit k mch dn knh


Lm sao 8 ngi 1 u ni v nghe c 8 ngi u bn kia cng mt
lc?. Ta khng th dng 8 ng dy kt ni cho 8 ng tn hiu c v tn
km, b nhiu gia cc ng dy hay suy gim tn hiu trn ng dy c bit khi
khong cch truyn xa ln hay c nhiu hn s ng cn truyn (16, 32, 100,). C
1 cch l ghp cc ng tn hiu li vi nhau gim bt s ng truyn v r rng

bn nhn c cng phi tch ng nhn c tr li 8 ng tn hiu ban u


nhng khng ln ln gia cc ng tn hiu ghp li th cn phi t cho mi
ng mt m ring. Mch in t thc hin chc nng ghp nhiu ng li vi
nhau c gi l mch dn knh cn mch in t s tch ng nhn c ra nhiu
ng tn hiu ban u c gi l mch tch knh. Mch dn knh v tch knh
ngy nay c s dng rt rng ri trong nhiu lnh vc hin i lin quan trc tip ti
in t nh ghp tch knh in thoi, knh truyn hnh, truyn d liu ni tip, mng
truyn internet, Vi tn s hot ng c ca cc IC mch s hng Mhz tr ln
nn cho php ghp truyn c rt nhiu ng tn hiu v d liu i coi nh l ng
thi. Phn ny ta s tm hiu v cc mch dn knh, tch knh dng IC s v nhng
ng dng lin quan.

2.3.3.1. Khi nim


Mch dn knh hay cn gi l mch ghp knh, a hp (Multiplexer-MUX) l 1
dng mch t hp cho php chn 1 trong nhiu ng ng vo song song (cc knh
vo) a ti 1 ng ra (gi l knh truyn ni tip). Vic chn ng no trong
cc ng ng vo do cc ng chn quyt nh. Ta thy MUX hot ng nh 1
cng tc nhiu v tr c iu khin bi m s. M s ny l dng s nh phn, tu t
hp s nh phn ny m bt k thi im no ch c 1 ng vo c chn v cho
php a ti ng ra.
Cc mch dn knh thng gp l 2 sang 1, 4 sang 1, 8 sang 1, Ni chung l
t 2n sang 1. Mc tip theo s phn tch v thit k mch dn knh 4 sang 1
2.3.3.2. Mch dn knh 4 sang 1

Hnh 2.2.1 Mch dn knh 4 sang 1 v bng hot ng

Mch trn c 2 ng iu khin chn l S0 v S1 nn chng to ra 4 trng thi


logic. Mi mt trng thi s cho php 1 ng vo I no qua truyn ti ng ra
Y. Nh vy tng qut nu c 2n ng vo song song th phi cn n ng iu khin
chn.
Cng ni thm rng, ngoi nhng ng nh trn, mch thng cn c thm
ng G: c gi l ng vo cho php (enable) hay xung nh du (strobe). Mch
t hp c th c 1 hay nhiu ng vo cho php v n c th tc ng mc cao hay
mc thp. Nh mch dn knh trn, nu c thm 1 ng cho php G tc ng
mc thp, tc l ch khi G = 0 th hot ng dn knh mi din ra cn khi G = 1 th
bt chp cc ng vo song song v cc ng chn, ng ra vn gi c nh mc
thp (c th mc cao tu dng mch)
Nh vy khi G = 0
S1S0 = 00, d liu I0 s a ra Y
S1S0 = 01, d liu I1 s a ra Y
S1S0 = 10, d liu I2 s a ra Y
S1S0 = 11, d liu I3 s a ra Y
do biu thc logic ca mch khi c thm ng G l

Ta c th kim chng li biu thc trn bng cch: t bng trng thi trn, vit
biu thc logic ri rt gn (c th dng phng php rt gn dng ba Karnaugh.
Nhn thy rng t hp 4 cng NOT a 2 ng iu khin chn S0, S1 vo
cc cng AND chnh l 1 mch m ho 2 sang 4, cc ng ra mch m ho nh l
xung m cng AND cho 1 trong cc ng I ra ngoi. Vy mch trn cng c th v
li nh sau:

Hnh 2.2.2 Cu trc mch dn knh 4 sang 1


Hnh 2.2.3 Dn knh 4 sang 1 t
gii m 2 sang 4
2.3.3.3.Mt s IC dn knh hay dng

Hnh 2.2.4 K hiu khi ca mt s IC dn knh hay dng

74LS151 c 8 ng vo d liu, 1 ng vo cho php G tc ng mc


thp, 3 ng vo chn C B A, ng ra Y cn c ng o ca n: Khi G
mc thp n cho php hot ng ghp knh m chn CBA s quyt nh 1
trong 8 ng d liu c a ra ng Y. Ngc li khi G mc cao, mch
khng c php nn Y = 0 bt chp cc ng chn v ng vo d liu.

74LS153 gm 2 b ghp knh 4:1 c 2 ng vo chn chung BA mi b c


ng cho php ring, ng vo v ng ra ring. Tng t ch khi G mc
0 ng Y mi ging 1 trong cc ng vo tu m chn.

74LS157 gm 4 b ghp knh 2:1 c chung ng vo cho php G tc ng


mc thp, chung ng chn A. ng vo d liu 1I0, 1I1 c ng ra tng
ng l 1Y, ng vo d liu 2I0, 2I1 c ng ra tng ng l 2Y, Khi G
thp v A thp s cho d liu vo ng nI0 ra nY (n = 1,2,3,4) cn khi
A cao s cho d liu vo nI1 ra nY. Khi

= 1 th Y = 0

Chng hn vi 74LS153, k hiu khi, chn ra, bng trng thi v cu to logic
c minh ho nhng hnh di, vi nhng IC khc cng tng t

Hnh 2.2.5 K hiu khi v chn ra ca 74LS153


Bng s tht ca 74LS53

Hnh 2.2.6 Cu to bn trong ca 74LS153


2.3.3.4. ng dng
a) M rng knh ghp
Cc mch ghp knh t ng vo c th c kt hp vi nhau to mch ghp
knh nhiu ng vo. V d to mch ghp knh 16:1 ta c th dng IC 74LS150
hoc cc IC tng t, nhng c 1 cch khc l ghp 2 IC 74LS151
S ghp nh sau:

Hnh 2.2.7 Hai cch m rng knh ghp 16 sang 1 t IC74LS151

(74LS151 l IC dn knh 8 sang 1)


b) Chuyn i song song sang ni tip:
Cc d liu nh phn nhiu bit, chng hn m ASCII, word,... thng c x l
song song, tc l tt c chng c lm 1 lc. Trong my tnh, d liu c di chuyn
t ni ny n ni khc cng 1 lc trn cc ng dn in song song gi l cc bus.
Khi d liu c truyn i qua khong cch di chng hn hng chc mt th cch
truyn song song khng cn thch hp v tn nhiu ng dy, nhiu, .... Lc ny
mch dn knh c th dng nh mch chuyn i song song sang ni tip.
Cch ni

Hnh 2.2.8 Chuyn i d liu truyn t song song sang ni tip


Mch hnh trn cho php truyn d liu 16 bit trn ng truyn ni tip thng
qua IC dn knh 74LS150. Tt nhin cn 1 mch m to m s nh phn 4 bit cho
4 ng chn ca mch dn knh (chng hn 74LS93). Mch m hot ng khin
m chn thay i t 0000 ri 0001, ri n 1111 v li vng tr li 0000 m ln tip
khin d liu vo song song c chuyn i lin tip sang ni tip. Cng cn phi c
mt mch dao ng to xung kch cho mch m, nu tn s dao ng to xung
kch cho mch m rt ln th d liu c lun chuyn nhanh, v vi tc ln nh
vy vi cm nhn ca con ngi th d liu dng nh c truyn ng thi.
Nguyn l ny c p dng cho ghp knh in thoi v nhiu ng dng khc
c) Dng dn knh thit k t hp:

Cc mch dn knh vi hot ng logic nh xt trc ngoi cch dng


ghp nhiu ng ng vo cn c th dng thit k mch t hp i khi rt d
dng v:
Khng cn phi n gin biu thc nhiu
Thng dng t IC
D thit k
Bi ton thit k mch t hp nh bng di y cho thy r hn iu ny
V d: Thit k mch t hp tho bng s tht sau
T bng s tht ta c biu thc logic l:
Y=ABC+ABC+ABC+ABC

Hay c th vit

y l biu thc thuc dng tng ca cc


tch. Nh cch thit k trc ta s s dng
cc cng logic gm 3 cng NOT, 4 cng
NAND, 1 cng OR, cn nu chuyn sang dng
ton cng NAND khng th phi cn ti 3 cng
NAND 2 ng vo, 4 cng NAND 3 ng
vo v 1 cng NAND 4 ng vo cha k l
phi n gin biu thc nu c th trc khi
thc hin.

V phng trnh li ra ca
mch ging vi phng trnh ca
b dn knh 4-1. By gi ta s s
dng IC dn knh 4 sang 1. 2
ng vo A, B s c ni ti 2
ng chn ca IC, cn c vo
th t t hp trong bng nu Y l
0 th s phi ni ng vo ghp
knh tng ng xung t, cn
nu Y l 1 th ni ng vo ghp
knh tng ng ln ngun (c th

Hnh 2.2.9 Thit k t hp dng

qua R gi tr 1K). Hnh 2.2.9 s

mch dn knh

minh ho cho cch ni trn v


nu bn kim tra li s thy mch
hon ton tho iu kin ra ca
bi ton.
Tng t s dng MUX 2-1, MUX 4-1 MUX 8-1 thit k cc hm sau:

2.3.4. Mch tch knh


2.3.4.1. Khi nim
B chuyn mch phn knh hay cn gi l tch knh, gii a hp (demultiplexer)
c chc nng ngc li vi mch dn knh tc l: tch knh truyn thnh 1 trong cc
knh d liu song song tu vo m chn ng vo. C th xem mch tch knh
ging nh 1 cng tc c kh c iu khin chuyn mch bi m s. Tu theo m s
c p vo ng chn m d liu t 1 ng s c a ra ng no trong s
cc ng song song.

Cc mch tch knh thng gp l 1 sang 2, 1 sang 4, 1 sang 8, ...Ni chung t 1


ng c th a ra 2n ng, v s ng chn s phi l n. Mc di s ni n
mch tch knh 1 sang 4
2.3.4.2 Mch tch knh 1 sang 4

Hnh 2.2.9 Mch tch knh 1 sang 4


Mch tch knh t 1 ng sang 4 ng nn s ng chn phi l 2
Khi ng cho php G mc 1 th n cm khng cho php d liu vo c
truyn ra bt k ng no nn tt c cc ng ra u mc 0
Nh vy khi G = 0 BA = 00 d liu S c a ra ng Y0, nu S = 0 th Y0
cng bng 0 v nu S = 1 th Y0 cng bng 1,tc l S c a ti Y0; cc ng
khc khng i
Tng t vi cc t hp BA khc th ln lt ra S s l Y1, Y2, Y3

Biu thc logic ca


cc ng ra s l:

T y c th dng
cng logic thit k
mch tch knh

Hnh 2.2.10 Cu trc ca mch tch knh 1


sang 4

V d: Kho st IC 74LS155

Hnh 2.2.12 K hiu khi v chn ra ca 74LS155

Trong cu trc ca n gm 2 b tch knh 1 sang 4, chng c 2 ng chn A0A1


chung, ng cho php cng c th chung khi ni chn 2 ni vi chn 15). Mt lu
khc l b tch knh u c ng ra o so vi ng vo (d liu vo chn 1 khng
o) cn b tch knh th 2 th ng vo v ng ra nh nhau khi c tc ng
(d liu vo chn 14 o).
Cu trc logic ca mch khng khc g so vi mch xt trn ngoi tr mch
c thm ng cho php
Bng s tht ca 74LS155

Mch tch knh hot ng nh mch gii m


Nhiu mch tch knh cn c chc nng nh 1 mch gii m. Tht vy,vo d
liu S khng c dng nh 1 ng vo d liu ni tip m li dng nh ng vo
cho php cn cc ng vo chn CBA khi ny li c dng nh cc ng vo d
liu v cc ng ra vn gi nguyn chc nng th mch a hp li hot ng nh 1
mch gii m.
Tu thuc m d liu p vo ng C B A m mt trong cc ng ra s ln cao
hay xung thp tu cu trc mch. Nh vy mch tch knh 1:4 nh trn tr
thnh mch gii m 2 sang 4 . Thc t ngoi ng S khi ny tr thnh ng cho
php gii m, mch trn s phi cn mt s ng iu khin khc cho php mch
hot ng gii m hay tch knh; cn cu to logic ca chng hon ton tng thch
nhau. Hnh sau cho php dng mch tch knh 1 sang 4 gii m 2 sang 4

Hnh 2.2.13 Mch tch knh hot ng nh mch gii m

Tng t ta cng c cc loi mch khc nh va tch knh 1:8 va gii m 3:8,
tch knh 1:16/gii m 4:16

2.3.4.3 Mt s IC gii m tch knh hay dng


Kho st IC tch knh/gii m tiu biu 74LS138
o

74LS138 l IC MSI gii m 3 ng sang 8 ng hay tch knh 1


ng sang 8 ng thng dng v c hot ng logic tiu biu, n
cn thng c dng nh mch gii m a ch trong cc mch iu
khin v trong my tnh.

S chn v k hiu logic nh hnh di y:

Hnh 2.2.14 K hiu khi v chn ra ca 74LS138


o

Trong
o

A0, A1, A2 l 3 ng a ch ng vo

E1, E2 l cc ng vo cho php (tc ng mc thp)

E3 l ng vo cho php tc ng mc cao

O0 n O7 l 8 ng ra (tc ng mc thp )

Hnh 2.2.15 Cu trc bn trong 74LS138


o

Hot ng gii m nh sau:

a d liu nh phn 3bit vo C, B, A(LSB), ly d liu ra cc


ng O0 n O7; ng cho php E2 v E3 t mc thp, ng cho
php E1 t mc cao. Chng hn khi CBA l 001 th ng O1 xung
thp cn cc ng ra khc u cao.
o

Hot ng tch knh:


D liu vo ni tip vo ng E2, hay E3 (vi ng cn li t
thp). t G = 1 cho php tch knh. Nh vy d liu ra song song
vn ly ra cc ng O0 n O7. Chng hn nu m chn l 001th
d liu ni tip S s ra ng O1 v khng b o.

M rng ng gii m: 74LS138 dng thm 1 cng o cn cho php


gii m a ch t 5 sang 32 ng ( dng trong gii m a ch ca
my vi tnh). Hnh ghp ni nh sau:

Hnh 2.2.16 Ghp 4 IC 74LS138 c mch gii m 5 ng sang


32 ng
Cc IC gii m tch knh khc:
o

Ngoi 74LS155 v 74LS138 c ni n trn ra cn mt s IC cng


c chc nng gii m/tch knh c k ra y l

74139/LS139 gm 2 b gii m 2 sang 4 hay 2 b tch knh 1 sang 4,


chng c ng cho php (tc ng mc thp) v ng chn ring

74154/LS154 b gii m 4 sang 16 ng hay tch knh 1 sang 16


ng

74159/LS159 ging nh 74154 nhng c ng ra cc thu h

74155/LS155 nh kho st trn: gm 2 b gii m 2 sang 4 hay 2


b tch knh 1 sang 4. c bit 74155 cn c th hot ng nh 1 b
gii m 3 sang 8 hay tch knh 1 sang 8 khi ni chung ng cho php
vi ng vo d liu ni tip v ni chung 2 ng chn li vi nhau.

74156/LS156 ging nh 74155 nhng c ng ra cc thu h.

Cng ngh CMOS cng c cc IC gii m/tch knh tng ng nh bn


TTL chng hn c 74HC/HCT138,...Hn th na nhiu IC h CMOS
cn cho php truyn c d liu s ln d liu tng t. Mt s IC c
k ra y l

74HC/HCT4051 dn/tch knh tng t s 1 sang 8 v ngc li

74HC/HCT4052 dn/tch knh tng t s 1 sang 4 v ngc li

74HC/HCT4053 dn/tch knh tng t s 1 sang 2 v ngc li

Kho st IC 4051
o

Khi dn knh d liu vo chn COM OUT/IN, ra 3 knh CHANNEL


I/O t 0 n 7.

Ngc li, khi tch knh th d liu song song vo cc chn CHANNEL
I/O 0 n 7 v ra chn COM OUT/IN;

3 ng chn l A, B, C.

Chn INH (inhibit) cho php d liu c php truyn ra.


o

Hnh 2.2.17 Chn ra 4051

Hot ng ca IC c tm tt nh bng sau:

Cu trc logic mch kh phc tp nh hnh di y

Hnh 2.2.18 Cu trc mch ca 4051

2.3.4.4. ng dng
o

Dng mch tch knh thit k mch logic


o

Cng ging nh mch dn knh, mch tch knh hay gii m cn c th


dng thit k mch logic t hp. Nu nh vic thit k t hp dng
mch dn knh khng dng thm cc cng logic th vi mch tch knh
hay gii m t hp li phi thm vo mt s cng logic mi t c
logic t hp mong mun. Nhng b li, mch tch knh/gii m cho
php thit k t hp nhiu ng ra mt cch d dng. V d sau s
minh ho r hn vn ny:

Cho bng s tht nh hnh sau:

Nu s dng cch c, ta s xy dng ba K, ri rt gn, vi 4 ng vo,


4 ng ra, xem ra vic rt gn kh di v phc tp. Dng IC 74154
(gii m 4 sang 16, tch knh 1 sang 16), th bi ton s n gin hn.

Tht vy, trc ht cn ni 4 ng vo A, B, C, D ti 4 ng chn


ca IC tch knh, ri da vo bng s tht trn ,ta xc nh cc v tr t
hp lm Y0 ln 1. Bn mch gii m/tch knh ta s ni cc ng ra
tng ng vi v tr t hp ti Y0. V c tt c 5 ng ra ln 1 nn
cui cng Y0 s l NAND ca 5 ng ra y. Tng t vi cc ng
ra Y1, Y2, Y3. Cch ni mch nh hnh di y

Hnh 2.2.19 ng dng mch tch knh thit k t hp


o

Nu trong 1 ct ng ra m s bit 0 nhiu hn s bit 1 th ta s dng


cng NOR gom tt c cc ng bit 0 y.

Chia s ng truyn
o

phn trc ta ni n ng dng ca mch dn knh cho php


chuyn i d liu t song song sang ni tip v truyn i. Khi d liu
n ni cn nhn, chng hn my tnh khc th n cng x l d liu
dng song song. Do li phi cn 1 mch chuyn i t d liu ni
tip n thnh d liu song song v y mch gii m/tch knh c
dng

Hnh 2.2.20 Truyn d liu ni tip


o

l mch gii m/tch knh bn nhn cng phi cn m chn p


vo cc ng DCBA, m ny c ly t mch m bn truyn, do
d liu bn truyn i v bn nhn li mi ng b nhau. Nh vy ta s
cn 5 ng dy gm 1 ng truyn d liu ni tip, 1 ng mass
chung v 4 ng m s chn. Ngoi ra do mch m t ng reset khi
m ht m (ln 1111) lm d liu c truyn lin tc nn ta cn phi

c 1 mch cht ng ra song song chn d liu li khi 16 bit


truyn mi cho ra mt lt
o

Thc ra th cch truyn ny vn cha hiu qu lm, ch dng khong


cch gn, ta vn c th gim bt s dy chuyn i na (thay v 6 ng
dy nh trn). Tht vy, thay v truyn i ti 4 ng cho m s chn
t mch m ta s ch truyn i 1 ng xung ng h chung tc l bn
nhn s t thm 1 mch m na to m s chn cho b gii
m/tch knh v mch m ny c cp xung ck ging nh mch m
ca bn truyn. Cch hay hn na l truyn xung ck ngay trn ng
truyn ni tip, tt nhin ta phi m ho xung ck li n khng ln ln
vi d liu truyn v bn nhn cng phi c 1 mch pht hin v tch
xung ck ra khi d liu nhn. y c gi l cch truyn tin (d liu)
ni tip ng b (synchronuous data transmission). Ngoi ra cn c cch
truyn tin ni tip khng ng b tc l bn truyn v bn nhn khng
dng xung ng h nh nhau, hay ni cch khc d liu truyn v nhn
khng ng b nhau. 2 cch truyn ny ta s c tm hiu r hn nhiu
mn hc truyn s liu, giao tip my tnh

Cng cn ni thm rng cc ng vo ca mch dn knh khng ch l


1 byte, 1 word d liu song song cn truyn m c th l cc ng tn
hiu ring l, chng hn mt s ng ly t cm bin nhit ca l
nhit, ca cc gian phng chng chy n; mt s khc l t cm bin d
mc cht lng, mt s khc li t cc cng tc tip im khi b tc ng
s to mc tn hiu logic phn hi, .....Tt c u c thu thp chuyn
i v dn li truyn v ni cn thit chng hn phng gim st iu
khin. Ti y cc thng tin c tch tr li v x l, hin th v tnh
trng ca ni ang gim st thu thp chng hn c k t nhp ca, c
khi c th xy ra chy, mc nc, nhit vt qu mc cho php hay
tt c vn bnh thng. Nh vy y c th c s dng cho h thng
theo di an ninh t xa.

2.3.5. Thit k mch m ha


2.3.5.1. Thit k mch m ha 8 ng sang 3 ng
Mch m ho 8 ng thnh 3 ng,
Mch ny c 8 ng vo chuyn thnh 3
ng ra dng s nh phn 3 bit. mt thi
im ch c 1 ng vo mc tch cc
tng ng vi ch mt t hp m s 3
ng ra; tc l mi 1 ng vo s cho ra
1 m s 3 bit khc nhau. Vi 8 ng vo
(I0 n I7) th s c 8 t hp ng ra nn

Hnh 2.1.1 Khi m ho 8 sang 3

ch cn 3 ng ra (Y2, Y1, Y0).

Bng trng thi mch m ho 8 sang 3

T bng trn, ta c:
Y0 = I1 + I3 + I5 + I7
Y1 = I2 + I3 + I6 + I7
Y2 = I4 + I5 + I6 +I7
Da vo 3 biu thc trn ta c th v c mch logic nh hnh di y:

Hnh 2.1.2 Cu trc mch m ho 8 sang 3

2.3.5.2. Thit k mch m ha 10 ng sang 4 ng


Mch gm bn phm 10 phm nhn t SW0 n SW9. Cc phm thng h cc
ng I0 n I9 thp do c in tr khong ni xung mass. Trong 1 thi im ch
c 1 phm c nhn ng ln cao, cc ng khc u thp. Khi 1 phm
no c nhn th s to ra 1 m nh phn tng ng v s lm sng led no ni
vi bit 1 ca m s ra . M ny c th c b gii m sang led 7 on hin th.
V d khi nhn phm SW2 m s to ra l 0010 v led hin th s 2. Nh vy mch
s dng 1 b m ho 10 ng sang 4 ng hay cn gi l mch chuyn i m thp
phn sang BCD.

Hnh 2.1.3 Mch m ho 10 sang 4 v n led hin th


R rng vi 10 ng vo, 4 ng ra; y l 1 bi ton thit k mch logic t hp
n gin s dng cc cng nand nh hnh di y:

Hnh 2.1.4 Cu trc mch m ho 10 sang 4


V y l bng s tht ca mch m ho 10 ng sang 4 ng

Trong thc t h thng s cn s dng rt nhiu loi m khc nhau nh m hex,


np cho vi iu khin, m ASCII m ho t bn phm my tnh dng in k t ri n
cc m phc tp khc dng cho truyn s liu trn mng my tnh, dng trong vin
thng, qun s. Tt c chng u tun theo quy trnh chuyn i bi 1 b m ho
tng ng.
2.3.5.3. Thit k mch m ha u tin
Vi mch m ho c cu to bi cc cng logic nh hnh trn ta c nhn xt
rng trong trng hp nhiu phm c nhn cng 1 lc th s khng th bit c m
s s ra l bao nhiu. Do m bo rng khi 2 hay nhiu phm hn c nhn, m
s ra ch tng ng vi ng vo c s cao nht c nhn, ngi ta s dng
mch m ho u tin. R rng trong cu to logic s phi thm 1 s cng logic phc
tp hn, IC 74LS147 l mch m ho u tin 10 ng sang 4 ng, n c tch

hp sn tt c cc cng logic trong n. K hiu khi ca 74LS147 nh hnh 2.1.5


bn di:

Hnh 2.1.5 IC74LS147


Bng s tht ca 74LS147

Nhn vo bng s tht ta thy th t u tin gim t ng vo 9 xung ng vo


0. Chng hn khi ng vo 9 ang l 0 th bt chp cc ng khc (X) s BCD ra
vn l 1001 (qua cng o na). Ch khi ng vo 9 mc 1 (mc khng tch cc)
th cc ng vo khc mi c th c chp nhn, c th l ng vo 8 s u tin
trc nu n mc thp.
Vi mch m ho u tin 8 ng sang 3 ng, cng c IC tng ng l
74LS148.

2.3.6. Thit k mch gii m


Mch gii m l mch c chc nng ngc li vi mch m ho tc l nu c 1 m
s p vo ng vo th tng ng s c 1 ng ra c tc ng, m ng vo
thng t hn m ng ra. Tt nhin ng vo cho php phi c bt ln cho
chc nng gii m. Mch gii m c ng dng chnh trong ghp knh d liu, hin
th led 7 on, gii m a ch b nh. Hnh di l s khi ca mch gii m

2.3.6.1 Gii m 3 sang 8


Mch gii m 3 ng sang 8 ng bao gm 3 ng vo to nn 8 t hp trng
thi, ng vi mi t hp trng thi c p vo s c 1 ng ra c tc ng.
Bng s tht mch gii m 3 sang 8

Hnh 2.1.6 Khi gii m 3 sang 8


T bng s tht ta c th v c s mch logic ca mch gii m trn

Hnh 2.1.7 Cu trc mch gii m 3 sang 8

Rt gn hm logic s dng mch gii m:


Nhiu hm logic c ng ra l t hp ca nhiu ng vo c th c xy dng
t mch gii m kt hp vi mt s cng logic ng ra(mch gii m chnh l 1
mch t hp nhiu cng logic c MSI). Mch gii m c bit hiu qu hn so vi
vic s dng cc cng logic ri trong trng hp c nhiu t hp ng ra.
V d sau thc hin mch cng 3 s X, Y, Z cho tng l S v s nh l C thc hin
bng mch gii m:
Gi s mch cng thc hin chc nng logic nh bng sau:

T bng cho php ta xc nh c

cc t hp logic ng vo S ri C

mc cao

Nh vy s cn 1 cng OR ni
chung cc t hp logic th 1, 2, 4, 7
a ra ng S

Tng t ng ra C cng cn 1 cng OR vi ng vo l t hp logic th 2, 5,


6, 7

Vy mch gii m thc hin bng logic trn s c mc nh sau:

Hnh 2.1.11 ng dng mch gii m lm mch cng


2.3.6.2 Mch gii m BCD sang thp phn
74LS42 l IC lm nhim v gii m 4 ng sang
10 ng. Cu to logic v bng hot ng ca n s
minh ho r hn cho mch gii m ny:

Hnh 2.1.9 Cu trc mch ca 74LS42, gii m 4 sang 10


Bng s tht ca 74LS42
l v c 4 ng vo nn s c 16 trng
thi logic ng ra. y ch s dng 10 trng
thi logic u, 6 trng thi sau khng dng. Vi
mch gii m 4 sang 16 th s tn dng ht s trng
thi ra. Mt im na l cc ng ra ca 7442 tc
ng mc thp
V nguyn tc ta c th m ho t n ng
sang m ng v ngc li gii m t m ng
sang n ng, chc nng gia m ho v gii m
khng r rt lm, chng u lm nhim v chuyn i t m ny sang m khc
(nhng mch trn u ni n m h 2, thc ra cn nhiu loi m khc). Cng ch c
mt s chng c tch hp sn trong IC nh 7441, 7442 l gii m BCD sang thp
phn, 7443 l gii m tha 3 sang thp phn,
Mch sau minh ho cch kt hp mch m s hc chng sau vi mch gii m
cung cp cc hot ng nh thi v nh th t, IC gii m 7445 c dng v ti
l ng c c p ln dng ln ngoi sc cung cp ca cc IC gii m thng

Hnh 2.1.10 ng dng 74LS45

Hnh trn cho thy, mch m to ra 16 t hp trng thi cho mch m ho. Phi 4
chu k xung ck th Q3 mi xung thp, cho php ng c c cp ngun; cn n
c m ch sau 8 chu k xung ck. Thi gian m ca ti l 1 chu k xung ck. Ta c th
iu chnh thi gian ny t mch dao ng to xung ck. V nguyn tc hot ng ca
mch m 74LS90 ta s tm hiu chng sau.
2.3.6.3 Gii m BCD sang led 7 on
Mt dng mch gii m khc rt hay s dng trong hin th led 7 on l mch
gii m BCD sang led 7 on. Mch ny phc tp hn nhiu so vi mch gii m
BCD sang thp phn ni phn trc bi v mch khi ny phi cho ra t hp c
nhiu ng ra ln cao xung thp hn (tu loi n led anode chung hay cathode
chung) lm cc on led cn thit sng to nn cc s hay k t.
Led 7 on
Trc ht hy xem qua cu trc v loi n led 7 on ca mt s n c cu
to bi 7 on led c chung anode (AC) hay cathode (KC); c sp xp hnh s 8
vung (nh hnh trn) ngoi ra cn c 1 led con c t lm du phy thp phn cho

s hin th; n c iu khin ring bit khng qua mch gii m. Cc chn ra ca
led c sp xp thnh 2 hng chn gia mi hng chn l A chung hay K chung.
Th t sp xp cho 2 loi nh trnh by di y.

Hnh 2.1.12 Cu trc v chn ra ca 1 dng led 7 on

Hnh 2.1.13 Led 7 on loi anode chung v cathod chung cng


vi mch thc gii m

n led hin th 1 s no th cc thanh led tng ng phi sng ln, do , cc


thanh led u phi c phn cc bi cc in tr khong 180 n 390 ohm vi ngun
cp chun thng l 5V. IC gii m s c nhim v ni cc chn a, b,.. g ca led
xung mass hay ln ngun (tu A chung hay K chung)

Kho st 74LS47

Vi mch gii m trn ta c th dng 74LS47. y l IC gii m ng thi thc


trc tip led 7 on loi Anode chung lun v n c cc ng ra cc thu h v kh
nng nhn dng ln. S chn ca IC nh sau:

Hnh 2.1.15 K hiu khi v chn ra 74LS47


Trong

A, B, C, D l cc ng vo m BCD

RBI l ng vo xo dn sng

LT l ng th n

BI/RBO l ng vo xo hay ng ra xo rn

a ti g l cc ng ra (cc thu h)

Hnh 2.1.16 Cu trc bn trong ca 74LS47 v dng s hin th

Hot ng ca IC c tm tt theo bng di y

Nhn thy cc ng ra mch gii m tc ng mc thp (0) th led tng


ng sng

Ngoi 10 s t 0 n 9 c gii m, mch cng cn gii m c 6 trng thi


khc, y khng dng n (ghi ch 2)

hot ng gii m xy ra bnh thng th chn LT v BI/RBO phi mc


cao

Mun th n led cc led u sng ht th ko chn LT xung thp (ghi ch


5)

Mun xo cc s (tt ht led) th ko chn BI xung thp (ghi ch 3)

Khi cn gii m nhiu led 7 on ta cng c th ghp nhiu tng IC, mun xo s 0
v ngha trc th ni chn RBI ca tng u xung thp, khi ny chn ra RBO cng
xung thp v c ni ti tng sau nu mun xo tip s 0 v ngha ca tng (ghi

ch 4). Ring tng cui cng th RBI trng hay mc cao vn hin th s 0
cui cng
V d: Hy xem mt ng dng ca mch gii m led 7 on:

Hnh 2.1.14 ng dng mch gii m 74LS47

Mch dao ng to ra xung kch cho mch m, ta c th iu chnh chu k


xung mch m nhanh hay chm

Mch m to ra m s m BCD mt cch t ng a ti mch gii m c


th l cho m ln hay m xung

Mch gii m s gii m BCD sang led 7 on hin th s m thp phn

By gi ta c th thay mch dao ng bng 1 b cm bin chng hn dng b thu


pht led t ca vo nu mi ln c 1 ngi vo th b cm bin s to 1 xung kch
kch cho mch m. Lu rng IC 7490 l IC m chia 10 khng ng b m ta s
hc chng sau
Nh vy vi ng dng ny ta c h thng m s ngi vo cng cng c th
m sn phm qua bng truyn, tt nhin ch hn ch s ngi vo nhiu nht l
9.
Khi ny hnh trn c trnh by dng mch c th nh sau:

Hnh 2.1.17 Minh ho ng dng 74LS47 trong mch hin th led 7 on

Ta cng c th dng nhiu IC gii m 74LS47 gii m nhiu led 7 on.V cu


trc logic v cc thng s ca IC, c th xem thm trong phn datasheet.
Nhng IC gii m led 7 on khc
Ngoi 74LS47 ra cn c mt s IC cng lm chc nng gii m led 7 on c k
ra y:

Mt s IC cn c kh nng tng hp mch m, cht v gi m thc trong cng 1


v nh 74142, 74143, 74144 thm ch bao gm c led trong nh HP5082, TIL308.
IC gii m loi CMOS
H CMOS cng c cc IC gii m led 7 on tng ng, y gii thiu qua v
4511
4511 c kh nng thc, gii m v cht
d liu cng 1 lc. Cc ng ra nh
thy trn u tc ng mc cao nn 4511
dng cho gii m led 7 on loi K chung.
Cc chn BI, LT cng c chc nng tng
t nh bn 74LS47. c bit chn LE cho
php cht d liu li khi n cao. V cu
trc c sn mch thc 8421 trong n nn
4511 cn c th thc trc tip thc hay thc
c ti ln hn nh n kh nng sng, Hnh 2.1.18 K hiu khi v chn ra ca
4511
tinh th lng, hunh quang chn khng
Nhng ng dng chnh ca n l mch thc hin th trong cc b m, ng h
DVM, thc hin th tnh ton my tnh, thc gii m trong cc b nh thi, ng h
khc nhau

Bng hot ng ca 4511 nh di y, chi tit v n bn c th xem trong phn


datasheet.

2.3.7. Thit k mch iu khin ma trn LED 5x7


2.3.7.1. Cu to ma trn LED 5x7
Ma trn LED 5x3 l mt ma trn gm 35 n LED c sp xp thnh 7 hng v 5
ct, cc n LED ny c ni chung vi nhau bi Anot hoc Katot.
2.3.7.2. iu khin ma trn LED
Trong phn ny chng ta ch i tm hiu cch thc iu khin ma trn led hin
th cc ch ci, cc con s hoc cc k hiu tnh.
Trc tin ta xc nh tt c nhng ni dung c th c hin th trn ma trn
xc nh vi tng ni dung hin th, n LED no trong ma trn s c sng v n
no khng c sng. T nhng kt qu gii m ta xc nh c nhm cc n
LED s sng cho mt hoc mt s ni dung c hin th hay ni khc i ta xem c
cc n no hot ng ging nhau th nhm thnh mt nhm. Nh vy thay v phi
iu khin 7x5=35 n LED n ta c th ch phi iu khin mt s lng nhm n
no t hn nhiu
2.3.7.3. V d
Thit k mch hin th ch DTVT trn ma trn LED

VT

VT

VT

TV

TV: Y1
T:

Y2

V:

Y3

VT:

Y4

:
T:
V:

Y5
Y6
Y7

Ta c bng chn l sau:


A B Y1 Y2 Y3 Y4 Y5 Y6 Y7
0
0
1
1
1
0
1
0
0
T 0
1
1
1
0
1
0
1
0
V 1
0
1
0
1
1
0
0
1
T 1
1
1
1
0
1
0
1
0
T bng chn l ta c c cc phng trnh ca li ra Y v c th v c s
mch.

Chng 3 MCH TUN T


3.1 Cc khi nim c bn
Chng trc cp n cc mch t hp t cc cng logic n gin n cc
mch tch hp MSI phc tp hn nh mch chuyn i m, dn knh, tch knh.
Chng c mt c im l ng ra s thay i trng thi theo trng thi ng vo
m khng k ti cc trng thi trc ca n, ngha l chng khng c tnh nh.
n gin nh mch trn hnh 3.1.1, nu A = 1 th Y = 0

Hnh 3.1.1 Cng NOT

chng ny, ta s ni n mt loi ln khc ca mch s, l mch tun t.


Khc vi mch t hp, trng thi ng ra ca mch tun t tu thuc khng nhng
vo cc trng thi ng vo m cn vo c 2 trng thi trc ca ng ra.
Khng nhng th, trng thi ng ra s khng thay i ngay khi ng vo thay i
m li cn phi i n khi c xung lnh gi l xung ng h (clock). Nh vy mch
tun t va c tnh nh va c tnh ng b.
C mch t hp v tun t u c s dng nhiu trong cc h thng s. Mt h
tun t c th biu din mt cch tng qut nh sau:

Hnh 3.1.2 H tun t


Phn t hp s nhn tn hiu logic t u vo bn ngoi v t u ra ca cc phn
t nh, n tnh ton da vo cc u vo ny cho ra cc u ra khc nhau, trong

mt phn c em sang khi cc phn t nh ct gi i; u ra ca phn t nh


c th a ra ngoi hay a iu khin phn t hp. Phn iu khin s cho php phn
nh v t hp hot ng theo mt s yu cu ra.
Nh vy, cc u ra ca h thng s va ph thuc vo cc u vo va lin quan
n thng tin lu tr bn trong ca phn t nh. Phn t nh c th l mt mch
logic nhng c khi ch l mt ng ni phn hi t ng ra v ng vo.

3.2. Mch cht


Nh tn gi ca n, mch c th ci li, gi li trng thi logic ng vo

Hnh 3.1.4 K hiu khi cht SR v bng hot ng

3.2.1. Mch cht cng NAND


Hy xem cu to ca mch di y:

Mch gm 2 cng logic Nand


mc cho nhau, c 2 ng vo l
S (set: c ngha l t) v R (reset:
c ngha l t li). 2 ng ra k
hiu l Q (u ra bnh thng) v
Q (u ra o, tc l c trng thi
logic ngc li vi Q)
Hnh 3.1.3 Mch cht cng Nand
o

Hot ng ca mch nh th no?


o

Khi thit lp mch cht t S = 0, R = 1


Do S = 0 nn Q = 1 bt chp ng cn li
Vy ng ra n nh s l Q = 1 v Q = 0

Khi xo mch cht S = 1 v R = 0

Do R = 0 nn Q = 1 bt chp ng cn li
Vy ng ra n nh s l Q = 0 v Q = 1
V l do i xng nn hot ng thit lp v xo mch cht ngc
nhau.
o

Khi ng vo thng ngh S= 1 R=1


R rng cha th bit ng ra Q v Q nh th no
Hy xt n trng thi trc :
V vy khi S=1 R=1 trng thi ra khng thay i tc l trc nh
th no th sau vn vy (Qo v Qo)

Khi thit lp v xo cng lc S=0, R=0


R rng khi ny c 2 cng NAND u c mc vo l 0 nn mc ra l
1, y l iu kin khng mong mun v quy c Q v c trng thi
logic ngc nhau. Hn na khi S, R tr li mc cao(1) th s khng th
d on Q v Q thay i; v vy trng thi ny khng c s dng cn
gi l trng thi cm.

Nh vy, mch c 2 trng thi ra n nh l 0 v 1; mch c th nhn tn hiu s


vo (trong trng hp n gin ny ch l 0 v 1) v a c n ra, v t y kh
nng nh (lu tr d liu), ng b, v mt s im khc cng c th c thc hin
c. Ta s tm hiu k hn nhng mch sau . Mch hot ng nh trn c
coi l 1 mch cht, 1dng mch tun t c bn nht.
3.2.2 Cht cng NOR
Mch cht nh trn c th
thay th 2 cng NAND bng 2
cng NOR nguyn l hot ng
cng tng t nhng ng vo S,
R tc ng mc cao
Hnh 3.1.6 Cht cng NOR

Hnh 3.1.7 Dng sng minh ho v bng hot ng ca mch cht cng NOR
Thy rng cc mch tun t d l mch cht kho st trn hay cc mch cao
hn th u c cu to bi cng logic c bn. Mc d t thn cng logic khng th
lu tr c d liu nhng khi bit kt hp vi nhau theo mt cch thc cho php tu
theo mc phc tp, quy m kt hp m s c mch cht, mch lt, ghi dch hay
hn na l cc b nh, x l.
3.2.3. ng dng ca mch cht:
Mch cht nh tn gi ca n c s dng nhiu trong cc h thng s cn cht
hay m d liu trc khi c x l iu khin hay truyn nhn. Ngoi ra n cn
c s dng lm mch chng di v mch to dng sng vung.
a. Mch chng di:
o

Hin tng di do cc thit b c kh gy nn khi ng ngt chuyn


mch in t. Mch cht c th c dng chng di nh thy
chng 1

Mch minh ho

Hnh 3.1.8 Cht NAND chng di

b. Mch to dao ng sng vung


Mt mch cht c bn kt hp vi mt s linh kin R , C to nn mch
dao ng sng vung do ng ra lt trng thi qua li gia mc 1 v 0. Mch
thit lp v xo t ng theo thi hng np x ca t C v tr R.
o

Tn s dao ng tnh theo gi tr R, C l


f = (R+R3)C

Mch minh ho

Hnh 3.1.9 ng dng cht to dao ng sng vung

3.3. Cht NAND khi c xung ng h


Nh ni n phn trc, cc mch tun t cn c mt c tnh na l tnh
ng b m mch cht cha th hin. Trong h thng mch logic, cc mch phi thay
i trng thi c trt t hay ng b nhau th mi c th khng ch cc trng thi ra
theo cc thi im chn trc. Lc ny ngi ta s dng chn Ck (clock_ng h: v
thng thng tn hiu trn chn ny c sng dng in p nh tn hiu ca ng h)
minh ho qua hnh sau
o

Mch cht c thm vo 2 cng nand trc cng vi 1 ng iu khin ck

Bng s tht ca cht Nand khi


c thm ck

Hnh 3.1.10 Cht NAND c thm xung ng h


Hot ng ca mch c th gii thch theo bng s tht:

Mch va nu cn c mt tn rt thng dng: l flip flop (vit tt l FF). C th


y l mch FF RS. Cc FF c 4 dng kch hot t chn Ck: kch hot theo mc cao,
mc thp; cnh ln, cnh xung (ti thi im xung Ck c mc hoc cnh tng thch
th FF mi c php chuyn trng thi).

Do trong cc s tay tra cu IC s, cc trng thi kch hot ny c k hiu nh


sau

Bi 2.1: Flip-flop v cc vi mch in hnh

3.4. Tng quan v flip flop (FF)


FF l mch c kh nng lt li trng thi ng ra tu theo s tc ng thch hp ca
ng vo, iu ny c ngha quan trng trong vic lu tr d liu trong mch v
xut d liu ra khi cn.
C nhiu loi flip flop khc nhau, chng c s dng rng ri trong nhiu ng dng.
Cc mch FF thng c k hiu nh sau

Hnh 3.1.11 K hiu FF


Nu cc ng vo s quyt nh ng ra l ci g th ng ng h ck li ch ra
rng khi no mi c s thay i . Chn Ck c th tc ng mc thp hay mc cao
tu vo cu trc bn trong ca tng IC FF, do vi mt IC FF c nh th ch c mt
kiu tc ng v ch mt m thi, v d vi IC 74112 ch c mt cch tc ng l xung
Ck tc ng theo cnh xung.

3.5. Cc loi FF

Hnh 2.1.13 K hiu khi ca 4 loi FF ny bi cnh ln Ck


a) FF SR

Hnh 3.1.14 Dng sng minh ho cho FF RS


FF RS ny cnh ln khi s k hiu hnh tam gic s khi v du mi tn ln
trong bng trng thi.

FF RS ny bng cnh xung tng t v c kh hiu thm hnh trn nh hay gch u
Ck ch cnh xung k hiu khi v v du mi tn xung bng trng thi.
b) FF JK
FF JK b sung thm trng thi cho FF RS ( trnh trng thi cm)

Hnh 3.1.15 Dng sng minh ho cho FF JK


Nhn thy u vo J, K iu khin trng thi ng ra theo ng nh cch m S R
lm tr 1 im l khi J = K = 1 th trng thi cm c chuyn thnh trng thi ngc
li ( vi J = K = 0 ). N cn gi l ch lt ca hot ng.
T dng sng c th thy rng ng ra FF khng b nh hng bi sn xung ca
xung ck cc u vo J K cng khng c tc ng tr khi xy ra tc ng ln ca Ck
FF JK c th to thnh t FF SR c thm 2 u and c ng ra a v nh hnh:

Hnh 3.1.16 FF JK t FF SR
Cn cu to bn trong ca FF JK kch bng cnh sn s nh sau:

Hnh 3.1.17 Cu trc mch ca FF JK


c) FF T
Khi ni chung 2 ng vo JK nh hnh di th s c FF T: ch c mt ng
vo T, ng ra s b lt li trng thi ban u khi ng T tc ng v mi khi c
cnh sn ln hay xung ca xung ck.
K hiu khi v bng trng thi ca FF T nh sau:

=>
Hnh 3.1.18 K hiu khi ca FF T

Hnh 3.1.19 Dng sng minh ho cho hot ng ca FF T


FF T c s dng chnh to mch m chia 2. Khi T ni ln mc 1 (V cc) hay
trng, xung kch ln lt a vo ng Ck. Nhn thy ng ra Q s lt trng thi
mi ln ck xung hay ln. Tn s xung ng ra Q ch cn bng mt na tn s
ng vo ck nu a Q ny ti cc tng FF sau na th ln lt tn s f s li c
chia i. y l nguyn l chnh ca mch m s c xt n phn sau.

Hnh 3.1.19a FF T dng lm mch chia tn


d) FF D
Khi ni ng vo ca FF RS hay JK nh hnh th s c FF D: ch c 1 ng vo
gi l ng vo data(d liu) hay delay(tr hon). Hot ng ca FF D rt n gin:
ng ra s theo ng vo mi khi xung Ck tc ng cnh ln hay xung.

=>
Hnh 3.1.20 K hiu khi

Hnh 3.1.21 Dng sng minh ho cho hot ng ca FF D


FF D thng l ni chuyn d liu t ng vo D n ng ra Q cung cp cho
mch sau nh mch cng, ghi dch nn hn na ng vo D phi ch mt khong
thi gian khi xung ck kch th mi a ra ng ra Q, do FF D cn c xem nh
mch tr hon, ng D cn gi l delay.
e) Mch cht D

Cc FF ny bng mc u c th tr thnh mch cht khi chn ck cho mc tc


ng lun. Thng dng nht l cht D. Mch c to bi FF D khi thay ng vo
ng b bi ng vo cho php (enable: E) tc ng mc cao.
Cu to k hiu v bng trng thi nh nhng hnh sau:

Hnh 3.1.22 K hiu khi v bng s tht ca cht D

Hnh 3.1.23 Cu to cht D

3.6. Flip flop khi c thm ng vo trc tip


Nh thy cc FF xem xt trn khi cp in s
c th xy dng ngay trng thi ca ng ra v n
cn tu thuc vo cu trc ca mch v cc yu t
ngu nhin khc. V l do ny 2 ng vo mi
c thm vo xc nh chnh xc trng thi
Hnh 3.124 K hiu FF SR c

logic ra lc cp in (m ngun) hay bt c lc no

thm ng Pr v Cl

mun, n hon ton c lp vi trng thi logic


cc ng vo ng b J, K, R, S, D, T v k c

xung ng h ck, tc l chng ginh quyn u tin trc ht quyt nh ng ra.


Chng c gi l ng vo trc tip (ng vo khng ng b) v t tn l
Preset (Pr) c ngha l t trc v Clear (Cl) c ngha l xo

Cn phi rng khng c php t chn Pr = Cl = 0 v khi Q = Q' =1 trng


thi cm. Chn Pr, Cl khi ny khng c tc dng g, khng xc nh c trng thi
ra. Do , nhiu mch FF ch c 1 ng Clear xo mch khi cn m khng c
ng Pr; c FF th li khng c c 2 ng ny.
V cu trc bn trong ca FF khi ny, 2 ng Pr v Cl s c a vo tng trung
gian ca cc FF, nh trong cu to ca IC 74LS76.

3.7. ng dng ca FF
3.7.1. Mch m khng ng b
Trong nhng phn trc ta c bit n 2 loi mch tun t c bn l mch
lt v mch ghi dch; v cng bit rng nhiu FF ni li vi nhau c th hot ng nh
mt mch m hay thanh ghi (nh nhiu bit). Nhng mi ch l nhng mch nh
c bn, phn ny s cp n chi tit hn cu to, hot ng v nhiu ng dng ca
nhiu mch m khc nhau. Phn ln chng dng mch tch hp. H thng s ngy
nay s dng kh nhiu loi mch m, c th dng m xung, m sn phm, m
lm ng h, nh thi gian v r rng chng l cc mch logic nn chnh xc v
d dng thit k hn nhiu so vi cc loi mch tng t.
3.7.1.1. m khng ng b theo h nh phn (chia 2)
Mch m ln
Hnh di y trnh by mt mch m gm 4 FF T mc ni tip. Cc ng vo
T (hay J=K) ca c 4 tng FF u trng hay ni ln +Vcc. Xung cn m c a
vo ng ck tc ng cnh xung ca tng FF u tin (n c th l mt chui xung
vung c chu k khng c nh)
Cc ng ra Q ln lt c ni ti ng vo m ck ca tng sau n (nu c).
Chng c t tn l Q0 (LSB), Q1, Q2, Q3 (MSB)

Hnh 3.3.1 B m nh phn 4 bit khng ng b c bn

Hnh 3.3.2 Gin thi gian xung ca ng vo v cc ng ra b m:


Mch s m nh th no?
Mch m thng hot ng trng thi ban u l 0000 do mt xung tc
ng mc thp s c p vo ng Cl ca cc tng FF t trng thi ng ra l
0000.
Khi xung m ck tc ng cnh xung u tin th Q0 lt trng thi tc l Q0 = 1.
cnh xung th 2 ca xung ck, Q0 li lt trng thi mt ln na, tc l Q0 = 0. Nh
vy c sau mi ln tc ng ca ck Q0 li lt trng thi mt ln, sau 2 ln ck tc ng,
Q0 lp li trng thi ban u, do nu xung ck c chu k l T v tn s l f th xung
ng ra Q0 s c chu k l 2T v tn s cn 1/2f. Nh vy xung m ck c chia
i tn s sau 1 tng FF.

Do Q0 li tr thnh ng vo xung m ca FF th 2 (FF B) nn tng t tn


nh vy fQ1 bng mt na fQ0. Vi 4 tng FF th
fQ3 = 1/2fQ2 = 1/4fQ1 = 1/8fQ0 = 1/16f
Nh vy vi 4 FF ta c 16 trng thi logic ng ra t 0000(010) xung m u
tin n 1111 (1510) xung m th 16, tc l tr thp phn ra bng s xung m vo
v v vy y l mch m nh phn 4 bit (c 4 tng FF, tn s c chia i sau mi
tng) hay mch m chia 16
Mch c xp vo loi mch m ln v khi s xung m vo tng th s thp
phn ra tng ng cng tng. Nhng rng ch c 16 trng thi ra nn xung m
ck th 16 mch c t ng xo v 0 m li. Mun c nhiu trng thi ra hn th
phi ni thm tng FF. Tng qut vi hot ng nh trn nu c n FF th s to ra 2n
trng thi ng ra. S trng thi ng ra hay s lng s m khc nhau cn c
gi l Modulus (vit tt: Mod) do , mch m trnh by trn cn gi l mch m
mod 16
Bng s tht ca mch m nh phn 4 bit nh sau:
S

M s ra sau khi

Tr thp

xung

c xung vo

phn ra

vo

Q3 Q2 Q1 Q0

Xo

10

10

11

11

12

12

13

13

14

14

15

15

16

17

Nhn vo gin xung v bng trng thi hot ng ca mch m ny ta thy


rng khng phi lc no cc trng thi logic cc ng ra u thay i theo nhp xung
m ck u vo nn y ch l mch m khng ng b.
Gii m mch m
Vi b m nh trn th c th lm c g ?
Chc chn l n c nhiu ng dng ri, hy xt qua mt s v d sau:
phn mch gii m hin th led 7 on, mch m c ng dng to s
m cho mch gii m t 0000(0) n 1010(910)
Cn y l 1 ng dng n gin khc: yu cu c t ra l phi bit c mch
m n mt s no (chng hn 5) ri hin th ra led. Cch mc s nh sau:

Hnh 3.3.3 Gii m mch m hin th ra led

Vy l ta c mt tr chi in t n gin theo kiu may mn. Cho b m hot


ng, ngi chi s nhn mt nt vo mt thi im bt k ngng cp xung m
ck, mch m s dng li con s ang m n. Nu s ny lm n led sng th
ngi chi s thng.
Tt nhin hon chnh ta cn phi c mt mch dao ng cp xung ck cho
mch m chy (bn c th to mch dao ng t cng logic hay mch cht kt hp
vi linh kin th ng R, C nh ni phn trc).
Mt ng dng n gin khc l dng mch m ny to khong xung vung
iu khin ti (chng hn ng c chy hay m van x) trong khong thi gian 3s
m t s 7 n s 10
Gii php gii bi ton trn l s dng cng logic to mch gii m s
0111(710) kch ng ra ln cao ri gii m s 1010(1010) kch ng ra xung
thp tr li. Hai ng gii m ny c a vo ng Pr v Cl ca mch cht
t ng ra ln mc cao khi Pr v xo n khi Cl. Mch thc hin kt ni nh sau:

Hnh 3.3.4 Gii m mch m iu khin ti


Trong NAND1 s gii m s 7 cn Nand2 s gii m cho s 10. s m th 7
ca mch m ng ra Nand1 xung thp preset mch cht t Q ln cao. n khi
m ti 10 th ng ra nand2 khi ny xung thp (tt nhin Nand1 tr li cao ri)
thc hin xo ng ra Q lm Q xung thp. Khi mch m n 7 tr li th khong
xung vung li xut hin. N c tnh chu k. Thi gian tn ti xung vung c quyt
nh bi tn s (chu k) mch dao ng cp cho xung ck ca mch m, nu Tck = 1s

th T = 3s. Do ta c th thay i f mch dao ng thay i khong thi gian iu


khin ti.
By gi bn hy thit k b tr chi ch cn dng 3 FF T (to 8 trng thi ra). Khi
ngi chi nhn dng mch m s 5 hay s 10 th n led s sng.

Mch m xung
trc l mch m ln ln lt chia 2 tn s, s h 10 ra tng ng l t 0 n
15. Cng c khi cn mch m xung t 15 xung 0 chng hn, cch ni mch s nh
th no?
Hnh di trnh by cu trc mch m xung nh phn 4 bit. ng ra Q ln lt
ca tng trc s c ni n ng vo ck ca tng sau . Xung m ck vn tc
ng mc thp

Hnh 3.3.5 Mch m xung 4 bit khng ng b


Cc ng ra v cch thc xo mch, a xung vo ging nh trc. ng ra
Q ca tng FF u di trng thi i cnh xung ca xung vo cc ng ra khc
i trng thi cnh xung ca ng ra Q', tc l cnh ln ca ng ra Q0 ca FF
k trc. Dng sng ng vo v cc ng ra cng vi mc logic sau mi xung
vo v kt qu s m c trnh by nh hnh di y. rng sau xung ck u
tin th mch se m ngay ln s m cao nht l 15 ri dn dn xung 14, cho ti
0 tng cng sau 15 xung ck v ti xung ck th 16 mch s t ng xo v 15 m
xung tr li.

Hnh di y trnh by c 2 dng sng ca mch m ln v xung bn c th so


snh chng thy r hn nguyn l ca s m ln v m xung.

hnh 3.3.6 So snh dng sng m ln v m xung


Hy ni dy 4 FF T to ra mch m ln, mch m xung chia 16, c ng
ck tc ng mc cao.
Hy thay FF T bng FF JK v thit k tng t
Thm mt bc na l cng vi tng y FF ta s thit k mch c th m ln
m xung u c.
Nhn thy mch m ln hay xung l do ni t ng ra ca tng trc ti
ng vo ck ca tng sau do y s phi dng mt cng OR cho 2 ng vo.
Vic m ln xung c quyt nh bi mt ng iu khin chn ch ln hay
xung. Cu trc ca mch s c thit k nh sau:

Hnh 3.3.7 Mch m ln hay xung


Mun c c hai dng sng m ln v m xung nh hnh ta c th ly ra cng
lc t cc ng o v khng o ca cc tng FF ging nh hnh sau:

Hnh 3.3.8 Mch m ly ra dng sng m ln v m xung


Mch m t dng
Cc mch m trc t ng quay vng (m ln ht 15 ri reset tr li m
t u hay m xung n 0 th reset tr li m t 15 xung) nu tip tc cp xung
Ck cho mch m. By gi c mt yu cu l mch s phi dng m mt con s
no nh trc (chng hn 10). thc hin n ta phi tm cch dng FF u tin.
Mt cch m chng ta dng phn tr chi may mn l ngng cp xung ck
vo; nu mun mch t ng lm, c th dng cng logic t hp khng ch ng
vo T (chung) ca tng u, cc ng vo cng logic s l cc m s m ca s
ang m ti m mun dng. Hnh di y trnh by cch thc hin:

Hnh 3.3.9 Mch m t dng s m 10


3.7.1.2. Mch m khng ng b khng theo h nh phn (chia 2)
Vi mch m dng n FF mc ni tip th s mod (s trng thi logic ra) l 2n, v
mch s m t 0 n 2n 1 (4 FF m ti 16 trng thi). Trong nhiu trng hp ta
cn mch m c s mod khng theo 2n, chng hn m mod 10 (cn gi l mch m
thp giai hay mch m chia 10) rt hay dng hin th kt qu m dng h 10,
hay v d khc l trong ng h s cn mch m chia 6 v chia 12 hin th gi v
pht hay bt k mch m chia mod n no.Thng th trong mch m ln s m
tng theo th t lin tc t 0 n 2n 1 ri quay v 0 m tr li. Nhng cng c th
khng tng theo th t hay th t nhng khng lin tc min l s trng thi n.
Tr li mch m t dng hnh trn: khi m ti mt s nh sn (s 10) mch
s t dng, vy ta c th cho mch tip tc chy m tr li bng cch a ng
ti chn clear thay v a ti chn J, K.
Hnh mch m mod 10 c ni nh sau:

Hnh 3.3.10 Mch m mod 10

Cn l xung m ck th 10 khi s m va ln 10 th cc trng thi logic


ng ra c a v khng ch ng Cl ngay do c th thy l s 10 khng kp
hin ra phi chuyn v 0. Thc t th do thi gian tr hon gia cc cng logic
khong vi ns nn vn c s m 10 trong khong thi gian ny, ta ch quan tm ti
nh hng ny khi cn i hi mch hot ng vi chnh xc cao nh trong my vi
tnh chng hn.
nh hng ca tr hon c th hin r hn qua gin xung sau

Hnh 3.3.11 Tr hon truyn ca mch m khng ng b mod 10


Thc t th cch thit k mch m khng theo h nh phn li dng ng clear
nh trn khng c dng do:
+ Cc ng ra do c ni vi ti khc nhau nh hng n ng a v, ri tr
hon truyn qua cc cng logic na s pht sinh xung nhn, cc tng FF s khng
c xo ng thi
+ Hn na ng clear khng cn c t do xo mch lc mong mun.
Do vy c mt cch to mch m trn l nghin cu s lin h gia cc trng thi
cc ng ra ri th ni chng vi cc ng vo J, K ca tng no cho ti khi
tho bng trng thi. Hy xem cch ni nh th no:
Trc ht hy nhn vo gin xung ca mch m mod 16. Ti s m th 10
th mch phi reset tr li.

- ng ra Q0 khng thay i g d c c xo hay khng v n theo xung ck


- ng ra Q1 ti phi gi nguyn trng thi trong 2 chu k ca xung ck na do
ng J, K phi mc 0 trong khong thi gian ny, ta c th ni t chn Q3 v
J1, K1 v lc ny Q3 ang mc 0 (n cng ln 1 sau khi b xo)
- ng ra Q2 ti lc xo vn 0 nn khng cn thay i g tng FF 2
- ng ra Q3 khi xo phi tr li mc 0 ban u, lc ny Q1 cao, Q2 thp
ng thi Q0 ang i xung, do c th ni Q0 ti ng ck ca FF 3 v ni cng
and t Q1 v Q2
Kt qu ni mch nh sau:

Hnh 3.3.12 Mch m mod 10


Cui cng kim tra li thy tho hot ng. Nhng cch ny xem ra kh rc ri v
nh l on m. Thc ra n li rt hay, n c mt phng php thit k rt ng v
bi bn ta s gp li phn thit k mch m ng b phn sau.
C rt nhiu IC m khng ng b c h TTL v CMOS. y ch gii thiu
mt s IC hay dng:
74LS293
Cu to gm 4 FF JK vi cc u ra Q0 (LSB), Q1, Q2, Q3(MSB), Q0 ring
bit cho php mch hot ng linh hot. Cc u vo J, K u c ni mc cao bn
trong.

Mch c ti 2 u vo xung nhp CP (clock pulse) cng chnh l xung ck m ta


bit) cho tng 0 v tng 1 d thit k nhiu ng dng.
Hai ng vo khng ng b MR1 v MR2 (master reset) nu cng tc ng mc
cao th s hot ng nh chn clear xo mch.
S logic v s khi ca IC nh sau:

Hnh 3.3.13a K hiu khi v chn ra ca 74LS293

Hnh 3.3.13b Cu trc mch ca 74LS293


74LS293 l IC m khng ng b nhiu kiu bit ra tu cch mc dy.
m mod 16:
Xung nhp vo s vo chn CP0; chn CP1 ni ti ng ra Q0; MR1, MR2 ni
chung xung mass mch xo t ng

Hnh 3.3.13c 74LS293 m mod 16


m mod 10
Xung nhp vn vo chn CP0; chn CP1 ni ti Q0 cho s trng thi ln n
10, khi m n 10 Q1, Q3 ln mc cao nn c ni v MR1 v MR2 xo mch

Hnh 3.3.13d 74LS293 m mod 10


m mod 14
CP0, CP1 vn ni dy nh c khi m ti 14 th Q3Q2Q1Q0 l 1110 do phi
ni Q3 ti MR1, Q2, Q1 ti MR2 qua cng nand.

Hnh 3.3.13e 74LS293 m mod 14


74LS90, 74LS92, 74LS93

3 IC trn cng cc lot ca n (LS, HC, ) cng rt hay dng. S mch v s


chn nh hnh. Cng ging nh 74LS293 tng FF u kh c lp dng linh
hot hn, mun m y s trng thi ca IC th cn phi ni ng ra Q0 ti
ng vo B; hai ng reset thng ni AND xo mch m khi a ln cao. Khi
m ln th cn phi cho 1 trong 2 ng ny ln cao trong chc lt (khong vi mi
ns) ri a xung thp tr li. Ring 74LS90 c thm 2 ng reset 9 (R9(0) v
R9(1)). Bnh thng mt trong hai hoc c 2 ng ny c gi thp, mun ng
ra c s m l 9 th phi a c 2 ng ln cao.Nh vy ta c th dng 74LS93
lm mch m mod 10, mod 12 hay mod 16 ging nh 74LS293 trn. Cch mc dy
bn c th d dng lm c.

Hnh 3.3.14a Chn ra IC m 74LS90 74LS92 74LS93

Hnh 3.3.14b k hiu khi ca 74LS90 74LS92 74LS93


Cn khi cn s mod ln ta c th dng 4020 (mod 16384 tc 14 tng FF) hay 4040
(mod 4096 tc 12 tng FF). Do dng nhiu tng FF v li thuc loi CMOS c nn tn
s hot ng kh gii hn ch khong 2MHz.

3.8. Mch m ng b
phn trc ta bit rng nhng mch m khng ng b khi c nhiu tng
FF s tch lu nhiu tr hon truyn ca mi tng lm cho n ln hn c chu k m
xung khin ton mch c th hot ng sai logic nht l khi hot ng tn s cao.
Nh mch m bn bit chia 2 ni trc: khi s m tng t 1110 ln 1111 ch
cn ch ng ra ca FF 0 thay i nn ch mt 1tD. Khi s m tng t 1011 ln
1100 i hi ba FF chuyn mch lin tip nn s phi mt 3tD. Trng hp na khi s
m t ng reset v 0000 th c 4 FF u chuyn trng thi do tr hon truyn s
l 4tD. C th khc phc nhng gii hn ny bng vic s dng b m ng b hay
cn gi l b m song song bi v tt c cc tng u c kch bi cng mt xung
nhp Ck u vo. Khi cc FF chuyn mch cng mt lc khin thi gian tr hon
ca mch m bng tr hon truyn ca mt FF bt k s tng. m bo hot ng
ng, mt s cng logic c thm vo khng ch ng vo J, K (T). Trc ht
l mch m chia 16.
3.8.1 m ln chia 16
Ni dy nh th no ...?

Hnh 3.3.16 Mch m ln ng b mod 16

Bng trng thi v dng sng m ln ca mch m ng b hon ton ging nh


mch m khng ng b do ta s da vo chng xc nh xem mch hot
ng nh th no.
Cng cn lu l y ta xy dng mch m ln mod 16 vi 4 FF JK c xung
Ck tc ng cnh xung. Ta cng c th lm mch tng t, vi xung ck tc ng
cnh ln hay s dng FF T thay cho FF JK.

mch m ng, mi xung kch ck tc ng cnh xung, ch c FF no d


kin s lt trng thi mi phi T = 1(J, K c ni chung vi nhau v c coi nh
l ng chung T). Nhn vo bng trng thi hot ng ca b m ln ta s thy c
cn phi kt ni nh th no
- ng ra Q0 s thay i trng thi theo cnh xung ca xung kch ck do
ng T0 c trng (mc cao).
- ng ra Q1 i trng thi khi c xung kch xung Q0 do Q0 c a thng
vo ng T1
- ng ra Q2 i trng thi khi m n s 4, 8, 12, 0, lc ny th Q0 v Q1 u
xung thp; vy ng vo T2 s l And ca hai ng vo ny
- ng ra Q3 o trng thi khi s m l 8 v 0 khi ny Q0, Q1, Q2 u tc
dng cnh xung, vy ng vo T3 s l And ca 2 ng vo ny
Vy mi FF u phi c u vo T c ni sao cho chng mc cao ch khi no
u ra ca cc FF trc n mc cao.
T0 = 1
T1 = Q0
T2 = Q1.Q2
T3 = Q0.Q1.Q2
v t y mch c kt ni vi hai cng And c thm vo

Hnh 3.3.17 Mch m ln ng b mod 16

Tr hon truyn ca mch m s bng tr hon truyn qua mt FF cng vi tr


hon truyn qua cc cng and. Vi mch m kho st trn s tng l n = 4, s
cng and phi dng thm l n 2 = 2 nhng thi gian cng ch tr hon trn mt cng
and thi nn tr hon truyn tng cng l:
tD = tD(FF) + tD(and)
Do tr hon truyn ca cng and th nh hn nhiu so vi tr hon truyn ca FF
nn thi gian ny nh hn so vi thi gian tng ng ca mch m khng ng b.
iu ny cn c ch hn khi trong mch c rt nhiu tng FF v mch phi hot ng
tn s cao. y l im ni bt ca n so vi mch m khng ng b nhng r
rng n s phi c cu to phc tp hn
V d:
Hy xem tn s hot ng ln nht ca mch trn (fmax) khi tD(FF) = 50ns, tD(and)
= 20ns v so snh n vi fmax ca mch m khng ng b cng s bit
Ta c tr hon truyn tng cng ca mch l tD = 50 + 20 = 70(ns). Chu k xung
nhp ck u vo Tck phi ln hn 70 ns ny do
fmax = 1/70ns = 14,3MHz
By gi vi b m mod 16 khng ng b
fmax = .50ns = 5MHz
Nh vy r rng b m song song hot ng c tn s cao hn hn

By gi gi s cn lm mch mod 32 t mod 16, th ta s phi mc thm 1 tng FF


th 5. Tr hon truyn ca m song song s vn l 70ns suy ra fmax = 14,3MHz. Cn
vi b m khng ng b th do c thm 1 tng nn fmax = 1/5.50ns = 4MHz, tn s
ny b gim hn i.
3.8.2 m ng b ln xung
hnh 3.3.17 trn l mch m ng b ln, ta c th xy dng mch m ng
b xung ging nh cch lm vi mch m khng ng b tc l dng cc u ra
o ca FF iu khin cc u vo T ca tng k tip. Nh vy vi mch m
xung mod 16 th u ra Q s c ni ti T1, T2, T3 v b m s m xung t 15,
14, 13, ri v 0 reset tr li 15.
By gi thm 1 ng iu khin ch m ging nh bn mch m ln
xung khng ng b ta c mch m ln xung ng b. K = 1(up) m ln, K =
0(down) m xung. Mch c xy dng nh hnh sau (lu xung ck tc ng cnh
ln)

Hnh 3.3.18 Mch m ng b ln hay xung


3.8.3 m ng b khng theo h nh phn
thit k mch m mod m bt k t mch m mod 2n (m <= 2n) ta c th dng
ng clear xo mch khi m n s m, cch khc l nhn vo gin xung
th nghim vic ni cc u vo J, K. y ta s xt n mch m mod 10 hay dng
Ngoi xung ck c a vo tt c 4 tng FF th cn phi gii quyt cc ng J,
K

l khi mch m n s 10 th Q0 = 0 v Q2 = 0 khng i trng thi khi


reset v 0 nn FF 0 v FF 2 c kch bnh thng nh ni.
Cn vi FF 1, Q1 i trng thi khi Q0 cao ng thi Q1 phi c gi lun
mc thp s m th 10, khi ny c th tn dng ang cao cho ti khi reset, vy
J1 = K1 = Q0.
Sau cng vi FF 3 Q3 s c reset v 0 khi c 3 Q0Q1Q2 u v 0. Vy J3 = K3
= Q0Q1Q2
Kim tra li thy rng mch ng l hot ng m chia 10. Bn c th xem phn
thit k mch m ng b sau hiu r cch ni mch, cn y l cu trc mch
m t:

Hnh 3.3.19 Mch m mod 10 ng b


3.8.4 m t trc s m
Nhiu b m song song dng IC tch hp c thit k c kh nng np trc s cn
m thay v 0 nh ta thng thy. S t trc l bt k trong nhng s c th ra ca mch v
mch c th m ln hay m xung 1 cch ng b hay khng ng b t s ny.Vic ny
ging nh l np song song ghi dch vy, bng cch tn dng ng Cl v Pr (ng khng
ng b c lp vi ck). Cu trc mch vi 3 tng FF c minh ho nh hnh v hot ng
np c thc hin nh sau:

hnh 3.3.20 Mch m t trc 3 bit

Gi s mch ang m hay dng 1 s m no


a sn s m c trng thi cn np vo ng A B C
t mt xung mc thp vo u LD (parallel load), xung ny s cho php trng
thi logic ABC qua cng Nand a vo 3 tng FF qua 3 ng Pr hay Cl (tu thuc
bit mc thp hay cao). Kt qu l Q0 = A, Q1 = B, Q2 = C
Khi LD ln cao tr li, lc ny nu c xung nhp Ck th mch s tip tc m t s
va np (trc ck v cc ng T khng c tc dng).
3.8.5 Mt s IC m ng b
Nhm 74LS160/161/162/163
C 4 IC u c cng kiu chn v cc ng vo ra tng t nhau; c xung ck ny
cnh xung do trong cu to c thm mch m sau ng ng b; c kh nng
np song song; preset ng b; c th ni chng nhiu IC c s mod ln hn nhiu
do c
- LS160, LS161 l IC m chia 10 cn LS161 v LS163 l m chia 16
- LS160 v LS161 c chn xo Cl khng ng b cn LS161, LS163 c chn xo
Cl ng b
Nhm 74190, 74191

74LS190 l mch m chia 10 cn 74LS191 l mch m chia 16. Chng c kiu


chn ra nh nhau v chc nng cng nh nhau
- Chn EnG (enable gate) l ng vo cho php tc ng thp; chn U/D l
ng cho php m ln hay xung (thp)
- Chn RC (ripple clock) xung rn s xung thp khi m ht s; c dng cho
vic ni tng v xc nh tn s ca xung max/min khi ni ti chn LD (load) ca tng
sau.
Cch ni tng nh sau: chn RC ca tng trc ni ti chn ck ca tng sau, khi
ny tuy mi mch l m ng b nhng ton mch l m bt ng b. Cch khc l
chn RC ca tng trc ni ti chn EnG ca tng sau, xung ck dng ng b ti cc
tng.
Nhm 74LS192, LS193
LS192 l mch m chia 10 cn LS193 l mch m chia 16
C 2 loi u cu trc chn nh nhau v u c kh nng m ln hay xung
Khi m ln xung ck c a vo chn CKU cn khi m xung xung ck c
a vo chn CKD
Khi m ln ht s chn Carry xung thp, khi m xung ht s chn Borrow
xung thp. 2 chn ny dng khi cn ni tng nhiu IC
c bit mch c th t trc s m ban u cc chn ABCD v chn LD
xung thp cho php np s ban u.
Nhm 74HC/HCT4518 v 74HC/HCT4520
y l 2 IC m ng b h CMOS dng FF D v hot ng cng tng t nh
nhng IC k trn nhng v cu to c bn t cc cng logic CMOS nn tn s hot
ng thp hn so vi nhng IC cng loi b li tiu tn cng sut thp.
4518 l IC m chia 10 cn 4520 l IC m chia 16
Cu trc chn v c tnh ca chng nh nhau
Chn nhn xung ck v chn cho php E c th chuyn i chc nng cho nhau do
mch c th tc ng cnh xung hay cnh ln
Mch cng cho php ni tng nhiu IC khi ni Q3 ca tng trc ti ng E ca
tng sau.

3.9. Mch m vng


3.9.1 m vng
Mch m vng c cu trc c bn l thanh ghi dch vi ng ra tng sau cng c
a v ng vo tng u. Hnh di l mch m vng 4 bit dng FF D.

Hnh 3.3.22 Mch m vng 4 bit

Nhng rng, khi mi bt ngun cho mch m chy, ta khng bit bit 1 nm
ng ra ca tng no. Do , cn phi xc lp d liu dch chuyn ban u cho b
m. Ta c th dng ng Pr v Cl lm, nh l tng dng t s m cho
cc mch m khc ni trc, gi s trng thi ban u l 1000 vy ta c th
reset tng FF 3 t Q3 mc 1, cc tng khc th xo bng clear. C th dng mch
to xung np d liu ban u nh sau:

Hnh 3.3.23 Mch np s ban u cho mch m vng

Gi s ban u ch cho D0 = 1, cc ng vo tng FF khc l 0. By gi cp xung ck


ng b khi ck ln cao, d liu 1000 c dch sang phi 1 tng do Q 0 = 1, cc
ng ra khc l 0. Tip tc cho ck xung thp ln na, Q1 s ln 1, cc ng ra
khc l 0. Nh vy sau 4 nhp xung ck th Q3 ln 1 v a v lm D0 = 1. mch
thc hin xong 1 chu trnh. Trng thi cc ng ra ca mch nh hnh sau:

Hnh 3.3.24 Dng sng minh ho mch m vng


Hnh trn cho thy rng, dng sng cc ng ra l sng vung, dch vng quanh, chu
k nh nhau nhng lch nhau ng 1 chu k xung vo Ck. S m ra l 1, 2, 4, 8
khng phi l s xung vo (nh bng trng thi m pha di)
Vi 4 s m ra t 4 tng FF ta c
mch m mod 4. Ch 4 trng thi ra
trong tng s 16 trng thi c th,
iu ny lm gim hiu qu s dng
ca mch m vng. Nhng n cng
c u im ni bt so vi mch m
chia h 2 l khng cn mch gii m
trong cu trc mch (v thng trong
trng thi ca s m ra ch c 1 bit
1) .
3.9.2 m Johnson (m vng xon)

Hnh 3.3.25 Mch m vng xon

Mch m Johnson c mt cht thay i


so vi m vng ch ng ra o tng
cui c a v ng vo tng u.
Hot ng ca mch cng gii thch tng
t. Vi n tng FF th m vng xon cho
ra 2n s m do n cn c coi l
mch m mod 2n (m nh phn cho
php m vi chu k m n 2n). Nh
vy trn l mch m vng xon 4
bit. Bng bn cho thy 8 trng thi ng
ra v hnh di s minh ho cho s m.
Ta c th np trng thi ban u cho mch l 1000 bng cch s dng ng Pr v Cl
ging nh trn. Dng sng cc ng ra cng ging nh trn, hn th na, n cn
i xng gia mc thp vi mc cao trong tng chu k

Hnh 3.3.26 Dng sng mch m vng xon

3.10. Thit k mch m


Tuy thit k khng phi l ni dung chnh m ti liu phi cp nh y s nu
mt vi bi ton thit k in hnh gip sinh vin c th hiu su hn v mch logic
tun t.
Tr li hnh 3.3.19 y l mch m ng b chia 10 (MOD 10). Ngi ta dng
mch m mod 16 kt hp vi mt s cng logic to vic reset khi ng ra hin
th s 10. Qu trnh m ch din ra theo th t trong cc trng thi t 0 n 9, nh
vy mch n vi chu k m l 10.
C th thit k mch m theo cch khc vi cch trn theo dng lp bng trng thi
kt hp vi ba Karnaugh. Cch ny rt r rng trnh t, n c th thit k vi s mod
bt k, dng FF tu , m ln hay m xung cng c, thm ch s m khng theo
trnh t g c. Minh ho vic thit k qua v d sau.

BI TON 1:
V d thit k mch m ln ng b mod 8 dng FF JK minh ho nh hnh sau:

hnh 3.3.27 gin mch m ln mod 8

Trc ht hy cng tm hiu v s chuyn tip trng thi ng ra Q:

Gi s ng ra Q ang 0, by gi ta mun khi c xung ck th Q ln 1. Da vo


bng trng thi ca FF JK th J = 1, K = 0 hay J = 1, K = 1 (trng hp Q n+1 = 1 vi
Qn chnh l Q ang 0 trc ). Tm li khi Q t 0 chuyn ln 1 th cn J = 1, K = X
(X bng 0 hay 1). L lun tng t th:
Q t 1 chuyn v 0

cn J = X, K = 1

Q t 0 gi nguyn l 0

cn J = 0, K = X

Q t 1 gi nguyn l 1

cn J = X, K = 0

C bn trng hp chuyn trng thi ca Q c tm tt nh bng di y (c gi


l bng trng thi kch ng vo ca FF JK ):

Ging nh vy, bn c th lp c bng trng thi kch ng vo ca cc FF SR,


FF D, FF T
Sau khi nm vng quy tc chuyn trng thi ca FF trn ta mi bt u i vo bi
ton v d trn:
Do mch m c tt c 8 trng thi ng ra nn ta cn 3 FF, chn FF JK. C th tm
lt ni dung cn thit k qua mch logic sau:

Nhim v ca bi ton l tm ra mch logic X mch trn tho mn cc yu t:

- Mch c s m t 000 n 111 nn Qn+1 s l 001 n 000 (111 reset v 000)


- T trng thi ra da vo bng trng thi kch ng vo phn trn ta c th xc
nh c logic cn thit ng vo J, K ca 3 tng FF khi c xung kch ck th
chuyn ln trng thi tip theo.
Vi cc ng vo ca X l cc ng ra ca cc FF v cc ng ra ca X li l cc
ng vo kch ca cc FF, ta c bng chuyn trng thi ca X khi m:

By gi, lp ba K vi Q0, Q1, Q2 l cc bin ng vo trong khi cc ng J, K ca


3 tng FF li tr thnh ng ra. Ba K cho 6 ng ra nh sau:

T y, rt gn biu thc ta c cc hm logic din t mch logic X:


J0 = K0 = 1
J1 = K1 = Q0
J2 = K2 = Q0Q1
Ni mch X va tm c vo mch trn c th: hai ng vo J, K ca mi FF c
ni chung vi nhau (thnh ng vo T), FF 0 c ng T ni ln cao, FF1 c ng
vo T ni n ng ra Q0 cn FF 2 c ng vo T l ng ra cng And m 2
ng vo l Q0 v Q1. Kt qu cui cng l mch m nh hnh sau

Hnh 3.3.28 mch m mod 8

BI TON 2:
Thit k mch m ln/xung mod 4 dng FF JK iu khin ng c bc.

Trn thc t, ngi ta ch to c cc vi mch m rt a dng v c th p ng


c mt cch kh y cc nhu cu thc tin v lm vic rt n nh. Do , vic
thit k mch m s ch mang yu t cng c kin thc v FF nu nh khng c cc
ng dng nh v d sau: Thit k mch iu khin tc v o chiu quay ng c
bc.
* Tm hiu ng c bc (step motor)
ng c bc l ng c quay tng bc thay v chuyn ng lin tc. Cc cun dy
cm trong ng c s cn c cp dng v ngt dng theo mt trnh t c th hnh
thnh nn bc quay; v tn hiu iu khin dng s iu khin ng ct dng in
trong cc cun dy ca ng c. ng c bc rt thng dng v c s dng trong
nhiu lnh vc c bit i hi iu khin chnh xc nh u c ghi a t, iu
khin u in my in, trong tay my, ngi my (c cng sut b)

Hnh 3.3.29 ng c bc

Hnh trn l s mt ng c bc c trng vi 4 cun dy t tnh. cho chnh


xc, cun 1 v 2 phi lun trng thi ngc nhau (tc l cun 1 c cp in th
cun 2 ngt v ngc li nh vy ta c th ni ti 2 u ra Q vo ca mt FF JK.
Tng t vi cun 3 v 4 cng phi ngc trng thi nh gia cun 1 v 2.
o chiu quay ngi ta dng mt ng iu khin chn chiu quay cho ng c
v k hiu l C. ng C c lp vi vic chuyn trng thi hin ti v k tip ca cc
ng ra.
* Thit k mch iu khin
Nh vy c th tm lt bi ton nh sau:

Tn hiu iu khin tc l fx v o chiu quay l C, khi thay i hai tn hiu ny


mch s thay i tc v chiu quay tng ng. Dng 2 FF JK thit k mch m
ln/xung tng ng vi o chiu quay nh vo mch gii m 4555/4556 (la chn
mt trong hai IC ny tu thuc vo mch m li cc cun dy ng c bc). Nh
vy mch m cn thit k c th tm lc nh sau:

Lp bng trng thi logic vi Q A = A v QB = B v C l ng vo chn chiu quay,


tnh ton tng t nh bi ton trc ta c:

T bng trng thi logic, ba K c v v biu thc logic c rt gn l: J A = C.B +


C
KA = C + C.B
JB = C + C.A
KB = CA + C
* Kt qu
Cui cng ta c cu trc mch vi y cc ng vo ra

Hnh 3.3.30 Gin m cho ng c bc

Hnh 3.3.31 Mch m dng trong h iu khin ng c bc

3.10. ng dng mch m


Mch m chia 2 hay khng chia 2 ( m chia 10, m chia 6, m chia cho 12),
khng ng b hay ng b, c ng dng rng ri nhiu lnh vc. cc ng
dng nh vy mch m c dng kt hp vi nhiu loi mch khc nh dao ng,
so snh , gii m,.. Phn ny ch nu mt s loi mch ng dng chnh ca mch m
v c n gin, chng s c trnh by dng s khi. Hn na, ngy nay
c nhiu IC tch hp quy m ln hay rt ln (LSI, VLSI) kt hp nhiu chc nng
khin mch tr nn n gin hn, nhng y ch dng cc IC ri v d trnh by
nguyn l.

3.10.1 m nhiu hng hay chia tn s lin tip


Khi m s lng hin th ra s thp phn thng phi dng nhiu mch m
chia 10, chng hn 7490. Mch m u tin ni c xung m vo l hng n v,
mch m tip theo l hng chc, tip theo na l hng trm. Ta cng c th ni mch
m c nhiu s, s c gi tr thp nht l LSD v s c gi tr cao nht l MSD. V d
m t 0 ln n 999 th cn 3 mch m mc ni tip. Vi s m ti a l 999 th
tu theo du thp phn nm u m c cc tr s 999, 99.9, 9.99, .. S m cc
mch m c a vo khi hin th gm mch gii m v cc n hin th (xem
chng 9). mch hnh khi mch m 7490 th 1 m y tc t n s m 1001
= 910, th nu c thm mt xung vo na mch m s t ng reset v 0 tc ng
ra QD ca n s t 1 xung 0 to cnh xung n ng vo CLKB ca mch m
7490 th lm ng ra ca mch m ny l 0001 = 1. S m lc by gi ca 2
mch m l 1010. Tip tc nh th mch m ln 11 19 ri 20 , 21 .29, 30,
31

Hnh 3.3.32 Mch m 2 hng


Cc chn IC m, s ni mch v cc xung vo phi c thc hin ng b mch
mi hot ng. Ngoi ra, cn phi sp xp ng xo xo mch khi cn. hnh v
l mt cch nh vy: khi mi m in t cha np in nn ng xo cao xo

cc mch 5m, sau thi gian ngn (vi us), t np gn in khin ng xo


xung thp cho php cc mch m m ln, mi khi cn xo mch th n nt a
ng xo ln cao trong chc lt.
Mt khc mch m c bn l mch chia tn nn trong nhiu ng dng mch 5m
c dng nh mch 5chia tn. V d vi hai mch m thp gii mc ni tip nh
hnh trn th tn s ng ra QD ca 7490 th 2 l 1/100 tn s ca xung vo. Dng
cc ng ra khc thay v QD hay dng cc IC m khng phi thp giai (nh 7493,
7492) ta s c s chia tn mong mun.
3.10.2 Mch m s kin
Cc IC m thng c coi l trung tm ca cc mch m bin c hay s kin
chng hn m s xe vo bi, s ngi i qua ca, s sn phm i trn bng truyn
c ng gi. Hnh di minh ho cho mt mch m nh vy
Ta s phi cn mch pht hin hay cm bin chuyn i nhng thay i ca cc
hin tng trn thnh xung in kch cho mch m. Nu cn, c th thm mch lc
nhiu, khuch i v chuyn i ph hp vi ng vo IC m
Khi nhn c xung kch vo chn ck, IC m s m ln ,tu theo gii hn s
xung vo m ta c th ni chng thm nhiu IC m cho s m ln hn.
Mch gii m v hin th nh bit s cho php bit c s ngi i vo
cng
Gi s yu cu ra l ch cho php 99 ngi vo, nh vy cng cn thm 1 mch
bo trn khi s ngi vt qu s m ca mch (mch s reset) th led s sng v
nh hnh v ta c th ly mc tn hiu trn ny iu khin m ngun cho 1ng c
ng ca li. y thit k ti s m l 99 bn cng c th thit k s m tu ,
khi ny phi dng cc mch m ph hp, cc cng logic thm vo cho php bo trn
mt s tu (thit k t hp ng ra)

Hnh 3.3.33 Hnh minh ho mch m s kin


3.10.3 Mch m tn
My m s kin (m tch lu) trn c th c thm mt s mch in tr
thnh my m tn s (frequency counter). My m tn s y kh phc tp.
y ch trnh by nguyn l ca my m tn s n gin. Hnh di l s khi m
phn trung tm gn ging nh my m s kin

Hnh 3.3.34 Cc khi mch m tn


Trc tin l mch dao ng, v d dao ng cng logic m ta c bit, v
chia tn s xung c tn hiu TTL i xng tn s 0,5Hz. y l tn hiu iu
khin c chu k l 2s vi thi gian cao l 1w v thp l 1s.
u chu k tn hiu xung m cng(t mch dao ng chia tn) ln cao m cng
And cho xung vo khi m (sau khi c x l nh khuch i, lc, nn dng
mch giao tip) v mch m m ln sau ng 1s xung m cng xung thp ngn
khng cho xung vo khi m. ng thi khi xung m cng va xung thp mch
to xung cht s to xung hng dng hp cht s m ca khi m vo khi
cht (khi cht c bn l cc FF D), y s m c lu gi cho n khi s m
mi c cht vo.
S m cht c gii m v hin th. V cng And ch m ng 1s nn nu c
n xung vo th s m l n v tn s l n Hz. Do mch hnh trn cho php o tn
s t 0 Hz ln n 9999 Hz. Trn tn s 9999 Hz (t s xung vo khi m trong 1s
ln hn 999 xung) n bo trn s sng (hoc mt cch bo trn no khc v d nh
nhy ton mt s hay hin ln s 1 hng cao nht tc MSD).

Khi xung m cng t cao xung thp v s m c cht vo nh ni trn th


cnh xung ca xung m cng qua mch dao ng a hi n n cho xung ra c
cnh xung tr hon mt thi gian ngn so vi cnh xung ca xung vo, cnh cung
ca xung ra n mch to xung reset pht ra xung reset thch hp cho cc mch
m v mch bo trn.
Sau xung m cng li ln cao v xung vo c m trong ng 1s . , sau ng
1 s xung m cng xung thp v s m ln 2 c cht vo. Trong sut thi gian
xung thp v cao tr li, tng cng 2s, my vn hin th s m ln 1. Khi s m
ln 2 c cht vo my s hin th s m ln 2 m c th ging hay khc trc.
Mch tip tc hot ng theo chu k trn.
3.10.4 ng h s:
Phn ny trnh by v ng h s dng linh kin ri. Thc ra gi y mch dng
ny khng cn c s dng na v cng ngh tch hp cho php to ra cc ng
h s nh gn tn in, nhiu chc nng hay c th dng vi iu khin vi x l
lp trnh cho ng h s. Tuy nhin ng h s dng ny cho php ngi hc hiu
c nguyn l v bit c ng dng thc t ca mch m nn vn c nu ra
y.
S khi ca mch nh hnh di y:

Hnh 3.3.35 Khi ng h s (kiu c)

Ngun dao ng tn s 1 Hz cung cp cho ng kch ck c ly t mch dao


ng thch anh kt hp cng logic (nu mun chnh xc), ly t dao ng 555 (nu
mun tng i chnh xc) hay ly t li in xoay chiu 220V/50Hz chia p, lc,
nn dng v chia tn cng c.
Tn s 1Hz kch cho mch m 7490 cho php hin th hng giy led 7 on
cng lc chia 10 ng ra QD cung cp xung cho mch m sau, tc l tn s chia
cn 0,1Hz
Tng t tn s 0,1Hz kch cho 7492 m hin th hng chc giy led 7 on,
ng thi chia 6 ng ra to xung kch cho hng pht
C vy cch chia v hin th trn cho php chia tn s ti 1/gi v hin th ti
hng gi.
hin th hng chc gi (ch l 0 hay 1) th cn dng 1 FF JK l (m mod 2
dng 1 na IC 74LS73): khi QD ca 7490 k trc t cao xung thp (sau khi m
9) th s to xung kch cho FF JK ny lm n lt trng thi ng ra, tc l Q ln
cao lm sng s 1. Khi ng ra Q0, Q1 ca 7490 v ng ra Q ca na 74LS73 u
(FF JK u) u ln 1 th khi ny ng h ch bo 12 gi 59 pht 69 giy cng 1 giy
v ng ra ca cng Nand xung thp xo FF v xo mch m 7490 k . Hai hin
th gn vi 2 mch ny quay v 0. hin th ch AM, FM ta dng FF JK th 2 ca
74LS73: khi Q ca FF JK u xung thp th Q ca FF JK th 2 ln cao, mc ny cho
php hin th ch AM, cn khi Q ca FF JK u xung thp mt ln na th khi ny
ca FF JK th 2 s ln cao tc l ch PM c thy cn ch AM mt. Hin th
AM/PM n gin ch l cp mc p cao phn cc cho led hnh AM/PM khng phi
dng mch gii m nh cc hng trc.

3.11. Thanh ghi


3.11.1. Gii thiu
phn trc ta c bit n cc loi FF. Chng u c th lu tr (nh 1 bit) v
ch khi c xung ng b th bit mi truyn ti ng ra (o hay khng o). By
gi nu ta mc nhiu FF ni tip li vi nhau th s nh c nhiu bit. Cc ng ra
s phn hot ng theo xung nhp ck. C th ly ng ra tng tng FF (gi l cc
ng ra song song) hay tng cui (ng ra ni tip). Nh vy mch c th ghi li
d liu (nh) v dch chuyn n (truyn) nn mch c gi l ghi dch. Ghi dch
cng c rt nhiu ng dng c bit trong my tnh, nh chnh ci tn ca n: lu tr
d liu v dch chuyn d liu ch l ng dng ni bt nht
3.11.2. Cu to
Ghi dch c th c xy dng t cc FF khc nhau v cch mc cng khc nhau
nhng thng dng FF D, chng c tch hp sn trong 1 IC gm nhiu FF (to nn
ghi dch n bit). Hy xem cu to ca 1 ghi dch c bn 4 bit dng FF D

Hnh 3.2.1 Ghi dch 4 bit c bn

3.11.3. Hot ng
Thanh ghi, trc ht c xo (p xung CLEAR) t cc ng ra v 0. D liu
cn dch chuyn c a vo ng D ca tng FF u tin (FF0). mi xung kch
ln ca ng h ck, s c 1 bit c dch chuyn t tri sang phi, ni tip t tng ny
qua tng khc v a ra ng Q ca tng sau cng (FF3). Gi s d liu a vo l
1001, sau 4 xung ck th ta ly ra bit LSB, sau 7 xung ck ta ly ra bit MSB.

Nu tip tc c xung ck v khng a thm d liu vo th ng ra ch cn l 0 (cc


FF reset: t li v 0 ht. Do ta phi hng hay ghim d liu li. Mt cch lm
l s dng 2 cng AND, 1 cng OR v 1 cng NOT nh hnh di y.

Hnh 3.2.2 Cho php cht d liu trc khi dch ra ngoi
D liu c a vo thanh ghi khi ng iu khin R/W control mc cao (Write).
D liu ch c a ra ngoi khi ng iu khin mc thp (Read).

3.11.4 Cc loi thanh ghi


C nhiu cch chia loi thanh ghi dch (SR)
- Theo s tng FF (s bit): SR c cu to bi bao nhiu FF mc ni tip th c by
nhiu bit (ra song song). Ta c SR 4 bit, 5 bit, 8 bit, 16 bit
C th c SR nhiu bit hn bng cch mc nhiu SR vi nhau hay dng cng ngh
CMOS (cc my tnh s dng SR nhiu bit)
- Theo cch ghi dch c

SISO vo ni tip ra ni tip


SIPO vo ni tip ra song song
PISO vo song song ra ni tip
PIPO vo song song ra song song
- Theo chiu dch c SR tri, phi, hay c 2 chiu
- Theo mch ra c loi thng v 3 trng thi

Loi vo ni tip ra song song v ra ni tip


Loi va kho st mc 1 thuc loi ghi dch vo ni tip ra ni tip. y cng l cu
trc ca mch ghi dch vo ni tip ra song song. D liu s c ly ra 4 ng Q
ca 4 tng FF, v chung nhp ng h nn d liu cng c ly ra cng lc.

Hnh 3.2.3 Mch ghi dch vo ni tip ra song song

Bng di y cho thy lm nh th no d liu c a ti ng ra 4 tng FF

Loi c np song song (vo song song) ra ni tip v song song


By gi mun a d liu vo song song (cn gi l np song song) ta c th tn
dng ng vo khng ng b Pr v Cl ca cc FF np d liu cng mt lc vo
cc FF. Nh vy c th dng thm 2 cng nand v mt cng not cho mi tng. Mch
mc nh sau

H3.2.4a Mch ghi dch np song song


Mch hot ng bnh thng khi np song song thp nh ni. Khi np song song
WRITE = 1 cho php np

ABCD c a vo Pr v Cl t v xo Q0 = A, Q1 = B, Xung ck v ng
vo ni tip khng c tc dng (v s dng ng khng ng b Pr v Cl)
Mt cch khc khng s dng chn Pr v Cl c minh ho nh hnh di y.Cc
cng nand c thm vo np cc bit thp D1, D2, D3. ng WRITE/SHIFT
dng cho php np ( mc thp) v cho php dch ( mc cao). D liu np v
dch vn c thc hin ng b nh cc mch trc.

H3.2.4b Mch ghi dch np song song ra ni tip

Vi mch hnh 3.2.4b ng ra d liu l ni tip, ta cng c th ly ra d liu song


song nh hnh 3.2.5, Cu trc mch khng khc so vi trn. D liu c a vo
cng lc v cng ly ra cng lc (mch nh l tng m v hot ng khi c xung ck
tc ng ln.

Hnh 3.2.5 Mch ghi dch vo song song ra song song

Ghi dch 2 chiu


Nh thy, cc mch ghi dch ni nhng phn trn u a d liu ra bn phi nn
chng thuc loi ghi dch phi. c th dch chuyn d liu ngc tr li (dch tri)
ta ch vic cho d liu vo ng D ca tng cui cng, ng ra Q c a ti tng
k tip, . D liu ly ra tng u.
dch chuyn c 2 chiu, c th ni mch nh hnh di y:

Hnh 3.2.6 Mch ghi dch cho php dch chuyn c 2 chiu

Vi mch trn, cc cng NAND v ng cho php dch chuyn d liu tri hay
phi. Bng di y minh ho cho mch trn: d liu s dch phi 4 ln ri dch tri 4
ln. l th t 4 bit ra b o ngc li so vi chng trn.

3.11.5 Mt s loi IC ghi dch


Nhn thy rng cc ghi dch m t trn u dng cc FF ri, ri phi thm nhiu
cng logic ph to cc loi SR khc nhau. Trong thc t ghi dch c tch hp sn
cc FF v ni sn nhiu ng mch bn trong; ngi s dng ch cn phi lm
mt s ng ni bn ngoi iu khin cc ng cho php thi. Cc SR cng c
tch hp sn cc chc nng nh va c th dch tri dch phi va vo ni tip va np
song song. y l mt s ghi dch hay c dng:
Lit k
7494

: 4bit vo song song, ni tip; ra ni tip

7495/LS95

: 4 bit, vo song song/ni tip; ra song song; dch chuyn tri phi

7495/LS96

: 5 bit, vo ni tip/song song; ra song song ni tip

74164/LS164

: 8 bit vo song song ra ni tip

74165/LS765

: 8 bit, vo song song/ni tip; ra ni tip b tc

74166/LS166

: 8 bit; vo song song/ni tip; ra ni tip; c th np ng b

74194/LS194

: 4 bit vo song song/ni tip; ra song song; np ng b dch chuyn


tri phi

74195/LS195

: 4 bit, vo song/ni tip; ra song song; tng u vo JK

74295/LS295

: nh 74194/LS194 nhng ra 3 trng thi

74395/LS295

: 4 bit vo song song; ra song song 3 trng thi

74LS671/672

: 4 bit c thm cht

74LS673/674

: 16 bit

Kho st ghi dch tiu biu 74/74LS95

Hnh 3.2.7 S chn ra 74LS95

Hnh 3.2.8 Cu trc bn trong ghi dch 74LS95

S cu to v bng hot ng ca IC nh hnh trn. Cc ch hot ng ca n


nh sau:
Np ni tip
a d liu vo tng u Q0
t iu khin chn mc thp
Khi c ck1 hay ck2 th d liu s ln lt np vo ghi dch v s c a ti
cc tng sau
Np song song
D liu vo 4 ng ABCD
a iu khin kiu ln cao
Khi c ck1 hay ck2 th d liu s c np vo ng thi cc tng ca ghi dch
cnh ln u ca xung ck.

3.11.5. ng dng
Thanh ghi dch ng vai tr cc k quan trng trong vic lu tr, tnh ton s hc v
logic. Chng hn trong cc b vi x l, my tnh u c cu to cc thanh ghi dch;
trong vi iu khin (8051) cng c cc ghi dch lm nhiu chc nng hay nh trong
nhn chia, ALU xt chng 2 ghi dch cng c cp n. y khng i
vo chi tit m ch ni khi qut ngn gn v ng dng ca chng.

1. Lu tr v dch chuyn d liu


y l ng dng c bn v ph bin nht ca chng. Ghi dch n bit s cho php lu
tr c n bit d liu mt thi gian m chng no mch cn c cp in. Hay ni
cch khc d liu khi dch chuyn c tr hon mt khong thi gian, n tu
thuc vo:
- S bit c th ghi dch (s tng FF cu to nn ghi dch)
- Tn s xung ng h

2. To k t hay to dng song iu khin


Ta c th np vo ghi dch, theo cch np ni tip hay song song, mt m nh phn
ca mt ch no (A, B, ...) hay mt dng sng no . Sau nu ta ni ng ra
ni tip ca ghi dch vng tr li ng vo ni tip th khi c xung ck cc bit s dch
chuyn vng quanh theo tc ca ng h. Cch ny c th iu khin sng tt ca
cc n (sp xp trn vng trn hay cch no khc) Nh m phng sau l dng sng
tt ca n led. Vi ti cng sut th cn mch giao tip cng sut nh thm trans, r
le, SCR,... ni chng 1 cng s c dng. Cng c th to ra dng sng tn
hiu tun hon cho mc ch th mch bng cch ny. Ta c th thay i dng sng
bng cch thay i m s nh phn np cho ghi dch, v thay i tn s xung kch ck
c cp t mch dao ng ngoi t 0 n 200MHz tu loi mch ghi dch.

Hnh 3.2.10 To dng sng iu khin bi ghi dch

3. Chuyn i d liu ni tip sang song song v ngc li


Cc my tnh hay cc b vi x l khi giao tip vi nhau hay vi cc thit b ngoi
thng trao i d liu dng ni tip khi gia chng c mt khong cch kh xa.
Ngoi cch dng cc b dn knh tch knh 2 u truyn m ta ni chng 2
th ghi dch cng c th c dng. Cc ghi dch chuyn song song sang ni tip s
thay th cho mch dn knh v cc ghi dch chuyn ni tip sang song song s thay
th cho mch tch knh. Bn cnh ghi dch, cng cn phi c cc mch khc ng
b, chng nhiu, r sai nhm thc hin qu trnh truyn ni tip hiu qu.

hnh 3.2.11 Truyn d liu ni tip

4. Bus truyn d liu


By gi liu vi 8 ng d liu song song va nhn c t tch knh (cn gi l
1 byte), ta c th dng chung cho nhiu mch c khng? S d c yu cu l v
trong my vi tnh c rt nhiu mch lin kt vi nhau bi cc ng d liu a ch

gm nhiu bit d liu 8, 16, 32 m ta bit n n vi ci tn l bus. Vy bus


chnh l cc ng d liu dng chung cho nhiu mch (chng hn bus gia cc vi x
l, cc chp nh bn dn, cc b chuyn i tng t v s,
Ch c mt ng bus m li dng chung cho nhiu mch, do trnh tranh chp
gia cc mch th cn phi c mt b phn iu khin quyt nh cho php mch no
c thng vi bus, cc mch khc b ct khi bus. Vy y thanh ghi hay cc b
m 3 trng thi c dng
Hnh di minh ho cho ng bus 8 bit ni gia vi x l vi b m 8 bit, bn phm,
v b 8 nt nhn

Gi s rng c thit b u cn giao tip vi vi x l, nhng ch c mt ng truyn


nu tt c ng lot a ln th c th b nh hng ln nhau gia cc d liu, v
thng tin nhn c l khng chnh xc. Do y vi x l s quyt nh: chng hn
n t ng OE1 cho php b m cho mch m a d liu ln bus cn chn OE2
v OE3 ngng lm d liu t bn phm v nt nhn b ngt (ch) tc ng ra cc b
m hay thanh ghi 3 trng thi trng thi tng tr cao. Tng t khi vi x l cn giao
tip vi cc mch khc. Vi tc x l hng trm hng ngn MHz th vic d liu

phi ch l khng ng k do gia cc thit b giao tip vi nhau rt nhanh v


dng nh ng thi.

Phn II
CHNG 4
THIT K MCH TNG T
4.1 Khi nim mch tng t
4.2. Quy trnh thit k mch tng t
4.3 Thit k mt s mch tng t thng dng
4.3.1. Thit k mch khuch i
4.3.2. Thit k mch np acquy
4.3.3. Thit k mch iu khin motor DC
4.3.4. Thit k mch iu khin chung tr chi
4.3.5. Thit k mch iu khin n giao thng
4.3.6. Thit k mch dao ng
4.3.7 B to dao ng 555 v ng dng
BI 6: CC MCH NG DNG KTT
Phm vi ng dng ca Op-Amps rt phong ph, y ch nu mt s ng dng mang
tnh minh ho nguyn l lm vic ca Op-Amps.
1. Mch so snh ca s
y l mch in ng dng trong vic cnh bo qu nhit hay thiu nhit ca
mi trng cn theo di. Mch lm vic theo nguyn l so snh ca s, mt nguyn l
rt thng dng trong cc thit b cng nghip. Minh ho qua hnh.

Khi mun khng ch nhit l 40oC, ngi ta tin hnh nh sau: t nhit
mi trng ang l 27oC, bt u cp nhit cho l (im A). Nhit l tng dn
vt qua 36oC (im B), ri qua 40oC mch vn tip tc cp nhit cho n khi nhit
ca l n 44oC (im C), l mi ct in tr gia nhit. Nhit l bt u gim
dn t 44oC (im D). Gim qua 40oC vn tip tc gim. Cho n 36 oC (im E) th
li tip tc cp nhit cho l (im B) nhit l tng dn ln.

S nguyn l mch bo nhit


R rng gi nhit l nm trong khong 40oC, ngi ta cp nhit cho l
theo chu trnh B, C, D, E ri tr li B: hnh dng nh mt ca s nn c tn l mch so
snh ca s (window comparator). Nguyn l so snh ny c ng dng rt rng ri
trong cng nghip, dn dng, qun s, y t... Tm tt nguyn l lm vic nh sau:
in tr nhit PTR phi hp vi R1 v R2 to ra Vs l mt hm bin thin theo
nhit mi trng t PTR. C th c th tnh Vs:
R rng Vs = f(To) l mt hm ca nhit . Do , o Vs chnh l o nhit .
C th cc gi tr in tr trong mch c cn chnh 2 OP-AMPS lm vic nh
sau:
* Khi thiu nhit:
Lc ny VS < VA < VB, u vo v+ ca op-amps II nh hn u vo v- nn
ng ra op-amps II xung thp, LED 2 sng. Trong khi u vo v+ ca op-amps I
ln hn u vo v- nn ng ra op-amps I ln cao, LED 1 tt.
* Khi nhit:

Lc ny VA < VS < VB, u vo v+ ca op-amps II ln hn u vo v- nn


ng ra op-amps II ln cao, LED 2 tt. Trong khi u vo v+ ca op-amps I ln
hn u vo v- nn ng ra op-amps I ln cao, LED 1 tt.
* Khi qu nhit:
Lc ny VA < VB < VS, u vo v+ ca op-amps II ln hn u vo v- nn
ng ra op-amps II ln cao, LED 2 tt. Trong khi u vo v+ ca op-amps I nh
hn u vo v- nn ng ra op-amps I xung thp, LED 1 sng.
R rng ch cn nhn vo sng ti ca 2 LED, ta c th nhn bit c nhit
ca mi trng cn cnh bo nhit . mch cnh bo hiu qu hn c th thm
vo mt mch dao ng, mch ny gip khi c s c cc LED s khng sng lin tc
m nhp nhy.
2. Mch chnh lu chnh xc
Trong thc t, i lc ngi ta cn mch chnh lu c in p ng ra nh hnh v
trong iu kin l tng, nhng trn thc t d diode c phn cc thun v dn
dng th vn c mt st p ng k trn diode (chnh lu cu st p ny l 2V D). iu
ny dn n s mo dng in p ng ra nh hnh v.

khc phc nhc im ny, ngi ta s dng mch chnh lu chnh xc s dng
Op-Amps nh hnh v

Do dng in hai ng vo ca Op-Amps bng khng nn trong chu k phn cc


thun ca diode (chu k chnh lu) Vin=Vout, v vy sng dng in p ng ra b
chnh lu nh sng dng b chnh lu l tng.
3. Mch lc
Mch lc th ng c u im l rt n gin, tuy nhin h s truyn t nh do b tn
hao trn RC, ph thuc nhiu vo ti, kh phi hp tng tr vi cc mch ghp. Mun
hn ch suy gim th phi lp nhiu mt lc lin tip, lc ny tn s ct ca b lc
s khc vi cc tn s ct ca cc mt lc. Cch khc phc nhc im trn l s
dng cc mch lc tch cc. C th l a mt lc RC vo ng hi tip ca OpAmps tng h s truyn t, tng h s phm cht, ng thi lm gim nh hng
ca ti bng cch dng tng m phi hp tr khng.
Cng nh mch lc th ng, c th phn mch lc tch cc theo tn s lm vic nh:
mch lc thng thp, mch lc thng cao, mch lc dy. y gii thiu mt mch
lc tch cc lc thng thp: mch lc m tn s thp c truyn qua nguyn vn, c
tn s cao b suy gim v chm pha vi tn hiu vo.

C th dng cng thc tnh ton v thnh lp biu Bode v bin - tn ca mch
lc trn nh hnh

Cc nhn xt v mch lc thng thp:


- Ti tn s ct fc c lch pha l -45o; bin in p ra gim gn 3 dB.
- Ti tn s thp f << fc: bin |A| = 1 0dB
- Ti tn s cao f >> fc: bin |A| = 1/RC, h s khuch i t l nghch vi tn s
theo quan h: tn s tng 10 ln th h s khuch i gim 10 ln tc l gim
20dB/decade hay 6dB/octave.
4. Ngun dng cng sut ln
Trong thc t i khi ngun dng cung cp nng lng ra ti s tt hn ngun p v
d nh khi np bnh c qui, nu s dng ngun dng bnh s lu h hn nhiu ln so
vi np bng ngun p; c bit khi ngun p cung cp thng xuyn c gi tr bt n
nh (nh ly in t nng lng mt tri, sc gi ...). Nhng lc nh vy ta c th s
dng ngun dng trnh by trn hnh sau:

C th tng thm dng cho mch in trn khi thay Q2 bng cc transistor darlington
(transistor c lp ghp sn dng darlington bn trong linh kin). Nhng lc ny R 1
cng phi gim theo mt cch tng ng.
5. Ngun n p
Hin nay, n p DC s dng vi mch chuyn dng t n n nh rt cao, tuy
nhin mun ch to mt b n p s dng Op-Amps c n nh tng i tt cng
khng phi l iu kh! C th thc hin theo mch sau:

Khi chnh nh t s gia R2 v R3 thay i h s khuch i vng kn ca mch s


lm thay i c in p ng ra mc n nh mi. Vi dng ti ti a l 1A
trong khi in p ng vo bin thin trong mt dy in p rng, b ngun ny chc
chn s dng c kh nhiu vic trong lnh vc in t vi mch.