1. Trang chủ
  2. » Cao đẳng - Đại học

Kỹ thuật số - Lý thuyết và ứng dụng: Phần 2

153 25 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 153
Dung lượng 13,99 MB

Nội dung

Theo kieu dem tien.. Theo kieu dem lui.[r]

(1)

CHUONG 7

GHI CHUYEN

Hoc xong chuong hoc vien co kha nang:

Hieu duoc cac nguyen ly cau tao va hoat dong cua cac loai bo ghi chuyen.

Xay dung duoc cac loai bo ghi chuyen.

Ap dung cac loai bo ghi chuyen cac mach thuc te.

TONG QUAN

Bo ghi chuyen la mot nhom cac flip flop du’Oc dung de luu trCr so nhi phan Phai can co mot flip flop cho m6i bit cua so nhi phan Vi du, mot bo ghi dung de lifu trir bit nhi phan can phai co flip flop Cac flip flop du’Oc noi vdi cho so nhi phan co the di vao bo ghi chuyen va co the chuyen du’Oc cac bit ngoai flip flop cuoi cung Mot nhom cac flip flop thu’c hien chirc nang du’Oc goi la bo ghi chuyen

Cac bit cua so nhj phan co the dich chuyen tir vi tri sang vi tri khac bo ghi chuyen theo mot hirdng hoac theo ca hai hirdng Co hai cach dira so lieu vao bo ghi chuyen la so lieu vao noi tiep hoac so lieu vao song song Tirong tir, cung co hai cach dira so lieu khoi bo ghi chuyen: so lieu noi tiep va so lieu song song Tir do, co loai cau true bo ghi chuyen co ban nhu” mo ta tren Hinh 7.1

(2)

Ngo vao so lieu noi tiep

Ngo vao so lieu noi tiep

Ngo so lieu a' V

noi tiep a)l3p ghi chuyen ra/vao noi tiep Ngo vao so lieu

song song

Ngo so lieu /^ • ft noi tiep

; so lieu

b) Bo ghi chuyen vao noi tiep /ra song song song song

Ngo vao so lieu

it song song

ra so lieu -^ N«5

song song

7 K

c) EJo ghi chuyen vao song song/ra noi tiep d) E3o ghi chuyen ra/ vao song song

Hinh 7.1: Cac loai bo ghi chuyen

7.1 BO GHI CHUYEN VAO NOI TIEP- RA NOI TIEP

Cac flip flop JK hoac D du’Oc sir dung de tao nen cac bo ghi chuyen De chuyen bit vao flip flop thi J=0 va K=1

De chuyen bit vao flip flop thi J=1 va K=0

Dieu quan la J va K phai du’Oc dieu khien de cung cap cho so lieu vao chuan xac Cac mu’c logic cua J va K co the du’Oc thay doi xung nhip dang mu’c H (hoac L), can nhd rang cac mu’c phai that on dinh tCr tri/dc cho den tan sau xung nhip chuyen trang thai O day, ta dung flip flop JK Master-Slave tac dong xung nhip sirdn xuong Hinh 7.2 minh hoa hoat dong cua flip flop JK Master-Slave tirong Crng vdi sirdn xuong cua xung nhip

(3)

Ngo vao /{ i • A

eo lieu

Clock (Xung nhip)

•J Q

>

K Q

a)

Then gian

1

Clock O

J 1

0.

a

1 •

o

1

-o o o o

Hinh 7.2

b)

Trudc thdi diem a, Q=1

- Tai thdi diem a, Q Reset tro mu’c (so du’Oc chuyen vao flip flop ) - Tai thdi diem b, Q khong thay doi, vi flip flop dang chi/a so va so khac du’Oc chuyen vao flip flop

- Tai thdi diem c, Q Set trd mu’c (so du’Oc chuyen vao flip flop ) - Tai thdi diem d, so khac du’Oc chuyen vao flip flop

Ta da dira bit so lieu vao flip flop day thdi gian sau: bit tai a, bit

0 khac tai b, bit 1 tai c va bit 0 tai d

Bay gid hay them flip flop nira va du’Oc ket noi nhu1 Hinh 7.3, dong thdi Reset tat ca cac flip flop va dung cac tin hieu nhir tren dira vao flip flop

Tai thdi diem a: tat ca cac flip flop Reset, tat ca cac ngo vao J d mu’c 0, tat ca cac ngo vao K d mu’c

Khi Q4 Reset (so d Q3 du’Oc chuyen vao Q4) Tirong tir, so d Q2 du’Oc dira vao Q3, so d Q, du’Oc dira vao Q2 va so d ngo vao so lieu diroc dira vao Q v Cac ngo cua flip flop sau thdi diem a la 0 ^ 4 = 0000

Tai thdi diem b: tat ca cac flip flop deu chCra so Nhir vay, so 0 Q3 chuyen vao Q4, s o d Q2 chuyen vao Q3, sd d Q, chuyen vao Q2 va so d ngo vao so lieu chuyen vao Qv Cac ngo sd lieu la: Q.,Q2Q3Q4 = 0000

Tai thdi diem c: cac flip flop van chi/a cac so Sd d Q3 chuyen den Q4, so d Q2 chuyen den Q3, sd d Q, chuyen den Q2 nhirng luc so d ngo vao sd lieu chuyen vao Q, Cac ngo sd lieu bay gid la 0 ^ 4 = 1000

(4)

Ngo vao eo lieu

Clock

Thai gian

Clock

So lieu vao noi tiep

l k 0

1 J 0

1 K

u Q1 1 0 1

W

u

1 u 1 Q4 0

J

Hinh 7.3: Bo ghi chuyen 4 bit vao noi tiep

Tom lai, ta da chuyen bit so lieu theo kieu noi tiep vao cac flip flop Tai thdi diem d, bon bit so lieu bieu thi so nhi phan 0100 Gia du rang ta bat dau chuyen so LSB trudc, nhu vay, LSB nam Q4 MSB nam Q v Bon flip flop du’Oc coi nhu1 mot bo ghi chuyen bit Day chi'nh la ky thuat thudng dung de tao nen bo ghi chuyen ngo vao noi tiep

Mach dien Hinh 7.3 yeu cau co hai tin hieu vao J va K, ro rang la J = K (hoac K = J) Co the noi rang, J luon luon la phan bu cua K va ngupc lai Neu ta ket noi mot cong Invecto giua J va K flip flop Q v6i ngo vao J, luc do, ta chi can mot ngo vao so lieu, chi can mot ngo vao J Nhu vay, ta co the dung flip flop D nhu

trong Hinh 7.4a de thuc hien dung yeu cau tren Mot bo ghi chuyen ngo vao noi

tiep bit dupe tao bang flip flop D d Hinh 7.4b sir dung flip flop D lam bo ghi chuyen co Uu diem la chi can mot tin hieu vao va cach ket noi mach dupe don gian hon

Vi du:

Ve cac dang xung de chuyen so 1010 khoi bo ghi chuyen nhu Hinh 7.4d

Ldi giai:

Cac dang xung cua bo ghi chuyen dung nhu tren Hinh 7.4d Dang xung ky

hieu K dupe loai bo va dang xung J dupe ky hieu D Ngo vao so lieu noi tiep duoc xep loai hoac la JK hoac la D thuoc loai flip flop dupe sir dung Bay gid hay xet so lieu chuyen ngoai bo ghi chuyen nhu the nao?

(5)

Hay xem xet bo ghi chuyen 0 Hinh 7.4 Gia du co so nhi phan bit 0,020304 = 1010 du’Oc lull tri/ bo ghi chuyen Neu tin hieu xung nhip co dang nhir 0 Hinh 7.4d, ta hay xem xet tai cac thdi diem a, b, c, d

- Trudc thdi diem a: bo ghi chuyen lull tru” so nhi phan 0,020304 = 1010 So LSB (so 0) xuat hien 0

- Tai thdi diem a: toan bo so nhi phan du’Oc di chuyen sang flip flop ben phai So du’Oc chuyen vao Q3 va so LSB (so 0) du’Oc chuyen sang phai, khoi flip flop

cuoi cung va bien mat Bo ghi chuyen giufcac bit 0,620304 = 0101 va so LSB thCr

hai (so 1) xuat hien tai Q4

- Tai thdi diem b: tat ca cac bit du’Oc chuyen sang flip flop ben phai, so du’Oc chuyen vao Q, va so LSB thir xuat hien tai Q4 Bo ghi chuyen giCr cac bit

0,020 304 =0010

- Tai thdi diem c: tat ca cac bit du’Oc chuyen sang flip flop ben phai, so du’Oc chuyen vao Q, va so LSB (so 1) xuat hien tai Q4 Bo ghi chuyen giuf cac bit

0,020304 = 0001

- Tai thdi diem d: so MSB du’Oc chuyen ngoai flip flop cuoi cung va bien

mat, so chuyen vao Q, Bo ghi chuyen giu’ so Q,Q2Q3Q4 = 0000

Nqo vao So lieu

Clock

Ngo vao eo lieu

Clock

D 02 D 03 D 0 4 ->

— C>

Q2 0 3 0 4

-1

» -c) Then' gi an

Clock

Q1

02.

03

0 4

O

0

1 O.

1 '

1 o

-1

0

o

1

o

d)

(6)

Tom lai, so lieu du’Oc IlTu tru* bo ghi chuyen da du’Oc chuyen khoi bo

ghi chuyen flip flop cuoi cung Q4 dirdi dang noi tiep Nhir vay, khong chi ngo vao la noi tiep ma ngo bo ghi chuyen cung la noi tiep Oieu quan thirc hien la so nhi phan du’Oc liru trCr bo ghi chuyen du’Oc chuyen ngoai dau cuoi ben phai bo ghi chuyen va bien mat sau xung nhip

So chan IC 54/74L91 du’Oc trinh bay tren Hinh 7.5 IC la bo ghi

chuyen bit ho TTL MSI IC co flip flop RS ket noi theo kieu noi tiep ngo vao va noi tiep ngo Flip flop hoat dong Crng v6i sirdn am cua xung nhip Tuy nhien, vi dung mach dao trirdc cac flip flop nen so lieu du’Oc di chuyen tirong Crng vdi sirdn dirong cua xung nhip

Cac flip flop RS du’Oc noi hoan toan giong flip flop JK nhir tren Hinh 7.3.

Mach dao du’Oc noi giufa R va S flip flop dau, co nghTa la mach hoat dong nhir flip flop D Vi vay, ngo vao bo ghi chuyen co mot dirong nhat de chuyen so lieu vao bo ghi chuyen theo kieu noi tiep Ngo vao so lieu du’Oc dira vao hoac chan 12 (A) hoac chan 11 (B) Chu y rang mu’c so lieu A (hoac B) du’Oc dao bang cong NAND de dira vao ngo vao R cua flip flop dau tien, mCrc tin hieu sau khoi cong NAND lai du’Oc cong dao thirc hien dao mot Ian nu’a de den ngo vao S Do do, so Set flip flop dau, noi cach khac, so du’Oc dira vao flip flop dau tien sirdn dirong cua xung nhip xuat hien

14 13 12 11 10

a Q A B GND CLK

IC 54/74L91

Vcc

1 5

| 5a do chan IC 54/74L91: Bo ghi chuyen bit ngo vao noi tiep ngo noi tiep

B

i—O

Clock

rC>

5 Q

r-C >

s c

R Q

-S Q

R Q

s Q

-d>

R Q

S Q

R a

S Q

>

R Q

S Q

>

R Q

b) So do logic

Hinh 7.5

Neu co tin hieu vao bo ghi chuyen, ta dira vao cong NAND (chan 11 va 12), neu chi cd mot tin hieu, ta cd the noi hai chan A va B lai vdi de d in tin hieu vao

(7)

So lieu

(DATA

O' I

Clock-—q> R

a) Cac mile logic diroc chf dan bang cac mui ten se set Flip Flop

b) Cac mtic logic duoc ch’ dan bang cac mui ten se reset Flip Flop

Hinh 7.6:

Vi du:

Kiem tra xem cac mu’c logic dira den ngo vao cua bo ghi chuyen dung IC 54/74L91 nhu1 the nao? Cac bit va du’Oc dira vao bo ghi chuyen sao?

Ldi giai:

Ngo vao logic va flip flop dau tien du’Oc ve Hinh 7.6a, so lieu du’Oc dira vao ngo vao chan A Ngo vao R co mu’c 0, ngo vao S co mu’c Vi flip flop du’Oc Set sirdn dirong cua CLK xuat hien, so lieu du’Oc dira vao flip flop

6 Hinh 7.6b so lieu du’Oc dira vao chan A Ngd vao R cd mu’c 1, ngd vao S cd mire Flip flop du’Oc Reset sirdn dirong xung nhip CLK xuat hien Nhir vay, so lieu du'Oc dira vao bo ghi chuyen

7.2 BO GHI CHUYEN VAO NOI TIEP-RA 30N G SONG

Bo ghi chuyen vao noi tiep-ra song song cd so lieu du’Oc dira vao noi tiep nhirng cac so lieu du’Oc dira song song, cac sd lieu xuat hien d ngd cung mot luc Thirc hien dieu bang cach noi ngd cua mdi flip flop den mot chan cua IC Hinh 7.7b la so chan IC 54/74164 Bo ghi chuyen bit cd ngd ra, mdi ngd la mot flip flop bo ghi chuyen Mach logic cua loai bo ghi chuyen du’Oc gidi thieu d Hinh 7.7a.

(8)

CLEAR

CLOCK - ^ o > • — » A B -H -QA > ■s QA a ) So d o logic

b) S o d o chan

n QB

S OB

QA K) T QB K QC > QC -A. P _ QD > QD A

K QE -o>

5 QE

_d

R QF •—0(>

S QF

QC QD QE

k

TQF

R QO R X

i

a

> >

S QO

T 5 QH

QO nQH

Cac ngo song song Ngo so lieu

Vcc | QH QO QF QE 1 CLR CLK

14 13 12 11 10 I » I

IC54/74164

TU

QB QC QP | GND

Ngo vao a' | a

eo lieu

Ngo so lieu

Hinh 7.7

Hoat dong cua B nhir sau:

- Khi B mu’c H: cong NAND hoat dong va so lieu ngo vao noi tiep qua cong NAND va cong Invecto So lieu vao du’Oc chuyen noi tiep vao bo ghi chuyen

- Khi B d mu'c L: ngo cong NAND mu’c H, qua cong Invecto, tin hieu mu’c L, dong so lieu bi can lai va xuat hien sirdn di/ong xung nhip, so du’Oc dira vao bo ghi chuyen Sau xung nhip, bo ghi chuyen chCra day so

- Cung nhu1 IC 54/7491, neu chi can mot dirong tin hieu, co the noi hai chan A va B lai vdi va dira so lieu vao hai chan

7.3 BO GHI CHUYEN VAO SONG SONG-RA NOI TIEP

Ta can nghien ciru bo ghi chuyen vao song song-ra noi tiep co s in tren thi trirdng, la IC 54/74166, bo ghi chuyen bit va ta tap trung nghien cull mot mach flip flop IC de hieu ro nguyen ly hoat dong cua bo ghi chuyen

So chan cua IC 54/74166 du’Oc trinh bay tren Hinh 7.8a Day la bo ghi chuyen bit So lieu vao co the hoac song song hoac noi tiep, so lieu noi tiep IC co flip flop RS Hay phan ti'ch mot cac mach flip flop nay, sau do, them vao cac khoi logic

(9)

a) So chan b) Mach logic

Hinh 7.8: IC 54/74166

Nhan thay rang flip flop RS chuan hoa theo thdi gian co mach dao ngo vao chinh la flip flop D Neu mot bit so lieu x du’Oc xung nhip chuyen vao flip flop thi phan bu cua x phai du’Oc dira vao ngo vao so lieu Vi du: neu x = 0, thi R = va S = va so du’Oc xung nhjp chuyen vao flip flop xung nhip xuat hien

Bay gid them cong NOR (Hinh 7.9b) Neu mot chan cua cong NOR mu’c 0,

mot bit so lieu x du’Oc dira vao chan lai, gia tri x du’Oc cong NOR dao Vi du: neulc = , cong NOR ngo co x = 0, nhir vay, so du’Oc dira vao flip flop xung nhip xuat hien Cong NOR hay du’Oc dung de dira so lieu tir hai nguon so lieu khac nhau, hoac x, hoac x2 Khi cho x2 tiep dat thi so lieu x, du’Oc chuyen vao flip flop, ngirpc lai, neu x, tiep dat thi x2 chuyen vao flip flop

Viec dira them cong AND va cong dao nhir Hinh 7.9c du’Oc phep

(10)

cua cong NOR chan du”6i cua cong NOR co mu'c L Mat khac, day dieu khien mu’c L, cong AND tren ngirng hoat dong, cong AND dirdi hoat dong Dieu cho phep x2 xuat hien d chan dirdi cua cong NOR chan tren cua cong NOR co mu’c L

Tom lai, day dieu khien d mu’c H: bit so lieu d x1 du’Oc chuyen vao flip flop xung nhip sau x1 xuat hien; day dieu khien d mu’c L: bit so lieu x2 di/pc chuyen vao flip flop xung nhip sau x2 xuat hien

Vi du:

Cho mach nhu" Hinh 7.9c, hay viet cac mu’c logic co mat d chan moi cong neu day dieu khien co mu’c 1, x, = va x2 =

Ldi giai:

Cac mu’c logic du’Oc ghi d cac chan cua mdi cong logic tren Hinh 7.9d Gia tri

so lieu d x, du’Oc chuyen vao flip flop xung nhip xuat hien

Khi xem xet can than thay mach cho tren Hinh 7.9a ghep lai vdi tao

thanh bo ghi chuyen 54/74166 cho tren Hinh 7.8b Chung dirpc ket noi de co hai

cach hoat dong khac nhau:

- So lieu di/a vao song song

- Khai thac so lieu di chuyen noi tiep qua bo ghi chuyen tir flip flop QA dau tien den flip flop QH cuoi cung

Neu ngo vao so lieu ky hieu la x2 Hinh 7.9c du’Oc mang den cho tirng

flip flop, ngo vao so lieu ddng vai trd cac ngd di/a so lieu vao song song cho mot so bit ABCDEFGH Tam ngd vao du’Oc ghi nhan la A, B, C, D, E, F, G,

H nhi/trong Hinh 7.8 Day kiem tra cd ten Shift/Load

- Khi tri day dieu khien (Shift/Load) d mu’c L, cong AND di/di se hoat dong cho moi flip flop va so bit se du’Oc nap vao cac flip flop bang mot xung nhip, mach tren la bo ghi chuyen cd ngd vao song song

- Khi tri day dieu khien (Shift/Load) d mu’c H, cong AND tren se hoat dong cho moi flip flop, mdi xung nhip xuat hien se chuyen mot bit so lieu tCr mot flip flop vao flip flop lien sau, tien hanh theo hirdng tir QA den QH Noi cach khac, so lieu se du’Oc dich chuyen noi tiep qua bo ghi chuyen O mach flip flop dau tien bo ghi chuyen, ngd vao cong AND tren cd ten la Serial Input (ngd vao noi tiep) Nhir vay, so lieu cGng cd the nap vao bo ghi chuyen theo kieu noi tiep

Tom lai, Shift/Load d mu’c L: mot xung nhip nap bit so lieu ABCDEFGH vao bo ghi chuyen theo kieu song song Khi Shift/Load d mu’c H: cac xung nhip se chuyen so lieu qua bo ghi chuyen theo kieu noi tiep

Can chu y rang xung nhip du’Oc nap vao bang cong NOR hai ngd vao Khi Clock Inhibit d mu’c L, tin hieu xung nhip qua cong NOR dirpc dao lai va bo ghi chuyen dirpc dap Crng theo sirdn xung dirong Khi Clock Inhibit d mu’c H, ngd co’ng NOR d mu’c L, xung nhip khong tdi dirpc cac flip flop Luc nay, bo ghi chuyen lull giCr noi dung bo ghi chuyen

(11)

Mu’c L d ngo vao Clear co the du’Oc nap vao tai thdi diem bat ky, khong can quan tam den thdi diem xung nhip xuat hien va se reset lap tCrc toan bo flip flop tro ve trang thai "0" Khi khong dung tdi chan Clear, no phai luon luon du’Oc tri mu’c H

7.4 BO GHI CHUYEN VAO SONG SONG-RA SONG SONG

De dap ting yeu cau co bo ghi chuyen vao song song-ra song song ta co the thu’c hien mot cach don gian bang cach them vao dirong cho moi flip flop IC 54/74166 da de cap tren day

IC 54/74198 la loai IC TTL-MSI bit co kha nang cho tin hieu vao song song va cho tin hieu song song IC co 24 chan, chCrc nang cua cac chan du’Oc ghi

trong Hinh 7.10 Ngoai chu t nang cho tin hieu vao song song va lay tin hieu

song song, bo ghi chuyen co the chuyen so lieu tir trai qua phai va ngirpc lai Ta hay nghien cuu cach chuyen sang trai cac so lieu bo ghi chuyen

IC 54/7495A la bo ghi chuyen bit, ngo vao song song, ngo song song IC cung co ngo vao noi tiep, co the dung IC chuyen so lieu tir trai sang phai (tir Qa sang QB) va theo hirdng ngirpc lai, chuyen tir phai sang trai So chan IC va thi logic cho tren Hinh 7.11 Cac flip flop va logic dieu khien du’Oc dung IC hoan toan phu hpp vdi flip flop va logic dieu khien cua IC 54/74164 nhu1 da trinh bay Hinh 7.9c.

Cac ngo song song la QA, QB, Qc, QD cua flip flop bo ghi chuyen

Khi chan Mode Control (kieu dieu khien) mu’c H, cong AND d ngo vao ben

phai cua moi cong NOR hoat dong, cong AND ben trai ngirng hoat dong Cac so lieu chan A, B, C va D du’Oc nap vao bo ghi chuyen moi sirdn am cua xung nhip xuat hien Nhir vay la ngo vao so lieu song song

Khi chan Mode Control (kieu dieu khien) d mu’c L, cong AND ngo vao ben trai cua cong NOR hoat dong, cong AND ben phai cua cong NOR ngirng hoat dong Ngo vao so lieu doi vdi flip flop QA bay gid la ngo vao noi tiep Ngo vao so lieu cua flip flop QB lay tir QA va cis nhir the tiep tuc cho den flip flop Q0 moi sirdn am sung nhip xuat hien mot bit so lieu du’Oc dira noi tiep vao bo ghi chuyen ma flip flop QA la flip flop dau tien Moi bit so lieu luu trCr du’Oc dich sang flip flop lien ke ben phai, cho den flip flop cuoi cung QD Bo ghi chuyen hoat dong nhir vay la dich chuyen so lieu tCr trai sang phai va co ngo vao so lieu noi tiep

(12)

Co hai ngo vao xung nhip: Clock va Clock 2, phu hpp vdi yeu cau can phan biet xung nhip dung de dich sang phai vdi xung nhip dung de dich sang trai Neu khong can tach xung nhip dich sang phai va xung nhip dich sang trai co the ket noi Clock va Clock lai v6i

56 lieu vao

S Q

— 0> R

Clock-00

a) Flip Flop D

—•£>>•7

Day 3ieu khien

c) Bo sung day dieu khien Clock

"J5T >

x2 _ *Z 00

0 ° * — 5 Q w

Clock

-c>

b) Bo sung them cong NOR

d) Vi du clock _

Hinh 7.9

Ngo vao noi tiep dich trai Vcc 51

24 23 22

Input H QH Input G QG Input F QF Input E QE Clear

51 L H QH G QG F QF E QE

SO IC 54/74193 Clear

; /V QA B QB : QC QD CLK

LiJ lAj L±J UJ L®J CD [jEI [a] IioI l l DU

1 Input A QA Input B QB Input C QC Input D QD Clock GND

5

Ngo vao

A' • a'

noi tiep dich phai

Hinh 7.10

(13)

7.5 BO OEM VONG

Cac bo ghi chuyen da trinh bay phan tri/6c phai co mach bo trp de dieu khien ngo vao D cua flip flop D (hoac cac ngo vao RS, cac ngo vao JK) de dam bao thao tac chuan xac dich chuyen Mach logic tao nen cac dang xung dieu khien du’Oc lay tir phan dieu khien cua he thong Phan dieu khien la nguon cung cap xung nhip va cac tin hieu dieu khien khac rat quan Mach phan hoi co the di/a vao mach ghi chuyen co ban

O u t o u li C'oc* 2

> C I<xk I L

Oj o, 0o n notei

S«rn> A

,n p g ( 0 GNO

R fT51 pn [io] 'TI

I i ( i

i

X

( O« o Qc o*

V

CKt CK?V t

1 r

S f U i n o u l

A B c 0 M o d e 1

) i | t |

l i i i l l LU i±J liJ LU LiJ

if-OuH fjJ Ptn ovji

O l l t >nput|

im« ( - A w S s ) l L S i, r r ' o e t r t ^ e i y V'jtsai:

i? l ld<} C -J

(14)

Hay bat dau tCr bo ghi chuyen noi tiep nhir IC 54/74164 Mot nhCrng ap dung logic la ket noi ngo cua flip flop cuoi cung QH quay tro lai ngo vao D cua flip flop A dau tien (Hinh 7.13a) Chu y rang cac ngo vao so lieu dirpc ket noi vdi Gia du, tat ca cac flip flop deu du’Oc Reset va xung nhip hoat dong Oieu gi se xay ra? Cau tra Idi se la: khong cd gi xay vi ngo vao D cua flip flop dau tien (ngo vao cua A va B) dang mu’c Do do, moi xung nhip len mu'c 1, so cl moi flip flop se du’Oc dich sang flip flop ben canh so d flip flop cuoi cung H theo mach phan hoi chuyen dich trd lai mach flip flop A dau tien Noi cach khac, tat ca cac flip flop dang d trang thai Reset, mdi mot xung nhip lai Reset cac flip flop mot Ian nu’a va moi ngd flip flop tri mu’c Hay xem bo ghi nhir mot ong dirng day so (giong nhirbong ping-pong ong), no dich vong quanh bo ghi chuyen va dich dan sang flip flop ben moi xung nhip xuat hien Gia du rang, Qa d mu’c 1, tat ca cac flip flop khac d mu’c 0, va xung nhip hoat dong Chinh d thdi gian dau xung nhip len mu’c 1, so d A se dich chuyen sang B va A du'Oc Reset vi so d H se dich chuyen vao A Tat ca cac flip flop khac van tri mu’c Xung nhip thir hai se dich chuyen tir C sang D, v.v Nhir vay, so se dich chuyen tCr flip flop sang Flip flop lien ben moi cd xung nhip tac dong (chuyen tir len 1) Khi so den flip flop H, xung nhip tiep theo se chuyen so vao flip flop A theo day phan hoi Mot Ian nCra, lai coi bo ghi nhu" ong dirng day bong ping-pong, cd qua trang (so 0) va mot qua den (sd 1) chuyen dong tuan hoan vong quanh bo ghi chuyen theo chieu kim dong ho, chuyen sang flip flop lien ke ben moi cd xung nhip xuat hien Dang xung cua bo dem vong cho tren

Hinh 7.13b.

S e ria l d a ta in p u t

Hinh 7.12: Day ket noi cua IC 54/7495A de thirc hien chuyen dich trai

(15)

cioc*

°- j 1 i i r

°> 1— | _ L_J—

! 1— : j— i

l— ; i i

_J !

■ -

-b | C.>c d in q it iin q k h i -b o qJvi c h u y e n c « n v l m u c v.» u a y m in

Hinh 7.13: Bo dem vona

Dang xung cua bo dem vong thirdng du’Oc dung de dieu khien he thong digital Bo dem vong du’Oc dung de dieu khien cac bien co phai xay theo mot trinh tir thdi gian nghiem ngat, vi du, bien co A xay ra, tiep den la bien co B, roi den bien co C v.v So logic Hinh 7.14 chi cach tao Reset, Read, Bu va Write dung lam cac xung dieu khien, cac xung xuat hien tuan tii, xung no sau xung Cac tin hieu dieu khien xuat hien cac ngo cua cac flip flop A B, D va du’Oc chi tren Hinh 7.13.

kE SEt ~

CONTROL LOGIC

(LOGIC D\e\J KHIeN)

COMPLEMENT WRITE

tin nieu

(QD) COMPLEMENT

(QE) WRITE 1

ni i

_ n _

(16)

Tuy vay, bo dem vong cung nhieu van de can giai quyet Oe tao cac

dang xung nhuf tren Hinh 7.13, bo dem can co mot va chi co mot so nhat

Thdi co de co xung bat dau dong nguon vao he thong rat hiem hoi Neu tat ca cac flip flop deu Reset dong nguon thi bo dem vong khong lam viec nhi/ chung ta thay trirdc day Mat khac, neu mot vai flip flop trang thai Set dong nguon, chuoi cac dang xung phoi hop la ket qua cua cac flip flop du’Oc Set Do can Preset bo dem de co cac trang thai mong muon trudc sir dung chung

Ta hay xem xet mot phi/ong phap de xoa flip flop, di/a chung ve mu’c va xac lap mot mu’c nhat

Vi du, bo ghi chuyen dung IC 54/74164, bit co chan Clear Hay chi phi/ong phap xac lap mu’c va tri cac mu’c

Nhu” Hinh 7.15a chi phi/ong phap don gian :"Reset dong mach"

Phirong phap du’Oc sir dung rong rai de tao mot xung am co rong nho dong mach nguon cung cap Tri/dc dira nguon cung cap vao bo ghi chuyen, dien ap tren tu bang di/a dien ap nguon vao tu, tu du’Oc nap len den dien ap +Vcc vdi hang so thdi gian RC va tri mu’c dien ap + Vcc suot thdi gian

duy tri dien ap nguon Dang xung du’Oc chi tren Hinh 7.15a Neu diem A du’Oc

noi vdi ngo vao Clear cua IC 54/74164, tat ca cac flip flop se tir dong du’Oc Reset ve dien ap + Vcc du’Oc dira vao mach IC

Mach logic bo sung vao di/dng phan hoi nhi/ ve Hinh 7.15b se tao mu’c

1 nhat de Set bo ghi Ta xem mach hoat dong nhir the nao? ^ r r

i

c c T o C le a r

(O en m a c h x o a )

P o w e r o n (D o n g m a c h n g u o n )

Hinh 7.15a: Mach Reset dong nguon

1 Xung :"dong mach nguon Reset" du’Oc dao va de Set ban dau cho flip flop X mCrc du’Oc dira vao cong OR de ngo cong OR co mu’c

Khi xung nhip dau tien den no se chuyen dich mu’c vao QA

2 Khi Qa len mu’c 1, no se Reset flip flop X Tai thdi diem QA co mi/c 1, cac Qb, Qc Qh co mu’c X se tri mu’c nao nguon di/a vao flip flop X So lieu ti/ H se di/a qua cong OR tri/c tiep di/a den ngo vao so lieu AB Mu’c nhat va bay mu'c se dich chuyen vong quanh bo ghi chuyen, dich ti/ flip flop sang flip flop lien ben, roi lai tii flip flop QH chuyen len flip flop QA moi xung nhip xuat hien

(17)

(Xung nhip)

< : : ; ■ '

i 1 i i • i

A\

Pang xung dieu

khien can co

Hinh 7.16

Vi bo dem vong d Hinh 7.13 co the hoat dong vdi nhieu mu’c Vi du, no co the du’Oc dung de tao dang xung dieu khien phirc hpp Gia du, can co dang

xung dieu khien nhir ve tren Hinh 7.16 Dang xung co the de dang du’Oc tao

nen bang cach Preset bo dem Hinh 7.13 v6i mu’c o A va C cac flip flop

(18)

CAU HOI VA BAI TAP

7.1 Xac dinh so flip flop can thiet de xay diing bo ghi chuyen co kha nang lull tru” du’Oc:

a) So nhi phan bit,

b) Cac so thap phan len den 32, c) Cac so thap luc phan len den F

7.2. Mot bo ghi dich co flip flop So nhi phan co I6n bao nhieu co the liru trir vao bo ghi chuyen nay?

7.3. Ke ten loai bo chuyen va ve so khoi cho moi loai

7.4. Ve dang xung dich chuyen so nhi phan 1010 vao bo

nhir ve tren Hinh 7.3.

7.5. Ve dang xung dich chuyen so nhi phan 1001 vao bo

nhir ve tren Hinh 7.4.

7.6. Bo ghi chuyen ve tren Hinh 7.3 I iru tru1 so nhi phan 0100 Ve dang xung doi vdi chuyen tiep xung nhip, gia du rang ca J va K deu mu’c L

7.7* Can bao lau de chuyen so nhi phan bit vao IC 54/74164 nhirve

tren Hinh 7.7 Neu xung nhip co tan so:

a) MHz, b) MHz

7.8* Tren co so bai tap so 7.5 tan so xung nhip ci/c dai la bao nhieu neu thdi gian truyen dan so lieu la 30 ns?

7.9* Doi vdi mach tren Hinh 7.9 viet mu’c logic tren moi chan cua cong, cho biet:

a) Day dieu khien CONTROL = 1, X, = 0, X2 = 1,

b) Day dieu khien CONTROL = 0, = 0, X2 =

7.10* Ve tat ca cac dang xung ngo vao va ngo doi vdi IC 54/74166 nhi/

tren Hinh gia du rang so thap phan 190 du’Oc chuyen dich vao bo ghi chuyen

theo kieu:

a) song song, b) noi tiep

7.11* Ve cac dang xung can dira vao va dich chuyen sang trai mot bit don thong qua bo ghi chuyen tren Hinh 7.12

7.12 Cd mach nhu' tren Hinh 7.12, giai thi'ch hoat dong cua mach dich

chuyen cac bit tir phai sang trai

ghi chuyen ghi chuyen

(19)

7.13* Bo ghi chuyen Hinh 7.13 co the de dang xoa tat ca cac bit bang cach dung ngo vao Clear Hay xem xet neu muon thiet ke mach logic de xac lap bo ghi chuyen vdi sir chuyen doi cac bit va bit

7.14. Giai thi'ch hoat dong cua IC 4017 SCr dung IC de xay dirng mach nhay dudi

7.15. Xay dirng mach tao tre |ns bang cach sir dung bo ghi chuyen Giai thi'ch hoat dong cua mach Muon tang thdi gian tre len gap ddi (16 |is) thi can tien hanh sao?

7.16. Sir khac co ban giCra mach logic to hop va mach logic tuan tir la gi?

7.17. Phan biet cac tir viet tat dirdi day thirdng du’Oc sir dung cac ky hieu logic cua flip flop truyen thong:

a) CLK b) CLR c) D d) R e) S

7.18. Khi mot flip flop du’Oc dung de tri tam thdi so lieu thirdng du’Oc goi bang tir nao?

7.19. Mot flip flop du’Oc kich hoat bang sirdn am xung nhip Hoi flip flop thay doi trang thai xung nhip chuyen tir mu’c nao den mu’c nao?

(20)

CHUONG 8

BO DEM

Hoc xong chuong hoc vien co kha nang:

Hieu duoc nguyen ly cau tao va hoat dong cua cac loai bo dem va cac kieu dem.

Phan tich duoc cac dang xung cua cac loai bo dem

Ve du'Oc cac dang xung cho biet so nguyen ly cua cac loai bo dem.

Xay dung duoc cac loai bo dem va cac kieu dem.

Ap dung cac cach xay dung cac loai bo dem va cac kieu dem vao cac Ung dung thuc te.

TONG QUAN

Trong he thong digital, bo dem la bo kien du’Oc su” dung nhieu va rat linh hoat Xung nhip dieu khien bo dem, nen co the dung bo dem de dem so chu ky xung nhip Vi da biet chu ky xung nhip nen bo dem du’Oc dung lam cong cu thdi gian, chu ky hoac tan so Cd hai loai bo dem co ban la bo dem dong bo va bo dem khong dong bo Bo dem kieu song Ian truyen cd hoat dong va cau tao don gian, it linh kien nhirng han che ve toe dem Mdi flip flop flip flop phi'a trirdc lam cho thay doi trang thai, vay, tre truyen dan bi don ti'ch lai Bo dem nhir vay du’Oc goi la bo dem noi tiep hoac bo dem khong dong bo

Bo dem song song hoac bo dem dong bo cd toe hoat dong nhanh day, xung nhip lam cho cac flip flop dong thdi thay doi trang thai Tre truyen dan cua bo dem bang tre truyen dan cua mot flip flop Bo dem loai cd toe truyen d in nhanh, nhirng lai ddi hoi nhieu linh kien

Cac bo dem noi tiep va song song du’Oc dung phoi hop de dung hoa giCra toe hoat dong va phan cirng Cd bo dem thirc hien dem tien, cd bo dem thirc hien dem lui Bo dem cd the xoa de mdi flip flop deu chCra so hoac dat trirdc so lieu ngd vao de cho moi flip flop chCra mot bit du’Oc dir kien trirdc

(21)

8.1 BO DEM KHONG DONG BO

Bo dem nhi phan khong dong bo co the du’Oc cau tao bang cac flip flop JK Hinh 8.1 la flip flop JK master/slave ket noi tang Xung nhip la dang xung vuong dieu khien flip flop A Ngo cua flip flop dieu khien flip flop B va ngo cua flip flop B lai dieu khien flip flop C Tat ca cac ngo vao JK du’Oc ket noi vdi + Vcc Oieu co nghTa la mdi mot flip flop se chuyen trang thai bu (toggle) moi sirdn am xung nhip den ngd vao cua xung nhip CLK

Khi ngd cua mdi flip flop du’Oc dung nhir ngd vao xung nhip cua flip flop lien ke sau, bo dem nhu” vay goi la bo dem khong dong bo Flip flop A phai chuyen trang thai trirdc no tac dong den flip flop B, flip flop B phai thay doi trang thai trirdc no tac dong den flip flop C Viec lat trang thai xay tir flip flop sang flip flop lien ke ben giong nhu song Ian truyen tren mat nirdc Vi ly do ma tre truyen dan cua ca bo dem bang td’ng tre truyen dan cua rieng tirng flip flop Vi du, bo dem gom flip flop, mdi flip flop cd thdi gian tre truyen dan la 10 ns, vay tre truyen dan cua bo dem la 30 ns

Hinh 8.1b la dang xung cua bo dem Gia du rang, luc bat dau, cac flip flop duoc reset (phuc hoi) de cd cac ngd mu’c Ta xem flip flop A chira LSB (so cd so nho nhat) va flip flop C chira MSB (so cd so Idn nhat), nhir vay, luc dau bo dem cd CBA = 000

J1TL f

Clock

— J A

-c>

— K A

J B

c>

AC B

~ J C

— AC C B

Cac ngo ra a) o d e m nhi phan khong dong bo b it

Thai gian h

-1_

Clock

1 _ I L

B

-C.

b) D ang xung

C

J t

-i -Thuf t j

d e m C B A

O o o o

1 O O 1

2 O 1 O

3 O 1 1

4 1 O O

5 1 O 1

6 1 1 O

7 1 1 1

O o o o

c ) B ang siJ t h a t

(22)

Tai moi thdi diem cua sirdn am xung nhip xuat hien thi flip flop A chuyen trang thai Nhir vay, tren true thdi gian,

- tai thdi diem a, flip flop A len mu’c 1, - tai thdi diem b, flip flop A xuong mu’c 0, - tai thdi diem c, flip flop A tro lai mu’c v.v

Nhan thay rang, tan so xung ngd cua flip flop A bang 1/2 tan so xung nhip Vi flip flop A cd ngd noi vdi ngd vao xung nhip cua flip flop B, nen tai mdi thdi diem dang xung cua flip flop A ve mu’c 0, flip flop B thay doi trang thai Nhir vay, tai thdi diem b, flip flop B cd mu’c 1, roi flip flop B xuong mu’c tai thdi diem d va lai len mu’c tai thdi diem f Nhan thay rang tan so xung ngd cua flip flop B bang 1/2 tan so cua flip flop A va bang 1/4 tan so xung nhip

Vi flip flop B cd ngd ket noi vdi ngd vao xung nhip cua flip flop C, tai thdi diem d dang xung cua flip flop B xuong mu’c 0, flip flop C chuyen trang thai Nhu vay, flip flop C cd ngd len mu’c tai thdi diem d va lai trd ve mire tai thdi diem h Tan so xung ngd flip flop C bang 1/2 tan so d ngd cua flip flop B va bang 1/8 tan so xung nhip

Nhan thay rang, trang thai ngd cua cac flip flop la mot so nhi phan tirong dirong vdi so sirdn am xung nhip xuat hien Trirdc thdi diem a, tren true thdi gian, trang thai ngd la CBA = 001; tai thdi diem b chuyen CBA = 010, v.v Thirc te, kiem tra cac dang xung, nhan thay rang, bo dem thirc hien dem tirng

xung nhip va dem theo he nhi phan (xem bang tren Hinh 8.1c).

Vi moi trang thai ngd bieu thi tren bang sir that la mot so nhi phan tirong dirong vdi so xung nhip, ba flip flop Hinh 8.1 la bo dem nhi phan bit khong dong bo Bo dem cd the dung de dem so xung nhip len den circ dai la xung Bo dem bat dau dem tir 000 len den 111 Tai thdi diem nay, bo dem reset trd lai 000 va bat dau chu ky dem lai Ta noi rang bo dem thirc hien cach dem tien

De dang nhan thay rang, mot bo dem cd n flip flop se cd 2n trang thai ngd Vi du: mot bo dem gom flip flop vira trinh bay d tren cd 23 = trang thai ngd (tir 000 den 111) Mot bo dem gom flip flop cd 25 = 32 trang thai ngd (tir 00000 den 11111) v.v Mot bo dem nhi phan Idn nhat cd the du’Oc bieu thi bang n tang flip flop cd sd thap phan tirong dirong la 2n - Vi du, bo dem flip flop dem duoc nhieu nhat 23 - = , so thap phan nhieu nhat ma bo dem flip flop dem du’Oc la 25 - = 31 Bo dem flip flop dem du’Oc 63

Bo dem flip flop du’Oc goi la bo dem mo-dun (hoac Mod-8) vi cd trang thai Bo dem flip flop la bo dem Mod-16 Mo-dun cua bo dem la tong trang thai ma bo dem thu’c hien

Hinh 8.2 la so chan va bang sir that cua IC 54/74L93 Day la bo dem bit nhi phan thuoc loai mach TTL MSI, cd the lam bo dem Mod-8 hoac bo dem Mod-

16 Neu xung nhip dira den ngd vao B, luc cac ngd la QB, Qc va Qz va bo

dem la bo dem Mod-8 Trong trirdng hop flip flop A khong dung den

Mat khac, neu xung nhip du’Oc dira den ngd vao A va QA cua flip flop du’Oc ket noi vdi ngd vao B, ta cd bo dem Mod-16, bit, kieu khong dong bo Cac ngd la QA, QB, Qc va QD Bang sir that cua bo dem bit loai cho tren

Hinh 8.2c

(23)

Tat ca cac flip flop cua IC 54/74L93 co cac ngo vao reset true tiep va hoat dong d mu'c L tich c l / c Nhi/ vay, can co cac ngo vao reset R0(1) va R0(2) cua ngo vao cong NAND d cung mu'c H de reset tat ca cac flip flop cung mot luc Bo dem du’Oc reset, khong lien quan den xung nhip

Dang xung cua IC 74L93 dem theo Mod-16 du’Oc bieu thi tren Hinh 8.3 Tai thdi diem a, tr§n true thdi gian, bo dem co cac gia tri ngo la 0000 Moi si/on am xung nhip xuat hien, bo dem lai dem mot so, bat dau tir 0000 tai thdi diem a den 1111 tai thdi diem b Sang den thdi diem c, bo dem reset 0000 va viec dem lap lai nhi/ trudc Ro rang, day la bo dem Mod-16, vi cd 16 trang thai (tir 000 den 1111) va so thap phan Idn nhat du’Oc liru trir flip flop la so 15

(1111).

enput A ■ r u i t u ;

<1118!

^11 ■

fSV ' '

C A )J'lB3!

O'. -c

-c£> C K i

\ t :

- - C > C K i

X

I IT

< i9ii&: j c >—»— — a ,

J

I I «8i1101

M O n - c , I !

I— < > C K i

IA

o

i <11H

O i -or

CK >

:il Sc< tid Ioc::c

fC ' n h i n t u t r e n x u o n g fnpul

A

Ot, G t.D Q c

J 17

(“ - 11 t »0*[ S ‘

1 1i

oA >— t t > jr.

°C C,

5 /7 3 <P—

.=> : I <■

NC NC NC

L o g ic d u e rn g : x e tn c a c b a n g c h a c n a n g N C : k h o n g k e t d o i v d i m a c h t r o n g IC

b! Sd chan IC 54/74L93

d l s e m c i i j ca c J C A , *L $

C e r > 9o r s

Uq w 0

0 u I L 1

L. L f H

2 i L h I

3 i I H H

' t * i L

r.

L f r *- H

c L. H hr L

7 L H

£ H •_ L

9 H ik w h

1C t i L h t

n H L A h i

i * H

h i i

13 t~ H V H

U t- * H I

1c p r~t H H

b l C i n c

(24)

Hinh 8.3: Cac dang xung cua Mod-16 trirdng hop su1 dung IC 54/74L93

Mot sir thay doi ly thu va co loi cua bo dem khong dong bo bit Hinh 8.1

du’Oc chi tren Hinh 8.4 He thong xung nhip van dira den ngo vao xung nhip cua flip flop A, nhirng ngo A dieu khien flip flop B, tirong tir nhir vay, ngo B dieu khien flip flop C Hay chu y dang xung cua bo dem theo kieu ket noi

Vcc

Thai gian. Clock

Trang

3

thai C A

7 1 1 1

6 1 1 0

5 1 0 1

4 1 0 0

3 0 1 1

2 0 1 0

1 0 0 1

0 0 0 0

7 1 1 1

c) Hinh 8.4: Bo dem lui

Flip flop A chuyen trang thai doi lap sirdn am xung nhip xuat hien nhir da trinh bay tren Nhirng flip J o p B se chuyen trang thai doi lap flip flop A len mu’c 1, chu y rang moi A len mu’c thi A tir mu’c chuyen xuong mure va sirdn am xung nhip tac dong vao flip flop B lam no chuyen trang thai Tren true thdi gian, B chuyen trang thai doi lap tai cac thdi diem a, c, e, g va i

Tirong tii, flip flop C du’Oc B tac dong va flip flop C chuyen trang thai doi lap flip flop B len mu’c Flip flop C chuyen mu’c tai a, xuong mu’c tai thdi diem e va len mu'c tai thdi diem i

(25)

Nhu” vay tai thdi diem a, noi dung bo dem la ABC = 111, thay doi 110 tai thdi diem b va 101 tai thdi diem c Nhan thay rang tri so cac ngo cua bo dem cirgiam moi cd xung nhip xuat hien isloi mot cach khac, bo dem hoat ddng theo kieu dem lui, cac ket qua du’Oc tom tat bang sir that d Hinh 8.4c

va day van la bo dem Mod-8 vi bo dem cd trang thai va la bo dem lui

Bo dem tien-lui, khong dong bo, bit, dem tuan tir so nhi phan du’Oc gidi thieu tren Hinh 8.5 Day la siJ ket hpp bo dem da trinh bay tren day Doi vdi bo dem loai nay, de dem tien, mdi flip flop phai lat trang thai d phan thu’c (Q) cua flip flop lien trudc (doi lap vdi phan bu Q ) Neu dem tien, day dieu khien dem lui dat d mu’c 0, day dieu khien dem tien dat d mu’c 1, so dang xung trirdng hpp du’Oc trinh bay nhir tren Hinh 8.1.

Hinh 8.5

Mat khac, neu day dieu khien dem lui dat d mu’c va day dieu khien dem tien dat d mCrc 0, mdi flip flop phai lat trang thai d phan bu cua flip flop lien trirdc Nhir

vay bo dem trirdng hpp la kieu dem lui, cd dang xung nhir tren Hinh 8.4.

Qua trinh dem cd the du’Oc tiep tuc doi vdi cac flip flop tiep sau de tao nen bo dem tien-lui cd mo-dun Idn hon Tuy vay, de xac dinh toe circ dai cua bo dem hoat dong, ta can tinh den cac tre cua cac cong

8.2 CONG GIAI MA

Co’ng giai ma can du’Oc ket noi vdi ngd cua bo dem, bang cach nhir vay, ngd cua co’ ng se d mu’c chi nao cac noi dung cua bo dem bang vdi trang thai da cho Vi du, cong giai ma du’Oc ket noi vdi bo dem khong dong bo bit nhir

a Hinh 8.6a, se giai ma trang thai (CBA = 111) Nhir vay, ngd cua co'ng se mire chi nao A = 1, B = va C = va dang xung xuat hien ngd cua cong mang so hieu He thu’c logic doi vdi co’ng dirpc viet la = CBA So sanh vdi

bang sir that cua bo dem (nhu’ d Hinh 8.1) cho thay dieu kien CBA = 111 la

(26)

Hinh 8.6

Bay trang thai khac cua bo dem co the du’Oc giai ma theo cach tirong tir tren day Vi du, de giai ma trang thai 5, bang sir that cho thay rang CBA =101 la trang thai nhat Be ngo cua cong o mu’c thdi gian nay, ta phai dung C, B va A d cac ngo vao cua cong Can chu y rang neu B = 0, thi B = He thu’c logic

chuan xac la = CBA, cong ioai cho tren Hinh 8.6c Bang xung cho tren Hinh

8.6b ma so va ma so

Tat ca cong can giai ma trang thai cua bo dem bit nhir tren Hinh 8.1

du’Oc chi tren Hinh 8.7a Cac ngo cua cong du’Oc bieu thi tren Hinh 8.7b Cac dang xung du’Oc giai ma la mot day cac xung dirong xay theo chuoi thdi gian nghiem ngat va rat thuan loi dung lam tin hieu dieu khien he thong digital Neu ta xem trang thai nhir la sir kien thCr nhat, roi den trang thai la sir kien thu1 hai, trang thai la sir kien thCr v.v cho den trang thai Ro rang la bo dem dang dem tien theo ma so thap phan tir den roi lai dem tir

Neu cong du’Oc noi vdi bo dem tien-lui nhu” Hinh 8.5, thi cac dang

xung du’Oc giai ma se xuat hien nhir tren Hinh 8.7b, day la bo dem theo kieu dem

tien Neu bo dem theo kieu dem lui, co dang xung du’Oc giai ma xuat hien nhir tren

Hinh 8.7c, trong trirdng hop nay, neu trang thai duoc xem nhir la siJ kien dau tien, tiep theo la trang thai la sir kien thir hai, v.v xuong den trang thai Ro rang la bo dem dang dem lui theo ma so thap phan tir den roi lai dem b it dau tir

Vi du, dung IC 54LS11 co cong ANB ngo vao de giai ma cac trang thai 1, 4, cua bo dem tren Hinh 8.5.

a biet rang so logic va so chan cua IC 54LS11_du;oc gidi th ie u jre n

Hinh 8.8 Cac he thu’c logic doi vdi cac trang thai tren la: = C B A = C B A va = C B A Cach noi day tir cac ngo flip flop cua bo dem IC 54LS11 diroc chi tren Hinh 8.8.

(27)

Hay xem xet cac dang xung bo dem Hinh 8.5 tao ra, day la hoat dong dem tien Xung nhip va moi ngo cua flip flop du’Oc ve lai tren Hinh 8.9, thdi gian tre truyen dan cua mdi flip flop co ke den ve cac dang xung A B va C Chu y rang xung nhip lam flip flop A lat trang thai va dang xung A nhu” vay bi tre di mot khoang thdi gian b in g ke tu1 siren am xung nhip truyen dan Tren Hinh 8.9

cung ve phan bu cua A la A de tham khao

a) Dem tien b) Dem lui

Hinh 8.7: Cac cong giai ma cua bo dem nhi phan khong dong bo bit

(28)

Nhung hay quan sat xung tap nhieu xay bo dem tien hanh tCr trang thai den trang thai Tren true thdi gian, A xuong mu’c (A len mu'c 1) tai thdi diem a Vi thdi gian tre cua flip flop B mai tan thdi diem b mdi xuong mu’c Nhu1 vay, giura diem a va b tren true thdi gian, ta cd dieu kien C = 1, B = va A = 1, do, ngd cua cong d mu’c va mot xung tap nhieu xuat hien Hay xem dang xung = C B A Phu thuoc vao cac ngd cua cong giai ma nhir the nao de cac xung tap nhieu (cac xung khong mong muon) cd the hoac khong cd the anh hirdng nghiem den bo dem Cac xung tap nhieu cd rong vai nano giay va ca quan sat tren may hien sang cGng kho khan Nhirng IC TTL chuyen trang thai rat nhanh va mach TTL se dap Crng ca cac xung tap nhieu nho nhat xuat hien, ma cac xung tap nhieu thirdng xuat hien vao cac thdi diem khong mong muon Do do, phai coi chi/ng tranh dieu kien It nhat la cd hai giai phap doi vdi

xung tap nhieu Phuang phap thCr nhat la lay mau cac co’ ng, ta se xem xet phirong

phap phan dirdi day Phwong phap thu" hai la dung bo dem dong bo,

mot loai bo dem kha quan va du’Oc trinh bay d phan tiep theo

A-B -

C

C i o c k

-X u n g t a p n h i e u

J

a) D a n g x u n g b) C o n g g ia i m a c o lay m au

Hinh 8.9

Hay xem xet viec sir dung cong AND ngd vao de giai ma trang thai d

Hinh 8.9b, 6 day, xung nhip du’Oc dung nhir la xung chon Khao sat dang xung tren Hinh 8.9b thay ro rang xung nhip mu’c giCra cac diem a va b tren true thdi gian Vi xung nhip phai mu’c de cho ngd cua co’ ng d mu’c 1, vi vay, xung tap nhieu khong the xuat hien Noi mot cach khac, xung nhip d mu’c C = 1, B = va A = va xung doi vdi trang thai xuat hien dung luc no can du’Oc xuat hien Chu y rang rong xung dirong d trang thai dung bang rong phan duong cua xung nhip Hay quan sat dang xung = C B A x xung nhip CLK Ky thuat cd the du’Oc ap dung doi vdi cac cong giai ma trang thai khac cua bo dem (hoac cho bo dem bat ky khac) va cac dang xung ngd du’Oc giai ma se khong cd cac xung tap nhieu

(29)

8.3 BO OEM DONG BO

Bo dem khong dong bo co cau tao don gian nhat, nhung co han che lam viec tan so cao Nhir da trinh bay phan tren, moi flip flop co mot thdi gian tre O bo dem khong dong bo, cac thdi gian tre la cong tinh, to'ng thdi gian tre cua bo dem xap xi bang tong so thdi gian tre cua cac flip flop Kha nang xay xung tap nhieu d ngo cua cac cong giai ma co the co d bo dem khong dong bo Ca hai van de tren co the khac phuc nhd bo dem dong bo Oieu khac chinh la moi flip flop du’Oc chuyen trang thai dong bo vdi xung nhip

Hinh 8.10 la cau true cua be dem nhi phan song song, cung vdi bang sir that va cac dang xung doi vdi trudng hdp dem tu nhien theo kieu tuan tu Vi moi trang thai ting v6i mot so nhi phan tuong duong, nen ta gan cho moi trang thai la mot so dem day, tu tudng cd ban la giu cho ngd vao J va K cua mdi flip flop d mUc 1, nhu vay, flip flop se chuyen trang thai ifng vdi mdi sudn am cua ngd vao xung nhip Tiep do, ta dung cac co’ ng AND de chon mdi xung nhip thU tu den flip flop C v.v Cau hinh logic thudng mang y nghTa dieu khien tUng mdi flip flop mot

Xung nhip dupe true tiep dua den flip flop A Vi flip flop A chuyen trang thai vdi mdi sudn am xung nhip ngd vao CLK va flip flop A se chuyen trang thai doi lap ca hai ngd vao J va K deu mu’c 1, nen flip flop A se chuyen trang thai Ung vdi moi sudn am xung nhip

Mdi A mu’c 1, co’ ng AND X dUdc hoat dong va mot xung nhip duoc chuyen qua co’ng de den ngd vao cua CLK cua flip flop B Sau B chuyen trang thai vdi mdi sudn am khac tai cac thdi diem b, d, f va h tren true thdi gian

Vi co’ng AND Y dupe hoat dong va se chuyen xung nhip den flip flop C chi ca hai A va B d mu’c 1, flip flop C chuyen trang thai Crng vdi moi sudn am xung nhip thU tu tai cac thdi diem d va h tren true thdi gian

Xem xet cac dang xung va bang su that, thay rang bo dem thuc hien dem tien chuoi so nhi phan tu nhien tU 000 den 111, dem tang tUng so moi sudn am xung nhip xuat hien Day la bd dem nhi phan dong bo Mo-dun 8, theo kieu dem tien

Vdi cau hinh bo dem loai nay, ta khac phuc dupe hien tupng xung tap nhi<§u da gidi thieu d phan tren day Cac dang xung cua bo dem dupe ve lai d Hinh 8.11 va ta cd tinh den thdi gian tre truyen d in cua tUng flip flop Nghien cuti ky cac dang xung nay, ta rut ket luan sau:

- Sudn am xung nhip la tac nhan lam cho mdi flip flop chuyen trang thai doi lap

(30)

- Ket qua cua chuyen trang thai dong bo khong lam sinh cac xung tap nhieu ngo cua cong giai ma, nhu' cong doi vdi so du’Oc chi tren Hinh 8.11

Do do, cac cong giai ma tren Hinh 8.7 du’Oc sir dung cho bo dem ma khong so

xay xung tap nhieu

n U r

Hinh 8.10

— l _

Hinh 8.11

Ta hay so sanh cac dang xung voi cac dang xung cua bo dem khong

dong bo Hinh 8.9.

Bo dem tien, mac song song (dong bo) co the du’Oc xay di/ng theo cach tirong tii va du’Oc chi Hinh 8.12 O mot he thong dong bo thdi gian tai mot flip flop bat ky chuyen trang thai du’Oc xac dinh bang cac trang thai cua tat ca cac flip flop d phia trirdc cua flip flop vtia chuyen trang thai Theo kieu dem tien mot flip flop phai chuyen trang thai doi lap moi tat ca cac flip flop dting phia trirdc no d trang thai va xung nhip lam chuyen trang thai Theo kieu dem lui flip flop chuyen trang thai doi lap chi xay tat ca cac flip flop phia trirdc trang thai

(31)

Bo dem tren Hinh 8.12 la bo dem dong bo, bit, dem tien-lui De dem tien, xung nhip cua bo dem du’Oc dua den ngo vao dem tien ngo vao dem lui dupe giu mu’c De dem lui, xung nhip cua bo dem du’Oc dua vao ngo vao dem lui tri ngo vao dem tien mu’c

Khi tri ngo vao dem lui mu'c (dem tien) se lam cho cac cong AND Y,, Y2 va Y3 khong hoat dong Xung nhip du’Oc dira vao ngo vao dem tien se dua th in g vao flip flop A va se dieu khien cac flip flop khac bang cac cong X v X2 va X3 Bo dem se van hanh dung nhu bo dem dong bo da thao luan trudc day tren

Hinh 8.10 Dieu khac nhat la cho day la bo dem Mod-16, dem tien tUng so nhi phan va tac dong voi sudn am xung nhip, bat dau tU 0000 va dem len

den 1111 Dang xung chuan xac dupe chi tren Hinh 8.12b.

Day dem tien

Day dem lui

a) 5a do logic

C L K

T h a i

g ia n j b

I

b) C a c d a n g x u n g d e m t i e n

k i m

- s -1 - r n - r C L K

J _ J !_ l L _ r i _ j L i l_ J L_i L _ r T _ i L

c

o

c ) C a c d a n g x u n g d e m lu i

Hinh 8.12

Neu day dem tien tri mUc 0, cac cong AND phia tren cua Hinh 8.12 la

(32)

se di th in g den flip flop A va dieu khien cac flip flop sau nhd cac cong AND Y,, Y2 va Y3

Flip flop A se chuyen trang thai doijap moi co sudn am xung nhip chuyen den nhu chi tren Hinh 8.12c Mdi A o mu’c 1, cong AND Y, se hoat dong va xung nhip chuyen trang thai se lam cho flip flop B chuyen trang thai doi lap tai cac thdi diem a, c, e, g v.v moi ca hai ngo A va B deu mu’c 1, cong AND Y2 dupe hoat dong va nhu vay xung nhip se dieu khien flip flop tai_a,_e, i, m va q Tuong tu, cong AND Y3 se hudng xung nhip vao flip flop D chi A, B va C deu d mu’c Nhu vay, flip flop D se chuyen trang thai doi lap tai cac thdi diem a va i tren

true thdi gian Cac dang xung tren Hinh 8.12c chifng to rang bo dem dang hoat

dong theo kieu dem lui, thu’c hien dem moi Ian mot soi nhi phan, bat dau tir 1111 xuong den 0000

Neu nghien cifu so logic cua IC TTL 54/74193 nhu gidi thieu tren

Hinh 8.13, ta thay rang IC dieu khien logic giong nhu bo dem gidi thieu tren

Hinh 8.12 IC MSI la mot bo dem dong bo, bit, dem tien va dem lui IC co chan xoa (Clear) va chan xac lap trudc (Preset), cac ti'nh chat dupe trinh bay d phan sau Bay gid ta can xem xet logic dieu khien doi vdi moi flip flop va cong OR cung hai cong AND, tai cong OR dung de cung cap xung nhip cho moi flip flop

Dang xung cua IC 54/74193 dupe gidi thieu tren Hinh 8.12, chi cd dieu can

chu y la dang xung ngd A, B, C va D thay doi trang thai tuong ting vdi sudn

am xung nhip Trong mach logic Hinh 8.12, xung nhip dua den mot hai

ngd vao dem tien hoac dem lui deu qua mot co’ ng dao trudc dua den co’ ng logic AND-OR cua mdi ngd vao xung nhip cua flip flop

Bo dem tien-lui dong bo co the dupe xay dung theo so logic hoi khac mot chut, nhu chi tren Hinh 8.14 6 bo dem loai nay, tai thdi diem mot flip flop nao thay doi trang thai duoc xac dinh bdi cac trang thai cua cac flip flop dirng phia trudc bo dem kieu dem tren, flip flop phai chuyen trang thai doi lap moi tat ca cac flip flop phia trudc dang trang thai va xung nhip den ngd vao xung nhip CLK lam cho flip flop chuyen trang thai kieu dem lui, flip flop chuyen trang thai doi lap tat ca cac flip flop d phia trudc dang trang thai

Bo dem dac biet lam viec theo kieu kiem che vi moi flip flop thay doi trang thai theo sudn am xung nhip cac ngd vao J va K deu d mu’c va khong thay doi trang thai cac ngd vao J va K deu mu’c

Tom lai, kieu dem cua bo dem loai tien-lui thuc hien theo trinh tu thdi gian nghiem ngat nhUsau:

1 Thiet lap mu’c hoac mu’c cac ngd vao J va K Cho xung nhip chuyen tir mu’c xuong mu’c

3 Xem ngo cua flip flop de xac dinh flip flop da chuyen trang thai doi lap chua

(33)

Hinh 8.14b gidi thieu bang su1 that cua bo dem tren Hinh 8.14a De dap ting yeu cau can phai chuyen trang thai moi xung nhip chuyen trang thai, cac ngo vao J va K cua flip flop A phai du’Oc giCr mu’c Dieu thi'ch hpp cho ca kieu dem tien Ian dem lui

Trong kieu dem tien, flip flop B doi hoi dieu kien flip flop A mu'c va xung nhip chuyen tu” mu’c xuong mu’c de no chuyen trang thai Moi day dem tien va flip flop A, ca hai deu mu’c 1, ngo cua cong X! mu’c Moi mot hai ngo vao Z, mu’c thi ngo cua no cung mu’c 1, do, cac ngo vao J va K cua flip flop B cung mu’c Khi kieu dem tien, sirdn am xung nhip den ngo vao xung nhip CLK cua flip flop lam cho no chuyen trang thai bu, cti nhir the dem tien len, bat dau tu" len hoac len

6 kieu dem lui, flip flop B phai thay doi trang thai moi A mu’c va sirdn am xung nhip xuat hien Ngo cong Y, mu’c 1, do, cac ngo vao J va K cua flip flop B d mu’c moi-khi A va day dem lui cung mu’c Nhir vay, flip flop B thay doi trang thai moi A mu’c va xung nhip chuyen tir xuong Viec dem lui thu’c hien tir den 15 hoac tir 14 den 13

6 kieu dem tien, xung nhip dich chuyen xuong mu’c 0, lam cho C chuyen trang thai doi lap moi ca A va B deu mu’c (dich chuyen tir len 4; len 8; 11 len 12 va 15 den 0) Ngo cua cong X2 mu’c moi ca hai A va B deu mu’c va day dem tien cGng mu’c Do do, cac ngo vao J va K cua flip flop C mu’c khoang thdi gian va C chuyen trang thai

6 kieu dem lui C chuyen trang thai moi ca A va B deu mu’c Ngo cua cong Y2 mu’c vao luc ca hai A va B deu a mu’c va day dem lui mu’c Do do, cac ngo vao J va K cua flip flop C mu’c khoang thdi gian va C chuyen trang thai, la viec chuyen tir 15 xuong 0; 12 xuong 11; xuong va xuong

Trong kieu dem tien, D phai chuyen trang thai doi lap moi A, B va C tat ca deu d mire Ngo cua cong X3 mire Nhu” vay, cac ngo vao J va K cua flip flop D d mire moi tat ca A, B, C va day dem tien deu mu’c Flip flop D chuyen trang thai dem tir len va tir 15 den

9 ?

(34)

D ata l" p ’Jt A 115(

‘i'rn U it

C ti.!'»? Up

;C*rr;i I -is

input B i l l

Data input C iioj

Data Input D'91 C l e a r

.c a d : 1''

.— j i r y C » ■

O u ' p j t O i

Outtt/i 0,

Oulffu* CL

II Hi l l

i ( M i l l ! r r n

r~T

!

~ —

T J n ;! 11 t—— m r F >.T ■* ■■ ~N f/i

I

:j j So d o l o g c

Hinh 8.13

Hay xem so logic cua IC TTL MSI 54/74191 gi6i thieu tren Hinh 8.15 Day

la bo dem tien-lui dong bo, IC co chan Preset va chan Clear.Ta so sanh so

logic cua IC 54/74191 voi bo dem Hinh 8.14 de hieu ro hoat dong cua bo dem

dung IC 54/74191

(35)

Can chu y rang ngo vao xung nhip qua mot cong dao trirdc xung nhip di den tiing flip flop Nhi/ vay, cac ngo cua cac flip flop Master-Slave se chuyen trang thai chi nao xung nhip d ngo vao cua flip flop chuyen trang thai tCr mu’c xuong mu’c va do, xung nhip ngo vao chung chuyen tCr len Cac dang xung du’Oc trinh bay tren Hinh 8.15b

Dem tie n

Dem lui

D c 5 A Bern

0 0 0 0

0 0 1

0 0

0 1

0 0

0 o 5

0 1 0

0 1

1 0 0 &

1 0 0 9

1 0 1 0 10

1 0 1 11

1 0 12

1 0 13

1 1 14

1 1 15

0 0 0 0 0

b ) d a n g 5U th a t

Hinh 8.14

8.4 BO OEM MOD-3

Cac bo dem da trinh bay tren day la cac bo dem dong bo va khong dong bo, dem tien, dem lui Tat ca deu la cac bo dem nhi phan, co Mo-dun la 2n, do, n la so flip flop Cac bo dem nhir vay goi la "dem tii nhien" cua 2n

Mot bo dem Mod-2 du’Oc xay diing boi mot flip flop nhat; mot bo dem

Mod-4 can flip flop, no dem tirng trang thai rieng biet

(36)

Ou'cuo

i C w l I / -*\

M i x / r !Ol «kil*

Ycc %1« A OOC* Cl&Cfc m in Loao C j' j C O j j D

71 P R F I L r T u ' I t T —

<ff W II>t jSJKJfcWJ#

j. _ JT

p rd? » rw !

c * ^:t o r v or * ‘*t* <Wbt)%( ^_0*d c

_ o

I

J

I

0 , G *

Oo<wV go Of OW i TrpU t %0

*411 * • <2* - S

, —

t r - i - -i , j , I - - Cr ar*J C?» _ D ! J

I I I L i i L u Id L i ) Llj J j

011 * u , * £/u£tl« Q o v irv

up ^’-’c

CfiO

int Cuipju - ^ OutCUII

'npurt

*9t '!»Si9S cocrir*

RHx*« c'ock

M i Kirr\>t\ p r j i

Output O,

Oukxji Q,

•6>

f -O ulout Qr

» v

Cxi'SUC Oc

Hinh 8.15 a) Sd chan cac IC 74191 va 74LS191 (bo dem nhi phan) b) Cau true ben cua IC

(37)

'19 ? 'LS191 Binary coumef

Typ>côl to*d, count, end inhibit ã*o<nrvc*i

l l i u n r e t ^ d t x l o w is i n * f o l l o w i n j M Q u m c t l o a d I f x e v e t l t o b i n a r y t h ir t e e n

2 C o u n t u p t o f o u r t e e n , f i f t w n ( m * x n n u m l , l e r c o n e a n d t w o i n h t D i i

A. Count oown to one, zero (minimum], <ihe«n, fourteen, end thirteen

D a ta in p u t s

ftippie dock

Hinh 8.15c

Thuting ngirdi ta yeu cau xay dirng cac bo dem co Mo-dun khac vdi 2, 4, 8, 16 v.v Vi du, can co bo dem Mod-3 hoac Mod-5 Mot bo dem co Mo-dun nho hon luon luon co the du’Oc xay dirng tir bo dem co Mo-dun I6n hon bang cach bo qua mot so trang thai Nhu” vay, bo dem da du’Oc cach dieu Trirdc het, can xac dinh so flip flop can co de xay dung loai bo dem cach dieu So flip flop du’Oc xac dinh bang cach chon so dem tir nhien thap nhat, nhirng Idn hon so dem cua bo dem du’Oc cach dieu Vi du, bo dem Mod-7 doi hoi co flip flop, vi la so tu nhien thap nhat Idn hon so dem cua bo dem cach dieu co Mod-7

(38)

TUdng tu" mot bo dem co flip flop co so dem tu* nhien la 8, nhi/ng bo Qua so dem, nen co the xay dung bo dem cach dieu co mod la 7, hoac

Co nhieu phirong phap xay dirng cac bo dem co kieu dem cach dieu Bo dem loai co the la loai bo dem dong bo, bo dem khong dong bo hoac phoi hdp ca hai loai bo dem dong bo va khong dong bo va co giai phap dem nhay Vi du, neu bo dem Mod-6 dung flip flop se co so trang thai can du’Oc bo qua Bo dem Mod-3 di/dc xem xet phan nay, d phan sau ta xem xet bo dem Mod-5

Thai g ia n

Clock

Vcc J

Ot>

K

+ Vcc J 3

>

K &■

A ) S o d o lo g ic

i

C lo c k _n_ A

B

-b ) a d d da ng xung

& A Bern

O O O

O 1 C lo c k _ w M o d -3

1 0 Xung n h ip

O O O a\ t>\

c ) B ang s u th a t d ) K h o i lo g ic

Hinh 8.16

Hinh 8.16 la bo dem Mod-3 dung flip flop Vi flip flop co so dem tir nhien la 4, nen bo dem cach dieu Mod-3 da bo qua mot trang thai Cac dang xung va bang sir that d Hinh 8.16 chi rang bo dem thu’c hien dem cac chuoi nhi phan 00, 01, 10, roi quay lai so 00 Bo dem bo qua so nhi phan 11 Bo dem thirc hien phep dem nhir sau:

1 Trudc thdi diem a tren true thdi gian, A = 0, B = 0; tai thdi diem a, sirdn am xung nhjp den gay ra:

- A chuyen trang thai doi lap vi cac ngo vao J va K deu d mu’c

- B reset ve (B vcn da d 0), vi ngo vao J mCrc va ngo vao K o mu’c 2. Trudc thdi diem b tren true thdi gian, A = va B = 0; tai thdi diem b, sirdn am xung nhip den, gay ra:

- A chuyen trang thai bu, (tir ve 0) vi cac ngo vao J va K deu o mu’c - B chuyen trang thai bu (tir len 1) vi cac ngo vao J va K deu d mire

3 Trudc thdi diem c tren true thdi gian, A = va B = 1; tai thdi diem c, sirdn am xung nhip den, gay ra:

- A reset ve ( A von da d mu’c 0), vi ngo vao B mu’c va ngo vao K mu’c

(39)

- B reset ve vi ngo vao J d mu’c va ngo vao K mu’c

4 Bo dem tien hanh qua trang thai, tang len theo birdc dem la co sirdn am xunhg nhip xuat hien d ngo vao xung nhip CLK

Bo dem Mod-3 dung flip flop du’Oc coi nhir la mot khoi logic nhi/ chi tren

Hinh 8.16d Khoi logic co ngo vao xung nhip, cac ngd A va B Bo dem Mod-3 du’Oc coi nhir la khoi chia 3, vi dang xung ngo B (hoac A) co chu ky bang Ian chu ky xung nhip Noi cach khac, bo dem Mod-3 chia tan so xung nhip cho Chu y rang, day la bo dem dong bo vi ca hai flip flop cung chuyen trang thai dong bo vdi xung nhip

Neu ta xem mot flip flop la mot bo dem Mod-2, ta thay rang mot bo dem Mod- (2 flip flop mac noi tiep) la hai bo dem Mod-2 mac noi tiep Tirong tir, mot bo dem Mod-8 la ket noi mot cach don gian 2x2x2 v.v Nhu” vay, cac bo dem co Mod cao hdn co the du’Oc xay dirng tir cac bo dem co Mod nho hon Vi du, noi mot flip

flop vdi ngo B cua mot bo dem Mod-3 nhir d Hinh 8.16, ta co mot bo dem

Mod-6 (3 x = Mod-6) nhir chi tren Hinh 8.17 Ngd cua flip flop du’Oc ky hieu C Chu y rang, xung cua bo dem Mod-6 co dang doi xCrng va no co tan so bang 1/6 tan so xung nhip

+ Vcc

Clock (Xung n h ip )

a ) 3 d e m M o d = x 2 h ) P a n g xung

+ Vcc

Hinh 8.17

Clock (xu n g n h ip )

a ) 3 d e m M o d - = x 3

Clock

Q

A

3

J -L _ T

L_

t>) D ang xung

(40)

Ta cung co the xay dirng bo dem Mod-6 bang cach ket noi flip flop phia

trirdc bo dem Mod-3 (Hinh 8.18), luc do, ta co bo dem Mod-6 = x Dang xung

cua bo dem du’Oc bieu thi tren Hinh 8.18b IC TTL MSI 54/7492A la bo dem

chia 12 Khi xem xet ky, ta thay rang so logic, cac flip flop QB, Qc va QD dung

la bo dem x nhir tren Hinh 8.17 Nhi/ vay, neu xung nhip di/a den ngo vao B

cua IC '92A va cac ngo lay tu” QB, Qc va QD, thi day la bo dem Mod-6 ('92A la ky hieu bien va thu gon cua IC 54/7492A)

Mat khac, neu xung nhip du’Oc dira den ngo vao A va QA du’Oc ket noi vdi ngo vao B, ta co bo dem Mod-12 = x x Bang sir that cua cau hinh bo dem Mod- 12 cho tren Hinh 8.19b Day la bo dem khong dong bo vi tat ca cac flip flop deu khong dong thdi chuyen trang thai Nhir vay, co kha nang xay hien tirpng xung tap nhieu xuat hien ngo cua cac cong giai ma du’Oc dung vdi bo dem

Ti/ cac phan tren, ta thay rang co the xay di/ng cac bo dem co so dem tir nhien (2, 4, 8, 16 v.v ) va bo dem Mod-3 Ta cung co the ket noi cac bo dem de tao nen cac bo dem co cac Mod 2, 3, 4, 6, 8, 9, 12 v.v

Ngo vao A (14)

Ngo vao 3 0)

(6) RO(1) -,

RO( 2) IZ I*

a) a logic

-O

J Q

(12)

> CLK K

QA

j a

>CLK

Is

Z?“

□ J Q

- £ > cLK

K Q

Y

01) QB

(9)

QC

J Q (6 )

> CLK K

QD

Dem QD QC QB QA

0 L L L L

1 L L L H

2 L L H L

3 L L H H

4 L H L L

5 L H L H

6 L H H L

7 L H H H

6 H L L L

9 H L L H

10 H L H L

11 H L H H

t>) Bang su that

Input A NC QA QB GND QC QD

fwl Ib] [tFI I~n1 [iol in 171

LJ LJ Lll LJ LJ L_l l_J

Input B NC NC NC Vcc ROd) RO(2)

Logic d ifcn g : Xem bang c h itc nang G h i chu: C h in QA k e t n o i vcri ngo vao B

c) a chan IC '92A, 'L592

Hinh 8.19

8.5 BO DEM MOD-5

Bo dem dung flip flop nhir tren Hinh 8.20 co so dem tir nhien la nhi/ng no du’Oc ket noi de bo qua trang thai Thirc chat, bo dem la bo dem tien,

(41)

birdc dem la 1, dem chuoi nhi phan tu1000 den 100, do, day la bo dem Mod-5 Hay xem xet hoat dong cua bo dem

Cac dang xung cho thay rang flip flop A chuyen trang thai moi xung nhip chuyen tir xuong 0, trir trirdng hop bo dem dem tir den Nhir vay, flip flop A can phai chuyen trang thai_mdi xung nhip den ngo vao CLK va khong lat trang thai dem Chu y rang C d mu’c moi birdc dem, tru" budc dem Neu C du’Oc ket noi den ngo vao J cua flip flop A, ta se co tin hieu ngirng dem nhir mong muon Oieu dung vi cac ngo vao J va K flip flop A bang 1, trir dem Nhir vay, flip flop chuyen trang thai moi sirdn am xung nhip xuat hien Tuy nhien, dem 4, J = va thdi gian tiep sau, sirdn am xung nhip den ngo vao CLK, flip flop A se khong xac lap Viec ket noi nhu” vay lam cho flip flop A thu’c hien dem chuoi so

nhu1 mong muon, ket qua chi Hinh 8.20.

Dang xung tren Hinh 8.20b chi rang flip flop B phai chuyen trang thai mdi A chuyen tir xuong Nhir vay, ngo vao xung nhjp cua flip flop B flip flop A

dieu khien, dieu du’Oc the hien tren Hinh 8.20c.

Neu xung nhip lam cho flip flop C chuyen trang thai J = va K = 1, thi moi xung nhip se phuc hoi flip flop Bay gid, ngo vao J mu’c chi nao dem thi C se mu’c dem va C d mire tat ca cac birdc dem khac Cac mu’c can thiet doi vdi ngo vao J co’ng AND co ngo vao la A va B qui dinh Vi A va B ca hai deu d mu’c chi dem 3, nhu” vay, ngo vao J cua flip flop C se d mu’c chi nao dem Do do, sirdn am xung nhip lam cho chuyen trang thai cac flip flop tir dem len dem thi flip flop C se du’Oc xac lap Tai tat ca cac thdi diem khac, ngo vao J cua flip flop C deu d mire va flip flop C du’Oc tri d trang thai

phuc hoi Bo dem Mod-5 du’Oc gidi thieu tren Hinh 8.20.

Vca—

C lock'

J1TL

j a

>

K A

J B

-£>

k b

— j c

-C> — K C

Clock

c ) o dem nhi phan M od-5

A B C

d ) Khoi logic

c B A Bern

o O O O

o O 1 1

o 1 O 2

o / 3

I O o 4

o o o O

Clock

-A

B

C

a ) r a n g e u t h a t i?) Dana xune

(42)

Trong xay di/ng bo dem loai nay, can luon luon kiem tra cac trang thai du’Oc bo qua de dam bao chac chan bo dem khong thao tac sai Bo dem bo qua cac trang thai 5, va no thao tac dem chuoi so Tuy nhien, co the xay trudng hpp bo dem du’Oc xac lap mot cac trang thai dirpc bo qua, nguon du’Oc di/a vao bo dem Can kiem tra thao tac cua bo dem b it dau tCr mot ba trang thai cam de dam bao rang bo dem khong thao tac sai va tien hanh dem chuoi so dem mong muon

Gia du rang, bo dem dang a trang thai (CBA = 101) Khi xung nhip lien ke sau chuyen tir mu’c xuong mu’c 0, cac tri/dng hpp sau day cc the xay ra:

1 Vi C = 0, flip flop A phuc hoi Do do, A chuyen trang thai t i / xuong Khi A chuyen tir xuong 0, flip flop B lat trang thai va B chuyen tir mu’c len mu’c

3.Vi ngo vao J cua flip flop C mu’c 0, flip flop C phuc hoi va C chuyen tCr mu’c xuong mu’c

4 Do do, bo dem chuyen tCr trang thai cam den trang thai dung qui dinh, trang thai (C B A = 010) sau mot xung nhip

Bay gid, gia du rang bo dem bat dau tir trang thai cam (C B A = 110) Sirdn am xung nhip lien ke sau xuat hien, cac hien ti/dng sau day se xay ra:

1 Vi C d mire 0, flip flop A phuc hoi Vi A da mu’c 0, no van tri mire Vi A khong thay doi, flip flop B khong doi va B van tri mu’c

3 Vi ngo vao J cua flip flop C O mu’c 0, flip flop C phuc hoi va C thay doi tir mu’c xuong mu’c

4 Do do, bo dem nhir vay tien hanh ti/ trang thai cam (so 6) den trang thai qui dinh sau mot xung nhip

1 j

e - J i J ^ L j ^ ' i j n j - u n _ m - L n _ r L r L

,n • c < fr S u t*

i i i.' i ^ i ;; i a

,

(43)

Cuoi cung, gia du rin g bo dem bat dau trang thai cam (CBA = 111) Khi sudn am xung nhip lien ke sau xuat hien, cac sir kien sau day xay

1 Vi C mu'c 0, flip flop A phuc hoi va A chuyen tti mu’c xuong mire

2 Vi A chuyen tu’ mu’c xuong mu’c 0, flip flop B lat trang thai va B chuyen tis

mire xuong mu’c

3 Ngo vao J cua flip flop C d mu’c 1, do, flip flop C chuyen trang thai doi lap tu” mu’c xuong mu’c

4 Nhu vay, bo dem tien hanh tu1 trang thai cam sang trang thai qui dinh sau mot xung nhip

Khong co mot ba trang thai cam nao gay cho bo dem thao tac sai Bo dem tir dong thoat ngoai trang thai cam nao chi sau mot xung nhip

Cau true cua bo dem Mod-5 co the du’Oc coi nhu la mot khoi logic nhu trinh bay tren Hinh 8.20d va co the dung cach ghep x hoac x de tao nen bo dem Mod-10 hoac goi la bo dem thap phan

Bo dem Mod-10 dupe cau tao bang cach dung bo dem Mod-5 Hinh 8.20 va

ket noi vdi mot flip flop nhir tren Hinh 8.21 Hinh 8.21 cGng ve dang xung va bang sir that cua bo dem Mod-10 Chu y rang bo dem Mod-10 tren day tien hanh chuoi dem co va co ma khong dem true tiep du’Oc chudi so nhi phan

Bo dem thap phan co the dupe tao nen mot cach de dang bang cach ket noi bo dem Mod-5 Hinh 8.20 va mot flip flop, nhirng cau hinh la x 5, nhir tren Hinh 8.22 Bang sir that va dang xung tirong Crng vdi bo dem Mod-10 = x du’Oc gidi thieu tren Hinh 8.22 Chu y rang, bo dem thap phan dem tri/c tiep chudi so nhi phan, dem tir 0000 len den 1001 va trd ve 0000

(44)

IC TTL MSI 54/7490A la mot bo dem thap phan Sd logic, bang sir that va chan IC dirpc gi6i thieu tren Hinh 8.23 Quan sat ky ta thay rin g cac flip flop QB,

Qc, Qd tao nen bo dem Mod-5 dung nhir bo dem Mod-5 d Hinh 8.20 Tuy vay,

nhan thay rang flip flop QD IC '90A la mot flip flop RS, flip flop co ngo Q0 ket noi ngirpc tro lai ng5 vao A, ta co bo dem cd va cd 5, nhir trinh bay d phan tren Hay nghien ciru sd logic va bang sir that cua IC '90A vi IC dirpc dung rong rai thuc te Mot ap dung kha hap dan ve viec sir dung IC 54/7490A lam bo dem den 999 Ba IC '90A mac noi tiep IC dau (phia phai) dem cac xung ngd vao d ngo vao CLK Ta goi IC la bo dem ddn vi

IC '90A d giCra co birdc dem 1, mdi Ian dem bang 10 xung ddn vi, vi D cua he dem ddn vi mang sang khoi giCra mdi dem tir den Khoi giCra dupe goi la bo dem hang chuc

IC '90A d ben trai co birdc dem 1, mdi Ian dem bang 100 xung ddn vi va bang 10 Ian birdc dem hang chuc Do do, khoi dupe goi la bo dem hang tram

Hoat dong cua bo dem da dirpc giai thich ro Mach logic cd kha nang dem cac xung ngd vao tir len den 999 Trudc het, can Reset tat ca cac flip flop IC '90A, sau do, tien hanh dem so xung ngd vac cua bo dem ddn vi Cach s§p xep cac IC '90A theo tirng tang nhir vay dude dung rong rai cac Von ke digital, cac bo dem tan so va nhieu irng dung can den dem thap phan

Can chi rang IC 54/7490A chi la mot so cac IC loai TTL MSI dung lam bo dem thap phan Dac biet, IC 54/74176 la bo dem thap phan khong dong bo kha pho’ bien khac Ngoai cd cac IC 54/74160, 54/74162, 54/74190 va 54/74192 la cac bo dem thap phan dong bo kha pho’ bien Mdi loai IC ke tren co nhung dac diem rieng can nam vung cac dac diem dirpc gidi thieu cac thong bao ky thuat ve IC ke tren

(45)

\ L9C LS90

a ) S<? <1d lo -g c

?.:a ; £•!■ Li'^o

CHw6» il**n' HCO

|Xu”n Qii cf^u Uf

9 t - A , X S 9

CfJ •Jem V) “*.VM (5 <?| I X o n q l i f cf"* f$)

[ _

N j o i » N ao r.l

d 0

_ Oc <■># a G «in 0 ° 9

£

<>,

0 f T L L L L L L

> i £ H i L L H

2 L H L I L H L

■» l L */ *

3 <■ L H V

- *■ h L L •» t H L i

5 L h W H

5 * L L L

6 L H >y L to_ >/ L L H

7 H / / H 1 M I

8 H t u L 8 L N

0 H I f H g H / / i t

b ) B u n g S t / t l i i t

IC * A 0 ’ I S S O ( n h t n t u - i f i - n x t t o i v i t r v p u l A ,\*C

j—0> B ^tu.j —|

* j „ I j

i ~ i i r

L! I ’J 'T ’ f l i J l?J !»J L’ i

I^DUl ft fT NC

L o g ic d i/tfn rj, x e m C i r i g chifC C»hi c h u A Ng<> r j Q A k e t i w i v<ii m jd v i o B

B Nlji* <jD K'-t n o i vt*i n r jo v.it» A

Hinh 8.23

-TLTLR

D e m h a n g tra m B e rn h a n g c h u c D e m d o n v i

(46)

S N , S N S y n c h r o n o u s b in a r y c o u n t a r t

S N S N S y n c h ro n o u i b in a ry c o u n te rs a s im ilar; ho w e ve r, th e C L E A R is a sy n c h ro n o u s as s h o w n fo r tha S N 60 S N decade c o u n te rs a t le ft.

J o r N d u a l- in - lin e o r W fla t p a ck a g e ( T o o v ie w !

Outputs

D a ta inputs

P o sitiv e -logic: See d e s c rip tio n

Hinh 8.25

8.6 BO DEM XAC LAP TR UD C

Ta da nghien cifu hoat dong cua cac bo dem cac chuoi so nhi phan theo kieu dem tien, dem lui, ta cGng da nghien cu'u hai loai bo dem co kieu dem cach dieu,

(47)

do la bo dem Mod-3 va Mod-5 Tu1 cac loai bo dem co ban va ket noi phoi hpp cac bo dem co ban ta co the tao nen cac bo dem co mo-dun 2, 3, 4, 5, 6, 7, 8, 9, 10 v.v Kha nang xay dung nhanh chong va de dang mot bo dem co Mo-dun nhu mong muon quan den mu’c cong nghe ban dan cung cap cho chung ta nhieu IC TTL MSI de thu’c hien muc dich tren Bo dem xac lap trudc (Preset) la khoi logic co ban du’Oc dung de thuc hien bo dem co Mo-dun can co

Hau nhu tat ca cac bo dem xac lap trudc la loai IC TTL MSI dupe cau tao bang flip flop (thudng la loai flip flop JK Master-Sslave) va loai bo dem thudng du’Oc goi la bo dem bit, cd the la dong bo hoac khong dong bo Khi bo dem tien chudi so nhi phan tii nhien tu” 0000 len den 1111, bo dem du’Oc goi la bo dem nhi phan Vi du, IC 54/74161 va 54/74163, ca hai deu la bo dem nhi phan dong bo hoat dong theo kieu dem tien Cac IC 54/74191 va 54/74193 cOng la cac bo dem nhi phan dong bo, chung hoat dong hoac la theo kieu dem tien hoac la theo kieu dem lui

Vi bo dem thap phan rat quan trong, nhieu bo dem bit co ban du’Oc ket noi ben IC de tao bo dem cach dieu Mod-10 hoac goi la bo dem thap phan Vi du, IC 54/74160 va 54/74162 la cac bo dem thap phan dong bo theo kieu dem tien Cac IC 54/74190 va 54/74192 cung la cac bo dem thap phan dong bo, nhung cd the dem tien hoac dem lui

* * i '

Cac bo dem de cap tren day, tat ca deu la mach TTL MSI O' cac IC nay, ta chi can quan tam den cac ngo vao, ngo va tin hieu dieu khien

So chan va so logic cua bo dem bit dong bo cua IC 54/744163 dupe

gidi thieu tren Hinh 8.25 Nguon cung cap +Vcc va GND (dat) Ian lupt la cac chan

16 va Xung nhip dupe dua den chan Ta can chu y rang cac ngo chuyen trang thai tuong Ung vdi sudn duong xung nhip

Cac ngo cua flip flop la QA, QB, Qc va QD ngd "CO NHO" (Carry) d chan 15 du’Oc dung de tao nen bo dem cd nhieu tang lien tiep de dem hang don vi, hang chuc va hang tram

Hai ngo vao Enable (P d chan va T d chan 10) du’Oc dung de dieu khien bo dem Neu mot hai chan Enable d mu’c 0, bo dem se ngUng dem, neu ca hai ngo vao deu d mu’c thi bo dem hoat dong

Chan Clear d mu’c se reset tat ca cac flip flop, cac ngo cua cac flip flop d mu’c xung nhip tiep sau xuat hien, luc khong can quan tam den cac mu’c logic d cac ngo vao Enable Cach tien hanh dpc goi ia reset ddng bo vi no ddng thdi xay doi vdi tat ca cac flip flop luc sudn duong xung nhip xuat hien Mat khac, nhan thay rang IC 54/74161 cd chan Clear khong ddng bo, vi no xay lap tUc chan Clear chuyen trang thai tu’ xuong 0, khong lien quan den mu’c cua xung nhip, cua Enable va Load.^

(48)

Doi voi bo dem thirc hien dem tien chuoi so nhi phan, can tri cac ngo vao Enable, ngo vao Load va Clear mu’c Voi dieu kien nay, bo dem se dem tien co birdc dem la mdi sirdn dirong xung nhip xuat hien va dem tu 0000 len den 1111, roi lap lai chudi dem tren Vi xung nhip tac dong dong bo den tat ca cac flip flop, cac ngo thay doi trang thai cung mot luc va khong co hien tirpng xung tap nhieu xuat hien So trang thai cho tren Hinh 8.26a chi chudi dem tu1 nhien, a

do, moi hinh vuong tirong Crng vdi mot birdc dem (hoac trang thai) va mui ten chi ro bo dem tien hanh dem tir trang thai sang trang thai tiep sau nhir the nao

15

0 13

| 12 10

Den ngd vao xoa (chan 1)

a) Sd trang thai bo dem mod-16 b) Cong giai ma so dem

c) SO trang thai d i/d c cach dieu doi vdi bo dem mod-10

Hinh 8.26

Cd the de dang cach dieu de thay doi dai so dem bang cach sir dung ngd vao Clear dong bo Oieu thirc hien mot cach de dang bang cach dung cong NAND de gia ma so dem Idn nhat can cd, va dung ngd cua cong NAND de xoa bo dem mot cach dong bo de tro ve day so nhi phan 0000 Sau do, bo dem bat dau dem tir 0000 len den so dem Idn nhat can cd, va roi lai xoa de trd ve so 0000 Day la giai phap ky thuat dirpc sir dung de xay dirng mot bo dem cd mo-dun can cd

Vi du, can cd bo dem cd so dem Idn nhat la 9, ta noi cac ngd vao cua cong

NAND de giai ma sd dem = DCBA = 1001 Tir do, ta cd bo dem Mod-10 vi chuoi

so dem nhi phan tir 0000 len den 1001 Cong NAND du’Oc dung de giai ma so

theo so trang thai cach dieu chi tren Hinh 8.26b va 8.26c Tir Hinh 8.26b

nhan thay rang can sir dung hai cong dao de cd QB va Qc So trang thai cach

dieu cd nhung hinh vuong lien net bo dem cach dieu, Mod-10 va cac hinh vuong dirt net bieu thi cac trang thai du'pc bo qua

(49)

Bo dem Mod-12 co so dem Idn nhat la 1110 = 10112 Bo dem se dem tCr 0000 len den 1011 roi quay trd lai so 0000 Nhu vay, cac ngo vao cong NAND phai la

Q0, Qc> Qa

-Xac lap cac dang xung voi cac ngo vao Clear, Preset, dem, ngUng hoat dong

(Inhibit) cua cac IC 54/74163 (va 54/74161) du 'O c gidi thieu tren Hinh 8.27 Can

nghien cun ky de hieu sau sac cach dieu khien cac ngo vao

So logic va xac lap cac dang xung doi voi cac IC 54/74160 va 54/74162 d u ’Oc cho tren Hinh 8.28 (cac chan cua IC giong voi chan IC 54/74163 cho

trudc day) Hai bo dem d u ’O c cach dieu va chung la cac bo dem thap phan

Hon nu’a, cac ngo vao, ngo va cac day dieu khien cua hai bo dem tren day cung hoan toan giong vdi cac IC 54/74163 va 54/74161 Cac bo dem dem tien moi si/on duong xung nhip xuat hien, tien hanh dem tu” 0000 len den 1001 roi quay trd lai 0000 So trang thai chi tren Hinh 8.26c do la so trang thai cua bo dem Mod-10 hoac bo dem thap phan

Mot vi du k h a c , muon x a y di/ng bo dem co Mo-dun 12, ta tien hanh nhu1 sau:

5N54161, SN&4163 SN74161, SN74163 Synchronous binary counters Typtc*J ckaf, pretet count and inhibit iaqu#nc«i

Illustrated below is the following lequence. 1 Clear ootouts to zero.

2 Preset to binary twelve.

3 Count to thirteen, fourreen, fifteen, 2ero, one and two

4 Inhibit.

Clear (SN54161, SN74161)

Clear (SN54163 SN74163!

Load

A

Data inputs

B

V

U _ r

Clock (SN 54161, SN74161)

Clock (SN54163, SN74163i

L J (Asynchronous'

Outputs

-( S y n c h r o n o u s )

"LJ -m j i J i J ^ n _ r L r i r L n _ r L r L ri i

112 *13 14 15 0

| h - C o u n

t-Clear Prmet

- I n h i b i t

(50)

IC 54/74193 la bo dem nhi phan dong bo theo kieu dem tien-lui IC co chan reset chung va co the reset de dem so can co voi cac ngo vao nap so lieu mac

song song Ky hieu logic doi vdi IC TTL MSI dupe chi tren Hinh 8.29a.

Chan PL la ngo vao dieu khien de nap so lieu vao cac chan PA, PB, Pc va PD Khi IC dung lam bo dem, chan duoc bo ngo va PL phai tri mu’c Chan MR la chan reset chu, binh thudng chan dupe tri mu’c (mu’c chan MR se reset tat ca cac flip flop)

Cac ngo TCuVa TCD dupe dung de dieu khien cac bo kien noi tiep phia

sau Cac ngo vao xung nhip la CPu va CPD Dua xung nhip vao CPy, bo dem se dem tien, neu dua xung nhip vao chan CPD, bo dem se dem lui Chu y rang,

xung nhip can dupe noi vdi mot hai chan CPy hoac CPD, nhung khong dua

vao hai chan cung mot luc Cac ngo vao khong dung tdi can dupe duy tri 6

mu’c Cac ngo cua bo dem la QA, QB, Qc va QD

So trang thai chi cac trang thai on dinh cua bo dem, dong thdi cung chi qua trinh dem tu” budc sang budc tiep theo So trang thai cua IC

54/74193 dupe gidi thieu tren Hinh 8.29b Moi hinh vuong la mot trang thai b’n

dinh, cac mGi ten chi chuoi so dem theo ca hai cach dem tien va dem lui Day la bo dem bit, cd 16 trang thai o’n dinh, dupe danh so 0, 1, 2, 15

C a c b o d e m t h a p p h a n d o n g b o s i r d u n g c a c IC /7

(51)

> V I * i .>.‘ « v > S N G S N S y n c n r o n o y i c o w m e n

T y p * C i c l* - * r c o u n t a n d i n h i b i t m k j u •*><=•• I l l u s t r a t e d t > « lo w is t h a f o l l o w i n g » # a u t n c »

1 C ■c m s o u t p u n t o z a r o 2 P r * * « t t o C O w n m

3 C o u n t t o ••Q h T , n ir > * , j a r o , o n * , t w o a n d t h r e « 4 I n h i b i t

C l — r( S N 6 S N ) C l« » c ( S N I S N )

1_T

D a t a i n p u t s ■<

-> _ r

B S

C l o c k ( S N S N )

C lo c k ( S N S N G ! ENA9LE P

E N A B L E T

f aA

I

! '

O u u ts <

i _ 1QC C a r r y

( A r y n c / i r o n o u i )

{ S y n c h r o n o u s ) "I I

- T '

17

C l e a r P r e t a t

0

C o u n i

-Hinh 8.28

<*) (61

a - |— y ^ 7Oc°o

To P L

(e )

Hinh 8.29

(52)

dich chuyen vao bo dem, dieu co nghia la bo dem preset cac so lieu co mat cac chan PD, Pc, PB va PA

Ta cung co giai phap ky thuat khac de cach dieu bo dem Dung cong NAND de phat hien mot trang thai bat ky cac trang thai on dinh, vi du, trang thai 15

(1111), va dung ngo cua cong de dat PL a mire Tai thdi diem nay, bo

dem da preset so lieu co chan PD, Pc Pb va PA

0 1 2 3 4

Hinh 8.30

Vi du, gia su1 rang PD Pc PB PA = 100.1 (so 910) Khi xung nhip dupe dua vao, bo dem thu’c hien dem tuan tu cho den 15 (11112) Tai thdi diem nay, PL se xuong

mu’c va so (1001) se dupe dua vao bo dem Bo dem se thuc hien dem cac

trang thai 10, 11, 12, 13 va 14 va tai so dem 15 bo dem lai se preset ve so Chuoi so dem de dang dupe chi tren so trang thai Hinh 8.30, Vi so 15 (1111) ton tai mot khoang thdi gian rat ngan de bo dem du dupe preset, nen cac trang thai on dinh vi du tren day la 10, 11, 12, 13 va 14 Do do, day la bo dem Mod-6 Can chu y rang, giai phap ky thuat la khong dong bo, vi preset hoat dong khong xay dong bo vdi xung nhip Vi ly nay, can de phong hien tuong xung tap nhieu phoi hpp vdi cac ngo preset bo dem

Ta xem xet mot trudng hpp khac, trudng hpp dem lui dung giai phap ky thuat tren day Gia du rang, bo dem tren van preset so 1001 (so 9), nhung xung nhip dupe dua den chan dem lui CPD Luc do, bo dem dem lui den 15, roi lai preset den va lap lai qua trinh dem So trang thai trudng hpp dupe chi

tren Hinh 8.31 Ro rang bo dem cd mo-dun la 10

Hinh 8.31

(53)

8.7 BO DEM CHUYEN (BO OEM JOHNSON)

6 Chirong 7, ngo cua flip flop cuoi cung d bo ghi chuyen dupe ket noi tro lai ngo vao dieu khien cua flip flop dau tien Cach ket cau cho ta bo dem vong nhir ve tren Hinh 7.13 va giai phap ky thuat dupe goi la phan hoi true tiep Neu cac ngo cua flip flop cuoi cung dupe dao cheo va ket noi trd ve cac ngo vao dieu khien cua flip flop dau tien, giai phap ky thuat dupe goi la phan hoi dao Cach ket noi dan den bo dem co nhung tinh chat rat doc dao, bo dem loai dupe goi la bo dem dich hoac la bo dem Johnson

Trang thai 6

Hinh 8.32: Bo ghi chuyen tang dung phan hoi dao de tao nen bo dem chuyen

Ba flip flop JK Master-Slave d Hinh 8.32 dupe ket noi bo ghi chuyen

chuan Them vao do, cac ngo cua flip flop cuoi cung dupe dao cheo nhau_va ket noi trd ve cac ngo vao cua flip flop dau, ngo C ket noi v6i K cua flip flop A va C dupe ket noi v6i J cua flip flop A

Gia_du rang, tat ca cac flip flop deu dupe preset va xung nhip b it dau hoat dong Vi C d mu’c C d mire 0, nen mu’c xac lap flip flop A xung nhip dau tien xuat hien Dong thdi, B va C van tri mu’c vi cac ngo vao J cua cac flip flop van d mu’c va cac ngo vao K cua chung d mu’c

Trong chu ky xung nhip thir hai, A van tri mu’c vi C con_d mu’c va C d mu’c Dong thdi B dupe xac lap mu’c vi bay gid A = va A = 0; C van khong thay doi vi B d mu’c chu ky xung nhip

Trong chu ky xung nhip thir ba, A va B van tri mu’c va C dupe xac lap mu’c vi bay gid B d mu’c Do do, sau ba chu ky xung nhip, tat ca flip flop da dupe thay doi tir trang thai len trang thai

(54)

Trong chu ky xung nhip thir nam, A tri mu’c 0, B reset ve (vi bay gid A mu’c va A mu’c 1), va C tri mu’c

Chu ky thu1 nam sau dua bo dem trd ve diem xuat phat ban dau, vi C dupe reset ve ca hai A va B dang tri mu’c Nhir vay, bo ghi chuyen v6i phan hoi dao da thuc hien mot chu ky dem tron ven chu ky xung nhip

Hinh 8.32b cho thay rang dang xung cua moi flip flop la xung vuong co chu ky gap Ian chu ky xung nhip Hon nu’a, tat ca cac ngo cua flip flop deu co chu ky giong nhau, chi co dieu khac la cac xung dich chuyen xung no lech vdi xung dung mot chu ky xung nhip Xung vuong chuyen dich sang cac flip flop tiep sau, tien sang mot flip flop moi xung nhip chuyen ti/ trang thai xuong trang thai Vi hoat dong cua bo ghi chuyen la tuan hoan va cac dang xung dich sang cac flip flop lien sau roi quay trd lai flip flop dau tien nen cau hinh duoc goi la bo dem chuyen hoac bo dem Johnson Bang sir that cua bo

dem loai dupe gidi thieu tren Hinh 8.33a De de dang so sanh, Hinh 8.33b chi

ra bang su that nhi phan true tiep doi vdi flip flop Can chu y rang, bo dem chuyen flip flop dem trang thai rdi rac Qua trang thai sap xep nhu vay, bo dem chuyen dem tuan tu so nhi phan tuong Crng vdi 1-3-7-6-4-0 Nhu vay, sau trang thai cua bo dem chuyen la trang thai roi rac va co the giai ma dupe

c B A

T rang t h a i

Dem nhi phan

t\Jor\c\ diicm g C & A D em

0 O 1 0 0 0 O

0 1 0 0 1

1 1 1 3 7 0 0

1 1 O 0 1

1 0 O 4 0 0

0 0 0 O 0

1 0

0 0 1

1 1

0 0 0 O

a) b)

Hinh 8.33: Bang suth at cua bo dem chuyen flip flop

Tuy nhien, can chu y rang bo dem chuyen bo qua cac so nhi phan (010) va (101), do, phai kiem tra de xac dinh xem bo dem co dem cac so theo dung qui dinh khong, vi co the bo dem chuyen hoat dong sai, dem mot hai so cam tren day tai thdi diem ban dau dua nguon vao he thong Mot hai trang thai cam cung co the xay nhieu hoac mot vai hoat dong sai sot khac Ta hay xem xet cac trudng hpp bo dem thao tac sai nhu sau:

Gia du, luc dau, bo dem dang dem so nhi phan (010) Thdi gian ke sau xung

nhip chuyen xuong mu'c A len mu’c 1, B chuyen xuong mu’c Ova C len mu’c

(55)

Nhir vay, bo dem se tien den dem so nhi phan (101), day la trang thai cam thu* hai

Trong chu ky xung nhip thu1 hai, A xuong mu’c 0, B len mu’c va C xuong mu’c Nhu vay, d xung nhip thu" hai, bo dem lai trd ve trang thai cam ban dau, so nhi phan (010) Do do, bo dem dao dong giua hai trang thai cam tren day va khong hoat dong nhu mot bo dem Mod-6

De tranh tinh trang nay, can phai dam bao c h ic chan rang bo dem khong the tri mot hai trang thai cam ke tren Mot phuong phap de_thuc hien dieu tren day la dung cong NAND nhu chi tren Hinh 8.34 Khi A, B va C deu mu’c (tuong Crng v6i trang thai cam 010), ngo cua cong NAND d mu’c Neu ngo cong NAND dupe noi vdi chan PR (preset) cua flip flop A, thi A se set mu’c moi xay dieu kien Nhu vay, bo dem lap tire tien tir so nhi phan (010) sang so nhi phan (011) Day la trang thai thu" hai chuoi dem binh thudng va bo dem hoat dong dung nhu mong muon

Vi du, thiet ke bo dem chuyen flip flop Hay dung so dang xung de lap bang suthat va chi chudi so dem can co

A

- 5-c~

Ben PR

cua Flip Flop A

Hinh 8.34: Cong preset doi v6i bo dem tren Hinh 8.32

Lap danh sach cac trang thai cam va kiem tra cac trang thai de xac dinh bo dem co hoat dong sai vi cac trang thai cam thi hay chi phuong phap giai quyet

Hinh 8.35 la bo dem chuyen va dang xung can thiet ke Bang su that dupe xay dung tir so dang xung Vi bo dem dung 4 flip flop nen co 16 trang thai co the xay Vi bo dem dung 4 flip flop nen co 16 trang thai co the xay Theo kieu hoat dong cua bo dem can thiet ke, chuoi so dem co trang thai do, trang thai cam phai dupe xac dinh Tam trang thai cam tuong Crng la 2 4, 5, 6, 9, 10, 11

va 13 Cac so dupe chi bang tren Hinh 8.36 Hai cot ben phai cua

bang la trang thai mdi va so nhi phan mdi, tuong duong va bo dem se dem cac so sau moi chu ky xung nhip Vi du, sau mot chu ky xung nhip, bo dem se dem tu”

so nhi phan 2 (0010) sang so nhi phan 5 (0101) Bang chi rang neu bo dem mot

trang thai nao so cac trang thai cam, thi no se dem chuoi nhi phan 2-5-

11-6-13-10-4-9-2 Nhu vay, bo dem se sa vao kieu dem khong mong muon va cu” lap lai mai Chu y rang, bo dem van la bo chia Tuy nhien, can phai dua bo dem ve kieu dem mong muon

Cac dang xung cua chuoi so cam dupe chi tren Hinh 8.36b Mot phuong

(56)

10) Dieu kien khong bao gid bang chudi so dem cho phep, nen cong

NAND chi Hinh 8.34 co the dung de hieu chinh bo dem Tuy nhien, dieu

can_thiet la noi cac ngo cua cong NAND chuyen tu* xuong (tire la moi ABC =1) va do, bo dem se tro ve chuoi so dem mong muon

J U L

Clock

PR

L - jJ A

-Oy

r —IK A CLR

T) r-o>

PR

J p

K &

CLR

T>

0

PR J 0

CLR ~Cr~ PR J P > D CLR

: f f (—e—

^_njn_n_run_nji_njnjn_njn_n A 3 C D J

P c P A

T ran g th a i

S o n h i p h a n T arrn n d ilrrn r\

O o O O O

O o O 1 2

O o 7 3

O 7 4 7

1 7 5 15

1 7 O 6 14

1 O O 7 12

7 O O O & »

O O O O O

b) c)

Hinh 8.35: Bo dem chuyen tang

Chu y rang, n flip flop co the dupe dung de chia xung nhip cho 2n Dieu co nghTa la flip flop chia xung nhip cho 4, flip flop chia xung nhip cho v.v Nhu vay, co the xay dung bo dem co Mo-dun c h in bang each chon so thi'ch hpp cac flip flop va noi chung bo dem chuyen

Pem nhi phan Trang thai Trang thai mdi Pem nhi phan mrri

2 0010 0101 5

4 0100 1001 9

5 0101 1011 11

6 OHO HOI 13

9 1001 0010 2

10 io io 0100 4

11 1011 OHO 6

13 1101 m o 10

a) t>)

Hinh 8.36

Xay dung cac bo dem co Mo-dun khac tir cau hinh bo dem chuyen co ban

that de dang Cac dang xung tren Hinh 8.32 cho thay rang neu A reset ve sdm

(57)

xung nhip, C cung nhu vay, dieu co nghTa la A, B va C tat ca deu mu’c chi hai chu ky xung nhip, chu ky xung nhip cac flip flop van tri mu’c Do do, bay gid bo dem chia 5, thay vi chung chia va co trang thai rdi rac cua bo dem Mod-5

Hinh 8.37 gidi thieu so logic, cac dang xung va bang su that cua phiiong phap thuc hien tren day Vi can thiet lam cho A chuyen trang thai xuong chi sdm hon chu ky xung nhip so vdi trudc day, nen ngo vao K cua flip flop A phai xuong mu’c sdm hon mot chu ky xung nhip Do do, chi can ket noi ngo B vdi ngo vao K cua flip flop A ma khong ket noi vdi ngo C Nhu vay, bo dem cd mo-dun le bat ky de dem so le m cd the duoc xay dung tu* bo dem cd mo-dun c h in m+1 bang cach don gian la ket noi ngo vao K cua flip flop dau tien vdi ngo cd mu’c cua flip flop trudc cuoi

Trang th a i xung nhip

A P C

J IT L

o D _ PP A K A CLP TT

3 4

- o >

O

PP J &

CLP

—c r

/ 2

H

h-_r

pp

dp *)

c p A Trang th a i

o o o O

o o 1 1

o 1 1 2

1m 1 o 3

1 o 4

o o O

c) Hinh 8.37: Bo dem chuyen Mod-5

Bo dem van cd hai so dem bi cam, so (010) va so (101) So (111) cGng la so bi cam, nhung so khong gay chuyen r lc roi nao vi bo dem se chuyen mot cach tu nhien tir so (111) sang so 6(110) va day la trang thai thu” tu chudi so dem yeu cau Hon nua, cd the thay rang, bo dem se chuyen tu” so (010) sang so (101) va sau sang so (011), so la trang thai thir hai chudi so dem mong muon Nhu vay, bo dem khong cd kieu dem bi cam duoc tri mai nhu bo dem dich trudc day

8.8 BO OEM CHUYEN MQD-10 CO GIAI MA

Bo dem chuyen flip flop cd the dupe xay du’ng nhu tren Hinh 8.38 Day la

(58)

rC

JULClock

Fk

J <4

> > r °>

K A CLR

K CLR

J C

K C

CLR

— 0— r—C>

1 ,0

I i r -4—M - 1.0T

l

/C P ‘

_ a ^ _

rc>

-a-CLK

~o~

Trang Si9 nhi phan

Hinh 8.38

Tu” do, ta thay neu bo dem dem cac trang thai cam nay, no se thuc hien mot hai tien trinh sau day: thif nhat, bo dem van chia xung nhip cho 10, nhung no se di den mot hai chuoi so cam 2- 5-11-23-14-29-26-20-8-17-2

hoac 4-9-19-6-13-27-22-12-25-18-4; thCr hai, neu bo dem dem mot hai so 10

hoac 21, no se dem luan quan hai so Be giai quyet tinh trang tren, lam cho bo

dem lam viec chudi so chuan xac, ta dung cong NAND nhu chi Hinh

8.34 Ngo cua cong dupe ket noi vdi chan PR cua cac flip flop C, D va E

Bo dem dich thap phan Hinh 8.38 co 10 trang thai roi rac, do, bo dem co the duoc giai ma de tao 10 dang xung thdi gian tuong tu nhu bo dem

Mod-8 Hinh 8.7 Trong bo dem khong dong bo Mod-8 co giai ma, ta can cong

AND ngo vao vi co flip flop bo dem Trong trudng hop nay, ta dung 10 cong AND ngo vao de giai ma bo dem chuyen Mod-10 vi co flip flop Tuy

vay, xem xet cac dang xung tren Hinh 8.38 cho thay rang co the cau tao mach

don gian hon

Nhan thay rang, trang thai duoc xac dinh nhat A mu'c va B mu’c Nhu vay, chi can mot cong AND ngo vao d_e giai ma trang thai Cac ngo vao cong AND la A va B, he thu’c logic la Xt = A B

Tuong tu, trang thai chi co q_thdi diem B mu’c va C mu’c Cac ngo vao cua cong de giai ma la B va C, va he thu’c logic chuan xac la x2 = BC Cac phuong trinh logic de tri trang thai duoc xay dung tuong tu cach lam tren day Cac phuong trinh cung vdi cac cong giai ma thi'ch hop duoc chi tren

Hinh 8.39

Nhu vay, ngoai nhung Uu diem sir dung bo dem chuyen, co mot iru diem nu’a la chi can cong ngo vao de giai ma mot trang thai nao so cac trang thai cua bo dem

(59)

3 t > « 3 £ > - " - E >

\ x = P C

-_ J r - O

~ ^ \ - X = P E

“ -^ E 'o

-X = P

-XO = A P

i = CP

X

- reX T

-X9_

XIO7L

_ n _

J L

_ n _ n

J L _n_

n _ r r

J L

r r r r

Hinh 8.39

Tren Hinh 8.40a dang xung dupe dung nhu la mot tin hieu dieu khien Van

de la can chi mach logic de tao tin hieu

Ta thay rang tin hieu dieu khien can co tuong ung vdi mu’c cac trang thai 1, va va o tat ca cac thdi diem khac, no co mu’c Giai phap trudc la dung

co’ng AND nhu chi tren Hinh 8.39 de giai ma Neu cac ngo cua cong

duoc dung nhu la ngd vao co’ng OR nhu Hinh 8.40b, tin hieu dieu khien x

dupe tao ngo cua cong OR

t>) c)

Hinh 8.40

(60)

CAU HOI VA BAI TAP

8.1. Neu i/u diem cua bo dem khong dong bo

8.2. Giai thi'ch hien tupng co xung tap nhieu bo dem khong dong bo

8.3. Neu cach triet xung tap n h ilu bo dem khong dong bo

8.4. Neu Uu diem cua bo dem dong bo

8.5. Neu nhung Uu va nhupc diem cua bo dem phoi hpp dem khong dong bo

va dem dong bo

8.6 Mo ta diem khac biet giua cac tin hieu ngo cua bo dem dong bo va bo dem khong dong bo

_ 8.7 bo dem lui dau vao flip flop thu1 hai va thu” ba xuat phat tu1 dau nao cua Q, Q?

8.8 Bo dem nao co the doi hudng dem?

89 Bo dem Mod-10 thudng dupe goi la bo dem gi?

8.10. Cum tu1 hoan chinh cua BCD la gi?

8.11. Trong bo dem nao tat ca cac dau cung thay doi dong thdi?

8.12. Flip flop cuoii cung cua bo dem tien bit lat Ian dem, sau ba flip flop trudc co ngo cac mu’c nao cac mu’c sau: 000, 101, 111, 110?

8.13* Tan so cua xung nhip la bao nhieu neu chu ky cua B tren Hinh 8.1 la 1000 ns?

8.14 Xem xet neu ve cac dang xung doi vdi bo dem khong dong bo co 10 flip flop thi co nhung kho khan chu yeu nao?

8.15* Tan so xung nhip tren Hinh 8.1 la bao nhieu, neu chu ky dang xung tai C la 24 ps?

8.16* Can co bao nhieu flip flop de xay dung bo dem Mod-1287 So thap phan Idn nhat co the lUu tru bo dem Mod-64 la bao nhieu?

8.17* Ve chi'nh xac cac dang xung ngd doi vdi IC 74L93 dupe ket noi de tao nen bo dem Mod-16

8.18* Ve cac cong can thiet de giai ma 16 trang thai cua IC 74L93 hoat dong

nnu tren Hinh 8.3.

8.19* Sir dung cac dang xung co tren Hinh 8.9 va nghien cuti cac cong giai

ma nhu tren Hinh 8.7 Hay chi cac xung tap nhieu se xuat hien b£ng cach ve

cac dang xung dupe giai ma cua cac co’ ng

(61)

8.20* Xac dinh so cac flip flop can thiet de xay dung cac bo dem sau day:

a) Mod-6

b) Mod-11

c) Mod-15

d) Mod-19

0) Mod-31

8.21* Ve cac cong giai ma va tat ca cac dang sang doi vdi bo dem Mod-6

nhu tren Hinh 8.17

8.22* Ve so logic, lap bang su that va ve cac dang xung doi v6i bo dem Mod-9 dung hai bo dem Mod-3 ket noi noi tiep

8.23* Ve cac cong giai ma va tat ca cac dang xung doi v6i bo dem nhu tren

Hinh 8.22.

8.24* Co bao nhieu bo flip flop de xay du’ng cac bo dem co cac Mod dem sau:

a) b) c) d) 10 e) 21

8.25* Ve mot bo dem chuyen gom flip flop va ve dang xung cua bo dem Lap bang suthat va kiem tra cac trang thai bat hop phap

(62)

CHUONG 9

BO NHO BAN DAN

Hoc xong chuong nay, hoc vien co kha nang:

Hieu duoc nguyen ly cau tao, cac tinh nang co ban cua cac loai bo nhO ban din:ROM, PROM, EPROM, RAM va DRAM.

Hieu duoc nguyen ly cau tao cac loai te bao nho ban dan.

Phan tich duoc cac hoat dong cua cac loai bo nhd ROM va RAM.

Thuc hien d'UOc cach md rong dung luong bo nhO ban d§n.

ifng dung cac tinh nang cua cac loai bo nho ban dan cac mach dien tit

TONG QUAN

Bo nhd ban dan thay the cac loai bo nho bang vat lieu tir Cac tien bo m6i cua cong nghe ban dan thdi gian gan day da cung cap nhieu mach nho loai MSI va LSI co tin cay cao va gia Vao dau nhung nam 60 cua the ky trudc, gia thuong pham mot bit nhd vao khoang USD (tuong duong 34000 VND) Den nay, nhung nam dau cua the ky 21, gia thuong pham 128 Mega Byte (1024 000 x128 x bit) vao khoang 20 USD (tuong duong 340000 VND) Nhu vay, gia thuong pham cua mot bit nhd sau khoang 40 nam da giam di vao khoang 105.10‘ Ian Bo nhd ban dan dien hinh co cac te bao nhd sap xep theo hinh chu nhat, gan khoi hop nho bang nhua dang DIP (Dual in line package) Te bao nhd co ban la mot mach flip flop tranzito hoac mach cd kha nang tich tru dien tich va duoc dung de lu’u tru' mot.bit tin Cac bo nhd thu'dng du'pc phan cac loai bo nhd

(63)

Ii/C in g circ, MOS hoac CMOS theo tranzito dung de cau tao cac te bao nhd Tong so cac te bao nhd mot bo nhd chinh la dung lupng cua bo nhd Vi du, mot chip nhd ludng cuc 1024 la mot bo nhd ban dan cd 1024 te bao nhd, moi te bao gom mot flip flop cac tranzito ludng c u t tao nen Chip la mot thuat ngu' hay dirpc dung hon la thuat ngu thiet bi nhd ban dan

Noi chung, cac bo nhd MOS va CMOS tieu thu nang lirpng it hon, gia hon va kich thudc nho hon bo nhd ludng cuc, nhung bo nhd ludng cUc hoat ddng nhanh hon Mot cach tong quat, cac loai bo nhd cd the dupe chia cac loai bo nhd ROM va RAM

RAM la loai bo nhd cd the nap cac tin vao hoac lay cac tin tu” bo nhd Vi mdi te bao la mot flip flop nen khong cd nguon cung cap, tin bo nhd cung bi xoa, RAM cd loai te bao nhd nhu vay dupe goi la bo nhd xoa

ROM la loai bo nhd chi cd the lay (doc) so lieu Vi du, ROM luu tru cac gia tri cua ham luong giac, ham logarit thap phan, logarit tu nhien hoac cac chuong trinh khong thay doi de tim can bac hai cua mot so Vi cac so lieu dupe lUu tru vTnh vien d mdi te bao nen mat nguon cGng khong lam mat so lieu va nhu vay, ROM la loai bo nhd khong xoa Viec sir dung PROM cung giong nhu ROM, nhung cd dieu khac vdi ROM la cac so lieu dupe ngUdi sir dung tu nap vao PROM

EPROM la loai bo nhd so lieu cd the thay the tirng thdi gian nhd sir dung loai PROM cd kha nang xoa duoc (EPROM) So lieu cd the dupe lap trinh vao EPROM, sau lai xoa di va lap trinh lai neu can

Dudi day trinh bay cac loai bo nhd ban dan va cac dac diem hoat dong cua chung Cac bo nhd ban dan cd dung luong nho dupe thao luan trudc vi no cd cau hinh don gian va de hieu Cac cau true co ban dupe van dung vao cac bo nhd cd dung lupng Idn hon

9.1 OjA CHI HOA BO NHO BAN DAN

Lap dia chi la viec tien hanh lira chon mot cac te bao cua bo nhd de nap tin vao hoac lay tin De lua chon thuan tien, cac bo nhd thudng sap xep cac vi tri te bao theo hang va theo cot nhu Hinh 9.1a Trong trudng hpp dac biet nay, cd m hang va n cot va bo nhd cd n x m te bao

n c o t c o t Te r nha A 3

Ft

1

' /

m hang n C- %

I

1 n x m te bao

hang A

I

1 1 1

a)

(64)

Mach dieu khien phu hap v6i sU sap xep co ban cua bo nhd dupe thiet ke cho chi co mot hang va chi co mot cot hoat dong va te bao nh6 vi tri giao

nhau cua cac hang va cot dupe chon Vi du, Hinh 9.1b, neu hang A va cot B

duoc kich hoat, thi te bao nh6 vi tri giao cua hang va cot dupe chon, tuc la tin co the dupe doc tu” te bao hoac viet vao te bao Oe tien Ipi, te bao duoc goi la te bao AB tuong ting vdi hang va cot dupe chon Cach dia chi hoa duoc goi la "dia chi" cua te bao Su kich hoat cua mot hang hoac cot du’Oc thuc hien bang cach dat mu’c logic (hoac co the dat mu’c logic 0) len hang va cot Van de dupe de cap den phan sau Bo nh6 co nhieu cau hinh khac Nhung cau hinh cua bo nhd co 16 te bao sap xep hinh chu nhat dupe trinh bay Hinh 9.2 Cac bo nhd 16 x va x 16 ve thuc chat tuong duong nhau, cGng nhu vay, bo nhd x ve co ban tuong duong vdi vdi bo nhd x Do do,

nam bo nhd trinh bay tren Hinh 9.2 chi ro loai cau hinh khac nhau, chung cung

chira so te bao nhu

^ Cl? t 16 c o t

t>) c )

Hinh 9.2

6 Hinh 9.2a viec chon mot te bao van doi hoi phai cd mot hang va mot cot, dupe goi la dia chi nhat, cau hinh 17 day dia chi phai dung tdi 16 hang va cot hoac hang va 16 cot Mot hai trudng hpp nay, yeu cau toi thieu that chi la 16 day Tuy nhien, mot hai cach sap xep nhu o Hinh 9.2 b

chi yeu cau cd 10 day dia chi: hang cot hoac hang cot Ro rang la su bo tri tot nhat van la cau hinh tren Hinh 9.2c, vi no chi can cd day dia chi: hang va cot

Noi chung, su sap xep cd it day dia chi nhat v in la sap xep hinh vuong vdi n hang va n cot va dung lupng bo nhd la n x n = n2 te bao Vdi ly nay, cau hinh hinh vuong dupe dung rong rai cong nghiep che tao bo nhd ban dan Su sap xep n hang n cot thudng cd quan he vdi dia chi hoa dang ma tran Ngupc lai, cau hinh cot n hang thudng dupe goi la dia chi hoa dudng th in g , vi viec lua chon

(65)

mot te bao nh6 chinh la sir lira chon hang tirong Crng, cot luon luon dupe dung tdi

Vi du, IC 54/747481A la mot RAM ludng cuc 16 bit, dupe sap xep theo cau hjnh x nhu trinh bay tren Hinh 9.3 Co day dia chi X (cac hang X,, X2, X3, X4) va day dia chi Y (cac cot Y 1( Y2, Y3, Y4) Viec lira chon mot te bao dupe thuc hien bang cach dat mu’c logic vao mot day X va vao mot day Y Vi du, X, = va Y4 = 1, se lua chon te bao a hang duoi cung va cot ngoai cung ben phai (tat ca cac day dia chi khac phai dat mire logic 0) Dia chi cua te bao la X1Y4

Hay lay bo nhd x tren Hinh 9.2c lam vi du Be chon dupe mot te bao nhd nhat ta chi cho mot hang va mot cot hoat dong Nhu vay, ta phai dung bo giai ma cua so nhi phan (Hinh 9.4) Vi du, lua chon te bao nhd a dia chi 43 (hang cot 3) Neu A4 = va A3 = bo giai ma se tri mu’c logic cho hang thir tu, cac hang khac mu’c Tuong tu, neu A2 = va A, = 0, bo giai ma se tri mu’c logic cho cot thu” ba va tat ca cac cot khac mu’c Nhu vay, mot ngo vao A4A3A2A., = 1110 se lira chon te bao nhd 43 Ta xem A4A3 la dia chi hang bit va A?A, la dia chi cot bit Do do, mot te bao nhd dupe dac trung bang dia chi bit A4A3A2A.|

J o ’ A- - i i n c O '

'• A.*SN / Smje A<Jdi*»K W i l * , -

-*• -: * C

M*

i ■—

i o c i Se? ’C

V

(66)

Mot vi du khac, dia chi AaA3A2A^ = 1 , lira chon te bao co hang la va cot la (dia chi 23)

Cac bo giai ma dia chi Hinh 9.4 giam so day dia chi can thiet de dia chi hoa mot te bao nh6 nhat Cac bo giai ma co chira cung bo nho Mot bo giai ma nhi-thap phan co n ngo vao nhi phan se lira chon mot 2n day Vi du, mot bo giai ma co ngo vao nhi phan se chon dupe 23 = ngo ra, hoac bo giai ma co ngo vao se co 16 ngo

Noi chung, mot dia chi B bit co the dupe dung cho bo nhd cd te bao,

do, cd B/2 bit dung cho cac hang va B/2 bit dung cho cac cot (Hinh 9.5) Chu y

rang tong cac bit dia chi phai la so nguyen va chan (2, 4, 6, .) vi ngd vao mdi bo giai ma la B/2 bit, nen ngo mdi bo giai ma phai la B/2 day Nhu vay, dung lirpng bo nhd la:

28/2 n 2b

Vi du, mdi dia chi 12 bit cd the dung de tao nen bo nhd cd dung lupng la 12

= bit theo cach thuc hien tren day

Cac bo nhd thuong pham thudng cd dung lupng la 1024, 2048, 4096, 16384 Tat ca cac so deu la luy thCra vdi so mu la so nguyen Cung can noi them la mot bo nhd cd dung lupng la 210 = 1024 bit dupe goi la Kbit (1K), tuong tu, cd bo nhd 16K(16384 bit), bo nhd 4K (4096 bit)

Hinh 9.5

(67)

Nhu" tren da trinh bay, ta mdi de cap den cac bo nh6 du’Oc truy cap den mot te bao don Viec truy cap den nhom bit - dac biet la nhom bit (Nibble) va nhom bit (Byte) la thuan Ipi hon ca It nhat la ta co hai phuong phap thudng dung Phuong phap dau la truy cap nhom cua cac te bao tren cung mot bo nhd Phuong phap thu1 hai la ket noi song song cac bo nhd

Hinh 9.6 gidi thieu so logic 64 bit (16x4) cua bo nhd ludng cUc Cd 16 hang te bao nhd va moi hang te bao, nhu vay la 16x4 te bao, mdi te bao la mot flip flop tranzito Bo giai ma dia chi cd bit dia chi va nhu vay, cd 16 day chon, mdi day chon mot hang Trong trudng hop nay, mdi mot day chon dupe noi vdi tat ca te bao mot hang, nhu rhe, mdi day chon se lay te bao cung mot luc Do do, moi day chon se lay mot tu” bit (Nibble), thuan tien hon la lay tting te bao don

Cd the cho rang su sap xep giong nhu mot "ngan xep" cd 16 bo ghi chuyen bit Day chinh la dang dia chi dudng thSng va bit dia chi dupe giai ma se chon mot 16 bo ghi chuyen bit Trong trudng hop nao do, so lieu dupe doc tu” bo nhd nay, no xuat hien 6 4 day cua ngd so lieu: D1f D2, D3, D4 va dupe xem nhu mot tu” so lieu bit Tuong tu, so lieu dupe dua den bo nhd de nap vao dupe xem nhu la mot tCr so lieu bit 0 cac day ngd vao so lieu: l^ l2 I3, l4

Cac IC 54/74S89 va 54/74S189 deu la cac bo nhd ludng cue, dupe sap xep dung

nhu cau hinh dupe ve tren Hinh 9.14a.

Hinh 9.6: Bo nhd 64 bit (16x4)

9.2 ROM, PROM VA EPROM

- ROM sur dung cac diot

(68)

Ngo vao G dupe dung de cho tat ca 32 cong giai ma ngo vao dupe ki'ch hoat hay khong di/cfc kich hoat Khi G mu’c 1, tat ca cac cong giai ma dia chi bi ehcin lai va bo nh6 khong hoat dong, do, dat day bit so lieu ngo d mu’c Khi G d mtic 0, so lieu cac ngo se tirong Crng v6i tir bit bo nhd va dupe chon bang dia chi ngo vao Tren hau het cac bo nhd co mot day d ngo vao thirc hien cung chut nang nhir chan G, no thudng dupe chi thi la day chip dupe kich hoat (CHIP ENABLE) hoac day lira chon chip (CHIP SELECT)

Cac mu’c logic va co the dupe liru trir bit cua moi tir so 32 tir Cac mu’c logic phai du’Oc xac dinh trudc mua bo nhd va cac nha san xuat phai cong bo trudc cac thong so ky thuat Cac nha san xuat lap trinh cho bo nhd

trudc phan phoi cho khach hang Mot bo nhd dupe lap trinh, noi dung cua

bo nhd khong the thay doi dupe nu’a Cac nha san xuat deu phai ghi ro noi dung

cac thong so ky thuat cua cac bo nhd cac phieu ky thuat hoac thong bao thong so ky thuat cua cac san pham Phan lap trinh cho bo nhd la nha san xuat thu’c hien

Viec sir dung ROM 54/7488A tuong doi don gian Trirdc het, vi cac mach logic la mach TTL nen IC phai dupe noi vdi nguon cung cap va tiep dat Cac thong so ky thuat cua ROM chi ro dien ap cung cap, binh thirdng Vcc = + 5V chan 16 va ROM noi dat d chan Cac ngo vao va ngo la cac chan lai du’Oc chi so’ tay chan linh kien (Hinh 9.9b).

Tam ngo so lieu la cac tranzito hd mach Colecto nen phai cd dien trd keo len Rpu d moi ngo so lieu tir chan den chan va chan Cu the la gia tri dien trd keo len khoang tir 5100 den 5k£21 noi tir moi ngo den nguon cung cap + Vcc

Bay gid, yeu cau dat la dua dia chi ngo vao chi'nh xac de doc mot tir bit va dat day ngo vao G (day chon) d mu’c Bang thong so ky thuat cua IC 54/7488A cho biet la thdi gian truy cap = 25 ns va circ dai la 45 ns

Nhir vay, mot tir so lieu bit se du’Oc lay d cac ngo Y 1f Y Y8

khoang 45 ns sau sudn sau cua xung G xuat hien, nhu chi tren Hinh 9.10a.

Cac day dia chi can phai on dinh thdi gian so lieu dang du’Oc doc cua bo

nhd Hai dudng bieu dien nhu Hinh 9.10a la so lieu ra, dudng bieu di§n

cd the chuyen tir mu’c logic len mu’c logic hoac tir mu’c logic xuong mire logic

0 Trong Hinh 9.10b cach the hien dang xung don tirong duong vdi cach the hien

cac dang xung don d ngo tren Hinh 9.10a.

(69)

1 i« SN > ằ ằ * * ô'ã% ô -! ãằ ô

Or /V Oo«'- rv-i.n^ c>r >V f !* | p K K ^ i*

enable B i n a r y « > e c r

O u r p u t

fia] r a n r i n y i nTi rrn r^n m

C u t o u t s

P o s itiv e <ogic S e « O « c r i o t i o n

ib)

(70)

BANG CHON TU

T i r CAC NGO VAO

E D C B A*

0 L L L L L

1 L L L L H

2 L L L H L

3 L L L H H

4 L L H L L

5 L L H L H

6 L L H H L

7 L L H H H

8 L H L L L

9 L H L L H

10 L H L H L

11 L H L H H

12 L H H L L

13 L H H L H

14 L H H H L

15 L H H H H

16 H L L L L

17 H L L L H

18 H L L H L

19 H L L H H

20 H L H L L

21 H L H L H

22 H L H H L

23 H L H H H

24 H H L L L

25 H H L L H

26 H H L H L

27 H H L H H

28 H H H L L

29 H H H L H

30 H H H H L

31 H H H H H

Hinh 9.7c

— Chanomq ——

A O O H E S S

■ f ■ I i i i i

SE L S C T ! m e G

I I

O^J !D u t (ht<jr> to io w t

O u i o u t ! ! o w t o n iq f r l

i i

O u t p u t

-i a)

Hinh 9.10: Thdi gian truy nhap, cua ROM 54/7488A

So logic doi v6i IC 54/74186 du’Oc chi tren Hinh 9.11 Chip la loai IC TTL-LSI va no la PROM 512 bit, du’Oc cau tao gom 64 tir bit bit dia chi ABCDEF dupe giai ma de chon dupe mot so 64 tir, cac tir bit so dia chi dirong th in g tuong tu so dia chi cua IC 54/7488A Y nghTa nhat cua bo nho la ngUdi sir dung dupe quyen lap trinh cho bo nhd

(71)

Mot tCr bit dupe nap day du co dang 0000 0000 Lap trinh cho bo nhd cd nghia la xac dinh cac noi dung yeu cau cho moi tti bo nhd roi nap mu’c logic vao cac vi tri can cd mu’c logic Vi du, neu noi dung yeu cau cua tii thir 27 la 0101 1100, cac vi tri bit 3, 4, va se Ian lupt thay doi tU mu’c logic vTnh cifu sang mu’c logic virih cCru Mot lap trinh xong cac mu’c logic hoac duoc nap vao PROM trd vTnh ciru

Ve co ban, viec lap trinh dupe thu’c hien bang cach dung mot xung ddng dua

den moi ngd ra, d mot mu’c logic phai xuat hien Nhu vay, a Hinh 9.11b, bo

nhd dupe lap trinh bang cach:

1 Oat dia chi chi'nh xac (ABCDEF) cho mot tU de dupe lap trinh Vi du, doi

vdi tu’ thu’ 27, dia chi la 00011011 Mu’c la hd mach, mu’c la ddng mach

* G N D D a ta o u t p u t s G N D 2

A D D R E S S

- - G N I •

! J G N D :

o '

-V D C _ J _

Hinh 9.11: a) So logic va chan IC b) Lap trinh doi vdi 54/74186

2 Dat mot xung ddng den mdi bit can phai nhd mu’c Be nhd noi dung 0101 1100, yeu cau cac xung dong, mdi xung tai mot thdi diem phai dupe dat vao cac vi tri sd lieu Y3, Y4i Y5 va Y7

3 Lap lai cac budc tren cho tat ca cac tti dupe lull trti bo nhd

(72)

Ve cd ban, IC 54/74186 lap trinh giong nhir IC 54/7488A NhUng IC 54/74186 co hai day MEMORY/ENABLE, mot hai day neu d mu’c s§ can trd viec nap trinh, neu ca hai deu d mu’c 1, be nh6 mdi hdat dpng di/dc Theo thong so ky thuat, thdi gian truy cap la 50 ns, thi'ch ting vdi moi bo nhd TTL

Mot nhifdc cua PROM la PROM dUdc lap trinh, cac noi dung duoc nap vao bo nhd mot cach vTnh vien, khong the thay doi duoc; loi lap trinh khong the stia lai cho dung dUdc EPROM khac phuc dUdc nhi/dc diem

EPROM co sd cau true va dia chi tUdng tti nhu PROM nhi/ng EPROM difdc cau tao bang cac tranzito MOS Nhieu EPROM dung linh kien MOS deu tuong hop vdi bo nhd TTL va ca ky thuat lap trinh cho EPROM cung giong nhu ky thuat lap trinh cho chip luong cue Oieu khac nhat cua EPROM la cd che nap vTnh vien cac mtic Icgic va vao te bao nhd

Xung dong du’Oc dung de nap mtic Icgic lap trinh chc PROM ludng cue chi'nh la dung de dc't chay day noi bo nhd Ky thuat cung du’Oc dung de lap trinh cho EPROM loai MOS, nhung xung dong bay gid du’Oc dua vao thudng la vai milisec (ms) de nap dien ti'ch co dinh vao te bao nhd dac biet Dien ti'ch duoc nap lam cho te bao luu trti mtic logic

Oieu hap d in day la co the lam phong dien va te bao nhd lai tro ve mtic Hon the ntia, viec lap trinh lai dupe lap lai nhu" qua trinh thu’c hien luc ban dau Cac te bao nhd dUdc "xda" bang cach chieu met tia cuc tim qua c ctia so’ bang thach anh len mat cua chip Tia cuc tim lam mat cac dien ti'ch da du’Oc nap va tat ca cac te bac nhd trd lai mtic logic Cac yeu cau ve lap trinh va xoa lenh da nap rat khac doi vdi tting loai EPROM Can tham khao cac thong so ky thuat cua cac nha san xuat EPROM

*■! I ULj

Aml£;

A2 I \

A | ? A e m o j T

° ■ P£J

c-iFT. ã!! F71

'CtT

Lz3 'sô FF! ^

* ’ >

; Z'Z V £ f * ~oc

! 15 pROGRAW

D it d o j ; p u i

O , Oe

Unio S E L E C T

io c :

“■i oi*.i

I N ' P J T S

M l

Ouidu: c

-A OS!’

X X

y.

Hinh 9.12: EPROM Intel 8708,dung lUdng 8192 bit

(73)

EPROM loai MOS du’Oc dung rong rai la loai Intel 8708 Bo nho la PROM co the xoa duoc,' co dung lupng la 8192 bit (8192 bit dupe sap xep 1024 tif, mdi tu* bit) Hinh 9.12 cho thay bo nhd co 8192 te bao nhd sap xep 128 hang 64 cot Bo giai ma X dung bit dia chi de chon mot so 128 hang, bo giai ma Y dung bit dia chi de chon mot nhom cua bit tu’ 64 cot bit so lieu duoc dung d cac ngo qua cac bo khuech dai dem trang thai

t ACC: thdi gian truy cap la 450 ns va day la thdi gian tre de dia chi den du’Oc ngo ra; tACC dupe chi tren hinh ve cac dang xung Thdi gian tre Idn nhat cua CHIP SELECT den ngo ra, ky hieu la t ^ cung duoc chi tren hinh ve, gia tri Idn nhat cua t^o la 120 ns

Nhu vay, de doc mot tti so lieu chip, cac day dia chi phai o’n dinh va sau khoang thdi gian 120 ns, day CHIP SELECT (CS) ve mtic 0, so lieu se xuat hien cac ngd Nhupc diem cua bo nhd la ddi hoi cung cap nguon + 12 VDC va ca hai nguon + 5V va - 5V Cac EPROM Intel 2716, 2732, 2764 khac phuc dupe nhupc diem vi chi can cung cap nguon + VDC

INTEL 2716 la EPROM cd dung lirpng 16K (2K x 8) Bo nhd cd 2048 tti, moi tti bit, dung lupng nhd tong cong la 16384 bit, no hoan toan thich hpp vdi TTL va cd thdi gian truy cap t ACC nho hon 450 ns 11 bit dia chi se chon mot 2048 tti 8_bit (211 = 2048) va tti dupe chon se xuat hien d cac day ngo so lieu vdi

dieu kien CE va OE (OUTPUT ENABLE) d mtic Hinh 9.11 gidi thieu so logic

va chan cua EPROM 2716

INTEL 2732 la EPROM 32 K(4K x 8), cac chan IC 2732 giong nhu chan IC 2716, nhung dung lupng bo nhd gap hai Ian

Tuong tu, EPROM 2764 la EPROM cd dung li/png 64k (8k x 8)

Thu’c chat, so logic a Hinh 9.13a khong chi rieng cua IC 2716 ma chung

cho moi ROM, PROM hoac EPROM Ve co ban, no chi khac d tong so dia chi ngo vao de chtia di/ng du so bit ma tran te bao nhd

/ ,i iLLi Dau ouittuti

O c - O ,

O f

w &

o u io u : m a c

- Av

A D D R E S S ■ inputs

O u u :

D u f

-*c c

-G K C

^LL, ^4 j *

*3iT i

f *

V '- o e c o o f ’

-

-> - g a t in g • • -•

-1 - o t C ~ X - o e c o a e - •

i • m a t r i *

! • r> i

- _

i n i r ? ? ) f

C,; *.'

3 * '* |?2JA, {ZD’'* iio] ■ ■Vl^K 11B ^ c , m&]c{

‘ i ► jC

“ |C, I c

(74)

PROM AMD (Advanced Micro Devices) la EPROM loai CMOS cung co sd d6 logic tUOng tu” voi 2716 EPROM co ky hieu AM 27512, no co 16 day ngo vao dia chi va ma tran te bao nhd co dung lupng 524288 bit; dupe cau tao gom 65536 tir, m6i ti/ bit EPROM co hon nira trieu tin dupe liru truf trdng khoi hinh hop co 28 chan, v6i be dai nho hon cm, be rong khoang 1,25 cm Dieu noi len sire chira that la tuyet dieu cua EPROM AM 27512 loai CMOS

9.3 RAM

Dieu khac co ban giCra RAM va ROM la d chd sc lieu co the dupe nap

vao RAM dia chi mong muon Le duong nhien, so lieu co the du’Oc dcc tir dia chi nac d6 cua ca RAM lln ROM, cac chu ky dia chi hoa va chu ky doc doi v6i ca RAM lln ROM la nhu Cac dac ti'nh cua RAM tinh thuoc ca hai loai MOS va

ludng cuc se dupe de cap den phan

RAM tTnh dung mach flip flop lam te bao nhd co ban (hoac loai ludng cuc, hoac loai MOS) va mot mot bit dupe nap vao flip flop, bit du’Oc tri d flip fldp chi/ng nao nguon cung cap cho chip, nen co thuat ngCr "tTnh" Mat khac, te bao nhd co ban mot RAM "dong" dung dien ti'ch dupe nap co lien quan vdi loai linh kien MOS de nhd mot bit tin Vi dien ti'ch du’Oc nap se khong tri dupe lau, dinh ky no dupe lam mdi lai, lam tuoi lai, vi vay co thuat ngu RAM "dong" Ca hai loai RAM "tTnh" va RAM "dong" deu thuoc loai bo nhd xoa ngay, vi mot mat nguon cung cap se mat luon ca sd lieu da du’Oc luu tru

IC 7489 gidi thieu Hinh 9.14 la RAM 64 bit loai TTL LSI sap xep theo 16 tir, moi tir bit Khi giu ngo vao MEMORY ENABLE (ME) mu’c logic 0, se lam cho chip co kha nang hoat dong hoac doc hoac nap so lieu vao bo nhd va day dia chi so lieu se chon mot so 16 vi tri cua tir bit de doc hoac nap vao Roi sau do, neu WRITE ENABLE (WE) du’Oc tri d mu’c 0, sU co mat bit d cac ngo vao so lieu (D,, D2, D3, D4) se dupe nap vao dia chi dupe lua chon Ngirpc lai, neu WE d mu’c 1, so lieu dang dupe nap d dia chi nhd se dupe dua den day ngo so lieu (Sn, S2, S3, S4) Phai noi them rang, cac ngo la cac tranzito hd mach Colecto, nen can phai cd dien trd keo len Rpu cho moi ngd sd lieu Dien trd Rpu ket noi ngd vdi + Vcc Bang Hinh 9.14c tom tat cac hoat dong cua loai bo nhd

(75)

V POM3M ?J8A ylj IVM 223«aC A "UQJUO vflQM3M

5 J A H

llWkl a23«GOA

3TIPW 3J8A H3 IVWI

t r t O ruqni

Jua/uC

i r I -'II-Icob / ‘O t toi 'ictA.cti fhir /1 » W'vaC

JUtfJuO

i kO fuont

■Hr-?

JUQ’ OO n «

ruont irt/C^ 'D j3 a

C m C I3H > I77] (in Q iTTi 1 *

fTTl F I

i j

•i 1

*' * 1

i

i *3 Ci J

U 98&V A — ,

2 a _ ■» V A I

Y “ V

1

V1 7'“ i 1

, a j

d j 1 a 1 M 1 - 1 c ! i j j Lj »*n?2

i .'uafuo ! f /ooiuo

G'/O ajsC

i ;ucni

-

y -i sQ 2 J & / T3 3J3J

9 < ! 2 ‘ f O I 9wil»JO^

< K ^ x a He i o l i m t * j n r 91® / j i c a i o i t i r t t >ol itn + m n q m s n ^ f 10)

fJucJuO to noiJiOnoO I n o m ija O ViN I

fluent (H O *0 :n*rn*iorrx)3 I *in W J A • 1

5’ 0w 09I39<9< >0 /n^m^lonoO | ^ i

nuoni s T tfc >o ir t * m » i < j m o O i s o c i o r t | a H

itJiH i pn.rtion oO | H *

111

(76)

Hinh 9.14a: RAM 7489, 64 bit

Viec doc cua RAM khong khac vdi viec doc cua ROM Doi vdi chip nay, mot cach don gian la tri ME mu’c logic va WE mu’c logic va chon dia chi yeu cau TCr so lieu bit xuat hien cac ngo SENSE (doc ra) Dinh thdi cho

thao tac doc dupe chi bang cac dang xung Hinh 9.14d Thdi gian tre truyen

dan tpHL la khoang thdi gian tu' su'dn xuong cua xung ME den so lieu on dinh xuat hien d ngo Bang thong so ky thuat cho biet gia tri cuc dai la 50 ns thong

(77)

thirdng la 35 ns DiTcfng nhien la cac ngo vao cua dia chi phai on dinh toan bo cac hoat dong doc bat dau vdi sudn xuong cua xung ME Can chu y rang, sir xuat hien so lieu d ngo doc (SENSE) se la phan bu cua cua tir so lieu dirpc lull tru

n day dia chi

— ^

G iai

w

2 Exp n x

te b a o w

\

1

1

m a

w

Ngd vao

s f a < /A eo lieu D

l-I l-I

Dieu khien

+ V cc GND

- > DONgo ra/\ , ■ y\

eo lieu

t t

CE WE

Hinh 9.15: So khoi cua RAM tTnh

TCr bang sir that, ta co nhan xet chip khong dupe chon la ME mu’c logic 1, tat ca cac ngo dat mu'c 1, chung ta co mot kieu doc ]W E mu’c 1) Vi vay, cac dang xung cua bit dupe doc ra, tpLH la thdi gian tre tCr sudn len cua xung ME den cac ngo cd trang thai logic 1, theo thong so ky thuat cho biet thdi gian tre cuc dai la 50 ns, thudng la 26 ns

Khi viet vao, bit dirpc dua vao ngd vao se du’Oc lull trir dia chi bo nhd dupe chon bang cach tri ngd vao ME mu’c logic (chon chip) va tri WE mu'c Dong thdi, phan bu cua so lieu dupe dua vao ngd vao se xuat hien d

ngd Hinh 9.14d gidi thieu cac dang xung dinh thdi cho thao tac viet vao

Hay xem xet can than cac yeu cau ve dinh thdi cho mot chu ky viet vao Trudc het WE phai dupe tri d mu’c mot khoang thdi gian tdi thieu de nap tin vao cac te bao nhd, thdi gian du’Oc ky hieu la t^, tren dang xung, va theo thong so ky thuat, ^ circ tieu bang 40 ns ME (MEMORY ENABLE) chon chip d mu’c va dupe pnep dat mu’c trung hpp vdi hoac trirdc thao tac viet vao ddi hoi WE xuong mu’c

Tiep theo, de nap vao bo nhd, cac so lieu d ngd vao phai on dinh mot khoang thdi gian tdi thieu trudc WE va cGng phai on dinh sau WE Khoang thdi gian trudc WE xuat hien dupe ky hieu la t2 va la thdi gian xac lap sd lieu Thdi gian dupe tCr cuoi cua sirdn sau tin hieu WE den diem d so lieu phai dupe on dinh Theo thong sd ky thuat, thdi gian la 40 ns va trudng hpp no cGng bang vdi t* Cac ngd vao sd lieu phai dupe giu on dinh doi vdi khoang thdi gian sau xung WE tang len Thdi gian dupe goi la thdi gian tri so lieu t3, va theo thong sd ky thuat, yeu cau tdi thieu t3 = ns

(78)

cua tin hieu WE den diem a cac day dia chi ngo vao phai on dinh; yeu cau toi thieu doi v6i t4 la 0,0 ns Noi mot each khac la cac day dia chi ph§i on dinh trirdc hoac dong thdi voi tin hieu WE xuong mu’c logic Cac day dia chi cung phai on dinh doi vdi khoang thdi gian sau tin hieu WE tang len den mu’c Thdi gian duoc goi la thdi gian tri dia chi hoac thdi gian tri chon va ky hieu la t,, Yeu cau toi thieu doi vdi t5 la ns

Cuoi cung, sau thao tac viet vao, neu chip khong duoc chon (ME co mu’c logic 1) cac ngo se trd lai trang thai Thdi gian toi da de dieu xay la thdi gian phuc hoi doc (SENSE) ky hieu la tSR va tSP = 70 ns la gia tri c u t dai theo thong so ky thuat

1 y i t r t N S < b ? 0 , S N ^ < S ? 0 S >l A O - V / n i T [ wiT»< t lt l* O u l} » u lt

Switching C^MKIfHtliCI optxiing ©I 7^ and Vcc luniett Olh*rwi» rvolrd)

T e n e<v*d»t*©*>* I S N S ^S ? L O ] s n7 «s; « ( I v o * U a < 1 T r o * M « f*'OD»0* i '0'' delay l»m * low to n*o** ke>e* Chiipui A c c e tt t»m»* lio m 1~~ 33 7 0 2 3 r l

• !^ r h o r ^ a i * ^ io tow i f y f o u w m 1 A D D R E S S • i o * 7C W M 1 j

I O'JiPwt t nat »e tim e io n*^n irve i A c c » l* l i ’W ft l» (v r ã S n ô $ n s S . » ? • 4 5 OjIDuI tn * n * e tim e to k> » i* v * m r n f t i * E N A B L E 4 0 1 IS N S J

L * 4 ! ?c i

* > G u io u t r M u i t i»me to *eve S fr*K > « o v n v !> * * ã ô See figure 1 1 19 5C 1%

V i O u u t e n a w e t»m * to low keve l» o m w rite E N A B L E [ 17 SO 1 17

Oj i d u ien*r>*e n m e t»om D r u b le tim e t l»Ofr> c , - pP I » 3C 7

Outr>y» 0'Mt>le tim e I r o m i o w evt m e m o ry E-N A B L E

s b o n (S N S S / « 3C c I

w O u u t O iU '* * i»me l«om h*>n lev# D iu b > r t i m « n o n ’ 4 0 n (S N S ». 13 4C 13

i *4/ O u u t o i u o ' f tim e w o n ' »ov* »rv» w f.te E N A B L E See <>Qu^e 1

i , f 4C ie

» A i r t v n r o i v a iu e v e ô i Vc c ã V Ts • ? S * C

f * i r M M i i r m c n u r r r M M i n f o r m a t i o n

*Tett p o i n t

f- <ot> out do: u n rt« m t

w '"CioOtl CVOOf and 119 ciojcittncc

A i o * o o « a ' f N *

L o a d ci» ev *

i V I * I h J

A D D R E S S m o u t t

OJtt •noul) M E M O R V * E N A B L E n o u i l

W R I T E -ENABLE input Wawtorm I

tS , cio%ed o w «

Waveform 7

( S , o o t n S , c i o * * c \*t N o t t A '

A D D R E S S m o o t s i* e * N o t e B

Accrti iimf from ADDRESS mown voi l#9f wayefo/rnt

MEMORY* E N A B L E in p u t* ( i f f N o t * C) W ty » lo » m

CS, C t o f t d $ 7 o o * n

M f N o tv A / Wfvflo/m I S 00m S? CIOWC

I f f N o i f A l

0 V A c t f t i ( E N A B L E ) t i m * » » x J d i t * P > v t * m * Ir o * r » m e m o r y f » A B L E

* O J l* ) f w e v e * * m t

Hinh 9.16: RAM 74S200, 256 bit

(79)

Hoat dong cua IC 7489 don gian va d l hieu, do IC dupe nghien ciru phan RAM No co the dupe dung de tao nen cac bo nh6 co dung lupng Ion hon bang cach noi song song, nhi/ng no khong thuc te chung ta muon co bo nhd 16k, 32k, .256k, 512k Tuy nhien can nghien ctiu IC 7489 vi cac nguyen tac co ban cua dia chi va cac hoat dong doc ra, nap vao la rat co ban va tuong tu nhu doi vdi tat ca cac RAM tinh Vi vay, ghi nhd cac nguyen tac co ban chung ta co the xem xet cac chip khac co dung lupng bo nhd Idn hon

So khoi Hinh 9.17 co the dung de mo ta hoat dong cua hau het cac

RAM tTnh Cac RAM dupe cau tao vdi n day dia chi, cac day se chon nhat chi mot so 2n te bao cach sap xep bo nhd, co nghTa la chon bit tai mot thdi diem, se cd dieu khien chip hoat dong (CE), kich hoat viet (WE) va cung cap cho mot bit so lieu ngo vao don D, va mot bit so lieu ngo don D0

Vi du, IC 54/74200 Hinh 9.18 la RAM cd dung lupng 256 bit, dupe to’ chi/c gom 256 tir, moi tu" bit 256 te bao dupe sap xep theo hinh vuong gom 16 hang va 16 cot bit dia chi (28 = 256) dupe chia mot nhom bit, dupe giai ma de chon mot 16 hang va mot nhom bit, dupe giai ma de chon mot 16 cot Cd mot bit so lieu ngo vao don, mot bit so lieu ngd don va mot day WE Cd ngd vao ME (M „ M2, M3), tat ca ngd vao phai d mu’c de chon chip hoac lam cho chip du’Oc kich hoat

Bang su that chi rang neu chip hoat dong, mot chu ky viet dupe bat dau

bang tri WE mu’c hoac mot chu ky doc du’Oc bat dau bang tri WE mu’c Neu mot vai hoac tat ca cac ngd vao MEMORY ENABLE mu’c 1, chip bi ngan can va ngd cd trang thai tro khang cao Duong nhien la dinh thdi rieng

phai tuong tu vdi dang xung dinh thdi dupe xac dinh tren day doi vdi IC 7489

Chung ta hieu hoat dong cua 54/74200 (viet gon la '200), rat don gian dung nhieu chip '200 de tao nen bo nhd cd dung lupng Idn hon Vi du, chung ta cd the noi song song chip nhu chi tren Hinh 9.19 de tao nen RAM cd 256 tu", moi tir bit Khi noi song song chip '200 se tao nen bo nhd cd tu” bit v.v Khi noi song song cac chip nhu vay thi viec dieu khien va dinh thdi hoan toan giong nhu chi cd mot chip rieng le Oieu khac nhat la chd cd bit so lieu vao va bit so lieu (hoac vao, ra), tat ca cac bit so lieu deu song song vdi

(80)

Hinh 9.17: Bon '200 du’Oc sap xep bo nhd 1024 bit co 256 tti bit

Bo nhd MOS du’Oc dung rat bien la INTEL 2114 Day la bo nhd RAM tinh cd 4096 bit, dupe sap xep 1024 tCr, moi tCr bit (cac thong so ky thuat d Hinh

9.17) Cau true cua IC hoan toan tuong tu’vdi IC 7489 nhUchi Hinh 9.16,

nhung chu y rang IC 2114 cd dung lupng Idn hon cua IC 7489 la 16 Ian

he-j- - V

Der ;>•; »✓ ' > > a.:

r * -i

c

i

AO

A?r-A ■

A. -s /

i! * A,

I *

-;> To tii -200\

j 9C T.

] bo vte 200

S , > iTvTT

*20C !

T x I M £7I

O e c o d t '

-I ! '200 I I * X

'2 C

I ^

l i i

•— '200

j i i

■ i i i

«— ‘ '200

-i ! !

I i ‘

i i 1 i 1I

u

H

*20C

'2QC

*?OC

Hinh 9.18: 32 IC '200 ket noi de tao bo nhd cd 1024 tU bit

(81)

Bo nhd co ban du'Oc sap xep 64 hang va 64 cot, tong cong co 64 x 64 = 4096 bit Sau bit dia chi (tCr A3 den As) dupe dung de chon mot 64 hang (26 = 64), 64 cot dupe chia 16 nhom cac tti bit va bit dia chi (Aq, A 1f A2 va Ag) dupe dung de chon mot so 16 nhom Dia chi 10 bit se chon mot tu" don bit ti/ 64 hang va 16 cot, de cung cap mot bo nhd cd dung lupng b ln g 64 x 16 = 1024 tti bit

Hau het tat ca cac RAM tTnh cd dung lupng Idn hon 1024 bit deu thuoc loai

MOS, nhung so khoi to’ng quat tren Hinh 9.15 van giu nguyen Su thay doi

nhat la cho cac bit dia chi ddi dupe ghep lai (ghep bo nhd hai nhom) de giu so chan yeu cau tren DIP la it nhat Vi du, bo nhd cd 16 bit dia chi cd the dupe thiet ke chi vdi chan dia chi Cac dia chi dupe ghep vao chip nhom 8, trudc het cac bit tU den roi den cac bit tU den 16 Cac bit dupe nap mot cach don gian vao bo ghi chuyen d bo nhd, roi sau dupe dua den ma tran te bao, dong thdi de giai ma dia chi 16 bit can cd Mot vi du bo ich cua loai ghep dia chi la RAM "dong" 4116 dupe trinh bay phan sau

9.4 RAM DONG - DRAM

Nhu trinh bay tren day, su khac co ban giua RAM tTnh va RAM dong la cho te bao nhd Te bao nhd dong su1 dung mot mach tranzito MOS de luu tru dien ti'ch, va do, nhd bit Te bao dong chiem dien ti'ch be mat tren chip silicon nho hon nhieu so vdi te bao nhd tTnh; nhu vay, chip RAM dong cd dung lupng Idn hon nhieu so vdi chip RAM tTnh tren cung mot ki'ch thudc be mat Tuy nhien, vi dien tich dupe luu tru se mat dan theo thdi gian, no phai dupe dinh ky nap lai (lam tuoi lai), do, RAM dong cd mot yeu cau hoat dong phu them, la chu ky lam tuoi lai cac te bao nhd

(82)

iogc sy-i'bo

A-

A

RAW iG K X

;0^7'?^DO

a4•

A f

A * (1*.,

/ - -; e3B :

no; i

2001 j? Di C20f

G ' R E F R E S H R O W ~ 24 P.VR DWN * f > C ,.i‘ C 0l‘ n G ? « i

C A i t

p 3C2

23 21C 53f,\

A 2C A v «

Qj C7_

.n! 5i ^ -» LLi

VS: 11C

► in n<vn*nt;.a^ "•

c

•in*

vrc

’ O Z

l S I

ADO*55S£5 coiuW" ADD^tSo i■ ■ D i t * 'O C W !

Dau cuimr

R ow K W 'r v i f t ro a r

i - B - V w p oa

* S» V ? w f s-j?o<

4 12 V DO'Vf' Groonr

W ft*7 f £ N A L l

Funcnona; biock o<d«r»rr

A f m

A ,

A

-I -1 ADDRESS

I I j ;

H EtuHtrs

H A L -

-T i m m ? a r » c c o m f o ' R N t

-r ? * R o * i i i

I

: i

{1/21 rnrmory »rrAy

r ' • " * “ ■ U e C Q Q t

l

A - — I

A 15 i ! i

-I -I -I -I -I !

u u m ^ f i v c f » ' ? ; *f 1/2S o * c o H i ^ r n o e r o o i

!

!

r • l * n v e r e i r e r v i * m j n

h 'C

1 Ccmr</!

bu's?r jns i c ? : I/O we-fciic*

I D»u oo:

“ ! ! 1/2) i Of 64 coiyrnn o*er t/o ’

i A DO R £ 5S

I

Uecoo? I (j/2; me*no/y *ff*y

»c

Hinh 9.19: a) RAM dong

(83)

RAM DONG TM S 4116, DUNG LlfONG 16384 BIT

THONG SO THAY DOI KY HIEU TMS4116-15 TMS4116-20 TMS4116-25 DON Vj

Min Max Min Max Min Max

CAC YEU CAU VE THCTI GIAN DIEN AP CUNG CAP VA DIEU KIEN HOAT DONG NGOAI TROT

t d p ) Thdi gian chu ky kieu trang t p c 170 225 275 ns

Thdi gian chu ky doc f R C 375 375 410 ns

t c m Thdi gian chu ky viet * w c 375 375 410 ns

1 cfn<vv) Thdi gian chu ky doc, thay doi viet t R W C 375 375 515 ns

< w ( c m Do rong xung, CAS d mu'c H (thdi gian trudc nap) t C P 60 80 100 ns

t w ( c u Oo rang xung, CAS d m tic L f CAS 100 10000 135 10000 165 10000 ns

t w tR H ) Do rang xung, RAS d mu'c H (thdi gian tri/dc nap) t R P 100 120 150 ns

t W(RL) Oo rang xung, RAS d mu'c L t R A S 150 10000 200 10000 250 10000 ns

t W(W) Oo rang xung viet t W P 45 55 75 ns

11 Cac thdi gian chuyen tiep (stidn trtidc, sifdn sau) doi

vdi RAS, CAS

t r 35 50 50 ns

t s u ic A ) Thdi gian xac lap dia chi cot t A S C -10 -10 -10 ns

t S U (R A ) Thdi gian xac lap dia chi hang t A S R 0 ns

t SUfD) Thdi gian xac lap so’ lieu I D S 0 ns

t s u , " , , Thdi gian xac lap lenh doc t R SC 0 ns

t s u i w c h) Thdi gian xac lap lenh viet trtfdc CAS d mite H f CtVL 60 80 100 ns

f s u i w R H i Thdi gian xac lap lenh vie t trtidc RAS d m tic H t RW L 60 80 100 ns

t h (c l c ai Thdi gian tri dia chi cdt sau CAS d m ilc L f C A H 45 55 75 ns

t h (R A i Thdi gian tri dia chi hang t R A H 20 20 36 ns

t h (R L C A ) Thdi gian tri dia chi cot sau RAS d m tic L t A R 95 120 160 ns

t h (C L D ) Thdi gian tri so lieu sau CAS mu'c L t D H 45 55 75 ns

t h (r l d) Thdi gian tri so’ lieu sau RAS mu'c L t D H R 95 120 160 ns

t h m D ) Thdi gian tri so lieu sau W d mire L f D H 45 55 75 ns

t h(ixi) Thdi gian tri lenh doc f R C H 0 ns

t h /c L W ) Thdi gian tri lenh viet sau CAS d mu'c L f W C H 45 55 75 ns

1 h iR L w i Thdi gian tri lenh viet sau RAS d m tic L t W C R 95 120 160 ns

1 r l c h Thdi gian t r i, RAS d mu'c Lden CAS d mtic H t C S H 150 200 250 ns

f c h r l Thdi gian tre, CAS d mu'c H den RAS d mure L f C R P -20 -20 -20 ns

t c l r h Thdi gian tre, CAS d mu'c L den RAS d mu'c H t R S H 100 135 165 ns

t c l w l Thdi gian t r i, CAS d m tic L den W d m tic L (chi chu ky doc, chu ky tha y doi viet)

t CW D 70 95 125 ns

f r l c l Thdi gian tre, RAS d m tic L (gia tri c u t dai chi dSc trting cho thdi gian dam bao truy cap)

t RC D 20 50 25 35 ns

t r l w l Thdi gian tre, RAS d m tic L den W d m tic L (chi chu ky doc, chu ky thay doi viet)

R W C 120 160 200 ns

1 w l c l Thdi gian tr i,"W d m tic L den CAS d m tic L (chu ky viet sdm)

t1VCS -20 -20 -20 ns

t „ Khoang thdi gian lam mdi f R E F 2 ms

CAC DAC TINH CHUYEN MACH DOI VCTl DIEN AP CUNG CAP VA HOAT DONG TRONG DIEU KIEN NGOAI TRCfl t a/i Thdi gian truy cap t t i CAS

Oieu kien thCr C L=100pF; tai:cac cong 74TTL

t CAC 100 135 165 ns

tad Thdi gian truy cap t ti RAS

Oieu kien thCr CL=100pF; tai cac cong 74TTL

t RAC 100 200 250 ns

f ais tc H i Thdi gian ngo bi vo hieu hoa sau CAS d m tic H Oieu kien thti: C L=100pF: tai:cac cong 74TTL

f o F F 40 50 60 ns

(84)

TMS 4116 dupe chi tren Hinh 9.19 Cc^mdt day vao so lieu don D, mot day so lieu don Q va mot day dieu khien viet W Co 16384 te bao nho d u ’O c sap xep theo hinh vuong co 128 hang va 128 cot, vdi yeu cau co 14 day dia chi (214 = 16384) Chu y rang cac chan chi cung cap cho day dia chi, dieu co nghia la 14 bit dia chi phai dupe ghep vao chip nhom, moi nhom bit Day la chirc nang cua ngo vao dieu khien khac nhau: RAS va CAS

14 bit dia chi la A 13> A 12 A0 LSB la (A6, A5 Aq) la dia chi hang va MSB (A13, A12 A7) la dia chi cot Viec chon mot bit don bo nho doi hoi viec dia chi hoa cho chip theo birdc: birdc thCf nhat, dja chi hang bit dupe dua den chan dia chi tren chip, mot xung am tren day dieu khien xung chon dia chi hang (RAS) se lay mau bit dua vao cac chot hang tren chip Bi/dc thir hai, dia chi cot bit dupe dua den chan dia chi tren chip, mot xung am tren day dieu khien xung chon, dia chi cot (CAS) se lay mau bit dua vao cac chot cot tren chip 14 bit dia chi bay gid dupe liru trir tren chip va dupe giai ma de li/a chon mot te bao nhd don Neu ca hai RAS va CAS dupe duy tri mu’c logic 0, dia chi

dupe giai ma se tri mot khoang thdi gian va cac noi dung cua te bao nhd

dupe chon cd the dupe doc ra, hoac mot bit so lieu mdi cd the d u ’O c nap vao te bao d u ’O c chon

S w i t c h i n g c h » r * c J * r n t i c j r e c o m m e n c e d l u p p i y v o iio ^ a ru n g ? [ ■ - ! ]j A lt. JO 15 j * h\T,A\i f ;d; t i.ãSôi * i f ? i

»yn«r>o ■w.r U '.** IW ft i V r> 1^,1.1

j *»tci A c c r a lim e fro 'r.

; C A - k o p p ! Luact * ? ;

7 i T T L w i r

' :CAC •D O ! •i3C | 16? 1 m

* A c c f « litr t FCaZ

)

• / f i t * " A A

CL - 0t>1 i.o a oi v e riti, 1 T T _ pate*.

• W ? c o 2 ‘ r.i

O u u t n » » O it tim e

I utier

C« - 0 o * oAc “ t e r it t 7^ T T L

i AO \ c 5C i c 6 C j m

7 M S '< • €> b -b > I c y n a rn ic n c c ip v a c c e « rr»r»**r Ra j k; c y c le t i m i n g

\ /

-r

X

> Dr>

Hinh 9.19c

Neu k i c h h o a t v i e t (W) dupe d u y tri o m u ’c l o g i c 1, c a c n o i d u n g c u a b i t d u ’Oc c h o n se x u a t h i e n n g d so l ie u , d o d o , Q t a o n e n m o t c h u ky d o c Mat k h a c ,

(85)

neu W du’Oc giu16 mu’c logic 0, bit so lieu ngo vao so lieu D se du’Oc nap vao vi tn

du’Oc chon, do no tao mot chu ky viet

Dirong nhien la can co nhCrng yeu cau dinh thdi nghiem ngat Cac yeu cau ve thdi gian du’Oc chi ro d cac dang xung djnh thdi gidi thieu tren Hinh 9.19c Vi du, cac ngd vao dia chi hang phai on dinh khoang thdi gian circ tieu tri/dc xung RAS dat mire logic 0, day la thdi gian xac lap dia chi cho cac hang tASR hoac ts RA Hay xem xet cac dang xung dinh thdi chu ky doc cho cac khoang thdi gian Theo thong so ky thuat, thdi gian toi thieu bang 0,0 ns Noi each khac, cac dia chi hang phai o’n dinh thdi gian sau RAS dat mu’c logic Can nghien cCru ky cac dang xung Vi hieu ro cac tinh chat cua IC ta se sir dung IC cd hieu qua cao

-1" "

< - C-i 5 t

’• ' u : '‘-tfo u* * "-a j ' y i ■ f )a s

x _ - _ • X v ' ',,c ~ ) > > >

- , N ■ ■ ■ V ^ -v , \ ■ v«-; ■ ■ s ■ ^ X • > :■ » ■ • ~ -T ~

Hinh 9.19d

(86)

can thiet de lam m6i mot hang 128 te bao Tuy nhien, tat ca 128 hang phai du’Oc lam m6i sau moi khoang thdi gian ms

Viec lam m6i co the du’Oc thu’c hien bang cach dung bo dem bit dieu khien de cung cap cac bit dia chi de chon mot hang mot thdi gian, sau lai chon tiep hang khac RAS chi du’Oc dung tai moi vi tri dia chi de lam mdi lai hang Gia du rang, mdi thdi gian chu ky tC(w) hoac tC(rd) la 375 ns, no can 0,375 x 128 = 48 ps de lam mdi tat ca 128 hang Nhir vay, ngoai mdi khoang thdi gian ms, thdi gian 48 ps la thdi gian dung lam mdi lai, no chi chiem 48/2000 = 2,4% cua thdi gian dung cho bo nhd Viec lam mdi lai cd the du’Oc tien hanh cung mot luc cho tat ca 128 hang hoac bang cach lam mdi lai Ian lirdt tting hang mot, vdi khoang thdi gian bang giCra cac hamg theo kieu "dinh ky"

Mot dac tinh hap dan va htiu ich cua TMS 4116 la no cd the du’Oc dia chi hoa theo kieu dia chi trang Theo kieu dia chi hang du’Oc luu trCr cac bo giai ma ngd vao RAS va Ian lirot cac cot du’Oc chon cung mot hang bang cach dung CAS Uu diem Idn cua kieu dia chi trang la thdi gian chu ky doc hoac viet tc (p) giam xuong non mot nu’a, tCr 375 ns xuong 170 ns

Viec s i r dung RAM dong hoi phifc tap so vdi viec s i r dung RAM tTnh, vi cac bit

dia chi phai du’Oc ket hop lai; bo nhd phai du’Oc dinh ky lam mdi lai; viec lu ll tru* so lieu vao bo nhd hoac doc so lieu tCr bo nhd phai du’Oc lam tach biet vdi cac chu ky lam mdi T a t ca cac chirc nang cd the dat du’Oc bang logic dieu khie n ngoai,

nhirng van de du’Oc don gian mot chut bang cach dung bo dieu khie n RAM

dong IC TMS 4500A cua TEXAS INSTRUMENTS la mot cac mach dieu

khien RAM dong dung cho chip don IC 4500A cd the du’Oc dung vdi IC 4116, cung

n h ir vdi cac RAM dong 8K, 32K va 64 K khac (Hinh 9.19).

IC TMS 450A thirdng du’Oc dung giao dien cac RAM dong vdi he thong pP va IC TMS 4500A cd chtia cac bo ghep dia chi dieu khien lam mdi lai, dieu khien dinh thdi de dap ting cac yeu cau truy cap bo nhd va cac yeu cau ve viec lam mdi Cac ngd tti MA0 den MA7 la bit cua dia chi bo nhd du’Oc dung de dieu khien cac RAM dong Khuon dang (FORMAT) la bit dia chi hang, bit dia chi cot va bit dia chi lam mdi vao cac thdi gian yeu cau lam mdi lai, nhu1 chi tren Hinh 19d Cd ngd xung chon dia chi hang RAS0va RAS.,; CAS la ngd xung chon dia chi cot cua cac RAM dong neu chan chon chip (CHIP SELECT:CS) mtic

Ngd vao REN, du’Oc dung de chon mot hai n hom cua RAM dong dang

du’Oc dieu khien bang ngd RAS K h i m tic thi RAS, du’Oc chon va mtic

0 thi RAS0 du’Oc chon

Mtic mot hai dieu khien truy cap doc (ACR) hoac dieu khien truy cap viet (ACW) se lam cho dia chi cot xuat hien day dia chi ngd tti MAq den MA7 Tuy nhien ca hai ngd vao mtic 0, tat ca cac ngd deu trang thai trd khang cao. _

Ngd vao REFRED bat dau mot chu ky lam mdi Ngd vao xung nhip ky hieu CLK la ngd vao xung nhip cua he thong FS0 , FS, va TWST du’Oc dung de x£c dinh toe lam mdi va dinh thdi

Cd RAM dong khac du’Oc dung rong rai hon, la IC 4164 Hoat dong cua IC hoan toan giong vdi IC 4116, chi cd dieu khac nhat la ngudn cung cap la mot nguon ddn + 5V RAM dong 64 k (65536x1) tirong thi'ch di/dc vdi nhirng cd so ky hieu khac nhau: AM 9064; F 4164, 2164, MK 4564 MCM 6665 va TMS 4164

(87)

T S A r> OO A oynnrmc R A c n-nolle

7 M S < X A fv< L » jp

I T o p v e w J

C i * / ? o > y ? ^ a*

c J ' ; ;

A L £ i & j c

R A C ■

A C ^ r e

A C * ? ^

C A S ‘ c

R A „ t > ■> ■

C A c ~ M A t

E E

M A ? C A - j i t ;

i J G j _

F I A - r r r

C A m T

£ A Q T G N D !2Q :

| * C j ’ ■ V -r i ~ ■ / ? £ /=■ t & j r > V j~3 : i b ■ A A

: CA , j 3 | / f > i — [IE -

* - * « * ! R A

i r b ' tn

-C A

M A « j ? i ? & i m

c x

; In Af-c j

T M S - 0 A D R A M c o n t r o l l e r

Hinh 9.20

3C- I? K n -^ N Pt\K* P C W - TMS -*3TC *

=T>

s-ss

(88)

9.5 CAC TE BAO NHCJ

Te bao nh6 la don vi co ban de nh6 mot bit don cua tin bo nhd Cac te bao cau tao nen bo nhd ban d in thudng la cac flip flop du’Oc thiet ke bang cac tranzito lirdng ci/c hoac MOS hoac mach nap dien tich dung tranzito MOS

6 day ta chi nghien cull hoat dong cua te bao nhd ma khong nghien cull thiet

ke che tao Sir hieu biet sau sac ve te bao nhd dan den viec nam vCrng cac yeu cau cua mach, cung nhu1 danh gia du’Oc cac gidi han hoat dong cua bo nhd Ta nghien cull cac mach cd ban, minh hoa cho cac nguyen tac du’Oc dung cho hau het cac te bao nhd Doi vdi cac mach du’Oc nghien cUu, ta gia dinh mu’c dien ap cao bang + Vcc va mu’c dien ap thap bang OV

Te bao nhd dung RAM tTnh TTL cung vdi bo khuech dai doc va bo khuech dai viet vao du’Oc gidi thieu tren Hinh 9.23 Hai tranzito lirdng circ Q va Q2 ghep cheo tao nen bo chot don va cd kha nang nhd mot bit tin, mach la mot phan tir nhd Moi tranzito cd Emito mach cua te bao nhd du’Oc noi vdi + Vcc va dat (GND)

Neu day chon cot hoac hang mu’c (GND), te bao ngirng hoat dong (khong chon) De chon mot te bao, ca day cua hang va cot deu d mu’c (+ Vcc) Khi du’Oc chon, mot bit so lieu cd the du’Oc nhd te bao (viet vao) hoac cac noi dung cua te bao cd the du’Oc doc Ta xem xet si/ hoat dong cua te bao nhd

Khi cac day chon hang va cot mu’c 1, cac Emitd noi vdi cac day nhan thien ap ngirpc, te bao tac dong nhu mot chot, cho nen mot hai tranzito dan, tranzito lai ngirng dan Tranzito dan cho dong den Emito di xuong qua dien trd Rs va di vao ci/c Badd tranzito cua bo khuech dai doc ra, lam no d in Trong te bao, d tranzitd ngirng dan, khong cd ddng den tu” Emito, nhi/ vay, tranzito cua khuech dai doc d phi'a khong cd ddng Emitd bi ngirng dan Ket qua la cac tranzito cua bo khuech dai doc "bat chu’dc" cac tranzito te bao nhd Do do, du’Oc chon, cac noi dung cua te bao nhd du’Oc sir dung lap tCrc d cac ngc so lieu cua bo khuech dai doc Vi du, neu bit du’Oc nhd te bao, Q, dan Q2 ngirng dan Khi du’Oc chon, ngo so lieu (DATA OUT) d mu’c 1, va phan bu cua nd, DATA OUT se d mu’c

Bo khuech dai viet (WRITE) du’Oc dung de liru trir tin vao te bao nhd ngo vao W du’Oc tri d mu’c Khi W d mu’c 0, bo khuech dai khong lam viec va cac ngo cua nd khong ket noi vdi cac dien trd Rs Cd nhieu cau hinh ve te bao nhd, nhirng cac yeu cau co ban la WRITE len mu’c logic va WRITE xuong mu’c logic 0, mdi DATA IN d mu’c Icgic 1; ngirpc lai, WRITE d mu’c logic WRITE xuong mu’c logic 0, moi DATA IN d mu’c logic De lUu tru” mot bit vao te bao, trirdc het te bao du’Oc chon bang cach cho hang va cot, ca hai deu d mu’c logic Sau do, mu’c logic d DATA IN cua bo khuech dai viet vao se lam cho WRITE len mu’c logic va WRITE xuong mu’c logic Nhu” vay, ca Emito cua Q2 se d mu’c logic 1, lam cho Q2 ngirng dan va Qt dan va chot liru trCr bit Ngirpc lai, mCrc d DATA IN se dat tat ca Emitd cua Qt d mu’c Icgic 1, lam cho Q, ngirng dan va Q2 dan, nhd bit vao chot

Trong bo nhd tTnh dung NMOS, te bao nhd du’Oc cau tao bang cach dung hai

bo dao NMOS, ghep cheo de tao nen mot chot (Hinh 9.23) Trong bo nhd tTnh

(89)

dung CMOS, hai bo dao CMOS du'Oc ghep cheo de tao nen mot chot (Hinh 9.24).

Tir mot hai trudng hpp nay, mot bit so lieu du’Oc nap vao te bao hoac cac noi dung du’Oc doc bang cac cong truyen d in NMOS Trudc het, ta can xem xet cong truyen dan NMOS hoat dong nhu the nao

G a te

#1 #2

Hinh 9.22: Cong truyen dan NMOS

Hinh 9.22 gidi thieu mot tranzito NMOS loai giau dupe noi nhu mot cong truyen dan Tranzito dupe gia dinh truyen dan theo hai hudng: day cuc nguon va day cuc mang, hai day co the thay doi cho ma khong co dieu khac biet nao xay Ta goi ngan gon la day #1 va day #2 Oe day #1 la ngo vao thi day #2 la ngo Day cong (GATE) la day dieu khien Cac tin hieu dien ap hoac la VDC hoac la + Vcc

Neu cuc GATE dupe tri mUc (0 V), tranzito ngung d in , cac ngo vao va ngo bi phan cach Tin hieu khong truyen dan qua mach

Neu cuc GATE dupe tri mUc logic (+ 5VDC), va dien ap day #1 duoc dat d mUc 0, tranzito dan, dong se chay qua tranzito cho den V0 = V, = 0,0 V

Neu cu t GATE mUc logic va dien ap day #1 dupe dat mUc logic 1, tranzito se dan neu VQ d mUc va dong se chay qua tranzito cho den V0 = V, = + Vcc Hoac neu VQ cung mUc logic 1, tranzito se tri ngung dan vi V0 = V, = + Vcc

Tom lai, cong truyen dan khong hoat dong nao cuc GATE d mUc logic va ngo vao bi phan cach khoi ngo ra; nhu vay, cong truyen d in hoat dong nhu mot cong-tac bi ho mach, cong truyen dan hoat dong nao c u t cong mUc logic 1, dien ap ngo bang dien ap ngo vao, VQ = V, Nhu vay, cong truyen dan hoat dong nhu cong-tac kin mach

Mach Hinh 9.23 dien hinh cho te bao nh6 va khuech dai doc da

dung RAM tTnh loai MOS Te bao nhd gom co hai bo dao loai NMOS, ghep cheo de tao chot Co cong truyen d in T,, T2, T3 va T4 dung de chon te bao Khi ca hang va cot deu mUc 1, te bao dupe chon va cac noi dung cua no co the dupe doc nhd bo khuech dai doc ra, hoac mot bit so lieu dupe nap vao te bao nhd dung cong WRITE (W)

(90)

so lieu chan DATA IN (hoac mu'c logic hoac mCrc logic 0) se di/pc noi tri/c tiep den chot tai D Neu DATA IN mu’c 1, bit du’Oc nap vao, vi chot se on dinh vdi D co mu’c logic 1; ngirpc lai, DATA IN d mu’c logic 0, bit du’Oc nap vao vi chot on dinh v6i D co mu’c logic Day la chu ky viet

Ta lai gia dinh rang, te bao du’Oc chon nho tri ca hang lln cot mu’c Hai cong truyen dan T3 va T4 cung hoat dong (chung hoat dong nha cong-tac kin mach) Bat cir bit nao du’Oc nap vao chot D, phan bu cua bit xuat hien tai D va du’Oc ghep nhd cac cong truyen dan T3 va T4 den bo khuech dai doc Neu cong doc hoat dong (R d mu’c 1), bit so lieu du’Oc liru trCr d chot D se xuat hien ngo so lieu (DATA OUT) Day la chu ky doc

Hinh 9.23: Te bao nh6 dung hai bo dao NMOS ghep cheo de tao nen mot chot

Hai tranzito dau bo khuech dai doc tao nen mot cong dao co ngo la D Hai tranzito ngo bo khuiech dai doc Qt va Q2 co cac tin hieu vao~D va D v6i ket qua la mot hai tranzito luon luon dan, tranzito lai luon luon ngirng dan Vi du, neu bit so lieu du’Oc liru trir la 1, thi D = Nen Q, se dan Q2 ngirng dan va ngo so lieu (DATA OUT) se mu’c Ngirpc lai, neu bit du’Oc liru trir d chot, D = vi vay Q, ngi/ng dan, dan va DATA OUT se d mu’c

Mach Hinh 9.24 la dien hinh cua te bao nho va bo khuech da* doc

du’Oc dung RAM tTnh loai CMOS Te bao nhd gom co hai cong dao CMOS, ghep cheo de tao nen chot Co cong truyen dan T 1f T2, T3 va T4 du’Oc dung de chon te bao Khi ca hang Ian cot deu mu’c logic 1, te bao du’Oc chon va noi dung

(91)

cua no co the du’Oc doc nhd dung bo khuech dai doc ra, hoac bit so lieu co the du’Oc nap vao te bao bang cach dung cong WRITE (W)

Chu ky viet cua mach hoan toan giong v6i chu ky viet cua mach NMOS da du’Oc trinh bay tren day Te bao du’Oc chon nhd tri ca hang Ian cot mu’c va sau do, bit cd mat chan DATA IN se du’Oc nap vao chot neu W d mu’c (cong WRITE hoat dong)

Chu ky doc cGng hoan toan giong nhu” mach NMOS da trinh bay tren day Te bao du’Oc chon bang cach cho ca hang Ian cot deu d mu’c va cac noi dung cua te bao nhd xuat hien d chan DATA OUT sau truyen qua bo dao khuech dai doc

c *

GATE DdU o<i\

c -rA s c ;

Hinh 9.24: Te bao nhd dung hai bo dao CMOS ghep cheo de tao nen mot chot

(92)

phai di/dc nap lai Hdn nu’a, qua trinh doc ra, cac noi dung cua te bao dong co the bi mat tieu tan cac dien tich da du’Oc nap, ket qua la se bi mat cac bit da du’Oc nhd Day la hien tirpng doc xoa, hien tirpng khong xay d cac te bao nhd tTnh Ngay ca cac bo nhd dong co nhirpc diem nhu1 can phai co mach ho trp va cac tin hieu dinh thdi de lam mdi lai cung nhir hien tirpng doc xoa thi iru diem dung lirpng Idn cua chung van la dang ke

T

Hau#* tu

S o v » c e p i j i c

I T

- L - / L doxid

a _ • M O S F F T M0S C w » K H O f

f'VflCOH T

r,s t a o f t le t b ao <Aho d ong voi m e t t x a x t z

Chen t e w *o w«;f ie c7

c

9 0 » i? »r

i f t P M va.

\

I Gair

Fhfart ta

C a ; > * c 't o ' o ' a K

hia-JCT: I > c * !

it)) ~ 0 stt

Hinh 9.25

Hay xem xet mot te bao nhd dong co mot tranzito loai MOS nhir tren

Hinh 9.25 Te bao co mot tranzito NMOS va mot tu dien MOS du’Oc che tao tren cung mot chip Neu phien tu va de du’Oc noi vdi dat (GND) thi dien dung Cs thirdng de chCra cac dien tich cho mot bit bang dien dung cua tu dien MOS (CMOS) mac song song vdi tu dien tap tan cua tranzito C,) Bit dirpc nhd vao te bao neu tu Cs dirpc nap dien va bit dirpc nhd neu Cs phong dien

Ve cd ban, tranzito hoat dong nhir mot cong truyen d in Chon hang se lam cho cac tranzito ca hang cua bo nhd hoat dong Sau do, d chu ky doc, khuech dai doc phai tim cac noi dung cua te bao va dong thdi nap lai dien dung nhd Cs Chu y rang bo khuech dai doc giai quyet dirpc hien tirpng doc xoa ddng rb va dong thdi dirpc dung de tao lai, chu ky viet, cong WRITE dirpc dung de nap bit hoac bit vao te bao bang cach Ian lirpt cho tu Cs nap hoac phong dien./

(93)

CAU HOI VA BAI TAP

9.1. Trong bo nhd nao so lieu khong mat di mat nguon cung cap?

9.2. Bo nh6 nao van tri so lieu dirpc liru sau da ngat dien?

9.3. Bo nh6 co 10 dirong dia chi co the gan cho bao nhieu tu?

9.4. Bo nhd co dung lirpng 1024 x du’Oc goi la bo nhd co bao nhieu tir bit?

9.5. Cac bit va co the liru trCr phan tir nao cua bo nhd ban dan?

9.6. Bo nhd PROM co cac diot noi day chi cho phep lap trinh bao nhieu Ian?

9.7. Muon xoa cac vi tri nhd bang cach cho phong dien cac vi tri nhd EPROM ngirdi ta can chieu loai anh sang nao? Trong bao lau?

9.8. Ram ngoai kha nang dung de doc cac so lieu co kha nang nao

khac nu’a?

9.9. Cac mach dieu khien RAM dong cung cap che hoat dong: doc, ghi

va che hoat dong nao nu’a?

9.10. RAM dong sir dung linh kien nao de liru trCr so lieu?

9.11. Theo dinh ky ms, RAM dong phai du’Oc tac dong gi doi vdi cac te bao nhd?

9.12. Tren thi trirdng cd loai chip dac biet nao dung de dieu khien va thu’c hien tien trinh lam tiroi?

9.13. Giai thi'ch sir khac giC/a PROM va EPROM?

9.14. Giai thi'ch the nao la "bo nhd xoa dirpc"

9.15. Giai thi'ch y nghTa RAS va CAS Doi vdi IC TMS 4116,

- Gia tri circ dai va circ tieu cua rong xung cua RAS va CAS la bao

nhieu?

- Gia tri circ tieu cua thdi gian chu ky doc va viet la bao nhieu?

9.16. Hay chi cac trirdng hpp cd the sap xep theo hinh chCr nhat doi vdi bo nhd cd 32 te bao nhd

- Cd bao nhieu hang va bao nhieu cot doi vdi moi trirdng hpp?

- Can cd bao nhieu day dia chi moi trirdng hpp ke tren?

9.17* Can cd dia chi nao cua cac day A3A2A 1A0 de chon te bao 21

(94)

9.18 Xac djnh can co bao nhieu bit dia chi doi v6i bo nhd co dung lupng sau: a 1024

b 4096 c 256 d 16384

9.19* Can dia chi EDCBA bang bao nhieu dudi dang nhi phan va dang thap luc phan (hexadecimal) de lua chon tti bit hang thti 27 cua bo nh6 54/747488A

tren Hinh 9.9a?

9.20* Viet bieu thtic dai so Boolean cho dia chi hang thti 15 doi v6i ROM 54/7488A tren Hinh 9.9a

9.21* Chi cach ket noi cac RAM 7489 de co bo nh6 co dung luong la 32 tti bit

9.22* Ve so logic cho bo nh6 co 256 tti bit, v6i dieu kien sti dung IC

’200

9.23* Ve lai mach tren Hinh 9.23 va bieu thi cac mtic dien ap , gia du rang te bao khong dupe chon va dang luu trti mtic

9.24* Ve lai mach tren Hinh 9.23, bieu thi mtic dien ap, neu mtic dupe luu trti te bao va te bao dupe chon, gia du rang W 0 mUc L.

9.25* Ve cong truyen dan nhu tren Hinh 9.22, bieu thi mUc dien ap cho cac trudng hpp sau day:

a Cong (GATE) mtic va \ / : mtic b Cong (GATE) d mtic va V, mtic c Cong (GATE) mtic va V, mtic

(95)

CHUONG 10

CAC BO CHUYEN DOI

A/D VA D/A

Sau hoc xong chuong nay, hoc vien co kha nang:

Hieu duoc nguyen ly cau tao cua bo chuyen doi A/D va bo chuyen doi D/A

Phan tich duoc hoat dong cua mot so mach cua bo chuyen doi A/D co ban

Phan tich duoc hoat d'ong cua bo chuyen doi A/D co bo so ap

Phan biet dupe mot so bo chuyen doi A/D loai gan dung lien tiep va loai cd dien ap rang cua.

SCr dung duoc IC ADC 0804 thuong pham dung lam bo chuyen doi A/D

TONG QUAN

Hau het cac dang tin hieu phan anh cac hien tirpng tu nhien deu la cac tin hieu analog Vi du nhir thdi gian, toe do, luong, ap suat, cirdng anh sang tat ca deu la dang tin hieu analog tir nhien He thong digital nhir chi tren

Hinh 10.1 dirdi day co ngo vao analog Dien ap thay doi lien tuc tir OV den 3V Ma hoa la mot bo kien dac biet chuyen doi tin hieu analog tin hieu digital Bo ma hoa Hinh 10.1 du’Oc goi la bo chuyen doi tin hieu analog sang tin hieu digital, hoac ngan gon hon, du’Oc goi la bo chuyen doi A/D (ADC) Trong trirdng hpp nay, ADC chuyen doi cac tin hieu analog cac so lieu digital

(96)

Sd he thong digital tren Hinh 10.1 co mot bo giai ma Bo giai ma thuoc loai dac biet chuyen doi tin hieu digital tir bo xir ly digital ngo analog Vi du, ngo analog co dien ap thay doi lien tuc tir OV den V Ta goi bo giai ma la bo chuyen doi D/A (DAC) Trong trirdng hpp nay, DAC giai ma cac tin hieu digital dang analog

Toan bo he thong trinh bay tren Hinh 10.1 co the goi la he thong hon hpp vi no co ca bo kien analog Ian bo kien digital Cac bo ma hoa va bo giai ma nham chuyen doi tin hieu tir analog sang digital va tir digital sang analog dirpc goi la cac bo kien giao dien Tir giao dien thirdng du’Oc dung de chi bo kien hoac mach chuyen doi kieu hoat dong sang kieu hoat dong khac Dien ap ngo vao cua tin

hieu analog cua he thong tren Hinh 10.1 tir den 3V, dien ap co the bo

bien nang (transducer) tao Transducer la bo kien co chirc nang chuyen doi tin hieu tir dang nang lirpng sang dang nang lirpng khac

10.1 CHUYEN DOI TCr DIGITAL SANG A N A LO G (DAC)

Tir Hinh 10.1 gia du rang ta muon chuyen doi tin hieu nhi phan tir bo xir ly digital sang ngo co dien ap tir den 3y Ta lap bang sir that cho bo giai ma

Bang 10.1 trinh bay ngo vao D, C, B va A dirdi dang nhi phan Moi mu’c nam khoang tir +3V den +5V Moi mu’c vao khoang 0V Cac ngo du’Oc the

hien bang dien ap cot ngoai cung ben phai cua Bang 10.1 Theo bang nay, neu

so nhi phan 0000 xuat hien o ngo vao cua DAC thi ngo la 0V Neu so nhi phan 0001 ngo vao thi ngo la 0,2V Neu so nhi phan 0010 xuat hien o ngo vao, luc do, ngo la 0,4V Chu y rang, doi vdi m6i hang tir tren xuong dirdi cua Bang, ngo analog lai tang len 0,2V

Bang 10.1: Bang sir that cua DAC

CAC NGO VAO DIGITAL NGO RA ANALOG

D c B A VON

Hang 0 0

Hang 0 0,2

Hang 0 0,4

Hang 0 1 0,6

Hang 0 0,8

Hang 1 1,0

Hang 1 1,2

Hang 1 1,4

Hang 0 1,6

Hang 10 0 1,8

Hang 11 1 2,0

Hang 12 1 2,2

Hang 13 1 0 2,4

Hang 14 1 2,6

Hang 15 1 2,8

Hang 16 1 1 3,0

(97)

So DAC du’Oc trinh bay tren Hinh 10.2 Cac ngo vao digital (D,C, B va A) d ben trai Bo giai ma co phan: mang dien trd va bo khuech dai cong, ngo la dien ap ben phai hinh ve

Mang dien trd tren Hinh 10.2 du’Oc ti'nh toan cho mu’c d ngo vao B co gia tri gap Ian mu’c ngo vao A Tirong tir nhir vay, mu’c ngo vao C co gia tri gap Ian gia tri cua mu’c ngo vao A Mach du’Oc goi la mang dien tro thang

Van de co ban viec chuyen doi tin hieu digital tin hieu analog tirong dirong la chuyen n mCrc dien ap digital dien ap analog ti/ong dirong Oieu co the thirc hien bang cach thiet ke mang dien trd de chuyen moi mu’c digital dien ap (hoac dong) tirong dirong co so nhi phan

Gia du ta can chuyen tin hieu digital cho bang si/ that dirdi day cac dien ap analog tirong dirong So nhd nhat la 000, hay lay so bang V Sd Idn nhat la 111, hay lay sd tirong Crng bang +7 V Xac dinh giai tin hieu analog de trien khai GiCra 000 va 111 co mu’c roi rac Do chia tin hieu mu’c : LSB la tin hieu digital cd mCrc chuyen doi nhd nhat Nhir vay, si/ chuyen doi d ngo analog LSB bang 1/7 dien ap ngo analog Bo phan trd (mang dien trd) du’Oc thiet ke cho sd d vi tri nhi phan 2° tao dien ap bang: +7 V x 1/7 = +1 V d ngo

Ta thay ro rang rang 21 bieu thi sd co mCrc logic gao Ian bit 2° Do do, so d vi tri nhi phan 21 phai tao nen si/ chuyen doi dien ap d ngo analog gap Ian cua so LSB Dien ap ngo analog trirdng hop bang: +7 V x 2/7 = +2 V

Tirong ti/, 22 = = x = x 2° va nhir vay 22 phai tao nen si/ chuyen doi dien ap ngo bang Ian dien ap LSB Bit 22 phai tao nen dien ap ngo mot si/ chuyen doi bang +7 V x 4/7 = +4 V

Cong viec du’Oc tiep tuc va mdi bit sau co gia tri gap Ian bit trirdc Nhir vay, LSB cd sd nhi phan tirong dirong bang 1/7 Sd LSB lien sau cd sd bang 2/7, gap Ian LSB trirdc Sd MSB (trong trirdng hop he thong cd bit) cd sd nhj phan bang 4/7, gap Ian LSB dau tien Ta thay: 1/7+2/7=4/7=7/7=1 (tong cac sd nhi phan phai bang 1)

Tom lai, sd nhi phan tirong dirong mang nhan LSB bang 1/(2n - 1), d do, n la sd cac bit Cac sd lai du’Oc xac dinh bang cach nhan 2, 4, v.v

BANG SIf THAT CAC TRONG SO NHI PHAN TUONG DUKTNG

2* r 2*

0 0

0

0

0 1

1 0

1

1

1 1

BIT TRONG SO

2° 1/7

21 2/7

22 4/7

Tong: 7/7

(98)

B o k h u e c h dai c on g tren Hinh 10.2 lay dien ap tCr m a n g dien trd v a k h u e c h dai len tha nh dien ap du’Oc ghi cot ngoai c un g ben phai c ua Bang 10.1 B o khuech dai c o n g thirdng d u n g IC khuech dai toan tir O P - A M P B o k h u e c h dai c o n g con du’Oc goi la bo khuech dai ba c thang.

T o m lai, D A C co phan: mot n h o m dien trd tao ne n m a n g dien trd t ng va mot bo k h u ec h dai d u ng de khu ec h dai cong.

(S s ) (4 s ) (2 s ) (1s)

0 C B A

Mang B o khuech

dien t r o d a i conq

► —

-Hinh 10.2 S o d o khoi D A C

10.2 BO KHUECH DAI TOAN T lf

B o khu e c h dai toan tir, O P - A M P , co d a c di em la trd k h an g v a o c a o va trd k hang thap D o tang i'ch dien ap cua O P - A M P du’Oc x a c lap b a n g dien trd ben ngoai.

K y hieu cua O P - A M P du’Oc gidi thieu tren Hinh 10.3a O P - A M P co ngo v ao: ng o v a o phia tren la ng o v a o dao, du’Oc ky hieu b a n g da u n g o v a o phi'a dirdi la ngo v a o khong dao, du’Oc ky hieu b a n g dau + N g o cua O P - A M P d phia ben phai cua ky hieu.

Ngo vao dao_

Ngo vao khong dao

OPAMP

Ngo (Output)

Rf

Rin

Vin

1 1

OPAMP

-Q

1

Vout

b)

Hinh 10.3: O P - A M P a) K y hieu

b) N g o v a o va tang ich du’Oc x a c lap b a n g dien trd ngoai

O P - A M P luon luon dirpc su” d u n g vdi linh kien k em theo D i e n hinh la dien trd Hinh 10 du’Oc dira v a o de x ac lap d o tang i'ch dien ap c ua O P - A M P R in la dien trd v a o v a R, la dien trd ph a n hoi D o tang i'ch dien ap du’Oc x a c di nh b a n g c o n g thirc sau:

(99)

A =

-Rin

Gia du, c a c gia tri dien trd ket noi vdi O P - A M P la R f = 10 k Q va R jn = 10 k£2 T h e o cong thu’c tren, tang i'ch dien ap cua O P - A M P la:

R f 10000

A = -= -= 1

R in 10000

D o tang i'ch cua O P - A M P A = 1.

N eu Hinh 10.3b dien ap v a o V in = V , thi dien ap ng o V out = 5V , dien ap ngo vao dao d a ng du’Oc sir d u n g va neu dien ap na y ba ng + V , thi dien ap ngo ra bang - V B o tang ti'ch dien ap cua O P - A M P cGng co the du’Oc ti'nh b a ng c on g thu’c:

V0

A = -V in

Do do, tang i'ch cua mach tren Hinh 10.3 du’Oc ti'nh nhir sau:

V0 ' 5

A = - = - = 1

V in 5

D o tang i'ch dien ap A = 1.

Gia du, dien trd ng o v a o va dien trd ph a n hoi Ian li/pt ba ng k Q v a k Q nhu” chi tren Hinh 10.4 Hoi tang i'ch dien ap cua m a c h ba ng bao nhieu?

T a n g i'ch dien ap du’Oc ti'nh nhir sau:

R f 10000

A = - = - = 10

R in 10 00 0

D o tang i'ch dien ap A = N e u dien ap ngo v a o b a n g + , V , thi luc do, dien ap tai ngo b a n g bao nhieu? N e u tang i'ch b a ng 10, dien ap n g o v a o ba ng 0, V nhan vdi 10 Ian ba ng V la dien ap n g o D i e n ap ng o tai V0 b a ng - V nhu" bang v on ke tren hinh ve.

D o tang i'ch dien ap cua O P - A M P co the tha y doi neu ta thay doi ti le dien trd ngo va o R in va dien trd phan hoi R f T a c u n g co the xac lap tang i'ch c ua O P ­ A M P ba ng c ach sir d u n g c a c gia tri khac nh au cua R in va R f.

(100)

+ O—

1k Vin 1/2 V

J L

Hinh 10.4: M a c h k h u e c h dai sir d u n g O P - A M P

10.3 DAC CO BAN

D A C dd n gian du’Oc trinh b a y tren Hinh 10.5 D A C c o p h a n: m a n g dien trd d phan ben trai g o m c a c dien tro R 2, R3 va R B o k h u e c h dai c o n g 6 ben phai g o m mot O P - A M P va mot dien trd p h a n hoi D i e n ap n g o v a o (V,n) b a n g V du’Oc dat v a o c ac c h u y e n m a c h D, C , B va A D i e n ap ng o ( V Q) du’Oc d o tren von ke O P - A M P doi hoi du’Oc c u n g c ap b a n g n g u o n kep + V va - V

V6i tat ca c a c c h u y e n m a c h du’Oc ket noi v6i dat ( G N D ) b a n g V , nhir chi tren Hinh 10.5, dien ap ng o v a o tai di em A b a n g V va dien ap n g o c u n g bang 0 V Khi dien ap V du’Oc dat v a o n g o v a o c ua O P - A M P , ta ti'nh d o tang i'ch cua O P - A M P D o tang i'ch phu t hu oc v a o dien trd p h a n hoi R f N e u R f b a n g 10 kQ. va dien trd R in b a n g 150 kQ , tang i'ch c ua O P - A M P ba ng :

R f 1 0 00

A = - = - = 0, 06 R,n 1 0 0

M u o n tinh dien ap ra, ta n h a n d o tang i'ch vdi dien a p v a o: V0 = A x V in = , 6 x = 0,2 V

D ie n ap ng o b a ng 0,2 V n g o v a o la so nhi p h a n 0 D i e u n a y thu’c hien d u ng yeu cau c ua han g thi/ Bang 10.1.

B a y gid ta du a so nhi p h a n 0 v a o D A C Hinh 10.5 T h a n h d o n g cua c h u y e n m a c h B d U d c dat d vi tri 1, O P - A M P d U d c c a p n g u o n V D o tang i'ch luc n a y bang:

R f 1 00 0

A = - = - = 0 , 3

R, 7 0 0

N h a n tang i'ch vdi dien ap v a o ta dUdc dien ap n g o b a n g ,4 V D i e n ap n a y thu’c hien d u n g y e u cau c ua h a n g thu” Bang 10.1.

(101)

Ngo vao nhj phan

8>$ 4s 2s 1s

Hinh 10.5: M a c h D A C

R f 10000

A = - = - = 0 , 5

R,n 18700

Nha n tang i'ch vdi dien ap V ta diroc dien ap ng o c ua O P - A M P ba ng 1,6 V D ien ap n a y thuc hien d u n g yeu cau cua h ang thir Bang 10.1.

Khi tat ca c a c c h u y e n m a c h de u d U d c dat d vi tri Hinh 10.5, thi O P ­ A M P nhan dUdc dien ap V vi luc d o tang ich tang len de n D i e n ap dat va o O P - A M P co the tang den mu’c gidi han v a ba ng ±1 V ( b a n g vdi dien ap c un g cap cho O P - A M P ) C d the bo’ s un g c a c vi tri so nhj pha n b a n g c ac h tang so lUdng chuyen mac h m a n g dien trd N e u c h u y e n m a c h cd gia tri nhi pha n la 16s, luc do, can dien trd cd gia tri ba ng mot nira gia tri dien trd R4 v a ba ng Q G ia tri dien trd phan hoi cGng cd the thay doi de n kQ N g o va o, d o do, cd so nhi phan va ngo dien ap bien doi tu" V de n V.

D A C tren Hinh 10.5 cd nh Ud c diem: m a n g dien trd can cd nhieu loai tri so dien trd khac va chi'nh x ac c u a dien ap ng o thap.

10.4 CAC DAC LOAI THANG

(102)

B o k hu e c h dai cong tren Hinh 10.6 c un g du ng loai O P - A M P nhi/ m a c h tren Hinh 10.5, O P - A M P c ung can den n gu o n c ung c ap kep H o at d o n g c ua m a c h n a y tuong tu n h u m a c h tren Hinh 10.5 Bang 10.2 neu len chi tiet hoat d o n g cua D A C C h u y r i n g ta d a ng sir d u n g dien ap ng o v a o la 3, 75 V c h o bo c h u y e n doi Mdi b u d c d e m nhi phan tang len d ng o analog la 0, 25 V , nhir chi cot ngoai c un g ben phai cua Bang 10.2 N h6 lai la moi so d n g o v a o co nghia la 0 V du pe dat v a o ng o va o Moi so d ng o v ao co nghTa la dien ap V dupe dat v a o ngo v a o S i r d u n g dien ap ng o v a o 3, V vi dien ap n a y co lien quan mat thiet vdi ngo cua bo d e m T T L va c a c I C khac d u p e sir d u n g D A C Do do, c a c ngo va o ( D C , B A ) Hinh 10.6 co the di/pc ket noi tri/c tiep de n cac n g o cua IC T T L va hoat d o n g n h u da neu len Bang 10.2 T u y nhien, thuc te c a c ngo cua IC T T L kho ng c ho c a c gia tri du mu'c chinh x ac c an thiet, c phai d up e hieu chinh de dat d u p e dien ap ng o chinh xac.

B AUG : B A N G S J T H A T C U A C H U Y E N o S l D / A

S»GOVAOM~. C A C N J& v a on h i '’H A N CAC

KJ-*M*LQG

D 5 A

O 0 0 O

0 0 Q

0 0 0 0 0

0 0 } C.75

0 T 0 0 \DO

0 0 X25

0 O \5C

0 1 T

1 O o 0 2jOO

0 Q Z S

1 0 O 2 O

1 0 ,7

1 O 0 0

1 0

1 0 5C

1

Hinh 10.6: M a c h cua D A C sir d u n g m a n g dien tro t ng R - R

C o the dua them nhieu vi tri nhi ph a n ( 16s 32s s ) v a o m a n g dien trd cua D A C theo c ac mau dien trd n hi /t r ong Hinh 10.6.

D A C loai dien trd thang R - R cd i/u di em la chi si/ d u n g loai dien trd, cau true khong khac gi D A C nhu" da trinh b a y tren Hinh 10.5, nd c u n g cd phan: m a n g dien trd va bo khu ec h dai cong.

10.5 BO CHUYEN DOI TL/ANALOG SANG DIGITAL (ADC)

A D C la d a ng d a c biet c ua bo m a hoa S o khoi c u a A D C dirpc gidi thieu tren Hinh 10.7 N g o v a o la mot dien ap bien thien D i e n ap tri/Ong h o p th a y doi kho an g tCr V d e n V N g o c ua A D C cd gia tri nhi p h a n A D C bien doi dien ap anal og ng o v a o tti nhi p h a n bit C u n g n h u bo m a hoa khac d ngo v a o va ng o cua A D C can cd c a c dien ap chinh xac Bang 10.3 c ho ta biet c ach hoat d on g cua A D C

(103)

Hang 1 la dien ap dat vao ngo va o cua A D C ba ng V, ng o la so nhi pha n 0000 Hang 2 la dien ap dat vao ngo v a o va ba ng 0,2 V, ng o cua A D C co so nhi phan la 0001 C h u y rang m6i dien ap ngo v ao tang len 0,2 V thi so nhi pha n 0 ngo d e m tang len Cuoi c ung, hang 16 chi dien ap circ dai V du’Oc dat vao ng o v ao cua A D C thi ngo co so nhi pha n la 1111 Bang sir that 10.3 cua A D C la dao ngirpc cua Bang sir that 10.1 cua D A C C a c ng o v a o va ngo du’Oc dao ngirpc B a n g sir that cua A D C don gian, nhien c a c m a c h dien tir thirc hien bang sir that lai co phan phtic tap hon m a c h dien tir c ua D A C S o khoi cua mot loai A D C du’Oc trinh b a y tren Hinh 10.8 A D C co mot bo so ap, mot co’ ng A N D , mot bo d e m B C D va mot D A C

NGO VAO ANALOG

NGO RA NHI PHAN

Hinh 10.7: S o khoi A D C

Die n ap analog du’Oc dat v a o phan trai cua m a c h tren Hinh 10.8 B o so s anh kiem tra dien ap de n tir D A C N e u dien ap ng o v a o a na l og tai A I6n hon dien ap ngo vao tai B cua bo so sanh, x ung nhip den bo d e m B C D lam bo d e m thirc hien de m tang len mot birdc d e m B o d e m d e m tang c ho de n dien ap pha n hoi tir D A C lam c ho dien ap ng o v a o anal og I6n hon L u c do, bo s o s a n h lam c ho bo d e m ngirng de m tang G i a du, dien ap analog ng o v a o la V T h e o Bang 10.3 bo d e m nhi phan tang len de n 1010 trirdc no ngting d e m tang B o d e m du’Oc p h u c hoi ve so nhi phan 0000 va bo d e m bat dau d e m lai.

T a hay x e m xet A D C tren Hinh 10.8 Gia du rang c o mtic logic tai di em X d ngo cua bo so sanh C u n g gia du rang bo d e m B C D c o so nhi p h a n 0 0 v a co dien ap 0,55 V dat va o ng o v a o analog Mtic logic tai X c h o p h e p c o n g A N D hoat dong va x ung nhip dau tien xuat hien tai ngo v a o C L K c u a bo d e m B C D Bo d e m de m tien len so nhi phan 00 01 S o 0001 du’Oc the hien tren ng o nhi p n va c ung du’Oc dira v a o D A C .

(104)

NG<3 RA NHI PHAN B A N G B A N G S i/ T *->T C b A A D C Nq n v i c

Kqg r » nhj ?h£n

V6n 4* 2d

- ft ■A

H A N G OJO 0 0

H A N G 0 2 O 0

H A N G 0

H A N G 0 1

H A N G 0 0

H A N G w 0 1

H A N G 12 0 1

H A N G 6> 1.4 0 1

H A N G 1.6 0

H A N G 10 0

H A N G 11 jO 1

H A N G 12 2 2 1

H A N G 13 2.4 1 0

H A N G 14 1

H A N G 15 JS> 1

H A N G 16 1 1

Hinh 10.8: S d d o khoi cua A D C loai co bo d e m B C D

T h e o Bang 10.1 ng o c u a so nhi phan 0 cho dien ap la 0, V D i e n ap 0,4 V du’Oc phan hoi v e c n B c ua bo ao sanh B o so s a n h lai kiem tra v a so sanh dien ap cha n B vOi chan A : dien ap c n A v a n Idn hon dien a p 6 c h a n B ( , 55 V so v6i 0,4 V ) B o so s an h lai c h o mot mu’c logic M u ’c logic lai kich hoat cong A N D , de dira mot x ung nhip tiep theo tdi bo d e m B C D B o d e m thu’c hien d e m tang mot birdc d e m va ngo nhj p h a n co so nhj p h a n la 0 1 S o nhj p h a n n a y cGng du’Oc dira den D A C

T h e o Bang 10.1, n g o v a o 0011 c ho dien a p n g o la ,6 V D i e n ap 0, V lai du’Oc phan hoi v e chan B c ua bo so sanh B o so s a n h lai kiem tra v a so s a n h dien ap cua c han B vdi c h an A , Ian da u tien, ng o v a o c h a n B c d di en ap Idn h o n dien ap n g o va o cha n A B o so s an h c h o mu’c logic 6 n g o ra, m u ’c logic n a y l am c h o cong A N D khong hoat d on g , do, x ung nhjp kho ng d e n du’Oc bo d e m B o d e m B C D dirng lai 0 so nhj p n 0 1 L u c nay, so nhj p n 0011 b a n g , 5 V Q u a n sat hang Bang 10.3 ta thay 0, V tirong Crng vdi n g o nhj p h a n la 0 11 A D C da thirc hien viec c h u y e n doi theo d u n g Bang sir that.

N e u dien ap ng o v a o an al og la 1,2 V theo Bang 10.3 n g o nhi p h a n se la 0 1 Bo d e m se d e m tir 0 0 len den 1 trirdc bi bo so s a n h lam dirng qua trinh d e m C h u y rang c an mo t thdi gian de c h u y e n doi dien ap a n a lo g t nh so nhj phan T u y nhien, hau het c a c trirdng hop, x u n g nhjp hoat d o n g du n h a n h de qua trinh c h u ye n doi dien k h o n g cd sir co nao.

10.6 BO SO AP

O phan trirdc ta cd d u n g bo so ap T a da t y bo s o s a n h lam n h i e m vu so s a n h 2 dien ap va bao c ho ta biet mot hai dien ap, dien ap na o Idn hon Hinh 10.9 la so d o khoi c o ba n c ua mot bo so sanh N e u dien ap tai n g o v a o A Idn hon dien ap ng o v a o B bo so s a n h c ho mu’c logic d ng o N e u dien a p 6 n g o

(105)

v a o B Idn hon 6 ngo vao A, ngo co mu’c logic Ket qua co the tom tat la A > B, ngo co mu’c 1; B > A, ngo co mu’c T h u ’c chat bo so s a n h la mot O P - A M P Hinh 10.10a gidi thieu mach bo so sanh C h u y rang, dien ap 1,5 V dat va o ng o vao A va dien ap V dat vao ngo v a o B N g o cua vo n met chi thi dien ap 3,5 V hoac mu’c logic Hinh 10.10b chi thi dien ap ng o va o B da du’Oc tang len de n 2,0 V Dien ap 0 ngo vao A v i n giu’ gia tri 1,5 V N hu ” vay, dien ap ngo v a o B I6n hon dien ap ngo vao A N g o cua bo so s anh co mtic dien ap la V (thirc chat dien ap vao khoang - 0, V ) hoac mtic logic 0.

Hinh 10.9:Scf khoi Hinh 10.10: Mach cua bo so ap a) Dien ap tai A Idn hon tai B

bo so ap b) Dien ap tai B Idn hdn tai A

Bo so sanh 0 A D C tren Hinh 10.8 lam viec hoan toan giong nhi/ bo so s anh vtia trinh bay 6 tren D i o d Z e n e bo so s anh tren Hinh 10.10 giCr c ho dien ap ngo on dinh v ao kho an g +3 ,5 V K h o n g co diod Z e n e , dien ap ng o v a o khoang +9 V v a - V D ie n ap +3 ,5 V rat thi'ch hpp vdi c a c I C T T L

10.7 LOAI ADC KHAC

6 m u c 10.5 ta da x e m xet A D C co bo d e m x ung rang cira Ngoai loai A D C ke tren, ngudi ta sir d u ng mot so loai A D C khac T r o n g m u c na y ta x e m xet hai loai A D C

A D C s ud n d o c du’Oc gidi thieu tren Hinh 10.11 A D C n a y hoat d o n g giong nhir A D C co bo d e m x ung rang cua tren Hinh 10.8 B o tao x ung rang cua 6 p n trai cua Hinh 10.11 la phan m a c h phu mdi B o tao x u n g tao c a c x ung rang cira, dupe the hien tren Hinh 10.12a.

(106)

N06 RA CUA

S>6 ADC

Hinh 10.11: S d d o khoi cua A D C loai x u n g rang cira

Xung nhip den bo dem Q H D m m Xung nhip den bo de mn n n n n n n n n n n n

€>oc so nhi p h in 0011 0011 €>oc so nhi phan 0110 0110

a) b)

Hinh 10.12: C a c d a n g x ung cua A D C loai dien ap rang cira a) V6i dien ap dat v a o la V b) Vdi loai dien ap dat v a o la 6V

Hinh 10.12b la mot vi du khac D i e n ap n g o v a o d e n A D C la loai x u n g rang cira co dien ap la 6V D i e n ap rang cira bat da u tang tu* trai s a n g phai N g o cua bo so sanh c ho mu’c logic vi dien ap ng o tai d i e m ' A Idn hon dien ap c u a bo tao x ung rang cira tai di em B B o d e m tiep tuc d e m tien T a i di em Z dien ap tren sirdn d o c cua x ung rang cira cua bo tao x ung Idn hon dien ap n g o v a o V jn T a i d i e m ng o bo so s an h c ho mtic logic MCrc logic n a y lam c h o c o n g A N D k h o n g hoat do ng , x ung nhip, d o do, kho ng den du’Oc bo d e m B o d e m thirc hien d e m de n 01 10 thi ngirng d e m S o nhi p n 1 tirong ting vdi dien ap n g o v a o a n al o g la 6 V

D ieu kho khan doi vdi A D C loai x ung rang cira la thdi gian doi hoi hoi dai de bo d e m thirc hien d e m tien de n c a c dien ap c a o hon V i du, neu ng o nhi p h a n cd tam vi tri nhi pha n, bo d e m phai d e m tien len de n 255 D e k c p h u c nhi rp c di em nay, ta d u ng loai A D C g a n d u n g lien tuc.

(107)

Hinh 10.13: S d khoi cua A D C loai g an d u n g lien tuc

S o khoi cua A D C loai g a n d u ng lien tuc du’Oc trinh ba y tren Hinh 10.13. A D C g o m co bo so ap, bo D A C va mot khoi logic moi du’Oc goi la "khoi logic g an dung lien tuc".

Gia du, ta dat dien ap V v ao ngo v a o analog D a u tien, A D C loai g a n d u n g lien tuc doan dinh dien ap ng o va o analog, no g an c ho M S B mu’c logic C o n g viec du’Oc trinh b a y 6 Butfc tren Hinh 10.14, du’Oc "khoi logic g a n d u n g lien tuc" thirc hien Ket qua g an so M S B (vi du la 10 00) du’Oc D A C pha n hoi ve bo so sanh B o so s an h tra Idi cau hoi (6 Birdc 2, Hinh 10.14) so nhi p h a n vira g a n la 1000 tirong Crng vdi dien ap Idn hdn h oac nho hdn dien ap ng o v a o ? T r o n g trirdng hdp bo so s an h tra Idi la dien ap Idn hdn dien ap ng o vao S a u do, "khoi logic gan dung lien tuc" thirc hien nhiem vu 6 Birdc 3, Hinh 10.14, vi tri nhi p n 8s (mtic logic 1) du’Oc xoa va thay the ba ng mu’c logic Ket q ua x ac lap cho vi tri nhi phan 4s la 0 du’Oc c h u y e n tdi D A C va pha n hoi v e bo so sanh B o so s a n h tra Idi tiep tuc cau hoi v e ket qua x ac lap c ho vi tri nhi p h a n s mdi n a y du’Oc thirc hien d B ud c 4, Hinh 10.14: m U c logic 0 tuong Ung vdi dien ap Idn hon h ay nh o hon dien ap ngo v a o ? C a u tra Idi la nho hon T i e p theo, "khoi logic g an d u n g lien tuc" thuc hien c on g vi ec 6 B u d c 5, Hinh 10.14 Vi tri nhi p h a n 2s d u p e x ac lap mtic logic 1, cho ket q u a x ac lap Ian na y la 0110 S o nhi p h a n n a y du p e c h u y e n tdi D A C va tuong ting vdi 1 la mtic dien ap d upe p h a n hoi ve bo so sanh B o so s a n h tra Idi 6 B u d c 6: so nhj phan 1 tuong ting vdi dien ap Idn hon h ay nh o hon dien ap ngo v a o ? C a u tra Idi la nho hon "Khoi logic g a n d u n g lien tuc" t hu c hien c o n g viec d B u d c 7, vi tri nhi phan 1s d upe x ac lap mtic logic Ket qua cuoi c u n g du’Oc xac dinh bang so nhj p n 01 11 S o nhi pha n na y tuong ting vdi dien ap dat v a o ngo vao cua A D C la 7V.

C h u y rang Hinh 10.14 la so khoi dupe "khoi logic g an d u n g lien tuc" t hu c hien C a c cau hoi dupe bo so s anh tra Idi C u n g can chu y the m la c a c c o n g vi ec do "khoi logic g a n d u n g lien tuc" thuc hien phu t hu oc v a o cau tra Idi trudc do: mtic dien ap Idn hon h a y nho hon mtic dien ap dat v a o n g o v a o A D C ( x e m b u d c v a budc 5) ITu d i e m c u a A D C g an d u ng lien tuc la ton it thdi gian x ac lap mti c logic de cd dupe c au tra Idi Q u a trinh digital hoa d i i n n h a n h hon A D C g a n d u n g lien

(108)

Bl/CTC

BI/OC

Bl/OC

Bl/OC

Hinh 10.14: Lull do hoat dong cua ADC loai gan dung lien tuc

(109)

N g a y na y co tren 400 loai A D C khac nh au du’Oc su' d u ng rong rai T u y nhien cac A D C co nh u n g yeu cau ky thuat c h u ng nhu1 sau:

- Cac loai ngo ra

Noi c hung, c a c loai A D C du’Oc phan loai 6 ngo h oa c la so nhi pha n h o a c la so thap phan C a c A D C vdi ng o la so thap phan noi c h u n g du’Oc sir d u ng rong rai, ch§ng han nhir la von ke so A D C vdi c a c ngo la so nhi p n cd tir de n 16 ngo A D C vdi n gd nhi phan la c a c ngd v a o c ua c a c bo kien da n de n c a c he thong dira tren co sd vi xir ly, ta hay goi la A D C loai |jP.

- Do phan giai

D o phan giai cua mot A D C la so bit 6 n gd doi vdi khoi nhi phan D oi vdi loai A D C ngd thap phan phan giai 'a so so d o c (vi du: V2 h oa c V2) Loai A D C vdi c a c ng d nhi phan cd pha n giai la 4, 6, 8, 10, 12, 14 va 16 bit C a c sai Idi cd the x a y la sir d u ng c a c birdc nhi p n rdi rac Vi du, mdi birdc

d A D C bit bang 1/15 dien ap n gd v a o ( 24 - = 15) D i e u na y c ho d o phan giai la 6 , % (1/15 x 100 = , % ) T u y nhien, d A D C 8 bit c a c gia so nho hon Mot bo A D C

8 bit cd 255 birdc rdi rac hoa, tirong Crng vdi d o phan giai la , % (1/255 x 100 = 0 , % ) A D C 8 bit cd phan giai tot hon h o a c "chinh x ac hon" A D C bit.

- Do chinh xac

D o phan giai c ua A D C cd the cho la sai Idi digital von cd vi c a c IC sir d u n g cac birdc rdi rac 6 n gd C a c ly khac g a y sai Idi cua A D C cd the la c a c linh kien analog, c h S n g han nhir bo so sanh h o a c sir d u n g c a c dien trd cd tri so khong chinh xac m a n g dien trd Si r khong sai lech c h u y e n do7i tir tin hieu anal og sang tin hieu digital c ua A D C dirpc goi la chinh x a c cua I C A D C D o chinh x ac cua IC A D C cd ng d nhi phan p h a m vi tir ± V2 LSB de n ±2 LSB D o chinh xac cua IC A D C cd n g d thap p n p h a m vi tir 0,01 de n 0, 05 %

- Thdi gian chuyen doi

T h d i gian c h u y e n doi la mot c a c d a c tinh q u a n cua A D C D o la thdi gian can thiet de A D C c h u y e n doi dien ap ngd v a o a n al og s an g c a c n g d so lieu nhi phan h o a c thap phan C a c thdi gian c h u y e n doi dien hinh n a m p h a m vi tir 0,05 den 0 0 ps doi vdi cac IC cd c a c n g d nhi phan C a c thdi gian chuyen doi doi vdi c a c A D C cd c a c ngd thap p n p h a m vi kho ng q ua tir 200 den 400 ms.

- Cac dac tinh ky thuat khac

Bon d a c tinh ky thuat c h u ng cua A D C la dien ap c u n g cap, mu’c logic c ua n gd ra, dien ap ngd v a o v a c on g suat tieu tan circ dai D i e n ap n g u o n c u n g c a p noi c la +5V T u y nhien, mot vai IC A D C hoat d o n g vdi dien ap n g u o n c u n g cap tir + V den + V C a c mu’c logic n gd h oac la IC T T L h o a c la IC C M O S h o a c la trang thai P h a m vi dien ap ngd va o noi c h u n g v a o k h o a n g 5V C o n g suat tieu tan circ dai doi vdi c a c I C A D C p h a m vi tu” 15 de n 0 m W

(110)

10.9 IC A D C TH l/ O N G PHAM

I C A D C thirdng p h a m dtipc de c a p de n p h a n Hinh 1015a liet ke do c n IC A D C 0804 loai 8 bit B a n g Hinh 10.15 liet ke ten c a c c h an va cac ti'nh n a ng c ua c ac chan cua IC A D C du’Oc thiet ke de giao dien trtic tiep vdi c a c |iP 8080, 80 85 h o ac Z Mot so c h an cua IC A D C ti/dng ting vdi c h a n cua c a c juP thong d u ng Vi du, A D C sti d u n g R D , W R v a I N T R ti/dng ting vdi R D , W R va I N T R tren jxP 85 IC A D C c u n g c o the giao dien vdi c a c |uP 8 bit khac c h i n g han nhir 65 02 N g o v a o c h a n dieu khien C S cua A D C 0 nhan tin hieu c hon chip tti m a c h giai ma dia chi c ua j.iP.

A D C la bo c h u y e n doi tti anal og s an g digital 8 bit, g a n d u n g lien tuc, loai C M O S IC na y co c a c ng o trang thai de s a o c ho no giao dien trtic tiep vdi B U S sd lieu cua he thong sti d u n g jaP IC A D C co c a c n g o nhi pha n va co d a c ti'nh la thdi gian c h u y e n doi n ga n, chi k h o an g 100 |l is C a c n g o v a o va ngo c ua I C deu tirong hdp d u p e vdi c a c IC T T L va I C M O S I C n a y co mot bo tao d a o n g x ung nhip IC A D C k h o n g c a n de n c a c linh kien R v a C be n ngoai phu trd de hoat dong I C na y hoat d o n g vdi n g u o n +5 V tieu c h u a n va co the giai m a c a c dien ap anal og ng o v a o p h a m vi tti V de n +5 V

A D C du’Oc sti d u n g nhir m a c h gidi thieu tren Hinh 10.16 Chtic n a n g cua m a c h la de ma hoa c a c dien ap khac gitia V in( + ) v a V in( - ) so sanh vdi dien ap tha m khao ( , V vi du na y ) ttiOng ting vdi gia tri c u a so nhi pha n Vi du, d o phan giai c ua I C A D C la 8 bit h o a c , % D i e u n a y co nghia la ( 5, 12 x , % = 0, 02 V ) tang moi V dien ap tai c a c n g o v a o anal og thi bo d e m nhi phan d e m tang t he m " C h u y e n m a c h khoi d o n g " tren Hinh 10.16 luc da u ddng , sau m d de khdi d o n g c ho A D C c h a y tu1 G o i la " c h a y tti do" la vi no c h u y e n doi lien tuc ng o v a o a nal og s a n g c a c n g o digital C h u y e n m a c h khdi d o n g can dtipc de ho mot A D C d a n g hoat d on g N g o v a o W R co the dtipc xem la ng o v a o x ung nhip vdi n g o ngat I N T R phat x u n g de n n g o v a o W R tai cuoi moi c h u y e n doi analog-digital S t i dich c h u y e n tti L len H c u a tin hieu tai n g o v a o W R khdi dau c ho mot q ua trinh c h u y e n doi Khi viec c h u y e n doi ket thuc S t i hien thi so nhi pha n dtipc hieu chinh kip thdi v a ng o cua c h a n ngat I N T R phat mot xung a m X u n g a m n a y dtipc pha n hoi ve d o n g ho c ua n g o v a o W R va no b i t da u mot c h u y e n doi A/D khac M a c h tren Hinh 10.16 thtic hien k h o a n g 0 de n 10000 c h u y e n doi mot giay T o e d o c h u y e n doi cua A D C c a o vi no sti d u n g ky thuat g an d u n g lien tuc q ua trinh c h u y e n doi.

(111)

DBo (LSB)

Vcc CLK R | 0 31 Df32 DB3 DE34 DF35 DB6 DB7 (MSB)

2 19 16 17 16 15 14 13 12 11

IC A D C 0 & 0 4

1

CS RD \NR

4

CLK IN

5 6 7 & 10

INTR Vin (+) Vin (-) A GND V ref/2 D GND

BANG TEN VA CHUfC N AN G CAC CHAN IC ADC 0804

S O CHAN K f HIEU NG O RA/NGO VAO

HO AC NG U O N C UNG C AP MOTA

1 CS Ngo vao Day chon chip til chan dieu khien cua pP

2 RD Ngo vao Day doc tC/ chan dieu khien cua pP

3 WR Ngo vao Day viet chan dieu khien cua pP

4 CLK IN Ngo vao Xung nhip

5 INTR Ngo vao Day ngat di den ngo vao ngat cua pP

6 v in(+) Ngo vao Dien ap analog (+)

7 Vin (-) Ngo vao Dien ap analog (-)

8 A GND Nguon cung cap Tiep dat cua analog

9 ref/2 Ngo vao Dien ap tham khao (+)

10 D GND Nguon cung cap Tiep dat cua digital

11 d b7 Ngo Ngo sd lieu MSB

12 d b6 Ngo Ngo so lieu

13 d b5 Ngo Ngo sd lieu

14 d b4 Ngo Ngo sd lieu

15 d b3 Ngo Ngo sd lieu

16 d b2 Ngo Ngo sd lieu

17 DB, Ngo Ngo sd lieu

18 DB0 Ngo Ngo sd lieu LSB

1 9 CLK R Ngo vao Dien trd ket noi ngoai cua dong ho 20 Vcc (hoac

tham khao)

Nguon cung cap Dien ap nguon cung cap + V va dien ap

tham khao sd cap

(112)

NGO VAO ANALOG

1 k

ôã-KHdl 'AO 7

2

i R1

10k

FCl

150 pF

n g5 r a d i g i t a l

129s ^ s 16- s s 2s 1s

O O O O O Q Q Q

+5V

Vcc

Vin (+) DB7

DB6 Vin (-)

ADC0604

DB5 DB4 36 CHUYEN & \ ADC & BIT DB3

— DB2

WR CLK R

DBO

CLK IN INTR

A GND DGND CS RD

Hinh 10.16: S o noi d a y c ua m a c h sCr d u n g I C A D C C M O S cua Bo c h u y e n doi A/D

D i e n tro R: va tu dien C , du’Oc ket noi d e n c a c ng o v a o c ua C L K R va C L K IN cua IC A D C tren Hinh 10.16 tao nen d o n g ho ben I C d e hoat dong C a c ngo so lieu ( D B - D B ) dieu khien L E D hien thi so nhi pha n C a c ng o so lieu la c a c ngo trang thai vdi mu’c H tich circ.

N g o nhi phan tren Hinh 10.16 la ba o nhieu neu dien ap n g o v a o analog ba ng , V ? N h d lai rang cu1 mOi 0, 02 V b a n g d e m tang nhi pha n len birdc Chia 1 , V cho , V b a ng 50 (thap p n) C h u y e n doi so thap p h a n 50 s a n g so nhi pha n ba ng 0 1 0 B o chi thi 6 n g o se hien thi so nhi p h a n 0 1 0 ( L L H H L L H L )./.

(113)

CAU HOI VA BAI TAP

10.1* C o the x e m bo ma hoa c h u ye n doi tin hieu anal og sang digital la bo chuyen doi gi?

10.2* D A C g o m nhCrng phan chu yeu na o?

10.3* D o tang i'ch dien ap cua O P - A M P Hinh 10.3b du’Oc xac dinh bang cach chia tri so dien tro nao cho tri so dien trd nao dien trd: R ,n va R f? Ti'nh tang ich dien ap cua O P - A M P neu co R in = k£> va R f = 20 k£>.

10.4* T h e o Hinh 10.3b, vOi dien ap ngo va o la 0,2 V, hoi dien ap ngo V0

bang bao nhieu?

10.5* Ti'nh tang i'ch cua O P - A M P tren Hinh 10.5, chi co c h u y e n mach C (vi tri nhi phan 4s ) du’Oc dat tai mu’c logic 1?

10.6* Vdi dCr lieu tren hinh 10.5 va ket qua cua bai tap 10.5, ti'nh dien ap ngo ra V cua D A C ?

10.7* C o ma c h tren hinh 10.6 va ba ng 10.2, chi co mot c a c c h u ye n mach A, B, C va D d vi tri logic thi tang i'ch cua O P - A M P la nh d nhat?

10.8 T r e n hinh 10.8, dien X co mu’c logic ba ng bao nhieu de bo d e m thu’c hien de m tien mot birdc d e m x ung nhip xuat hien?

10.9* A D C thong dich:

a) T i n hieu d ngo v ao dirdi d a n g nao ? b) T h a n h tin hieu d ngo dirdi d a n g nao?

10.10* T h e o ba ng 10.3, neu dien ap analog d ng o v a o la V , thi ng o nhi phan cd tri so la ba o nhieu?

10.11* T h e o hinh 10.8, dien ap tai diem B nh d hdn dien ap tai di em A , thi luc ngo cua bo so s anh tai di em X cd mu’c logic b a n g ba o nhieu? Vdi mu’c logic na y xung nhip bi co’ ng A N D ng an can h ay c ho q u a ?

10.12* S d khoi bo so s anh tren hinh 10.8 so s a n h hai dien ap, hai so nhi phan hay hai so thap pha n ?

10.13* C d m a c h nhu” tren hinh 10.10, dien ap tai c o n g B tang da n va den luc nao trd nen Idn hdn dien ap tai di em A Hoi ng o cua O P - A M P c h u y e n tir

mu’c logic nao s a n g mu’c logic nao?

10.14* T r e n hinh 10.13, neu dien ap ngo v a o ( V in) la V va dien ap rang ci/a la V Hoi ngo cua bo so ap d mCrc logic n a o ? va luc do, c o n g A N D nga n can hay cho x ung nhip c h u y e n q u a ?

10.15* C d hai bo A D C 8 bit va bit, hoi bo A D C nao c h o p h a n giai Idn hon?

(114)

CLK IC A B C D

Vcc

3 C I

r)

GND

+ Vcc

4LS4 ; A3 g A2 f Al e AO d c b a test RBI RBO

-a b c d e f q

i m i 11 LED THANH

7 1 2 _ 6

- c i

IC 7446

13

LE Da

12 11 10 9 1 " 14

tJC l: T f T T

■eg

E]Dc LflDeT7E Dg

LED THANH

a)

T

CLK

Hien t h i b£ng LED th a n h a n fit chung

1 I I I I

)(loai 150 Om)| -L l

IC 4 Bo giai ma LED

A B C D

Bo dem th a p ph3n

b)

Hinh 11.1a: I C 4 dieu khien L E D catot c h u n g b) I C 4 dieu khien L E D anot c h u n g

Hinh 11.1a) la m a c h hien thi d u n g L E D co catot c h u n g , m a c h thirdng dirpc hien thi c a c so thap phan don B o giai m a B C D - t nh d u n g IC 7 4 tirong hpp vdi L E D catot c h u n g thirdng de dieu khien bo chi thi I C la bo d e m thap phan cd bon ng o flip flop la bon n gd v a o IC 4 C a c n g d cua IC 7 4 cd mu’c H tich circ, nd dieu khien bo kh u ec h dai d e m vi c a c tirong hpp ddng n g d qua nho khong du de dieu khien trifc tiep c a c L E D B a y tranzito np n hoat d o n g nhir c h u y e n m a c h de ket noi + V c c vdi tha nh L E D Khi n g d c ua 4 0 mu’c H, tranzito dan, m a c h c u n g c a p n g u o n c ho L E D M a c h tirong difcJng de L E D phat sang du’Oc gidi thieu tren Hinh 11.2 Khi n gd c ua 4 0 mu’c L, tranzito ngirng dan, luc khong cd tha nh L E D nao phat sang.

+ V cc

+ v

Hinh 11.2: Mach tirong duting LED du’Oc phat sang

(115)

M a c h Hinh 11.1b IC 7447 la m ac h anot c hu ng Bo chi thi vdi L E D thanh thudng dtipc sir du ng de hien thi so thap pha n don Bo giai m a B C D - L E D thudng d u ng IC 7447 de dieu khien bo hien thi Bon ngd v a o cua IC

74 7 la ngd cua bo d e m thap phan 7490 C a n nhd rang IC 47 c ho c a c ngd ra L ti'ch ctic.

Neu ngd cua IC 447 6 m Uc L, L E D se phat sang Gia du, dien ap dat tren mot L E D la V, d d ng c h ay qua L E D la: (5 - 2)/150 = 20 m A Ddng to’ng de hien thi so 8 la 20 m A x = 140 mA IC 44 can tieu thu d d n g la 64 mA, n h u v a y de hien thi mot s d thap pha n don can d d n g toi da v ao khoang 200 mA Mot ma c h hien thi so thap pha n can m a c h n h u trinh b a y tren Hinh 11.1, cd nghTa la can so d d ng to’ng c on g la x 0 m A = 80 m A ; neu hien thi 6 so thap phan thi can d d n g la 1200 mA R o rang rang d d n g tieu thu n h u v a y la qua Idn doi vdi c ac thiet bi nho T u y nhien, ta cd the giam dd ng tieu thu hien thi bang cach sir du n g ky thuat da hpp.

V e co ban, ky thuat da hpp du pe thuc hien ba ng c ach dat d d ng v ao mdi so hien thi cua c a c x ung lap ngan N e u toe lap lai cua x ung du Idn thi mat ngtidi nhin thay anh s ang o’ n dinh ma khong nhan L E D phat s ang nhap n h a y (vi du, kho ma nhan anh s a n g nhap n h a y cua bo hien thi nd phat sang vdi toe 50 Hz) C o n so thap p h a n don tren Hinh 11.3a d up e dien ap +5 V dat v ao thong qua mot tranzito pnp d u p e d u ng n h u mot c h u y e n m a c h Khi ngd v ao ctic B a - d o cua tranzito d m U c H, tranzito ngting dan, bo hien thi cd d d n g ba ng Khi n g d v ao chan B a - d o cua tranzito m d m Uc L, tranzito da n, va so dtipc hien thi N e u dang xung tren Hinh 11.3b dtipc dat v a o chan B a - d o c ua tranzito, tranzito se d i n va L E D se hien thi mot so thdi gian s mdi ms C h o du so khong dtipc hien thi thdi gian ms, thi so v i n dtipc Itiu m l t ta n h u cd ddng lien tuc c h a y qua L E D Vi L E D dtipc phat s an g x ung tac d o n g c U mdi 4 ms, toe lap lai la:

v lap = 1/0,004 = H z

(116)

T h i r d n g ngirdi ta tiet kiem linh kien v a n a ng lupng c ua n g u o n c u n g c a p ne u 4 ngo v a o A , B C va D den bo giai m a L E D nhu1 tren H i n h 11 du’Oc p h a n kenh c u n g vdi dieu khien c a c c c n so B o hien thi so nhir H i n h 1 sir d u ng IC 54/74153 moi IC cd mot cap bo pha n kenh 4-1 d u n g cho n g o cua moi I C 7 m a c noi tiep den moi bo giai ma don T a x e m m a c h hoat do ng s a o ?

+ V c c

O

1 ms

• m s '

- ms

b)

Hinh 11.5: L E D hien thi cd x u n g v a o c h an B a - d d c ua tranzito dieu khien

S o lieu ng o va o B C D du’Oc lull trir chot loai D c ua I C 7 , c du’Oc ky hieu 1, ,3 , C h o t liru trCr M S D v a chot liru trir L S D S o nhi p n bit cua M S D du’Oc ky hieu lA lB lc lD Vi du, neu M S D = , luc d o lA lB lc lD = 01 11

M6i I C co hai bo phan kenh B o n bo pha n kenh du’Oc ky hieu: A , B, C, D C a c d a y c h on A va B cua bo pha n kenh du’Oc ket noi s o n g s o n g va d o bo d e m da hop dieu khien ( d u n g n h u tren Hi nh 1 ) Khi c a c ng o v a o d a y c h o n bang A B = 00, d a y so cua mdi bo phan kenh se dtipc ket noi vdi n g o c u a bo phan kenh N h u vay, c a c ng o cua bo p n kenh ket noi de n I C giai m a 4 se la cac d a y 1A 1B C 1D, d a y la so nhi ph a n cua M S D S o nhi p h a n d u p e IC 4 giai ma va dat v a o tat ca c a c L E D hien thi ket noi s o n g song T u y c u n g thdi gian nh u n g so thU nhat d upe c h c n b a n g bo giai m a 5, nen M S D se d u p e hien thi tren L E D d ngoai c un g ben trai, tat ca c a c L E D k c de u k h o n g phat sang.

D e n b o d e m da hpp d e m tien de n A B = 01, d a y so c u a moi bo phan kenh dupe c h on va s o nhi phan dupe ap dat de n 4 se la A B C D , d a y la M S D thU hai ( so n g tram) N g o dupe giai m a cua 7 4 lai dupe ap dat den tat ca c a c L E D hien thi dupe ket noi s o n g s on g, n h u n g c o n so thU c o d a y d mUc L, nen c c n so "hang tram" b a y gid dupe phat s a n g ( c c n tat ca c a c s o k h a c khong phat s a n g tai thdi di em nay).

T u d n g tu, c c n so n g c h u c se d u p e hien thi c a c n g o v a o S e l e c t b a n g A B = 01, va so h a n g dd n vi d u p e hien thi c a c n g o v a o Se l ec t b a n g A B = 1 1 C h u y rang chi mot c on so d upe hien thi tai moi hdi di em va toe lap V lap = H z , nen k ho ng xuat hien n hap n h a y c on so d u p e hien thi B o n so d u p e ph a t s a n g n h u n g d d n g n g u o n c u n g cap de u n h u nh au c ho moi so d on d u p e phat s a n g

(117)

lien tuc D o n g thdi, 6 mu’c nao m a c h da tiet kiem du’Oc chip T i e t kiem linh kien lam tang so thap phan du’Oc hien thi.

cic n qo v ac C D t j

bo dem thap phjn

Hinh 11.6: L E D hien thi co x ung St robe dieu khien c a c chot de d u y tri hien thi

U llf Oocv

.EO

a rc T

chong

y Cor e>o f

v, Oipn o o 3

J - r ~ i

I j ■ " i

n _r i r ~ " l

5 i i i j

i p : m -

(118)

K y thuat thirdng dirpc sir d u n g hien thi da hpp so thap p h a n nhu" tren Hinh 11.8 rat de m d rong cho hien thi nhieu hon c on so thap pha n D i e u can thiet la tang kich co cua bo d e m da hpp va thay the IC b i n g I C co so ngo v a o nhieu hon.

Cac ngo vao &CD

Bo dsrr, da h e r

Hinh 11.8

T a t ca c a c m a c h trinh b a y 6 d a y dirpc du n g , nhirng c h u n g ta y thu’c dirpc rang tren thi trudng da co c a c chip LSI thuc hien da h p p rat tien Ipi tren c u n g mot chip, la M M C , 926, v a 928 IC M M C trinh b a y tren Hinh 11.9 la bo d e m so cd c a c bo dieu khien da hdp c a c n g o C a c linh kien ngoai can co chi la c a c L E D t hanh c ua bo hien thi va c a c dien trd n ddng T h u c te, bo d e m so c u n g n a m tren mot chip Mot x u n g d u o n g d ng o vao R e s e t p h u c hoi bo d e m bit va sau bo d e m se d e m tien mot c o s ud n am x u n g nhip xuat hien X u n g a m tren Latch E n a b l e luc d o se chot c a c noi d u n g cua bo d e m c a c chot bit B o n so da dupe luu tru s au d c dupe p h a n kenh, giai ma, va hien thi tren bo chi thi b a n g L E D la linh kien be n ngoai S d d o dupe

gidi thieu tren Hinh 11.9b vdi bo hien thi catot chu ng

(119)

+Vcc

Hinh 11.9: B o d e m so co c a c bo dieu khien da hop c a c n g o thanh

11.2 BO DEM TAN

(120)

G ia du rang tin hieu n g o v a o can x ac dinh tan so tren Hinh 11.10 la mot x ung v u o n g co tan so 7, 50 k Hz Bo chi thi se hien thi bao nhieu neu thdi gian kich hoat co’ng la t = 0,1 s? La bao nhieu neu thdi gian kich hoat c on g la t = s v a t = 10 s?

Ldi giai:

Khi t = 0,1 s, bo d e m se d e m tien len de n 0 ( c a c c h u y e n mu’c logic / s) x 0 , s = 750.

Khi t = s, bo d e m se d e m 0 ( c a c c h u y e n mu’c logic / s ) x s = 7500. Khi t = 10 s, bo d e m se hien thi 0 ( ( c a c c h u y e n mu’c logic / s) x 10 s = 75 0 Doi vdi tri/dng hdp cuoi c u n g can cd bo d e m chi thi so thap phan.

Vi du:

Xung c a n x a c dinh JUUliL

a) S o khoi Bo d e m tan

- i P

0 - 1

J

O >

}

D au ph a y th a p phan <»!

0 7 5 0

D a u c 'r a y

7 S 0

t 0 i*1

" _

■ r - 10 i

_ r D au p h a y th a p chan

Ic)

b) Dich c h u y e n da u p h a y thap pha n Hinh 11.10

N hi r Hinh 11.4, ket q ua d e m du’Oc cua bo d e m luon luon la so ti le v6i tan so can xac dinh, ti le d o la 10, h o a c 1/10 Vi v ay , d e v a n d e du’Oc don gian ta can dira dau p h a y thap p n v a o giCra c a c c on so hien thi s ao c h o bo d e m chi thi tri/c tiep tan so can x ac dinh.

Hinh 11.10b chi dau p h a y thap ph a n can di c h u y e n bo hien thi so thap phan vi rong c ua bo hien thi can phai di/dc tha y doi P h a n hien thi 6

- ► B o d e m

(121)

phia tren cua Hinh 11.10b, tin hieu can d u o c xac dinh tan so co noi du ng hien th nhan vdi 10, vi v a y dau phay thap phan c h u y e n sang phai mot vi tri P h an hien th

6 giCra c ho true tiep gia tri tan so cua tin hieu can xac dinh P h an hien thi du*6i c un g cua Hinh 11.10b, noi dung hien thi phai chia cho 10 d e d u o c tan so cua tin hieu can xac dinh, vi v a y dau phay thap phan da dich sang trai mot vi tri.

S o logic tren Hinh 11.11 gidi thieu mot c ach x ay d u ng bo d e m tan so vdi con so thap phan Khoi khuech dai tao dieu kien cho tin hieu ngo va o can xac dinh tan so cho ngo vao la tin hieu tuong hop vdi T T L - loat x ung d u o n g tU m Uc V den +5 V D C Khi di qua cong d e m , ngo va o se hoat d on g n h u la x ung nhip doi vdi bo dem Bo d e m co the d u o c x ay d u n g tU bo d e m thap pha n so sir du ng cac IC 54/74160 va bo d e m d u o c ket noi vdi bo hien thi L E D da hop n h u da trinh bay tren Hinh 11.8 H o a c bo d e m v a bo hien thi co the d o c ket hop c ung mot chip, vi du n h u IC M M C d u o c trinh b a y tren Hinh 11.9.

Bo chia g o m 6 bo d e m thap phan (vi du n h u c a c IC 54/74160) ket noi noi tiep N g o va o cua bo chia la x ung v u o n g tan so 100 k H z de n tU bo da o d on g tao xung nhip, x ung v u o n g d u o c chia H z , H z va 0,1 H z c a c x ung d u o c dung de tao tin hieu cua cong Enabl e.

Khi xung v uo n g H z d u o c sir d u n g de dieu khien flip flop c o n g , ngo cua flip flop Q co x ung v u o n g la 0,5 H z N g o Q co m U c H thdi khoang chinh xac s va m Uc L c un g thdi k h o an g s, va n h u v a y tin hieu d u o c sir dung lam tin hieu c on g Enabl e C h u y rang, tan so 10 H z se tao c on g 0,1 s va tan so 0,1 H z tao c on g 10 s T a hay d u n g c a c d a n g x ung tren Hinh 11.11 de x em xet cac chUc nang cua mach.

Mot chu ky d u o c bat dau flip flop cong d u o c c h u y e n trang thai doi lap H, du oc ky hieu khdi dau tren true thdi gian L u c nay, ng o v a o ( I N P U T ) qua c on g de m di den bo d e m (gia du rang bo d e m bat da u d e m tU 0 0 ) V a o cuoi thdi gian t cua co’ ng E n ab le, flip flop c o n g c h u y e n trang thai bu tU H x u o n g L, bo d e m ngUng d e m tien v a Q c h u y e n m U c logic a m lam tac d o n g d e n IC 74 12 T u o n g tu, Q chu ye n m Uc H x ung n a y da c h u y e n ket qua d e m d u o c v a o chot hien thi C o thdi gian tre truyen dan c u c tieu la 30 ns c h u y e n q ua IC 74121 va sau x ung a m Reset xuat hien 6 ngo X D o tre n a y d a m bao rang ket q ua d e m c ua bo d e m tac dong va o bo chi thi trudc bo d e m d u o c p h u c hoi X u n g p h u c hoi R e s e t tU IC 74121 cd rong 1 ps du de x ac lap n hd c a c linh kien R ca C cua bo dinh thdi Pha n cuoi cua x ung Res et la phan cuoi c ua chu ky d o ludng d u o c ky hieu la ket thuc tren true thdi gian.

Doi vdi co’ ng 1,0-s dau p h a y thap pha n n a m 6 n g a y ben phai so hang don vi, bo d e m cd the d e m len de n 9999, vdi chinh x a c la ±1 b u d c d e m ( cd nghia la chi'nh xac dat phan 104) Vdi c on g 10-s, da u p h a y thap pha n n a m giua so h an g c h u c va hang don vi, va vdi c on g 0,1-s da u p h a y thap phan na m

(122)

tio d e m m i n i

10 : »0 J i o SO

L l ,I I I T i c r

1 1 n 1 1 n

l _ f / _ / u / _ /

f f ir # VT/StT: n a n g ?j~uc d o r vi

r Cb'ri^ ie n

ir Ci?ri<3 F N / P - : ;• '

J ~ L

: r

N^£3 -i30 <tac ãô &o

m>m

" O

74 76 < v

6 K

-f C T n r ■ P P 3 o ch ia ta n

100 k U i

3 o ta o

J U U L

- f(? s 10 ? r» TO f • - in

xu na nhip

1 M>

1

M.-0 i t 1.- C h u y e n

'n a c h c o n g Khoi tao

c , C o n g E N A L E

n s t n o n e L

K e t t h u c Kh oi t a o K e t t h u c

= L L Z ^ u I

— J < i — J i

m t m i A j v m w w w L j _

t i — “ t i r

-r t f —

L

I

Hinh 11.11: B o d e m tan so co so thap pha n

B o tao x ung nhip du’Oc xac lap tai tan so 100 k H z va tan so n a y c h o d o chinh x a c tren thdi gian c on g E n a b l e b a n g phan 104 Ung v6i c o n g , -s N h u v ay , chinh xac na y co kha n a ng tuong hop v6i bo d e m

11.3 DO THOI GIAN (DO DO RONG XUNG)

V6i s u thay doi nho, bo d e m tan tren Hinh 11.10 co the c h u y e n doi d u n g cu do thdi gian S o logic tren Hinh 11.12 mi nh hoa y t uo ng co ban t hu dn g d u o c sir d u n g de cau tao nen d u n g cu chu ky c ua mot d a n g x u n g co chu ky nao D i e n ap can x ac dinh chu ky d u o c c h u y e n q ua bo k h u e c h dai de tao d a n g x ung co chu ky tuong hop vdi c a c m a c h T T L , sau d u p e d u a d e n flip flop J K N g o cua flip flop d u o c d u ng lam tin hieu c o n g E n a b l e , vi no o m U c

(123)

cao ting vdi rong xung t bang vdi chu ky cua dien ap ngo va o can xac dinh rong xung B o dao dong va bo chia tan c u n g cap chuoi xung du’Oc dira qua cong dem va du’Oc d u ng lam xung nhip cho bo d e m C a c ket qua d e m cua bo d e m va con so hien thi cua bo chi thi ti le vdi rong x ung cua tin hieu ng o v a o can xac dinh rong x ung t.

— ►I t \4

Hinh 11.12: S o logic d u ng cu do rong x ung t

Vi du, neu tin hieu ngo vao can x ac dinh rong x ung cd d a n g s ong hinh sin, tan so la k H z va x ung nhip tti bo chia tan cd rong la 1,0 ps va dan c ach cua mdi xung la 1,0 ps B o d e m va bo chi thi se d o c la 200 R o rang dieu n a y cd nghTa la 200 ps vi 200 cua 0,1 c ac x ung na y se q ua co’ ng d e m thdi gian 200 ps luc ma tin hieu c ong E n ab l e d mu’c H Bo d e m va bo chi thi cd chi'nh x ac la cong hoac trir mot b u dc de m.

11.4 DONG HO DIGITAL

(124)

50 Hz chu ky/s chu ky/phut chu ky/gia

Pern giay Dem phut Pern gia

Hinh 11.13: S o khoi d o n g ho digital

O e co tan so Hz/s c an phai chia tan so 50 H z cho 50 T a lai chia Hz/s cho 60 c ho ket qua da ng x ung co tan so la 1- mi n' C h i a d a n g x u n g n a y c ho 60 cho d a n g x ung mdi cd tan so la 1- h' D a y la y tirong c o ba n de x a y dirng m a c h dong ho digital.

S o khoi chi ro c ac chCrc n a n g thu’c hien cua d o n g ho tren Hinh 11.13 Bo d e m thir nhat chia 50 vdi m u c dich d on gian la chia tan s o c u a dien li/di 50 H z de du’Oc d a n g x ung v u o n g vdi tan so Hz/s B d d e m thir hai chia 60 n h a m tao sir thay doi mot trang thai mdi mot giay va cd 60 trang thai rdi rac, do cd the giai ma de c ho tin hieu chi thi giay va bo d e m thirc hien dem giay.

Hang chuc Hang dan vj

Hinh 11.14: B o d e m x M o d - cd giai m a h a n g d o n vi v a h a n g c h u c

B o d e m thir ba chia 60 de thay doi mot trang thai mdi phut va cd 60 trang thai rdi rac cd the giai m a de c u n g c ap tin hieu hien thi phut B o d e m luc na y thirc hien dem phut.

(125)

B o d e m cuoi c ung cu" 60 phut ( mot gio) lai c un g cap mot trang t i^ n ht i vay, neu chia 12 se co 12 trang thai va co the giai ma de c un g c ap tin hieu hien thi gid Luc nay, bo d e m thu’c hien dem gid.

Q A

E J

E CLR K

>

+Vcc RESET

<3-7

CLK : 10 Q A Q & QC QD

J

H

-I

- i 4

J U L chu kry/h

1 1

1 - 1 LED l

LED

Hang chuc H ang dan vi Hinh 11.15: B o d e m gid M o d - 2

N h u da biet, cd nhieu c ach de thuc hien bo d e m N h u n g d day, ta yeu cau thiet ke bo de m cho tdi uu hoa phan cUng.

f Giai ma hang chuc

Giai ma hang dem vi

I

Giai ma Giai ma hang chuc hang dem vi

r

Giai ma hang chuc

Giai ma hang dem vi

i i

Hang chuc Hang dem vi Hang chuc Hang dcrr\ vi Hang chuc Hang don vi

Hinh 11.16: D o n g ho Digital

(126)

11.5 BO DjNH THOI LCD CO CANH BAO

H a u het c a c lo vi s o ng va lo dien deu co bo dinh thdi co c an g bao Tri/6c kia, ngirdi ta d u n g bo dinh thdi co, n g a y n a y ngirdi ta sir d u n g c ac lo vi s o n g hien dai co c an h bao dien tir Khai m e m v e bo dinh thdi du’Oc trinh b a y tren Hinh 11.17a) T r o n g he thong nay, ban phi'm la ng o v a o bo hien thi va loa bao hieu la c a c bo kien ngd X i r ly va liru trCr c a c so lieu du’Oc c a c m a c h digital thirc hien khoi m a c h digital 6 Hinh 11.17a.

P h a n chi tiet m a c h digital du’Oc trinh b a y Hinh 11.17b) P h a n ma c h digital du’Oc chia m a c h bo phan: la khoi tao quet, khoi d e m lui tir ngat, khoi dieu khien/giai ma/chot va khoi so s an h tri so Khoi tao quet la bo d a o dong, trong trirdng hpp na y bo d a o d o n g c u n g c ap x u n g v u o n g co tan so Hz D o chinh xc a c cua bo dinh thdi co c a nh bao phu thu oc v a o d o chinh x ac c u a khoi dat thdi gian Hoat d o n g cua bo dieu khien khdi d o n g n g o v a o lam c ho bo d e m lui thirc hien d e m lui tirng birdc d e m Moi so nho hon d u p e chot va du’Oc giai ma Khoi c u n g dieu khien c a c bo hien thi Hinh 11.18 m o ta chi tiet m a c h dien tir co dinh thdi, hien thi ba ng hai so M a c h sir d u n g L C D v a I C C M O S c o n g suat thap.

a)

Canhbao b)

Hinh 11.17: a) Khai quat v e bo dinh thdi co c a nh bao b) S o d o khoi cua bo dinh thdi c o c a n h bao

Hinh 11.18 gidi thieu bo dinh thdi c d c a n h b a o d u n g L C D (hien thi d u n g tinh the long) B o dinh thdi hoat d o n g nhir sau:

(127)

- X a c lap tai/dieu khien khdi tao den (kieu tai)

- N a p tai c ho bo de m hang don vi nh d xac lap so B C D su1 d u n g c h u y e n mach phia tren.

- N a p tai cho bo d e m hang c h u c nh d xac lap so B C D su" du ng c h u y e n mach phia durcJi

- S o co hai so du’Oc hien thi tren L C D

- Dich c h u y e n tai/dieu khien khdi tao den (khoi tao kieu d e m lui)

Bo dinh thdi se bat dau d e m lui tirng giay mot L C D hien thi thdi gian lai trirdc coi canh bao keu Khi ca hai bo d e m de u dat de n so 0, L C D d oc 00 va coi canh bao phat tieng keu Birdc cuoi c un g la ngat m a c h ng uo n de m a c h ngat tin hieu am cua coi canh bao.

S o noi d a y cua ma c h bo dinh thdi co ca nh bao du’Oc trinh b a y chi tiet tren Hinh 11.19 C h u y rang mdi IC du’Oc dat a vi tri tirong doi tren so noi day Ho at dong chi tiet cua bo dinh thdi co canh bao nhir sau:

(555) # 100 Hz

Hinh 11.18: S o khoi cua bo dinh thdi L C D co c a n h bao

- Bo tao quet:

B o tao quet g o m bo tao x ung va bo chia tan B o tao x u n g sir d u n g IC dinh thdi 555 de tao x u n g co tan so 256 B o tao x ung n a y kh o ng that chinh x ac va on dinh, co the dieu chinh tri so cua R 1t thirdng R, du’Oc lay k h o a n g 20 kQ.

(128)

dtipc ket noi vdi Hinh 11.19 trinh b a y haj_khoi 4 bit dtipc ket noi d e lam thanh c a c bo d e m chia 16 C h u y la cac ngo v a o C P la c a c ngo v a o d o n g ho v a chi co ngo Q D du ’Oc sir du ng B o d e m chia 16 dau chia tan so 25 de c o H z Bo d e m thir hai chia tan so de dat dirpc 6 ng o tan so ye u cau la H z

- Bo dem lui tir ngirng dem

Hai bo d e m thap pha n sir d u ng IC H C Khi ng o v a o tai d e n IC 7 H C , c a c bo d e m hoat ng , c a c so lieu d n g o v a o ( A, B, C v a D ) n g a y lap tCrc dirpc c h u y e n v a o c a c flip flop cua bo d e m S a u do, ng o c u a bo d e m tai cac ch a n Q a, Q b, Q c va Q D co c a c so lieu dirdi d a n g B C D Khi tai/dieu khien khoi tao 6

mu’c H, tin hieu H z kich hoat ngo va o bo d e m lui cua bo d e m h a n g d on vi Bo d e m lui d e m g ia m di tai moi birdc d e m x u n g nhip c h u y e n m u ’c tir L len H N g o ra NHCf R A cua bo d e m lui h an g don vi c h u y e n tCr m u ’c L len H moi bo d e m lui hang don vi d e m tir den C a c bo d e m lui thirc chat du’Oc ket noi d e trd bo d e m lui tir ngirng vi d a y ngirng d e m du’Oc ket noi vdi n g o v a o c h a n C l e a r c ua ca hai bo d e m d u n g I C H C Khi d a y na y 6 mu’c H, ca hai bo d e m ngirng d e m va trd ve tri so 0 0 0.

- Bo so sanh trj so bit

C a c bo so s an h bit sir d u n g IC H C d e tao nen bo so s a n h tri so 8 bit du’Oc gidi thieu tren Hinh 11.19 M u c dich c ua m a c h na y la phat hien na o cac ngo cua c a c bo d e m dat tdi tri so 0 0 0 0 BCD Khi ca hai bo d e m dat tri so thi ngo cua bo so s an h tri so 8 bit ( A = B OUT) len mu’c H D i e u n a y n h a m mu c dich, thir nhat la tin hieu n a y lam ngirng hoat d o n g c ua ca hai bo d e m tai so 0 0 0; thu1 hai la mtic H tai n g o cua bo so s anh lam tranzito Q , d i n , d o n g q u a tranzito de n ca nh ba o lam coi phat a m Di ot triet d o n g ngi rpc cd the coi ca nh bao g a y ra.

- Bo dieu khien I bo giai ma

Hai IC H C d u n g bo dinh thdi c d m u c dich C a c chCrc n a n g cua IC H C dirpc trinh b a y tren Hinh 11.20 N g o v a o kich hoat chot ( L E ) dirpc g i n chat va o mu’c H m a c h dinh thdi lam c h o chot kh o ng hoat d o n g S o lieu B C D c h a y qua chot de n bo giai ma B C D - B o giai m a t ho ng dich n g d vao B C D m a C u o i c u n g, m a c h c u a bo dieu khien d chip H C c u n g cap na ng Itiong c ho c a c c ua L E D

D o n g ho hien thi d phia dirdi ben phai Hinh 11.9 tao x u n g v u o n g 100 Hz X u n g na y dirpc giri tdi pha n ket noi c h u n g tren L C D v a n g d v a o c h a n P h c ua IC 7 H C B o dieu khien L C D d IC H C dtia tin hieu d a o pha 180° d e n ca c thanh L C D de c a c n a y hoat d on g C a c t nh khong hoat d o n g n h a n dtipc mot tin hieu x u n g v u o n g c u n g pha tti ph a n bo dieu khien L C D cua I C H C

(129)

IC H C _ n

+5V I +Vcc

2 A QD

6 o dem

chia 16 CLEAR

GND

b ~

1 Hz

a) 5(7 noi day cua bo chia , dung bo dem chia 16

NGO VAO

b) Cau tr u e ben tro n g cua IC H C gom c h o t, bo giai ma va phan dieu khien

(130)

3

1

4

Tai/K.hoi ta o / P ie u khien Ta i bo d e m h a n g d m vi

r , A T a i =

C h u y e n m a c h O j -

-D e m lui = I s _ C h u y e n m a c h O

-C h u y e n m a c h O

C h u y e n m a c h O —

C h u y e n m a c h O —

NgQ v a o

Tai b3 d e m h iin g ch u c C h u y e n m a c h O ■ C h u y e n m a c h O C huyen m a c h u -C h u y e n m a c h — —

+Vcc QA CLR QB -|> P e m lui

QD

tAi

A Dem xuong f3 hang don vi c (74H C 192)

NHCf RA GNP^e

13

+ V

—■*- 11© 10

12

13 15

n h<5r a

D % ngang dem

14

5 V 116

10

15

Dem tie n +Vcc >Dem lui

CLR T^' y v

Dem xuong QA hiing chuc

OP A ((74H C 192)

QC &

C QD

D G ND

= & m Vcc AO

A l E3o so sanh A t r i s6 A b it

(7 H C ) bO

31 A>f3o A = f*o A<f3o b

P

A>f5 in A < [3 in T^Ti 13 15 +5V L AO +Vcc F3o so s in h A l

t r i scf A b it A

(7 H C ) A > (3 in A = f3 in A < f3 in

A = f t OUT PO

PI A? P GND

!L

D iiy ngung dem

+5V

J U U l

# 0 Hz

3ra

(131)

CAU HOI VA BAI TAP

Hz.

11.2* Mach Hinh 11.3 chi c ach hien thi L E D anot c h ung ap du ng ky thuat da hop H a y chi cach hien thi L E D catot c h ung cung ap d u n g ky thuat nay.

11.3 Gia du rang bo d e m va bo chi thi tren Hinh 11.12 co the d e m de n so thap phan va bo chia tan c ung c ap x ung v u o n g co tan so 100 k H z va du’Oc dung lam xung nhip D o c du’Oc tren bo chi thi la bao nhieu sau mot thdi gian t cua cong Enable, neu ngd va o cd tan so 200 H z d a n g xung v u o n g can xac dinh rong xung?

11.4* Giai thi'ch y nghTa chi'nh xac c on g h oa c trti mot btidc d e m ap d u ng doi vdi Bai tap 11.4.

(132)

TRA LOI CAC CAU HOI VA BAI TAP

CHlCONG 1: HE THONG SO VA MA

1.2 0*. sfi t hApp hAn

B0I c A c so NHj PHAN BAT PHAN THAP LUC PHAN

3579 1101 1111 1011 6 7 3 DFB

246810 1100 0100 0001 1010 742032 3C41A

86420 0101 0001 1001 0100 250624 15194

45678910 0001 0011 1110 56200476 2B9013E

97531 0111 1100 1111 1011 276373 17CFB

1 *

DOI RA CAC SO BAT PHAN THAP PHAN THAP LUC PHAN

SO NHI PHAN

1010 1100 254 172 AC

0001 0000 1010 412 266 10A

0111 10100110 3646 1958 7A6

0101 1111 0100 1110 57516 24398 5F4E

0010 10100011 1011 0100 1100 12435514 2767692 2A3B4C

CHL/ONG 2: CAC CONG LOGIC, BAI SO LOGIC, PHAN

TI'CH VA TONG HOP MACH LOGIC■ ■

2.24.

a) Mu’c L b) Mu’c H 2.26.

A B C Y

0 0

0 1

0 1

0 1

1 0

1

1 1

1 1

D a y la ba ng sti that cua c o n g O R n gd va o D o do, ket noi t nh tang hai c o n g O R n gd v a o tuong d u o n g vdi mot co’ ng O R n g d vao.

(133)

2.30*.

2.31*Gian tide cac bieu thu’c sau:

a) F = ( A + B ) + ( A + B ) = A + ( B + B ) = A + = 1 b) Vi A C D + B C D = C ( A D + B D )

Nen F ( A B C D ) = A B + C + C ( A D + B D )

Dtia vao tinh chat A + A B = A + B v a vi C = C ta co: F ( A B C D ) = A B + C.1 + C ( A D + B D )

= A B + C + A D + B D = C + A B + D ( A + B)

Ap dung dinh luat D e Mo rg an : A + B = A B, ta co: F ( A B C D ) = C + A B + D ( A B )

Lai ap du ng ti'nh chat A B + A = A + B ta co: F ( A B C D ) = C + A B + D

CHUONG 3: MACH XLf LY SO LIEU■ ■

3.10* Y = D9

3.12* Ket noi c ac ng o v a o so lieu theo h u d n g da n sau:

(134)

+ Ket noi dat v6i c a c ngo vao so lieu D, , D2 , D , D , D8 , D , D10 V a D 13. 3.14* Multiplexer Y : Noi dat cac ngo vao so lieu D , D , D13 - c o n tat ca c a c ngo v ao so lieu khac 6 mu’c cao.

Multiplexer Y , : Noi dat c ac ngo vao so lieu D0 i D, , D14 , D 1S - c o n tat ca c a c ng o v a o so lieu khac 6 mu’c cao.

Multiplexer Y 2: Noi dat cac ngo vao so lieu D3 , D8 , D13 - c o n tat ca c a c ng o v a o so lieu khac d mu’c cao.

Multiplexer Y3 Noi dat c a c ngo vao so lieu D6 , D , D14 - c o n tat ca c a c ngo v a o so lieu k hac d mu’c cao.

3.15* a) khong b) Y5

3.17* T r u d n g hop c

3.19* a) C h i p ben phai b) Y6

3.21*.

a) 67 b) c) 259 3.23* Y7

3.25* T r u d n g hp p c 3.27* S a p si m A

3.29* a) C h a n b) A B C D = 0111 3.30* a) b) c) d) 1

3.32* C h a n noi dat ( sau kh o ng ket noi vdi + V ) v a ket noi c h a n vdi + V (sau kho ng ket noi vdi dat)

CHlTONG 4: MACH SO HOC■ ■

4.8*

T r u d c het ta c h u y e n doi n h u sau:

20 - ► C8H 1 00 00 125 - > 7 D H - ► 0111 1101 L ap phep trU n h u sau:

1100 1000

- 1 1101

?

T h u c hien trU theo cot, ta co ket qua:

1100 1000 -0 1 1101 0100 1011

(135)

T h e o he thap luc phan, ta co: C8H

- D H 4 B H 4,9.

T h u c hien phep ti'nh so hoc v6i chi'nh x a c kep, dong nghTa vdi viec thuc hien phep ti'nh so hoc 16 bit P h ep ti'nh so ho c sir d u ng c ac so 16 bit dti6i d a ng sau:

X15X14X13X12 X^X^XgXg x7x6x5x4 x3x2x1x0

C a c so giong n hu byte tren x15 x8 va byte dudi x7 x0 O e thuc hien phe p ti'nh so hoc 16 bit, m a y vi ti'nh phai hoat d o n g tach rdi tUng byte mot M a y vi tinh cong byte dudi sau cong byte cao Dudi d a y la trinh tu lam viec cua m a y vi tinh:

18357 * B H * 0 0 0111 1011 0101 12618 * A H * 0011 0001 0 1010 Bu cua 12618 bang:

- C E B6H 1100 1110 1 1 0

Phep cong dtipc thtic hien theo hai btidc cua p he p ti'nh so hoc 8 bit D a u tien, cac byte dtidi dtipc cong:

1011 0101

+ 1011 01

1 1 1011 x8 x7x6x5x4 x3x2x,x0

Ma y vi ti'nh se Itiu trti byte dtidi x7x6x5x4 x3x2x1x S O N H O x8 dtipc sir d u ng de cong vao byte tren B a y gid, m a y vi ti'nh c o n g c a c byte tren va c ong ca S O N H O nhu sau:

1 < — x8

0100 0111 + 1100 1110

1 0001 0110 — ► 0001 0110

C a c Idi giai 8 bit dtipc ket hpp lai de co ket q u a cuoi cung:

0001 0110 0110 1011

C h u y rang M S B la bit 0, dieu cd nghTa la Idi giai cd gia tri d u on g Ket qua bang so thap phan la:

(136)

4.17*.

- H e tha p luc phan: C B H ;

- H e nhi phan: 0000 010 1100 1011

CHLfONG 5: IC TTL VA CMOS

5.3* L o w - p o w e r Schottky 5.5* 100

5.7* 20 5.9* 31 Q

5.11* Doi v6i bo ghi c huyen B, Disable can 6 mu’c L, c on tat ca c a c bo ghi c h u y e n k hac Disable can d mu’c H.

5.13* 6, 03 m A 5.14* 14,4 m A

CHUONG 6: FLIP FLOP

6.7*.

5 = 0.

<3=1

Q = 1

5 = 1

K = 1 K = 1

K = 0 (3 = 1

6.8*

a) C; b) G

6.9* D a u tien, flip flop dtidc p h u c hoi, ( Q = 0) T a i thdi di em t, C L K len mu’c

1, flip flop luc n a y dtidc ki'ch hoat va lap t u t dtidc xac lap ( Q = 1) vi R = o v a S = 1 T a i thdi di em t2 C L K x uo ng mu’c va flip flop k ho n g hoat d o n g va chot a trang thai on dinh, Q = 1.

(137)

Gii/a t2va t3ca hai R va S thay doi trang thai, nhu ng vi C L K d mtic 0, flip flop v i n khong du’Oc kich hoat (khong hoat d o n g ) va Q v i n du y tri mu’c 1.

Giua t3 va te, se dap ifng doi vdi bat ky s u thay doi nao cua R va S vi C L K d mu'c N h u vay, tai t3 Q xuong mu’c va tai t4 Q lai len mUc T a i tg gia tri Q =

dupe chot va khong co sti thay doi nao x ay doi vdi Q giua t6 va t7 m a c du ca hai R va S thay doi.

Giua t7 va t8 khong co sti thay doi nao x a y doi vdi Q vi ca hai R va S deu a

mu’c 0.

X em Hinh 6.26

6.10*.

Vi J = K = , flip flop c h u ye n trang thai doi lap moi cd xung nhip c huye n tdi Dang xung tai Q cd chu ky Idn g a p hai Ian chu ky x ung nhip Noi cach khac, tan so cua dang xung xuat hien d ng o Q b a n g 1/2 tan so x ung nhip C L K M a c h hoat dong n hu la bo chia tan so: tan so n gd Q ba ng tan so ngd va o xung nhip C LK chia cho 2.

+Vcc

-k a

-Hinh 6.28 a va b

6.13* D o rong xung du oc x ac dinh n h u sau: t = 1.1 ( R a C ) = 1,1 ( 04 x 10-7) = 1,1 ms

6.14* T U cong thUc ti'nh rong x u n g ta cd the tinh gia tri cua dien d u ng C nhu sau:

t 10'2

C = - = -1,1 R a 1,1 x

= 0, 909 p F

6.15* f = 48 kHz, t, = 13 ps, t2 = 7,8 ps

CHl/ONG 7: BO GHI CHUYEN

7.7*. a) 8p S b) 6 ps

(138)

7.9* a) R = 1, S = 0, Q = 0

c) R = , S = , Q = 1 7.10*.

a) M S B thu1 nhat Shift/Load 6 mu’c L, A B C D E F G H = 011 1 10 b) M S B thir nhat, Shift/Load d mu’c H

7.20* D = J Q + K Q M a c h logic n h u sau:

t MSB thd n h a t, Shift/Load tymt/c L, A B C P E F G H = 1011 WO Xung nhip

chan

Xung nhip

QA QB QC QD Q E Q F Q O QH

!

i O

7

1 1 1

: o

► iSo di/oc !Uu trif b) MSB thi/ nhat, Shift/Load a mtic H,

Xung nhip

J

Hinh BT 7.10

(139)

7.11*.

7.13*.

M O P E — I CLOCK (L= t)

-P -P A T A IN -PUT -

i i

Q P QC

Q 3 QA

I i -I -1

-t J - hi

Hinh Bai tap 7.11

P e’chuyen d o i cac h it va O m ach phan hoi duoc th a y th e hJmg mach sau:

Mach "dong nguon-xoa"

Vcc +V

10k

dS^CLEAZ

luF

r

Hinh Bai tap 7.12

CHUONG 8: BO OEM

8.13* M H z

8.15* Vi co 8 chu ky x ung nhip mot ch u ky c u a C , ch u ky x ung nhip phai la 24/8 = ps D o do, tan so x u n g nhip la /(3x10 6) = 3 kHz.

(140)

S o thap phan Idn nhat co the luu tri/ bo d e m co 6 flip flop ( M o d -6) la 111111 = C a n liru y sti khac biet giCra M o d u lu s (tong so c a c trang thai) v a so thap p n Idn nhat.

8.17* D a n g x ung chi'nh xac d u o c ve n h u sau:

i Qf3 — [■

i Q C - i

QD | -HINH BT 8.17

Noi d u ng cua bo d e m la 0 0 tai di em a tren true thdi gian Vdi moi c h u y e n dich sang s udn a m x u n g nhhip, bo d e m lai d e m len mot, c h o de n bo d e m co noi du ng cd noi d u n g la 1111 tai thdi di em b tren true thdi gian T a i thdi d i e m c, bo d e m p hu c hoi ( R e se t ) ve 0 00 , va bo d e m lap lai q ua trinh d e m tuan tu R o rang, d a y la bo d e m M o d - 6, vl co 16 trang thai (tU 0 0 de n 1111) v a s o t hap p h a n Idn nhat cd the d u o c Itiu tru c a c flip flop la so thap p h a n ( 1 1 )

8.18* C a n den 16 co’ ng N A N D ng o v ao vdi c a c ng o v a o n h u sau: A B C D , A B C D , A B C D , A B C D

A B C D , A B C D , A B C D , A B C D A B C D , A B C D , A B C D , A B C D A B C D , A B C D , A B C D , A B C D

A-5~

C~ '15'

Hinh Bai tap 8.18

(141)

C')

03

8.19*.

CLK _A

A

C C A B C

ABC

A B C A D C A B C A B C A B C A B C

HINH BT 8.19

8.2 0*.

a) b)4 c)4 d) e)

8.2 1*.

Aj

5 -

C ~

A

-/I

3

C /I _

5

-c

-'2

' 5

"O_

"2 " "

" —

" 5

(142)

8.22*.

O 0

j ^ L T L J i J i r i T T r i J i - r L r

8.23*

A § -

c I

D > I ^ I I I I

~ y

B I

C

D / i “

> B C I D j 6 * H B I

C

D

>

Cac cong giai ma

8.24*. a) 8.25*. CLK B C D A B C P j A > K A

HINH BT 8.22

_ > > Dem xung nhip 0 1 2 3 4 5 6 7 & 9

Cac ngo cua bo dem th a p phan HINH BT 8.23

b) c ) d ) e ) 1

J 3

>

K 3

a / c j m n n n n n n

_ n _ j

3 - —

HINH BT 8.25 8.26* Nam chu ky xung nhip

(143)

CHl/ONG 9: BO NHC5 BAN DAN

9.17* 0100

9.19* E D C B A = 11011 = 1B 9.20* "15" = ( E D C B A ) G

9.21* Hai chip g ong dtidc ket noi lai vdi nh au n h u sau:

a C a c ngo vao c h o n : ( A ket noi vdi A; B ket noi vdi B; Cke t noi vdi C ; D ket noi vdi D)

b C a c ngo vao so lieu: ( D , ket noi vdi D, ; D2 ket noi vdi D 2; D3 ket noi vdi D 3; D4 ket noi vdi D 4)

c C a c ngo doc: ( S ket noi vdi S , ; S2 ket noi vdi S 2; S3 ket noi vdi S 3; S4 ket noi vdi S 14)

ME va W E du oc sir du ng de lua c h on mot chip h oa c c ac chip khac.

9.22* V e hai m ac h giong n h u tren Hinh 9.17, m a c h no tren ma c h H a y ket noi:

a C a c d a y dia chi ket noi song song b Hai day M E ket noi lai vdi nhau. c Hai d a y W E ket noi lai vdi nhau.

Bon da y D A T A IN va D A T A O U T c ua m a c h phi'a tren dtidc coi la L S B va day D A T A IN va D A T A O U T cua m a c h dtidi dtidc coi la M S B

9.23* Q , kin mach; Q2 hd m ac h; D A T A O U T = D A T A O U T = H 9.24* Q , ngat mach; Q2 kin m a c h ; D A T A O U T = 1; D A T A O U T = 0 9.25* V :

a o mUc H b 6 mUc L

c C a c h ly khoi ngo vao Vdi mot tai dien trd tiep dat, V0 d mtic L. Vdi mot tai dien trd ket noi vdi + V c c , ng o a m u c H./.

CHl/ONG 10: BO CHUYEN OOl AID VA D/A

10.1* Bo c h u ye n doi tin hieu anal og s a n g digital ( A D C ) 10.2* M a n g dien trd va bo kh u ec h dai c o n g

10.3* A = 20 10.4* V 0 = - V 10.5* A = 0, 266 10.6* V o = - 8 V 10.7* A

10.9* a) analog

(144)

10.11* M u ’c H, c on g A N D cho x ung nhip c h u y e n qua 10.12* Hai dien ap D C

10.13* T u ’ m u’c H x uo ng mu’c L

10.14* M u ’c logic H ; C o n g A N D c h o x u n g nhip c h u y e n qua 4

0 , %

100 ps 10.10* 0 1

10.15* 10.16* 10.17*

10.18* I N T R

CHl/ONG 11: MOT SO l/NG DUNG KY THUAT DIGITAL

11.1* T o e lap V|5P ba ng 125 H z co nghTa la tat ca c a c c o n s o phai du’Oc hien thi moi mot khoangt thdi gian la (1/12 ) s = 8 ms C h i a k h o a n g thdi gian n a y c ho 6 c on so co nghTa la moi c on so se du’Oc phat s a n g k h o a n g thdi gian la 8 m s/6 = 1,33 m s ( cu n g co nghTa la L E D c o d o n g c h a y q u a thdi gian 1.33 m s ) va ngirng phat s an g k h o an g thdi gian , m s ( c u n g co nghTa la L E D khong co d d n g c h a y qua thdi gian , m s ) C a n c h u y ng d o rong x ung gi am x u ong , s an g c ua L E D hien thi c u n g g ia m D i e u c a n thiet la phai lam tang d d ng dinh c h a y qua mdi c ua L E D b a n g c a c h g i a m tri so di en trd R da neu Hinh 11.1 v a Hinh 11.2.

11.2* T r a n z i t o npn tren Hinh Bai tap 11.2 du’Oc dung lam ch u ye n m a c h giCra catot cua L E D hien thi va dat Khi tranzito da n, d d n g c h a y q ua t h a n h L E D de phat sa n g Khi tranzito n g u n g dan, khong cd d d n g c h a y q u a tha nh L E D , c a c th a nh L E D khong phat sang.

Ngo vao chan d a - d o

+Vcc-O

4^is

4 m s '

3 ms b) Hinh Bai tap 11.2

(145)

D a ng x ung a ngo vao cua chan B a - d o du’Oc trinh b a y r r e n Hinh Bai tap 11.2 b) C h u y rang, phai co xung di/ong de tac d o n g ram tran^'to da n, d on g c h a y qua L ED va lam L E D phat s an g k h oa n g thdi gian 1 m s cCr moi ms.

11.3* Gia du rang bo d e m va bo chi thj bat da u d e m tu 00000 T i n hieu ngo vao co tan so la 200 H z se cho O c o n g E n a b l e la t = 1/200 = 0 ps X u n g vu o n q 100 kHz du’Oc dung lam x ung nhip, d a y la chudi x ung d u o n g co da n cach giua xung trudc den xung sau la 10 ps ( T xungnhip = 10 ps) D o do, thgdi gian cong la t bo dem se dem tien 5000/10 = 0 b u d c d e m va so n a y hien thi tren bo chi’ thi Vi m6i xung nhjp co thdi gian la 10 as, nen so hien thi tren bo chi thi d u o c d o c te 500 x 10 = 5000 ps - d a y chinh la chu ky c ua tin hieu n g o v a o can d u o c x ac dinh.

(146)

CAC t lT v i e t t a t

TUTVIET TAT TU DAY DU

A/D Analoq/Diqital

A C Alternatinq C ur r e nt

A D C A n al o q to Diqital C o n v e r t e r A L U Arithmetic and Loqical Unit

A N S I A m e r i c a n National S t a n da r d Institute

A S C I I A m e r i c a n St an d ar d C o d e for Information I n t e r c n ge A S I C Application Specific Integrated Circuit

B C D B i n a r y - C o d e d Decimal B C H Binar y C o d e d H e x ad e ci m a l

Bit B inar y Digit

C A S C o l u m n A d d r e s s St robe

C L K C l oc k

C L R C l e a r

C M O S C o m p l e m e n t a r y Met al -oxi de s e m i c o n d u c t o r C P U Cent ral P r oc es si ng Unit

D A C Digital to A n a l o g C o n v e r t e r D E M U X D e- mul ti pl ex

D T L D i o d e - T r a n s i s t o r Logic E C L E m i t t e r - C o u p l e d Logi c E P R O M E r a s a b l e P R O M

F A Full a d d e r

F E T Fi el d-Effect T r a ns i st or F I F O First In First O u t

G n d G r o u n d H H e x a d e c i m a l

H A Haft A d d e r

IC Integrated Circuit

L E D Light Emitting Di od e L I F O L ast In First O u t L S B L e as t Significant Bit L S D L eas t Significant Digit L SI L a r g e S c a l e Integration M O S Metal O x i d e S e m i c o n d u c t o r M S B Mo s t Significant Bit

M S D Mo s t Significant Digit M S I M e d i u m S c a l e Integration

M U X Multiplex

P L A P r o g r a m m a b l e L o gi c A r r a y

(147)

Pr Preset

P R O M P ro g mm a b le R e a d O n l y M e m o r y R A M R a n d o m A c c e s s M e m o r y

R A S R o w A d d r e s s Strobe

R C T L Resistor C ap a ci t or T r a ns i st o r Logi c R O M R ea d O n l y M e m o r y

R T L Resistor T r a n si st o r Logi c T T L Transi st or T r a n s i s t o r Logi c

Mi croproces s or

TA I LIEU TH A M KHAO

Arpad Barna, Dan I Pcrat Integrated Circuit in Digital Electronic, J o h n Willey & S o n s , 1997

James E Palmer, Ph.D

Do Kim Bang

Ken Steiglitz

Introduction to digital s ys te ms , International Editions, S c h a u m ' s Outline Series, M c Gr a w- Hi l l , Inc., 1993

K y thuat - ly thuyet va ting d u ng , H o c vien B C V T , 1993

A Digital signal P r o c e s si n g primer

with Applications to Digital A u d i o and C o m p u t e r Music, A d d i s o n - W e s l e y Publishing C o m p a n y , Inc., 1996

(148)

MUC LUC■ ■

TRANG

LOI NOI DAU 3 CHITONG 1: HE THONG SO VA M A 5

T o n g q u a n 1.1 S o nhi p h a n 1.2 C h u y e n doi nhi pha n - thap p h a n 1.3.C h u y e n doi thap p h a n - nhi p h a n 1.4.S o bat p h a n 1.5 S o thap luc p h a n 1 Ma A S C I I 1 Ma d t i 1.8 M a G R A Y

Cau hoi va bai t a p CHlflJNG 2: CAC CONG LOGIC, DAI SO LO G IC , PH A N TICH VA TONG HOP M ACH LOGIC 23

T o n g q u a n 2.1 C o n g da o ( I nv ect o) . 2.2 C o n g H o a c ( O R ) 2.3 C o n g V a ( A N D ) s 2.4 C o n g H o a c - D a o ( N O R ) 2.5 C o n g V a - D a o ( N A N D ) 2.6 C o n g X - O R 2.7 Dai so l o g i c 2.8 Hai dinh ly D E M O R G A N 2.9 C a c dinh luat va dinh ly c ua dai so B O O L E 2.10 Phirong p p tong c u a tich . 2.11 B a n g K A R N A U G H 2.12 C a c n h o m doi, n h o m bo n v a n h o m t a m 2.13 D o n gian phirong trinh logic b ang B a n g K A R N A U G H 2 14 D i e u kien n g h i 2 15 P h u o n g p h a p ti'ch c u a tong . 2 16 G i a n Udc bieu thUc ti'ch c ua t o n g

Cau hoi va bai t a p

(149)

CHl/GTNG 3: M ACH XIJTLY SO LIEU 6

T o n g q u a n 3.1 C a c bo ghep kenh (Multiplexer) . 3.2 C a c bo phan kenh ( D e m u l t i p l e x e r ) 3.3 Bo giai ma - 3.4 C a c bo giai ma B C D - t h a p p h a n 3.5 Bo giai ma du ng L E D t h a n h 3.6 Ma h o a 3.7 Bo tao bit c h i n le - B o kiem tra bit ch a n l e

Cau hoi va bai t a p CHlfflNG 4: MACH SO HOC 93

T o n g q u a n 4.1 Phep cong nhi p h a n 4.2 Phep trCr nhi phan . 4.3 S o nhi phan khong dau . 4.4 C a c so co d a u 4.5 Phep bu 4.6 Phep bu so h o c 4.7 C a c khoi so hoc . 4.8 Bo cong - Bo tru" 4.9 Phep nhan va phep chia nhi phan .

Cau hoi va bai t a p CHUtfNG 5: IC TTL VA CMOS 119

T o n g q u a n 5.1 C a c IC ho 74xx . 5.2 C a c thong so cua IC T T L 5.3 C a c cong ho m a c h C o l e c t o 5.4 C a c IC T T L ba trang t h a i 5.5 Dieu khien ngoai doi vdi c a c tai T T L . 5.6 C a c IC T T L dieu khien tai n g o a i 5.7 Logic di/ong va logic a m 5.8 IC C M O S . 5.9 IC ho C x x 5.10 C a c dac ti'nh cua C M O S . 5.11 G i ao dien cua T T L va C M O S 5.12 G i ao dien cua C M O S va T T L

(150)

CHlfflNG 6: FLIP FLO P , XUNG NHIP VA DJNH THOTl 157

T o n g q u a n 6.1 Flip flop R S 6.2 Flip flop R S d on g bo tTnh 6.3 Flip flop D 6.4 Flip flop D tac d o n g ba ng stidn x u n g n h i p 6.5 T h d i gian c h u y e n trang thai cua flip f l o p

6.6 Flip flop J K 6.7 Flip flop J K M a s t e r - S l a v e

6.8 T r i g o S c h m i t t 6.9 C a c d a ng xung n h i p 6.10 X u n g nhip T T L 6.11 B o dinh thdi d u ng IC 555 , 6.12 D a o d o n g ddn o’ n d u n g IC dinh thdi 5 .

Cau hoi va bai ta p

CHlfflNG 7: BO GHI CH U YEN 179

To’ng q u a n 7.1 Bo ghi c h u y e n v a o noi tiep-ra noi t i e p 7.2 Bo ghi c h u y e n v a o noi tiep-ra s o n g s o n g . 7.3 B o ghi c h u y e n v a o s ong s on g- r a noi tiep . 7.4 B o ghi c hu y e n v a o song s o ng - s o n g s o n g 7.5 B o d e m v o n g

Cau hoi va bai tap

CHlfflNG 8: BO O EM 198

T o n g q u a n 8.1 B o d e m kho ng d o n g b o 8.2 Co’ ng giai m a 8.3 B o d e m d o n g bo . 8.4 B o d e m M o d - . 8.5 B o d e m M o d -

8.6 B o d e m x a c lap t r i r d c 8.7 B o d e m c h u y e n .

8.8 B o d e m c h u y e n M o d - t O co giai m a .

Cau hoi va bai ta p

(151)

CHlfflNG 9: BO NHGT BAN DAN 240

T o n g q u a n

9.1 Dia chi hoa bo n h d 9.2 R O M , P R O M va E P R O M 9.3 R A M 9.4 R A M dong - D R A M . 9.5 C a c te bao nhd .

Cau hoi va bai ta p

Tong q u a n 10.1 C h u y e n doi tu” digital sang anal og D A C . 10.2 Bo khuech dai toan tCr 10.3 D A C co ban . 10.4 C a c D A C loai thang . 10.5 Bo c huyen doi tti analog s ang digital ( A D C ) . 10.6 Bo so a p 10.7 Loai A D C khac

10.8 C a c d ac tinh ky thuat cua A D C 10.9 IC A D C thuong p h a m

Cau hoi va bai ta p

CHUttNG 1 : MOT SO LTNG DUNG KY THUAT DIGITAL 295

11.1 C a c bo hien thj da hop . 11.2 Bo de m tan . 11.3 D o thdi gian (do rong x u n g ) . 11.4 D o n g ho digital . 11.5 Bo dinh thdi L C D cd canh bao . CHlfOfNG 10: CAC B0 CHUYEN DOI A/D VA D/A 275

TRA LCTI CAC CAU HOI VA BAI TAP CACTI/VIET TAT

TAI LIEU THAM K H A O MUC LUC

(152)

KY TH U A T SO

LY T^OYET VK &RG

Nha xuat ban Lao dong - X a hoi Tang - 41b - Ly Thai To - Ha Noi

DT: 04.8241706 - 9346024 Fax: (04).9348283

Chiu trach nhiem xuat ban:

Nguyen Dinh Thiem Chiu Trach nhiem noi dung:

Nguyen Ba Ngoc Bien tap va sua ban in:

Nguyen Quang Ha Thiet ke bia:

Manh Hoa

In 700 cuon kh6 19x27cm tai xucmg in Cong ty Thanh Xuan Giay chap nhan dang ky ke hoach xuat ban so - /L D X H Cue xuat ban cap 27/8/2004

(153)

Ngày đăng: 01/04/2021, 12:17

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w