1
2
3
2
3
G 5
1. I THIÊU TAI 5
2. CAC YÊU CÂU VARANG BUÔC I I HÊTHÔNG 5
5
6
i 6
6
3. A CHON AN 6
CH 7
1. THIÊT KÊNGUYÊN LY 7
7
1.2 9
1.3 9
2. THIÊT KÊKYTHUÂT 9
10
odul GSM/GPRS M590 10
10
10
11
2.1.1.4. 13
2.1.1.5 13
13
14
14
2.2 21
21
2.2.2 22
23
24
24
25
2.2.5 Stack 28
29
2.2.6.1 PORTA 29
2.2.6.2 PORTB 30
4
2.2.6.3 PORTC 31
2.2.6.4 PORTD 32
2.2.6.5 PORTE 33
2.2.7 Timer 34
2.2.7.1 Timer0 34
2.2.7.2 Timer1 36
2.2.7.3 Timer2 37
2.2.8 ADC 38
2.2.9 Truy 41
2.2.9.1 USART 41
2.2.9.2 MSSP 50
2.2.9 53
2.2.10 (INTERRUPT) 54
2.2.11 55
2.2.12 56
2.3 57
2.3.1 Relay 12V 57
2.3.2 Opto Isolator 58
2.3.4 IC 7805 60
2.3.5 Diot 1N4007 60
2.3.6 Các linh ki khác t 60
61
61
1.1 61
61
62
62
63
63
63
64
2. 64
64
trình chính 64
65
65
66
67
O 68
5
1.
[1].
2.
-
-
-
-
-
-
-
6
-
-
-
-
-
-
-
-
-
-
-
-
7
- .
-
MODULE GSM/GPRS M590
PIC16F877A
nhóm em
S.
.
CH G
1.
SMS
MODULE
GSM/GPRS
M590
VI
PIC16F877A
8
:
-
- Module GSM/GPRS M590
PIC16F877A.
GSM/GPRS M590
.
9
Module GSM/GPRS M590 ule GSM/GPRS M590
nh
1.2 .
Phn mu
khin
Modul GSM/
GPRS M590
u
khin
Nhn gi
SMS
u khin
c thit
Timer
ADC routines
ADC
1.3 T
-
-
- OM.
-
-
-
2.
10
l GSM/GPRS M590
2.1.1.1.
[2].
2.1.1.2.
Mi
7g
-106dBm
EGSM900 nhóm 4 (2W)
DCS1800 nhóm 1 ( 1W)
210mA
2.5mA
-40C ÷ +80C
11
3.3V ÷4.8 VDC
AT
GSM 07.07
Connector
GSM RF connector
SMS
TEXT/ PDU
GPRS nhóm 10
P
2.1.1.3.
ên hình 2.3
Hình 2.3
1. Các Led ch th tr
12
2. DB9 connector(RS232) cng kt ni d liu
3.
4.
RS232.
Hình 2.4
STT
Chân
1
NC
2
RXD
3
TXD
4
NC
5
GND
GND
6
NC
7
NC
8
NC
13
9
NC
2.1.1.4.
LED
Không sáng
Led sáng
XANH
Led không sáng
2.1.1.5 H
14
2.1.2.1
-up modems),
turn to
.
[1].
2.1.2.2 Các lMODULE GSM/GPRS M590:
a. [2]:
Ok
15
+CMS ERROR <err>
Ok
N
+CMS ERROR <err>
Ok
+CMS ERROR <err>
Ok
+ CMS ERROR <err>
b. :
ATD<cr>
16
ATD01266609025;<cr>
<cr>: Enter
ATA<cr>
ATA <cr>
ATH<cr>
ATH<cr>
c.
AT+CMGD
AT+CMGD=<index> <cr>
Ok
+ CMS ERROR <err>
AT+CMGR=<index>[,mode] <cr>
17
-DELIVER:
+ CMGR:<stat>,<oa>,[<alpha>],<scts>[,<tooa>,<fo>,<pid>,<dcs>,<sca>,<tosca>,
<length>]<CR><LF><data>
-SUBMIT:
+ CMGR:<stat>,<da>,[<alpha>][,<toda>,<fo>,<pid>,<dcs>,[<vp>],<sca>,<tosca>,
<length>]<CR><LF><data>
-STATUS-REPORTs:
+ CMGR: <stat>,<fo>,<mr>,[<ra>],[<tora>],<scts>,<dt>,<st>
-COMMANDs:
+ CMGR:<stat>,<fo>,<ct>[,<pid>,[<mn>],[<da>],[<toda>],
<length><CR><LF><cdata>]
+ CMGR:<stat>,<sn>,<mid>,<dcs>,<page>,<pages><CR><LF>
<data>
+ CMGR: <stat>,[<alpha>],<length><CR><LF><pdu>
+CMS ERROR: <err>
AT+CMGS
(+CMGF=1):
+ CMGS=<da>[,<toda>]<CR> text is entered <ctrl-Z/ESC>
18
(+CMGF=0):
+ CMGS=<length><CR> PDU is given <ctrl-Z/ESC>
OK
OK
AT+CMGW
AT+CMGW=[<oa/da>[,<tooa/toda>[,<stat>]]]<CR>text is entered <ctrl-Z/ESC>
<ESC>
+ CMGW: <index>
OK
+ CMS ERROR: <err>
AT+CMGW=<length>[,<stat>]<CR> PDU is given <ctrl-Z/ESC>
AT+CMSS=<index>[,<da>[,<toda>]]
+CMGS: <mr> [,<scts>]
OK
19
OK
+CMS ERROR: <err>
AT+CNMI=[<mode>[,<mt>[,<bm> [,<ds>[,<bfr>]]]]]
OK
+CMS ERROR: <err>
d.
e. P/IP
AT+CIPSTART=<mode>,[<IPaddress>,<domain name>],<port>
<port> :
20
CONNECT OK
g.
AT+CFUN
AT+CFUN=0 <cr>
OK
AT+CFUN
AT+CFUN=1 <cr>
OK
ATZ <cr>
OK
ATE0 <cr>
h. C
-
21
-
-
bin (AT+CBC).
-
-
-
-
Ví
- ng hay modem GSM/GPRS. Ví
[1].
2.2
22
2.6
2.2.2
bit.
I/O [3].
.
23
-
-
-
-
-
-
-
Programming ) thông qua 2 chân.
- Watchdog
-
-
-
]:
24
2.2.4.1 B
8*1024 = 8192
[3].
25
Interrupt vector ).
2.2.4.2