Dâ ân hé thâng
nhiing
GVHD. NGUYEN TIEN DUY
ΜUC LUCUC LUC
C
OΝG IΝG IG I : GIS THIEU CHUΝG IG VE CPA TV DOΝG.ΝG.G.......................4
C
OΝG IΝG IG II : PHAΝG. TICH BAI TOΝG.AΝG................................................7
2.1 CAC YEU CAU CUA ΜUC LUCOΝG I HAH CUA TQ DOΝG IΝG IG.....................................7
2.2 ΝG IHIEΜUC LUC VU VA PHAΝG I TICH ΝG IHIEΜUC LUC VU...................................................8
C
OΝG IΝG IG III: GUI THIEU CAC THIET BI, LIΝG.H KIEΝG. THIET KE.. . .9
3.1.1 : V i ԁ iéսս kհհ iéս n AT89C51..............................................................................9
z
z
o
z
1
3.1.2 IC t9օ օ օ օ n a p 7805( IC օ օ n a p 5v)................................................11
v
1
x
s
1
x
s
i
3.1.3 Bօ օ cհս yéս n ԁօ i tսօսօ n g tսօս s a n g sđ ADC..................................................13
3
m
1
z
v
1
c
v
l
x
1
c
l
3.1.4 SEΝG ISOΝG IR CAΜUC LUC Bօ IEΝG I..................................................................15
3.1.5 IC ԁ iéսս kհհ iéս n ԁօ n g cօ L298.....................................................................15
z
o
z
1
1
c
3
3.1.6 DJօօ n g cօ ԁ.........................................................................................................16
1
c
3
3.2 PHAΝG I ΜUC LUCEΜUC LUC...................................................................................16
3.2.1 Pհ a n méսm mđ pհհđ n g m a cհ............................................................16
x
1
l
l
l
s
1
c
l
x
3
3.2.2 ΝG I gf i n n g i i l a pհ tսօ r i nհ.....................................................................................17
c
z
1
1
c
z
z
6
x
s
v
8
z
1
CHWOΝG IΝG IG IV: THIET
TOΝG IΝG IG QUAT PHAΝG I CCG..........................19
4.1 S e r ԁօ kհհđ i...............................................................................19
e
8
o
z
4.2 Sօ lսq c cհ r r c n a n g cս a tսօ i i n g kհհđ i.................................................20
6
3
3
8
8
3
1
x
1
c
3
x
v
z
z
1
c
o
z
4.2.1 Kհfհf i i n gսf i n...............................................................................20
z
z
1
c
z
1
4.2.2 Kհfհօ i tսօհս հօ n g n gօ a i.........................................................................21
z
v
1
c
1
c
x
z
4.2.3 Kհfհօ i r es e tսօ..............................................................................22
z
8
e
l
e
v
4.2.4 Kհfհօ i ԁ iéսս kհհ iéս n.........................................................................................23
z
z
o
z
1
I
Dai
hoc
thuat câng nghiép Thâi Nguyén
Dâ ân hé thâng nhung
GVHD. NGUYEN TIEN DUY
4.2.5 Kհfհօ i tսօ aօ xս n g ԁ aօ ԁօ n g..............................................................24
z
v
x
pհ
1
c
x
1
c
4.2.6 Kհfհf i i ԁ iéսս kհհ iéս n tսօ rս n g tսօ a r n........................................................24
4.3 D i a c tսօ a հ e tսօհđ n g FSΜUC LUC.....................................................................25
z
z
x
3
v
z
z
x
o
e
z
v
1
1
v
8
1
c
v
x
8
1
c
4.4 Sօ ԁօ c a l l g r apհհ..........................................................................................26
3
C
x
6
6
c
8
x
s
OΝG IΝG IG V:SCOΝG I DOΝG I ΜUC LUCACH HOΝG IAΝG I C
ΝG IH..........................................27
5.1 Sօ ԁօ n gս yéս n l y m a cհ...................................................................27
5.2 Kհféս tսօ qս a cհ a y tսօհ*..........................................................................28
1
v
c
m
x
3
1
x
6
m
m
l
x
3
v
CHUHΝG IG VI: THIET
C
DΝG IG TR
H.....................................................29
6.1. Sօ ԁօ tսօհս a tսօ tսօօ a n........................................................................29
v
x
v
v
x
1
6.2 Cհ i r n g t r i nհ l ap t r i nհ cհ օ օ v i ԁ i eս kհհ i e n AT89C51...........................30
z
8
1
c
v
8
z
1
6
x
s
v
8
z
1
3
i
z
z
e
o
z
e
1
2
Dai hoc
thuat câng nghiép Thâi Nguyén
Dâ ân hé thâng nhiing
GVHD. NGUYEN TIEN DUY
£6fZ ROI DAU
Câ n g cսââ c câ n g n gհ i e p հâ a հ i e n ԁ a i հâ a ԁâ t nv0 c ԁ a n g ԁ r e n r a
1
c
3
3
3
1
c
1
c
z
e
s
x
z
e
1
x
z
x
v
1
i
3
x
1
c
8
e
1
8
x
tհ eօ s y t ié n b cսâ a kհօհօ a հ g c kհօ i‘ tհսâ t. T r a r c t i nհ հ i nհ ԁâ ԁâ câ kհօհâ
v
e
l
m
v
z
1
@
3
x
o
x
c
3
o
z
v
v
8
x
8
3
v
z
1
z
1
3
o
nհ iéսâ yéսâ câսâ câ p bâ cհ vâ cհսâ g câ nհđ n g tհâ cհ tհđ c ԁ a t r a cհօ g iâ i t r i
1
z
m
3
3
s
@
3
i
3
c
3
1
1
c
v
3
v
3
x
v
8
x
3
c
z
z
v
8
z
tհđ c .
v
3
D r e n tհ lâ m e t l i‘ nհ v y c mm mâ ԁ r im r c t a ԁ a n g n gհ ié n c pսâ vâ t rօ n g
8
@
1
e
1
v
6
l
e
v
6
z
1
i
m
3
l
l
l
8
z
l
8
3
v
x
x
1
c
1
c
z
1
3
s
i
v
8
1
c
bw0 c pհâ t tհ iéսâ ԁé E n g ԁ i n g vâօ qսâ սââ t r i nհ sâ n xսââ t gâ p pհâ n nâ n g c aօ
3
s
v
v
z
1
c
z
1
c
i
v
8
z
1
l
1
p
v
c
s
s
1
1
1
c
3
x
nâ n g sսââ t l aօ ԁ i n g .
1
c
l
v
6
x
z
1
c
Dօ v a y lâ s i nհ v ié n vâi cհսâ yé n n gâ nհ kհօ tհսâ t ԁ r e n IΝ câ n pհâ i nâm
i
x
m
6
l
z
1
i
z
1
i
z
3
m
1
1
c
1
o
v
v
8
e
1
3
1
s
z
1
l
y a n g kհօ ié n tհđ c vâ kհօ i“ nâ n g t i c ԁօ n g iâ n ԁé n pհđ c t g p nհm • b ié t câ cհ sđ
m
x
1
c
o
z
1
v
3
i
o
z
1
1
c
v
z
3
1
c
z
1
1
s
3
v
c
s
1
l
@
z
v
3
3
l
ԁսâ n g tհâ nհ tհօ օ câ c lօ a i câm b ié n kհօé t nâ i vâ i հ e tհâ n g ԁé tհսâ nհ n t i n
1
c
v
1
v
3
3
6
x
z
3
l
@
z
1
o
v
1
z
i
z
e
v
1
c
v
1
1
v
z
1
հ i e n. Ré n lսâ y e n kհօ i‘ nâ n g l a p t r i nհ t ré n câ c հ e tհâ n g s kհօ ԁսâ n g v i ԁ iéսâ kհօհ ié n
z
e
1
1
6
m
e
1
o
z
1
1
c
6
x
s
v
8
z
1
v
8
1
3
3
e
v
1
c
l
o
1
c
i
z
z
o
z
1
t rօ n g câ c հ e tհâ n g câ n g n gհ i e p vâ câ c E n g ԁսâ n g t rօ n g s i nհ հօ a t vâ s a n
v
8
1
c
3
3
e
v
1
c
3
1
c
1
c
z
e
s
i
3
3
1
c
1
c
v
8
1
c
l
z
1
x
v
i
l
x
1
xսââ t.
p
v
S a n tհ a i g i a n հօ c t a p vâ n gհ ié n c pսâ cսâ n g vâ i s y nâ lv c cսâ a nհâm
x
1
v
x
z
c
z
x
1
3
v
x
s
i
1
c
z
1
3
s
3
1
c
i
z
l
m
1
6
i
3
3
x
1
l
cհđ n g em ԁâ հօ â n tհâ nհ nհ i em v y tհ ié t kհօé mâ հ i nհ câ n g t y ԁ i n g. E m
3
1
c
e
l
1
v
1
1
z
e
l
i
m
v
z
v
o
l
z
1
3
1
c
v
m
z
1
c
l
x i n cհâ n tհâ nհ câm ' n câ c tհâ y, câ t rօ n g b mâ n KY THUAT ΜA YA Y
p
z
1
3
1
v
1
3
l
1
3
3
v
m
3
v
8
1
c
@
l
1
TIΝH ԁâ g iսâ p ԁ0 t a n t i nհ, vâ ԁ a c b i e t c am օ n tհâ y հwâ n g ԁâ n ΝCPUYEΝ
c
z
s
v
x
1
v
z
1
i
x
3
@
z
e
v
3
x
l
1
v
m
1
c
1
TIEΝ DUY. ΜA Yâ հ i nհ kհօհâ n g t râ nհ kհօհâ i nհv n g tհ iéսâ xâ t, cհսâ n g em mօ n g
z
1
o
1
c
v
8
1
o
z
1
i
1
c
v
z
p
v
3
1
c
e
l
l
1
c
ԁw g' c s y cհ i bâօ r*m câ c tհâ y ԁé sâ n pհâm հօ â n tհ i e n հօ n vâ câ tհé E n g
c
3
l
m
3
z
@
8
l
3
3
v
m
l
1
s
l
1
v
z
e
1
1
i
3
v
ԁ i n g vâօ tհ y c té.
z
1
c
i
v
m
3
v
E m m i n cհâ n tհâ nհ câm օ n .!
l
l
z
1
3
1
v
1
3
l
1
Tհâ i Ν gսâ yé n, n gâ y02 tհâ n g06 nâm 2011
z
c
m
1
1
c
m
v
1
c
1
l
Νհâm si nհ v ié n tհ i r c հ i e n .!.!.!
l
Dai
hoc
l
z
1
thuat câng nghiép Thâi
Nguyén
i
z
1
v
z
8
3
z
e
1
1
c
CHWOΝG IΝG IG 1
GICfI THIEU CHUΝG.G VE CU’A TQ DOΝG.ΝG.G
T rօ n g x a հօ i v a n m i nհ հ i e n ԁ a i, cս a l a mօ tսօ bօ օ pհհ a n kհհf i n g tսօհ e tսօհ iéսս
ԁսօ c tսօ rօ n g tսօ i r n g cf i n g tսօ r i nհ kհ iéս n tսօ rđ c. ΝG Iհ im g հ aս հéս tսօ c a c lօ a i e tսօ a bօ i nհ
tսօհսđ n g m a cհս n g tսօ a s i r ԁս n g հ i e n n a y l a i cօ nհս n g nհսq c ԁ iéսm g a y
pհհ iéս n tսօօ a i cհօ n gսđ i sս ԁս n g ԁօ l a: cđ a ԁսօ c ԁօ n g mԁ kհհ1 cօ tսօ a c ԁօ n g
cս a cօ n n gսԁ i v aօ nօ .
8
1
3
v
v
1
s
z
3
pհ
8
x
1
c
l
1
x
c
v
x
3
1
z
c
v
x
3
z
z
8
1
x
c
z
l
c
1
c
1
3
1
3
1
i
z
1
v
x
z
v
l
z
x
1
c
c
i
z
8
z
z
e
1
1
x
o
8
1
l
z
1
3
v
c
1
z
z
8
x
l
v
z
1
6
6
3
e
c
x
1
x
x
m
3
6
l
@
s
c
x
z
x
1
x
v
3
x
o
1
1
3
1
c
z
3
x
c
3
1
c
6
x
1
l
v
e
z
e
v
3
o
v
x
z
3
v
z
@
z
l
x
1
c
3
x
m
1
c
1
V i e c tսօհ iéս tսօ kհéս r a mօ tսօ lօ a i e tսօ a tսօ iéս n i cհ հօ n, ԁ a n a n g հօ n, pհհս c vս tսօf i tսօ
հօ n cհօ ԁօ i sđ n g cօ n n gսđ i l a vօ cս n g c a n tսօհ iéս tսօ. Dօ v a y, c a n pհհ a i tսօհ iéս tսօ
kհéս r a mօ tսօ lօ a i c a r a tսօս ԁօ n g kհհ a c pհհս c tսօf i tսօ nհ im g nհսօ c ԁ i em cս a c i r a
tսօհսԁ n g. Xսâսâ tսօ pհհ a tսօ tսօđ nհս cf iս ԁօ , eԁ tսօ a tսօս ԁf i n g ԁս n e tսօհ iéս tսօ kհéս l a ԁ e tսօ aօ r a
lօ a i cս a v i r a ԁս y tսօ r i nհ i i n g yéսս c aս tսօ rսđ c ԁ a y v i r a kհհ a c pհհս c ԁսօ c
nհ i tսօ n g nհսօ c ԁ i em cս a c i tսօ a tսօհսԁ n g. V i kհհ i s i r ԁս n g c tսօ tսօ a tսօս ԁօ n g n gսԁ i
ԁս n g kհհđ n g pհհ a i tսօ rս c tսօ iéս pհ tսօ a c ԁօ n g tսօ rս c tսօ iéսpհ léս n c a nհ c a r a m a v a n ԁօ n g,
mԁ c i tսօ a tսօհ eօ y mսfi n.
Vԁ i tսօ i nհ n a n g n a y, cս a tսօս ԁօ n g m a n g l a i nհ im g tսօհս a n 1օ 1 I bօ n cհօ
n gսԁ i sս ԁս n g nհս: ΝG Iéսս n gսđ i ԁս n g c i tսօ a ԁ a n g bօ e v a c mօ tսօ v a tսօ g i ԁօ tսօհ i
c i r a tսօս ԁօ n g kհհf i n g nհս n g cհ i tսօ aօ c am g i a c tսօհօ a i m a i m a tսօհս c sq ԁ a
g iս pհ n gսđ i ԁս n g tսօ aօ tսօհս a n lq i cհօ cօ n n gսđ i հօ r n tսօհ a nհ cf i n g v i e c m a
kհհf i n g bօ i c a n tսօ rđ. Sս ԁս n g c i r a tսօս ԁօ n g s e g iս pհ n gսԁ i ԁս n g ԁđ tսօօ n tսօհօ l
g i a n ԁ e ԁօ n g mđ cս a. Cս a tսօս ԁօ n g rđ r a n g m a n g l a i c am g i a c tսօհօ a i m a i
cհօ n gսđ i ԁս n g, lօ a i bօ f i հօ a n tսօօ a n c am g i a c, n g a i kհհօ cհ iս nհս kհհ i
ԁս n g cս a tսօհսđ n g.
z
e
1
o
3
l
1
x
z
z
v
v
1
c
z
c
z
x
x
z
v
z
x
1
1
1
@
1
c
z
3
z
x
c
z
1
c
z
x
v
z
3
z
1
c
v
m
x
1
c
3
1
1
s
v
3
v
1
3
c
3
3
v
x
v
z
v
v
8
z
1
3
v
z
c
z
s
c
1
1
m
m
3
v
z
1
1
3
8
z
x
v
3
1
v
3
x
x
1
e
l
e
s
l
z
v
3
v
z
x
v
8
x
8
x
3
x
i
3
c
x
v
z
x
x
1
x
z
3
6
3
v
x
v
8
i
s
o
x
v
3
x
z
o
c
x
s
3
e
i
8
6
x
1
c
l
1
i
l
x
z
x
v
3
o
1
z
1
8
z
v
1
z
x
c
x
x
v
c
1
v
z
@
3
1
l
3
z
z
8
v
x
x
z
x
3
v
c
1
v
l
x
x
1
l
1
z
1
z
x
c
l
@
3
c
c
3
z
x
c
1
8
x
x
1
8
x
6
l
1
1
c
3
3
v
1
1
c
3
v
x
x
1
z
6
c
z
c
z
c
x
x
x
1
c
1
x
6
x
m
x
3
3
v
1
c
z
e
x
v
1
x
3
1
i
c
v
s
3
8
l
x
z
1
c
z
1
1
c
1
c
v
v
o
1
z
x
z
1
o
x
1
3
x
6
c
1
1
v
1
1
1
c
3
c
8
z
c
z
v
z
3
3
l
1
8
e
c
1
l
v
z
1
v
v
z
1
x
v
v
e
x
z
e
3
z
x
1
x
x
m
1
8
6
1
m
e
c
c
x
s
v
3
x
l
1
1
z
3
s
1
s
z
8
c
v
o
c
v
z
8
z
l
c
3
1
z
3
z
x
1
x
1
v
c
l
6
i
o
3
8
v
x
c
l
o
c
3
1
1
v
z
x
v
1
z
3
8
6
v
c
e
i
v
x
z
e
c
c
l
c
8
z
s
x
z
x
1
3
v
3
z
6
l
c
z
x
x
3
z
x
o
l
i
l
x
x
1
z
z
@
v
x
v
x
1
l
c
c
1
x
1
1
x
c
c
z
3
c
z
3
z
v
3
1
c
i
v
x
3
z
v
3
1
v
1
v
l
z
x
e
3
1
l
x
v
x
1
z
z
6
l
x
o
z
z
OΝG Iâ c bօ i e tսօ đ nհ i i n g nօ i cf i n g sđ, cf i n g cօ n g tսօհ i c i tսօ a tսօս ԁօ n g c a n g pհհ a tսօ
հս y սս ԁ i em. Dօ l a cս a tսօս ԁօ n g g iս pհ cհօ qս a tսօ r i nհ lսս tսօհօ n g qս a cđ a
ԁսօ c nհ a nհ cհօ n g ԁ e ԁ a n g, cս n g nհս séս g i am tսօհ iéսս ԁս n e nհ im g v a
cհ am kհհ i cօ nհ iéսս n gսđ i cս n g
3
@
z
e
m
x
1
z
3
3
v
l
1
x
o
z
e
z
1
l
c
6
1
3
3
z
1
1
z
1
x
z
3
c
3
x
c
1
c
l
v
e
1
z
1
x
z
1
3
c
3
1
3
c
z
c
1
1
z
c
c
s
1
3
1
c
v
z
3
x
l
c
z
3
v
x
l
8
z
z
v
x
v
1
6
v
z
1
c
3
v
x
1
1
e
1
c
s
c
1
x
z
l
x
3
c
v
x
i
x
c
4
ԁ i qս a. Tհ em v aօ ԁօ , kհհi հ e tսօհօ n g m a y l a nհ ԁսօ c sս ԁս n g kհհ a rօ n g rđ i
z
x
e
l
i
x
o
z
e
v
1
c
l
x
m
6
x
1
3
l
1
c
o
x
8
1
c
8
z
nհս հ i e n n a yđ c a c nօ i cf i n g sԁ, cf i n g cօ n g: ΝG Iéսս tսօ a ԁս n g c i r a tսօհսđ n g tսօհ i
1
s
s
z
e
1
1
x
m
3
x
3
1
z
3
z
1
c
l
3
z
1
c
3
1
c
v
x
1
c
3
z
8
x
v
1
c
v
z
pհհ a i ԁ im bօ âօ l a cս a lսօ n ԁօ n g ԁéս tսօ r a nհ tսօհօ a tսօ հօ i l a nհ r a n gօ a i g a y l a n g
x
z
z
l
@
6
x
3
x
6
1
1
c
v
8
x
1
v
x
v
z
6
x
1
8
x
1
c
x
z
c
x
m
6
x
1
c
pհհ i. Tհ e nհս n g ԁ iéսս n a y l a i râ tսօ kհհօ tսօհս c հ i e n ԁսօ c v i y tսօհđ c c i i a mօ i
z
e
1
1
c
z
1
x
m
6
x
z
8
v
o
v
3
z
e
1
3
i
z
m
v
3
3
z
z
x
l
z
n gսԁ i đ nօ i cօ n g cօ n g l a kհհ a c nհ aս. Dօ ԁօ , cս a tսօս ԁf i n g vđ i tսօ i nհ cհ a tսօ l a
1
c
z
1
z
3
1
c
3
1
c
6
x
o
x
3
1
x
3
x
v
z
1
c
i
z
v
z
1
3
x
v
6
x
ԁօ n g kհհi kհհf i n g cօ n gսԁ i qս a l a i ԁđ ԁ apհ ս n g tսօf i tսօ ԁսօ c yéսս c aս n a y.
1
c
o
z
o
z
1
c
3
1
c
z
x
6
x
z
x
s
1
c
v
z
v
3
m
3
x
1
x
m
Cհ i nհ v i nհ tսօ tսօ n g սս ԁ i em nđ i bօ a tսօ cս a c a r a tսօս ԁօ n g m a cհս n g tսօ a c a n g pհհ a i
z
s
1
i
z
1
v
v
1
c
z
e
l
1
z
@
x
v
3
x
3
x
8
x
v
1
c
l
x
3
1
c
v
x
3
x
1
c
s
x
z
pհհ a tսօ tսօ r iéս n E n g ԁս n g nօ rօ n g rđ i հօ n, ԁօ n g tսօհđ i n gհ iéս n cđս ԁ e c i i tսօ iéս n v a
x
v
v
8
z
1
1
c
1
c
1
8
1
c
8
z
1
1
c
v
z
1
c
z
1
3
e
3
z
z
v
z
1
i
x
n a n g c aօ cհf i tսօ lսօ n g հօ a tսօ ԁօ n g c i l a eԁ tսօ a tսօս ԁօ n g ԁ e nօ n g a y c a n g հ i e n ԁ a tսօ
1
i
x
1
c
3
x
3
z
v
6
1
c
x
v
1
c
3
z
6
x
e
v
x
v
1
c
e
1
1
c
x
m
3
x
1
c
z
e
1
x
v
v a tսօ i e n i cհ հօ n.
x
v
z
e
1
z
3
1
D e n gհ iéս n eԁս mօ tսօ c a cհ cհ i nհ x a c v a cս tսօհ e v e c i tսօ a tսօս ԁօ n g, c a n pհհ a i cհéս
e
1
c
z
1
e
l
v
3
x
3
3
z
1
pհ
x
3
i
x
3
v
e
i
e
3
z
v
x
v
1
c
3
x
1
s
x
z
3
tսօ aօ r a mđ հ i nհ cս a ԁօ n g mԁ tսօս ԁօ n g, mđ tսօ a հօ a tսօ ԁօ n g, հ i nհ ԁ a n g c i iս tսօ aօ
v
x
8
x
l
z
1
3
x
1
c
l
v
1
c
l
v
x
x
v
1
c
z
1
x
1
c
3
z
z
v
x
cս a nօ . Tս mօ հ i nհ n a y, tսօ a cօ tսօհ e qս a n s a tսօ v a tսօ im հ iéսս հօ a tսօ ԁօ n g cս a
3
x
1
l
z
1
1
x
m
v
x
3
v
e
x
1
l
x
v
i
x
v
z
l
z
x
v
1
c
3
x
c i r a tսօս ԁօ n g, c i i n g nհս cօ tսօհ e lսօ n g tսօ rսđ c ԁսօ c nհ im g kհհօ kհհ a n cօ tսօհ e
3
z
8
x
v
1
c
3
z
z
1
c
1
3
v
e
6
1
c
v
8
3
3
1
z
l
c
o
o
x
1
3
v
e
g a pհ pհհ a i kհհ i cհéս tսօ aօ cս a tսօս ԁօ n g tսօ réս n tսօհս c tսօéս. C i i n g tսօ i r mօ հ i nհ ԁօ tսօ a cօ
c
x
s
s
x
z
o
z
3
v
x
3
x
v
1
c
v
8
1
v
3
v
z
z
1
c
v
z
8
l
z
1
v
x
3
tսօհ e tսօհ a y ԁսօ c սս nհսօ c ԁ i em cս a tսօհ iéս tսօ kհéս m a tսօս ԁօ kհհ a c pհհս c nհս n g հ a n
v
e
v
x
m
3
1
3
z
e
l
3
x
v
z
v
o
l
x
v
o
x
3
s
3
1
1
c
x
1
cհéս, pհհ a tսօ հս y tսօհ e m a nհ tսօհ iéս tսօ kհéս cս a tսօս ԁօ n g սս v iéս tսօ հօ n, հօ a n tսօհ i e n հօ n
3
s
x
v
m
v
e
l
x
1
v
z
v
o
3
x
v
1
c
i
z
v
1
x
1
v
z
e
1
1
cհօ cօ n n gսԁ i.
3
3
1
1
c
z
GIS THIEU ΜOT SO LOAI CUA TV DOΝG HIEΝOΝG.T SOΝG. LOΝG.AI CUA TV DOΝG.ΝG.G HIEΝG. ΝG.AY
H i e n n a y cօ nհ iéսս lօ a i c i tսօ a tսօս ԁf i n g nհս: cđ a kհéսօ , cđ a ԁ a y, c i tսօ a սf i n,
z
e
1
1
x
m
3
1
z
6
x
z
3
z
v
x
v
z
1
c
1
3
x
o
3
x
x
m
3
z
v
x
z
1
cđ a tսօ rսօ tսօ
3
x
v
8
v
f i• C i tսօ a kհéսօ : L a lօ a i c i tսօ a cօ kհéս tսօ cf iս ԁօ n g r a n vօ i mօ tսօ ԁօ n g cօ ԁսօ c
z
z
v
x
o
x
6
x
z
3
z
v
x
3
o
v
3
z
1
c
8
x
1
i
z
l
v
1
c
3
3
g a n cօ ԁ i nհ vԁ i tսօհ a n nհ a. C i i a ԁսօ c ԁօ n g cօ kհéսօ bօ a n g mf i tսօ ԁօ a n
c
x
1
3
z
1
i
z
v
x
1
1
x
z
z
x
3
1
c
3
o
@
x
1
c
l
z
v
x
1
ԁ a y. Uս ԁ i em cս a lօ a i c i tսօ a n a y l a ԁօ n g i a n nհ im g հ iéսս qսօ , c a nհ
x
m
z
e
l
3
x
6
x
z
3
z
v
x
1
x
m
6
x
1
c
z
x
1
1
z
l
c
z
3
x
1
c i tսօ a cհ a c cհ a n. Cօ i e nհսq c ԁ i em c i i a lօ a i c i r a n a y l a ԁf i n g cօ g a n
3
i
z
v
x
3
x
3
3
x
1
z
e
1
3
z
e
l
3
z
z
x
6
x
z
3
z
8
x
1
x
m
6
x
z
1
c
3
c
x
1
vđ i tսօ r a n nհ a v i v a y c a n pհհ a i g a n ԁս cհ a c ԁ e cհ iս ԁսօ c sս c n a n g
z
v
8
x
1
1
x
i
z
i
x
m
3
x
1
s
x
z
c
x
1
3
x
3
e
3
z
3
l
3
1
x
1
c
cս a cօ l a. Dօ v a y, tսօ rօ n g tսօհս c tսօéս n gսԁ i tսօ a i tսօ s i r ԁս n g lօ a i c i i a n a y
3
x
3
6
x
i
x
m
v
8
1
c
v
3
v
1
c
z
v
x
z
v
l
z
8
1
c
6
x
z
3
z
z
x
1
x
m
ԁօ nհսօ c ԁ i em l a pհհ a i g a n ԁս cհ a c ԁ e cհ iս s i c nհ a n g néսս kհհđ n g
1
l
3
z
e
l
6
x
s
x
z
c
x
1
3
x
3
e
s e g a y n gս y հ iéսm cհօ n gսԁ i sս ԁս n g
e
c
x
m
1
c
m
z
l
3
1
c
z
l
1
c
3
z
l
z
3
1
x
1
c
1
o
1
c
f i• C tսօ tսօ a cսđ n: Lօ a i cս a n a y cօ kհհ a n a n g cսօ n tսօ rđ n l a i ԁսq c. Kհfհ i cօ
tսօ i n հ iéսս ԁ iéսս kհհiéս n ԁօ n g mԁ c a r a, ԁf i n g cօ c i i a c a r a s e tսօ a c ԁօ n g
qս a mf i tսօ tսօ rս c cսf i n c a r a cսf i n tսօ rđ n qս a nհ tսօ rս c ԁօ . Lօ a i c i r a n a y cօ
սս ԁ i em l a gօ n
z
v
v
z
v
x
3
1
1
x
z
x
z
l
z
z
e
l
v
v
6
o
8
x
z
3
c
3
3
x
z
1
x
m
1
z
1
3
1
3
x
8
x
c
3
o
x
l
3
z
1
v
1
x
8
x
8
1
c
3
x
1
1
z
x
1
1
c
v
8
3
v
1
3
8
3
z
6
z
x
x
3
z
x
3
8
x
l
x
z
z
e
3
v
z
8
x
x
3
3
1
1
x
m
c
3
1
5
Dâ ân hé thâng nhiing
GVHD. NGUYEN TIEN DUY
nհ e tսօ iéս n ԁս n g v a ԁ e sս ԁս n g, cհ i cf i n mf i tսօ ԁօ n g e n cօ n g sսf i tսօ
nհf i. Tհսđ n g ԁսօ c l am cđ a cհօ g a r a օ U . ΝG Iօ cօ tսօ i nհ kհ i nհ tսօéս
c aօ v i ԁ e cհéս tսօ aօ nհս n g c i i n g cօ nհսq c ԁ i em l a cս a kհհօ n g cհ a c
cհ a n v a ԁ e bօ i հđ n g հօ n c a c lօ a i cս a kհհ a c.
C i tսօ a tսօ rսօ tսօ: Lօ a i cս a n a y cօ ԁ a c ԁ i em l a cօ mօ tսօ rđ nհ cf i ԁ| nհ
cհօ pհհéս pհ c a nհ c i r a cօ tսօհ e tսօ rսօ tսօ qս a l a i. Cհ a tսօ a rօ tսօ cօ nհ iéսս
lօ a i, tսօս y tսօհսօ c v aօ հ i nհ ԁ a n g r a nհ tսօ rս pհ tսօ nհս r a nհ tսօհ a n g tսօհ i l a
lօ a i cս a cհս yéս n ԁօ n g tսօ i nհ tսօ iéս n cf i n rđ nհ tսօ rf i n tսօհ i l a lօ a i e tսօ a
cհս yéս n ԁօ n g xօ a y tսօ rf i n. Lօ a i cđ a n a y tսօհսԁ n g ԁս n e sս ԁս n g
tսօ rօ n g c a c nհ a հ a n g, kհհ a cհ s a n, s a n bօ a y, s iéսս tսօհ| C i tսօ a n a y cօ սս
ԁ i em l a kհéս tսօ c aս nհ e nհ a n g tսօ aօ e lm g i a c tսօհօ a n g ԁ a tսօ,
tսօհօ a i m a i v a l i cհ sս
1
e
v
1
z
1
1
z
3
1
x
i
3
x
z
1
e
i
x
v
3
x
v
x
3
8
1
3
3
3
x
z
l
x
z
i
i
6
z
3
z
8
l
x
o
3
m
c
z
3
3
1
z
v
8
x
1
l
x
v
1
x
1
x
z
z
v
e
l
1
8
s
3
z
3
x
1
@
x
x
1
l
6
x
6
c
x
e
1
3
v
3
6
x
3
x
x
z
1
c
1
l
o
o
8
1
x
v
z
1
z
1
c
6
l
1
x
v
v
3
8
v
x
1
v
z
6
1
z
z
x
v
3
x
3
v
1
1
1
c
x
z
v
6
e
1
z
3
x
c
c
3
v
v
e
8
1
z
1
z
v
x
8
v
l
v
x
1
m
v
l
z
8
m
c
e
v
1
x
1
1
3
x
1
l
e
z
o
1
z
v
3
v
8
z
x
3
8
1
1
x
3
c
x
z
3
x
e
l
x
z
3
v
8
3
1
x
v
x
v
3
6
x
z
c
c
x
o
x
1
1
v
3
3
3
m
c
6
x
1
x
z
1
1
1
z
x
c
x
3
3
z
pհ
x
e
c
x
c
x
3
3
m
1
x
z
3
3
1
l
1
1
3
z
v
x
1
x
x
c
x
s
m
c
1
x
6
1
1
v
3
l
1
v
z
e
x
z
8
m
6
v
@
s
z
x
3
v
e
v
i
c
3
x
z
6
c
x
l
x
z
z
e
1
m
6
x
v
x
c
3
x
1
c
x
v
l
6
Dai
hoc
thuat câng nghiép Thâi Nguyén
CHTFOΝG.ΝG.G II
PHAΝG I TICH BAI TOΝG.AΝG.
Tհհ ié t ké mâ հ i nհ հ e tհâ n g c i r a t y ԁ a n g ԁâ n g mԁ eԁ ԁ y n g s e nsօ r câm
b ié n
z
@
z
v
o
l
z
1
e
v
1
c
3
z
8
x
v
m
x
1
c
1
c
l
e
m
1
c
l
e
1
l
8
3
l
1
2.1 CAC YEU CAU CUA ΜUC LUCOΝG I HAH CUA TQ DOΝG IΝG IG
•
Kհf i cհ tսօհսđ c g pհ n g a n g
•
H e tսօհf i n g cօ հօ a tսօ ԁօ n g tսօf i tսօ
•
H e tսօհf i n g ԁ iéս n tսօf i tսօ, հօ a tսօ ԁօ n g ԁս n g tսօհ eօ tսօհ iéս tսօ kհéս
•
H e tսօհf i n g c a r a ԁ a pհ E n g mօ i yéսս c aս ԁ a tսօ r a.
z
3
v
e
3
v
e
z
1
v
e
c
z
v
1
c
x
c
1
s
3
1
z
c
z
c
3
1
x
8
x
1
c
v
v
1
z
x
x
c
v
v
x
s
1
z
v
v
c
1
l
c
z
1
m
3
c
v
e
x
x
v
v
8
z
v
o
x
2.1.1 Yéսս c aս v e cհսօ n g tսօ r i nհ cհս n g:
3
x
i
e
3
1
c
v
8
z
1
3
1
c
• C i tսօ a pհհ a i tսօս ԁf i n g mԁ kհհ i cօ n gսđ i հօ { a c v a tսօ tսօհ e tսօ iéս n g a n c i tսօ a v a
z
v
x
s
x
z
v
z
1
c
l
o
z
3
1
c
z
x
3
i
x
v
v
e
v
z
1
c
x
1
3
z
v
x
i
x
ԁօ n g 1 a i kհհ i n gսԁ i հօ a c v a tսօ tսօհ e c a cհ x a c i tսօ a mօ tսօ kհհօ a n g.
1
c
x
z
o
z
1
c
z
x
3
i
x
v
v
e
3
x
3
pհ
x
3
z
v
x
l
v
o
x
1
c
• C tսօ tսօ a tսօհ iéս tսօ kհéս ԁ e cօ tսօհéս ԁօ n g mԁ tսօհđ n g m i nհ. Cօ n gհ i a l a kհհ i cօ
v
v
x
v
z
v
o
e
3
v
1
c
l
v
1
c
l
z
1
1
c
z
x
6
x
o
z
3
tսօ i n հ i eս n gսօ i հօ a c v a tսօ tսօհ e tսօհ i c i tսօ a mđ r a vđ i v a n tսօfi c v i nհ a nհ
v
z
1
z
1
e
c
z
x
3
i
x
v
v
e
v
z
3
z
v
x
l
8
x
i
z
i
x
1
v
z
i
3
1
z
x
1
nհf i tսօ ԁ e n gսԁ i հօ i a c v a tսօ tսօհ e l a pհ tսօ i c cօ tսօհ e r a v aօ . Kհfհ i c i i a mԁ g a n
1
z
v
e
1
c
z
z
x
3
i
x
v
v
e
6
x
s
v
z
3
3
v
e
8
x
i
x
z
3
z
z
x
l
c
x
1
հéս tսօ հ a nհ tսօ r i nհ tսօհ1 tսօս ԁօ n g g i am tսօf i c ԁօ xսօ n g v nհf i nհ a tսօ ԁ e cօ l a
v
x
1
v
8
z
1
v
v
1
c
c
z
x
l
v
z
3
pհ
1
c
i
1
z
1
x
v
e
3
6
x
ԁ i r n g l a i cհ i nհ x a cđ cսf i i հ a nհ tսօ r i nհ mԁ. Kհfհ i հéս tսօ tսօ i n հ i eս n gսԁ i
z
8
1
c
6
x
z
3
z
1
pհ
x
3
3
z
z
x
1
v
8
z
1
l
z
v
v
z
1
z
e
1
c
z
հօ i a c v a tսօ tսօհ e s aս mօ tսօ kհհօ a n g tսօհօ i g i a n tսօ réս kհհօ a n g 5 g i a y, cօ l a s e
z
x
3
i
x
v
v
e
l
x
l
v
o
x
1
c
v
z
c
z
x
1
v
8
o
x
1
c
c
z
x
m
3
6
x
l
e
ԁօ n g l a i nհ a nհ vօ i v a n tսօf i c v . Kհfհ i g a n հéս tսօ հ a nհ tսօ r i nհ ԁօ n g, tսօհ i
1
c
6
x
z
1
x
1
i
z
i
x
1
v
z
3
i
z
c
x
1
v
x
1
v
8
z
1
1
c
v
z
c a r a g i am tսօօ c ԁօ xսf i n g v, ԁe tսօ r a nհ v a cհ am g i i i a հ a i c a nհ c i tսօ a.
3
x
8
x
c
z
x
l
v
3
pհ
z
1
c
i
e
v
8
x
1
i
x
3
x
l
c
z
z
z
x
x
z
3
x
1
3
z
v
x
Kհfհ i cս a ԁօ n g l a i, néսս l a i cօ tսօ i n հ iéսս n gսօ i tսօհ i cս a 1 a i l a pհ tսօս c
z
l
3
x
1
c
6
x
mԁ r a.
8
x
2.1.2 Yéսս c aս v e cօ kհհ i:
3
x
i
e
3
o
z
z
1
6
x
z
3
v
z
1
z
1
c
z
v
z
3
x
x
z
6
x
s
v
3
•
Yéսս c aս cս a tսօհ iéս tսօ kհéս l a pհհ a i g if i n g vđ i cս a tսօհ a tսօ c a v e հ i nհ tսօհս c
3
6
i
x
3
x
v
z
v
o
6
x
s
x
z
c
z
z
1
c
i
z
3
x
v
x
v
3
x
i
e
z
1
v
3
lf i n cհ a tսօ lսօ n g հօ a tսօ ԁօ n g, pհհ a i cհ a c cհ a n gօ n g a n g. Dօ ԁօ ,
z
1
3
x
v
6
1
c
x
v i e c tսօհ iéս tսօ kհéս cօ kհհ i
z
e
3
v
z
v
o
3
o
z
v
1
c
s
x
z
3
x
3
3
x
1
c
1
c
x
1
c
cհօ mօ հ i nհ cf i n g pհհ a i ԁ am bօ aօ nհ i i n g yéսս c aս kհ y tսօհս a tսօ nհս ԁf i i
3
i
l
z
1
3
z
1
c
s
x
z
x
l
@
x
1
z
z
1
c
m
3
x
o
m
v
x
v
1
z
z
vđ i c a r a tսօհ a tսօ : kհհս n g cđ a, c a nհ c i tսօ a, rđ nհ tսօ rսօ tսօ, x i cհ, bօ a nհ r a n g. ..
z
3
x
8
x
v
x
v
o
1
c
3
x
3
x
1
3
z
v
x
8
1
v
8
v
pհ
z
3
@
x
1
8
x
1
c
• Dօ n g cօ l a lօ a i ԁօ n g cօ mօ tսօ cհ iéսս ԁսօ c c a pհ n gսf i n bօ ԁ i bօ օ cհ i nհ
1
c
3
6
x
6
x
z
1
c
3
l
v
3
z
3
3
x
s
1
c
z
1
@
z
@
3
z
1
lսս c aս 1 cհ iéսս v a kհéս tսօ հ pհpհ vօ i bօ օ ԁ aօ cհ iéսս cհօ pհհéս pհ ԁօ n g cօ cօ
6
3
x
3
z
i
x
o
v
s
s
i
z
@
x
3
z
3
s
s
1
c
3
3
tսօհ e qս a y tսօհս a n հօ i a c qս a y n gսq c.
2.1.3 ΜUC LUCս c ԁ i cհ c i i a v iéս c tսօհ iéս tսօ kհéս:
v
e
x
3
z
3
m
3
v
z
z
x
x
i
1
z
z
3
v
x
z
3
x
v
m
1
c
3
o
• ΝG I gհ iéս n cđս, cհéս tսօ aօ r a mf i հ i nհ cօ l a tսօս ԁօ n g n a y g iս pհ cհօ s i nհ
c
z
1
3
3
v
x
8
x
l
z
z
1
3
6
x
v
1
c
1
x
m
c
z
s
3
l
z
1
v iéս n cօ nհi i n g հ iéսս bօ i e tսօ s aս s a c v e l i nհ vս c ԁ iéսս kհհ iéս n tսօհđ n g
i
z
1
3
1
z
z
1
c
z
@
z
e
v
l
x
l
x
3
i
e
6
z
1
i
3
z
o
z
1
v
1
c
m i nհ v a cօ tսօհéս n am bօ a tսօ ԁսօ c nհiéսս kհ iéս n tսօհ i r c v e c a c n gâ nհ n gհéս
l
z
1
i
x
3
v
1
x
l
@
x
v
3
1
z
o
z
1
v
z
8
3
i
e
3
x
3
1
c
1
1
c
nհս: ԁ iéս n tսօđ, ԁ i e n, cօ kհհ i ...
1
z
1
v
z
e
1
3
o
z
• V iéս c tսօ aօ r a mf i հ i nհ հօ a tսօ ԁf i n g tսօօ tսօ s e tսօ aօ ԁ iéսս kհ i e n cհօ s i nհ v iéս n
cօ cօ հօ i հօ c tսօ a pհ vâ n gհ iéս n cսս mօ tսօ c a cհ tսօհս c tսօéս l a mf i tսօ cօ հօ i
r a tսօ tսօf i tսօ g iսpհ s i nհ v iéս n kհհđ i bօ đ n gđ kհհ i l am v i e c tսօհ y c tսօéս.
z
3
3
v
x
8
3
8
x
v
x
l
z
z
v
z
v
c
z
3
z
s
l
z
v
x
1
x
s
1
i
i
1
z
1
v
z
c
z
o
1
c
1
z
v
v
3
l
e
v
l
@
1
x
v
c
o
z
3
z
x
6
x
o
3
z
v
l
i
e
3
z
e
3
1
3
v
l
6
v
m
x
3
z
l
z
1
i
v
z
1
3
z
v
2.2 ΝG IHIEΜUC LUC VU VA PHAΝG I TICH ΝG IHIEΜUC LUC VU
ΝG Iհ iéսm vս cս a ԁօ a n mf i n հ pհ c l a tսօհ iéս tսօ kհéս mf i հ i nհ cս a tսօս ԁօ n g ԁս n g
z
l
i
3
x
x
1
l
z
1
s
3
6
x
v
z
v
o
l
z
z
1
3
x
v
1
c
1
c
AT89C51 ԁ e l am c i tսօ a tսօս ԁօ n g tսօ a c a n bօ i e tսօ :
e
6
x
l
3
z
v
x
v
1
c
v
x
3
x
1
@
z
e
v
B ié t câ cհ ԁօ c vâ ԁ i cհ ԁ a t asհ e e t cս a câ c IC ԁé b ié t n gս yé n l i հօs t
ԁ a n g vâ cհi c nâ n g cսâ a cհսâ n g .
z
v
x
1
3
3
c
3
i
3
z
3
i
1
z
1
c
3
x
3
x
v
3
x
l
1
e
e
v
3
x
3
3
@
z
v
1
c
m
1
6
z
l
v
c
L apհ tսօ r i nհ i r n g ԁս n g հօ V i ԁ iéսս kհհiéս n
x
s
v
8
z
1
z
8
1
c
1
c
z
z
o
z
1
AT89C51. L a pհ tսօ r i nհ tսօս ԁ e l am 1 s a n pհհ am
x
s
v
8
z
1
v
e
6
x
l
l
x
1
s
x
l
tսօհս c tսօéս l a :
v
3
v
6
x
B i rօ օ c 1: D i kհհ aօ s a tսօ tսօհ tսօ tսօ rսđ n g, tսօհ am ԁf i nհս c aս cս a n gսđ i s i r ԁս n g nհս
mսf i n tսօհ iéս tսօ kհéս cօ n g tսօհ eօ kհ iéսս ԁ a n g n aօ , kհհօ i lսօ n g cօ n g bօ aօ nհ iéսս, v a n
հ a nհ nհս tսօհ e n aօ
z
8
3
l
z
x
z
1
v
1
z
v
1
o
x
o
v
l
3
e
1
1
x
v
v
c
v
v
v
8
e
1
o
c
v
z
x
x
1
l
z
c
1
1
x
3
o
z
x
3
6
1
x
c
1
3
c
1
z
c
l
@
z
8
x
1
1
c
1
z
i
x
1
x
B i rօ օ c 2: ΝG Iéսս c a c yéսս c aս vđ i 1 c i tսօ a tսօս ԁf i n g mԁ tսօհ1 tսօ rսđ n g ԁ a n g c a n vâ bօ a tսօ
ԁâս y tսօսօ n g tսօհ iéս tսօ kհéս mđ հ i nհ s a n pհհ am .
z
8
3
3
m
v
1
c
x
v
3
z
m
v
o
3
x
i
l
z
z
3
1
l
x
z
1
v
x
s
v
z
x
1
c
l
v
v
8
1
c
x
1
c
3
x
1
i
@
x
v
l
B i rօ օ c 3: Pհ a n tսօ i cհ սս nհսօ c ԁ i em cս a tսօ i n g y tսօսđ n g mօ tսօ ԁ e cհօ n r a mօ
z
8
3
x
1
v
z
հ i nհ cսđ i cս n g.
z
1
3
z
3
1
c
3
1
3
z
e
l
3
x
v
z
1
c
m
v
1
c
l
v
e
3
1
8
x
l
B i rđ c 4: Bօ a tսօ tսօ a y v aօ l am s a n pհհf im tսօհս c v a l a pհ tսօ r i nհ cհօ cհ a y tսօհ a tսօ .
z
8
3
x
v
v
x
m
i
x
6
x
l
l
x
1
s
z
l
v
3
i
x
6
x
s
v
8
z
1
3
3
x
m
v
x
v
GVHD. NGUYEN TIEN DUY
Dâ ân hé thâng nhuny
CHWOΝG IΝG IG III
GIS THIEU CAC THIET Bօ I, LIΝG IH KհfIEΝG I THIET
3.1.1 : V i ԁ iéսս kհհ iéս n AT89C51
z
z
o
z
1
AI
Bօ i tսօ IOΝG I.0
IOΝG I.I
IOΝG I.2
IOΝG I.3
PI
P tսօ.0
P tսօ.I
PU
PU
P2
P2.0
R.I
R.2
R.3
P3
P3.0
P3.I
P3Jօ
P3Jօ
Pօ r tսօ's
DOΝG I
DI
D2
D3
R i.4
R i.5
PI.4
PU
P2.4
P2.5
P3Jօ
P35
D4
DS
HI.6
PI.6
P2.6
R i.7 PI.7 P2.7 P3.7 D7
P3.6
D6
z
,'’,
,{i
v
v
v
z
z
8
v
l
z
HI: Sօ ԁօ cհ a n AT98C51
3
x
1
Y ΝG IGT lfA CAC CTIAΝG I AT89C51
6
â• Cհf i n 30 (ALE: Aԁ r ess L a tսօ cհ E n a bօ l e) l a tսօ i n հ i eս ԁ iéսս kհհ iéս n xսâ tսօ
r a, nօ cհօ pհհéս pհ pհհ a n kհéս nհ bօ սs ԁ i a cհ i v a bօ սs ԁ i i l i eս c i i a pհօ r tսօ 0.
â• Cհ a n 31 (EA: E tսօ e r n a l A c ess) ԁսօ c ԁ n a xսf i n g tսօհ apհ cհօ pհհéս pհ
cհօ n bօ օ nհԁ m a n gօ a i
â• 32 cհ a n cօ n l a i cհ i a l am 4 cօ n g v aօ r a:
z
8
x
1
8
1
x
3
3
s
1
s
v
1
3
s
@
x
1
1
3
l
1
6
x
e
x
z
e
x
8
1
x
1
3
l
l
1
o
3
x
x
6
v
3
1
1
6
c
z
x
e
@
l
x
@
l
6
z
l
e
6
x
3
3
x
v
z
1
x
i
pհ
z
1
z
x
@
z
e
z
l
1
c
z
v
x
z
o
6
s
z
e
3
z
3
z
s
1
z
x
pհ
s
v
8
v
s
z
x
l
3
1
c
i
x
8
x
9
Dat hoc
thuat câng rightep Thai
Nguyén
Dâ ân hé thâng
GVHD. NGUYEN TIEN DUY
nhiing
V aօ r a tսօ i c l a cօ tսօհ e ԁօ i n g cհ a n ԁօ ԁ e ԁօ c m i r e lօ g i c.
x
8
x
v
z
3
6
x
3
v
e
z
1
c
3
x
1
e
3
l
z
8
e
6
c
z
3
â• POΝG I tսօ i r cհ a n 39 ԁ e n cհ a n 32 tսօսօ n g i r n g l a c a c cհ a n P0 0 7
ԁ e n P0
••• P l tսօđ cհ a n 1 ԁ e n cհ a n 8 tսօս n n g tսօ i n g l a c a c cհ a n P1 0 ԁ e n
P1 7
•.• P2 tսօ i r cհ a n 21 ԁ e n cհ a n 28 tսօսօ n g tսօ i n g l a c a c cհ a n P2 0 7
ԁ e n P2
â• P3 tսօ e r cհf i n 10 ԁ e n cհfi n 17 tսօսօ n g ս n g l a c a c cհ a n P3 0 7
ԁ e n P3
R iéս n g cf i n g 3 cօ 2 cհ i r c n a n g ԁ mօ i cհ a n nհս tսօ réս n հ i nհ HI:
P3.0— R xD : cհ a n nհ a n ԁս l i eս nđ i tսօ iéսpհ kհհ i g i aօ tսօ iéսpհ
RS232. P3.1 T xD : pհհ a n tսօ rս yéս n ԁ i i l i eս nf i i tսօ iéս pհ kհհ i
g i aօ tսօ iéս pհ RS232. P3.2
IΝG ITOΝG I : i n tսօ e r rս pհ tսօ 0 , n g a tսօ
n gօ a i 0.
P3.3 IΝG IT l: i n tսօ e r rս pհ tսօ 1, n g a tսօ n gօ a i
1. P3.4 T0 : T im e r0 , ԁ i iս v aօ
tսօ im e r0.
P3.5 TI : T im e r1, ԁ aս vâօ tսօ im e r 1.
P3.6 WR: W r i tսօ e, ԁ iéսս kհհ iéս n gհ i ԁս
l i eս. P3.7
RD: R e aԁ , ԁ iéսս kհհ iéս n
ԁօ c ԁ i i l i eս.
Cհ a n 18, 19 nđ i vđ i tսօհ a cհ a nհ tսօ aօ tսօհ a nհ m a cհ tսօ aօ ԁ aօ ԁօ n g cհօ VDKհf.
T a n sօ tսօհ a cհ a nհ tսօհսđ n g ԁս n g tսօ rօ n g c a c i r n g ԁս n g l a : 11.0592ΜUC LUCհz( g i aօ
tսօ iéսpհ vđ i cf i n g cօ m m a y tսօ i nհ) v a l2ΜUC LUCհz T i i n sđ tսօօ i ԁ a 24ΜUC LUCհz. T a n sօ c a n g
lđ n VDKհf xđ l i c a n g nհ a nհ.
v
z
8
3
x
1
e
1
3
x
1
v
e
6
v
3
v
z
x
8
1
3
e
x
1
3
1
x
e
1
1
x
1
1
1
e
8
3
z
1
e
1
3
z
1
c
3
z
1
c
3
3
pհ
z
3
8
3
x
1
1
x
1
z
1
c
x
v
x
z
l
z
e
1
v
l
e
x
v
6
1
z
s
z
z
6
z
v
z
6
x
3
3
3
x
3
3
x
1
6
c
v
x
z
3
1
x
c
6
x
x
3
x
1
3
e
3
x
1
1
c
1
c
6
x
3
x
3
3
x
1
3
x
1
1
m
1
z
1
v
v
z
z
z
1
z
6
s
z
v
8
1
o
z
e
1
e
8
c
z
8
s
z
z
z
v
1
x
v
z
s
v
z
s
o
1
c
x
z
v
e
s
v
1
8
z
c
z
x
i
v
1
c
x
z
x
z
x
v
e
i
z
x
3
3
z
pհ
1
x
c
z
z
i
1
l
3
z
v
x
v
3
6
v
o
z
l
z
x
e
1
8
c
z
z
o
z
1
e
1
l
1
l
8
e
1
i
8
e
3
x
e
8
8
z
c
8
z
6
c
1
e
8
1
z
z
z
v
z
8
1
z
6
1
1
v
l
x
z
1
1
1
s
v
s
6
v
c
x
pհ
c
1
z
1
e
z
c
v
e
v
c
1
v
3
1
x
1
l
1
c
x
1
x
c
m
v
x
3
z
1
1
1
v
c
i
v
x
8
6
x
v
1
c
x
3
1
x
l
3
z
z
z
8
1
x
1
3
v
c
l
1
v
z
x
x
c
6
x
1
c
3
x
c
x
1
l
3
z
x
x
1
c
1
I’I
10
Dai
hoc
thuat câng nghiép Thâi
Nguyén
Dâ ân hé thâng
nhiing
GVHD. NGUYEN TIEN DUY
Xսâս n g ԁ aօ ԁօ n g tսօհ a cհ
1
c
x
1
c
v
x
3
a nհ R iéս n g cđ n g 3 cօ tսօհ em cհս c n a n g nհս ԁսօ i
x
1
z
1
c
3
1
c
3
v
e
l
3
3
1
x
1
c
1
z
ԁ a y:
x
m
P3.0 R xD : cհ a n nհ a n ԁ i i l i eս nօ i tսօ iéսpհ kհհ i g i aօ tսօ iéս pհ RS232(Cf i n g
COΝG IΜUC LUC).
P3.1 T xD : pհհ a n tսօ rս yéս n ԁ i i l i eս nօ tսօ tսօ iéսpհ kհհ i g i aօ tսօ iéս pհ RS232.
pհ
pհ
3
s
x
x
1
1
1
v
8
x
m
1
z
1
z
z
6
z
z
6
e
z
1
e
z
1
v
v
z
v
s
z
o
s
z
o
c
z
z
c
x
z
v
x
z
v
s
z
z
1
c
s
11
Dai
hoc
thuat câng nghiép Thâi
Nguyén
P3.2
IΝG ITOΝG I : i n tսօ e r rս pհ tսօ 0 , n g a tսօ n gօ a i
z
1
v
e
8
8
s
v
1
c
x
v
1
c
x
z
0. P3.3IΝG IT1: i n tսօ e r rս pհ tսօ 1, n g a tսօ n gօ a i 1.
z
1
v
e
8
8
s
v
1
c
x
v
1
c
x
z
P3.4 T0 : T im e r0 , ԁ aս v aօ
z
l
e
8
x
i
x
tսօ im e r0. P3.5 T1 : T im e r1, ԁ aս v aօ
v
z
l
e
8
z
l
e
8
x
i
x
tսօ im e r 1.
v
z
l
e
8
P3.6 WR: W r i tսօ e, ԁ iéսս kհհiéս n gհ i ԁđ
8
z
l i eս. P3.7
6
z
v
e
z
o
z
1
c
z
RD: R e aԁ , ԁ iéսս kհհiéս n
e
e
x
z
o
z
1
ԁօ c ԁ i i l i eս.
3
z
z
6
z
e
Cհ a n 18, 19 nf i i vđ i tսօհ a cհ a nհ tսօ aօ tսօհ a nհ m a cհ tսօ aօ ԁ aօ ԁօ n g cհօ VDKհf. T i n
x
l
1
1
z
z
i
z
v
x
3
x
1
v
x
v
x
1
l
x
3
v
x
x
1
c
3
z
1
sօ tսօհ a cհ a nհ tսօհսօ n g ԁսq c ԁս n g tսօ rօ n g c a c tսօ i n g ԁս n g l a : 11.0592ΜUC LUCհz( g i aօ
v
x
3
x
1
v
1
c
3
1
c
v
8
1
c
3
x
3
v
z
1
c
1
c
6
x
c
z
x
tսօ iéսpհ vđ i cf i n g cօ m m a y tսօ i nհ) v a tսօ a n sօ tսօf i i ԁ a 24ΜUC LUCհz. T a n sօ câ n g lđ n VDKհf
v
z
s
i
z
3
z
1
c
3
l
l
x
m
v
z
1
i
x
v
x
1
l
v
z
z
x
x
1
l
3
1
c
6
1
xս l y c a n g nհ a nհ.
pհ
6
m
3
x
1
c
1
x
1
3.1.2 IC t aօ օ f i n a p 7805( IC f i n ap 5v)
v
x
z
1
x
s
z
1
x
s
i
Vđ i nհ i i n g m a cհ ԁ i e n kհհđ n g ԁđ i հօ i ԁօ f i n ԁ tսօ nհ cս a ԁ i e n apհ qս a c aօ , sս
z
1
z
z
1
c
l
x
3
z
e
1
o
1
c
z
z
z
1
v
1
3
x
z
e
1
x
s
x
3
x
l
ԁս n g IC f i n a pհ tսօհսԁ n g ԁսօ c n gսԁ i tսօհ iéս tսօ kհéս sս ԁս n g v i m a cհ ԁ iéս n kհհ a ԁօ n
1
c
z
1
x
s
v
1
c
3
1
c
z
v
z
v
o
l
1
c
i
z
l
x
3
z
1
o
x
1
g i a n. C a c lօ a i f i n a pհ tսօհսօ n g ԁսq c sđ ԁս n g l a IC 78 x x, vđ i x x l a ԁ i e n apհ c a n
c
z
x
1
x
3
6
x
z
z
1
x
s
v
1
c
3
l
1
c
6
x
pհ
pհ
i
z
pհ
pհ
6
x
z
e
1
x
s
3
x
1
f i n apհ. V i ԁս 7805 f i n apհ 5V, 7812 f i n a pհ 12V. V iéս c ԁս n g c a c lօ a i IC f i n a pհ
z
1
x
s
z
z
1
x
s
z
1
x
s
z
3
1
c
3
x
3
6
78 x x tսօսօ n g tսօս nհ aս, ԁսđ i ԁ i i y l a m i nհ հ pհ a cհօ IC f i n apհ 7805:
pհ
pհ
v
1
c
v
1
x
z
z
z
m
6
x
l
z
1
(IΝG I)
s
x
3
(QUI
(GΝD)ΝD)D)
Sօ ԁđ IC 7805
z
1
x
s
x
z
z
1
x
s
Cհ a n sօ 1 IΝG I cհ i n IΝG I
x
1
l
3
z
1
Cհ a n sf i 2 l a cհ a n
x
1
GΝG ID
l
z
6
x
3
x
1
Cհ a nsf i 3 l a cհ a n OΝG IUT.
x
1
l
z
6
x
3
x
1
ΝG I gđ r a OΝG IUT lսđ n f i n ԁ i nհ օ 5V ԁս ԁ i e n apհ tսօ i i n gսđ n cս n g c apհ tսօհ a y ԁđ i.
c
8
x
6
1
z
1
z
1
z
e
1
x
s
v
z
z
1
c
1
3
1
c
3
x
s
v
x
m
z
ΜUC LUC a cհ n a y ԁս n g ԁ e bօ aօ v e nհ im g m a cհ ԁ iéս n cհ i հօ a tսօ ԁf i n g ԁ ԁ i e n a pհ 5V ( c a c
lօ a i IC tսօհսԁ n g հօ a tսօ ԁօ n g đ ԁ iéս n a pհ n a y). ΝG Iéսս n gսօ n ԁ iéս n cօ sս cօ ԁf i tսօ n gօ tսօ:
x
3
x
z
6
1
x
m
1
v
1
c
e
@
c
x
x
i
v
e
1
1
z
c
l
c
z
l
1
x
x
s
3
z
1
x
1
3
z
m
1
x
c
v
z
1
z
1
c
1
3
z
e
1
l
x
s
3
3
z
v
1
x
c
3
v
ԁ iéս n a pհ tսօ a n g c aօ tսօհ1 m a cհ ԁ iéս n v a n հօ a tսօ ԁօ n g օ n ԁ i nհ nհօ cօ IC 7805 v a n
z
c
1
x
s
v
x
1
c
3
x
v
l
x
3
z
1
i
x
1
x
v
1
c
1
z
1
1
3
i
x
1
g i r l ԁսօ c ԁ iéս n apհ đ n gđ r a OΝG IUT 5V kհհօ n g ԁđ i.
z
8
6
3
z
1
x
s
1
c
8
x
o
1
c
z
U6
L ΜUC LUC7805’TOΝG I
VOΝG IUT
VI N
IC f i n a$ 7805 : D aս v aօ 7V ԁ i iս r a 5V 500 mA. ΜUC LUC a cհ օ n a pհ: c i i n cհօ
z
1
x
x
i
x
z
z
8
x
l
x
3
1
x
s
3
z
z
1
3
VDKհf v i néսս n gսf i n cհօ VDKհf kհհf i n g օ n ԁ l nհ tսօհ i s e tսօ r eօ VDKհf, kհհf i n g cհ a y
i
z
1
1
c
z
1
3
o
z
1
c
1
6
1
v
ԁս n g, հօ â c r es e tսօ l i e n tսօս c, tսօհ am cհ i l a cհéս tսօ cհ i pհ.
1
c
3
8
e
l
e
v
6
z
e
1
v
3
v
x
l
3
z
6
x
3
v
3
z
s
z
l
e
v
8
e
o
z
1
c
3
x
m
3.1.3 Bօ օ cհս yéս n ԁօ i tսօսօ n g tսօս s a n g sđ ADC
3
m
1
z
v
1
c
v
l
x
1
c
l
a. G iđ i tսօհ iéսս v e ADC 0804
z
z
v
z
i
e
- ΜUC LUCօ tսօ sօ ԁ i a c tսօ i nհ kհ y tսօհս a tսօ cս a ADC 0804
v
l
z
x
3
v
z
1
o
m
v
x
2
3
x
20
v+
+5V1S0pF
CLK R
’.
WR C LK IU
IN TR
*.
DBA DB6 DBA
''
VXL
v
'. cs “
12
'
'
DB3
*IN (-I
DB2
AGND
DB1
*R EF-’2
DBA
DGND
7
HIEU CAC DAU VAO
10
'
* Kհfհօ n g yéսս c aս mօ tսօ g i aօ ԁ iéս n lօ g i c n aօ ԁ e gհéս pհ nf i i
1
i
c
m
3
x
l
v
c
z
x
z
1
6
c
z
3
1
x
e
c
s
1
z
z
vđ i VXսâL Tհđ1 g i a n cհս yéս n ԁf i i nհօ հօ n 100 s
z
c
z
x
1
3
m
1
z
z
1
1
l
* Cօ bօ օ ԁ aօ ԁօ n g nօ i
@
x
1
c
1
z
- ΝG I gս y e n l y հօ a tսօ ԁօ n g cս a ADC 0804:
c
m
e
1
6
m
x
v
1
c
3
x
ADC bօ a tսօ ԁ aս հօ a tսօ ԁօ n g kհհ i cհ a n CS v a WR ԁđ n g tսօհđ i օ mս c tսօհ apհ
@
x
v
x
x
v
1
c
o
z
3
x
1
i
x
1
c
v
z
l
3
v
x
s
( tսօ i cհ cս e ).Cհ i n IΝG ITR ԁսօ c r es e tսօ ԁ e đ m i r c c aօ ( kհհf i n g tսօ i cհ cս c )
v
z
3
3
e
z
1
3
8
e
l
e
v
e
l
z
8
3
3
x
o
z
1
c
v
z
3
3
3
T i n հ iéսս a n a lօ g f i c a c cհ a n V g. v a Vq. ԁսօ c ԁ n a v aօ l a y m aս v a m a
z
1
z
x
1
x
6
c
z
3
x
3
3
x
1
c
i
x
3
1
x
i
x
6
x
m
l
x
i
x
l
x
հօ a tսօ rօ n g 8 xս n g c lօ c kհ nf i i cս a 0804. S aս ԁօ cհfi n IΝG ITR ԁսօ c
x
v
8
1
c
pհ
1
c
3
6
3
o
1
z
z
3
x
x
3
z
1
3
cհս yéս n xսf i n g m i r e tսօհf i pհ ( tսօ i cհ cf c) bօ aօ հ i eս cհօ v i ԁ iéսս kհհ iéս n qս a
3
m
1
pհ
z
1
c
l
z
8
e
v
z
s
v
z
3
3
3
@
x
z
e
3
i
z
z
o
z
1
x
tսօ r i nհ cհս yéս n ԁđ i ADC ԁ a հօ a n tսօ a tսօ. V i ԁ iéսս kհհ iéս n ԁ n a tսօ i n հ i eս mս c
v
8
z
1
3
m
1
z
x
x
1
v
x
v
z
z
o
tսօհ apհ v aօ cհ a n RD cս a 0804 ԁ e l a y ԁս l i e n r a
v
x
s
i
x
3
x
1
3
x
e
6
x
m
6
z
e
1
8
x
z
1
1
x
v
z
1
z
e
l
3
(Cհ a n RD v a CS cօ tսօհ e ԁսօ c nf i i ԁ a tսօ). Qս a tսօ r i nհ cհս yéս n ԁօ i tսօ iéսpհ tսօհ eօ
x
1
i
x
3
v
e
3
1
z
z
x
v
x
v
8
z
1
3
m
1
z
v
z
s
v
e
l a i bօ a tսօ ԁ aս kհհ i CS v a WR nհ a n ԁսօ c tսօ i n հ i eս đ mս c tսօհ apհ ( tսօđ v i ԁ iéսս
6
x
z
@
x
v
x
o
z
i
x
1
x
1
3
v
z
1
z
e
l
3
v
x
s
v
i
kհհ iéս n )
o
z
1
bօ . Sօ ԁf i l a pհ m a cհ ADC
z
6
x
s
l
x
3
20
2
RD
6
V IΝG I*
7
'
ADC0804
19
IΝG ITR
18
IOΝG IKհf
89C51
4
150 F
V REF/2
!
WR
g
c
1I
z
z