Upload
trinhphuc
View
230
Download
3
Embed Size (px)
Citation preview
Auto-Curtain
- i -
- ii -
Abstract
There are more and more automatic equipments in this age. High technology
industry almost use automatic equipments to replace humans and efficiency is also
build up.in this experiment, we use infrared control transmitter to control motor and,
microcontroller 8051 which has PLC ability to control step motor and the data that
receiver sensor call back. 8051 take advantage of hardware construction and match
other equipments becomes a very popular microcontroller and step motor control
peed and directions by digital signal, otherwise we use infrared transmitter sensor and
photo-resistor in order not to use infared controller whether step motor still can make
sure turn or reverse automatically.
- iii -
.................................................................................................................................i
........................................................................................................................ii
Abstract ........................................................................................................................ iii
...............................................................................................................................iv
...........................................................................................................................vi
..........................................................................................................................vii
................................................................................................................1
....................................................................................2
2.1 ......................................................................................2 2.2 ..............................................................................................4
....................................................................................6
3.1 89C51 .................................................................................6 3.1.1 89C51 ..............................................................................6 3.1.2 89C51 ......................................................................7 3.1.3 89C51 ..............................................................7
3.2 ..................................................................................................9 3.2.1 ...................................................................................9 3.2.2 .........................................................................10 3.2.3 .............................................................................11
LCD..............................................................................................................14
4.1 LCD ...................................................................................................14 4.2 LCD ..........................................................................................16
......................................................................................19
5.1 ............................................................................................19 5.2 ................................................................................................19 5.3 ................................................................................................20 5.4 ................................................................................................................21 5.5 ........................................................................................................22 5.6 ................................................................................................................23
..............................................................................................................26
- iv -
......................................................................................................................27
..................................................................................................28
..................................................................................32
LCD .....................................................................................................37
..........................................................................................44
..........................................................................................45
..................................................................................................46
- v -
2.1.1 .........................................................................................................3
2.2.1 LM339 ..................................................................................................4
2.2.2 .........................................................................................4
2.2.3 .....................................................................................................5
3.1.1 8951 .............................................................................................7
3.2.1 ...................................................................................11
3.3.1 ....................................................................................12
3.3.2 ...................................................................................13
4.1.1 LCD .......................................................................................14
4.2.1 LCD ...........................................................................................17
4.2.2 LCD ...............................................................18
4.2.3 LCD 8951 .................................................................................18
5.2.1 ...............................................................................19
5.3.1 .......................................................................................20
5.4.1 PT-2248PIN ...................................................................................21
5.4.2 .......................................................................................22
5.5.1 ...................................................................................................23
5.6.1 PT-2249 .....................................................................................24
5.6.2 PT-2249PIN ...................................................................................24
5.6.3 ...........................................................................................25
- vi -
3.1.1 89C51 .......................................................................................7
3.2.1 ...................................................................................10
3.2.2 ...............................................................................................11
3.2.3 ...........................................................................12
4.1.1 16 X2 DDRAM ........................................15
4.1.2 LCD .............................................................................................15
5.3.1 TL-1838 ..............................................................................................20
5.5.1 ...........................................................................23
- vii -
- 1 -
2.1
Ge 0.6 1.5
1.5
.CdSCdSe
2.PbSPdSe
1m3.4m 200s
3.InSb
7m 50ns
4.
- 2 -
5m14m 77K
5.
20m 100m 4K
2.1.1
- 3 -
2.2
(cds) 10K
150K
LM339
2.2.1
2.2.1 LM339
2.2.2
- 4 -
Cds 9k LM339 0.55V
Cds 150 K 5 4.32V 100K
2.5V
0.55V 2.5V
4.32V 2.5
:
2.2.3
- 5 -
3.1 89C51
3.1.1 89C51
(Cpu)I/O
(Single Chip Microcomputer)
CPUI/O
(Microcontroller) I/O
8 8051 4KByte ROM128Byte Ram
32 I/O I/O
8951
(1) 8 Cpu
(2)()
(3)32 I/O
(4) 128 Ram
(5) 16 /(8052 3 )
(6) Uart
(7)5 (/)
(8)(Clock) 12MHz
(9) 4K(8052 8K)(Rom)
(10) 64K (Eprom)
- 6 -
(11) 64K (Ram)
3.1.2 89C51
3.1.1 8951
89C515V12MHz
3.1.3 89C51
3.1.1 89C51
Vss 20
Vcc 40 +5V
XTAL1 19 12MHz2.1
- 7 -
XTAL2 18
RESET 9 2.1
EA 31 2.1
P0.0~P0.7 32~39 8 /
P1.0~P1.7 1~8 8 /
P2.0~P2.7 21~28 8 /
P3.0 RXD()
P3.1 TXD()
P3.2 INT0( 0)
P3.3 INT1( 1)
P3.4 T0( 0)
P3.5 T1( 1)
P3.6 WR()
P3.7
10~17
8 /
RD()
ALE 30
PSEN 29
- 8 -
3.2
3.2.1
(Stepping Motor)
1.
2.
3.
4.
5.
6.
7.
8.
(1) (Variable Reluctance Type)
(2) (Permanent Magnet Type)
(3) (Hybrid Type)
- 9 -
3.2.2
4 A-AB-B
3.2.1
(CW) (CCW)
(
)
()
- 10 -
3.2.