GSM 1308 MODEM CONTROL USING PIC-16F877A MICROCONTROLLER
Transcript of GSM 1308 MODEM CONTROL USING PIC-16F877A MICROCONTROLLER
![Page 1: GSM 1308 MODEM CONTROL USING PIC-16F877A MICROCONTROLLER](https://reader034.fdocuments.net/reader034/viewer/2022050802/55a696bb1a28ab702d8b4657/html5/thumbnails/1.jpg)
GSM 1308 MODEM CONTROL
USING
PIC-16F877A MICROCONTROLLER
![Page 2: GSM 1308 MODEM CONTROL USING PIC-16F877A MICROCONTROLLER](https://reader034.fdocuments.net/reader034/viewer/2022050802/55a696bb1a28ab702d8b4657/html5/thumbnails/2.jpg)
Presented by
Supervised By
Dr. A.K.M Fazlul Haque
Associate Professor
Department of ETE
Daffodil International
University
Sk.Mustafizur RahmanID: 082-19-930
Md. Moktarul Islam
ID: 082-19-938
Md.Emam-ul-Uddin
ID: 082-19-939
![Page 3: GSM 1308 MODEM CONTROL USING PIC-16F877A MICROCONTROLLER](https://reader034.fdocuments.net/reader034/viewer/2022050802/55a696bb1a28ab702d8b4657/html5/thumbnails/3.jpg)
Aim of the Project:
Controlling the GSM 1308 modem using PIC16F877A by
improving the existing flowcode microcontroller program that
the modem can work as a more general mobile phone.
![Page 4: GSM 1308 MODEM CONTROL USING PIC-16F877A MICROCONTROLLER](https://reader034.fdocuments.net/reader034/viewer/2022050802/55a696bb1a28ab702d8b4657/html5/thumbnails/4.jpg)
Content PIC16F877A Microcontroller
E-Blocks
GSM ModemCompiling Procedure
Flowcode Software
Main Programs
Result
Conclusion
![Page 5: GSM 1308 MODEM CONTROL USING PIC-16F877A MICROCONTROLLER](https://reader034.fdocuments.net/reader034/viewer/2022050802/55a696bb1a28ab702d8b4657/html5/thumbnails/5.jpg)
PIC16F877A Microcontroller
The name PIC refers to a group of microcontrollers
This is a flexible 40 pin device. The
operating voltage of the microcontroller is
5V
![Page 6: GSM 1308 MODEM CONTROL USING PIC-16F877A MICROCONTROLLER](https://reader034.fdocuments.net/reader034/viewer/2022050802/55a696bb1a28ab702d8b4657/html5/thumbnails/6.jpg)
Memory of 16F877A
Flash or EPROM: It is the memory where
the written program is stored.
RAM: It is the memory where the declared
'variables are stored.
EEPROM: It is the memory where the
variables can be permanently stored.
![Page 7: GSM 1308 MODEM CONTROL USING PIC-16F877A MICROCONTROLLER](https://reader034.fdocuments.net/reader034/viewer/2022050802/55a696bb1a28ab702d8b4657/html5/thumbnails/7.jpg)
I/O Ports of 16F877A
PORT A : It is connected with Multiprogrammer
board
PORT C: It is Connected with RS232
Communicator
PORT D : It is connected with Keypad
PORT B: It is connected with LCD
![Page 8: GSM 1308 MODEM CONTROL USING PIC-16F877A MICROCONTROLLER](https://reader034.fdocuments.net/reader034/viewer/2022050802/55a696bb1a28ab702d8b4657/html5/thumbnails/8.jpg)
E-blocks are small circuit boards each of which consists of a block of electronics that can be snapped
together to form an electronic system. There are two kinds of E-block
E-block
Upstream boards
Downstream boards
![Page 9: GSM 1308 MODEM CONTROL USING PIC-16F877A MICROCONTROLLER](https://reader034.fdocuments.net/reader034/viewer/2022050802/55a696bb1a28ab702d8b4657/html5/thumbnails/9.jpg)
Used Components of E-Blocks
EB005 LCD board
EB014 Keypad RS232
![Page 10: GSM 1308 MODEM CONTROL USING PIC-16F877A MICROCONTROLLER](https://reader034.fdocuments.net/reader034/viewer/2022050802/55a696bb1a28ab702d8b4657/html5/thumbnails/10.jpg)
Jumper Setting of E-Blocks
Board PORTSettings
Keypad D No settings
LCD B Jumpers on DEFAULT
Sensor A Jumpers on DEFAULT
RS232 CC
Jumpers:
R& TX SELECTION
CTS & RTS SELECTION
1
Patch System wire links:
SPI/DAC CJumpers:
SDO, SDI & SCK SELECTION
A HIP EN SELECTION
1
Patch System wire links:
None
C
![Page 11: GSM 1308 MODEM CONTROL USING PIC-16F877A MICROCONTROLLER](https://reader034.fdocuments.net/reader034/viewer/2022050802/55a696bb1a28ab702d8b4657/html5/thumbnails/11.jpg)
Setting up the GSM modem
It can operates between 6vdc to 40vdc
RS232 is used to connect the modem with E-Blocks.
Need a active SIM card with sufficient credit.
Need to connect an Antenna with it to get network connection.
![Page 12: GSM 1308 MODEM CONTROL USING PIC-16F877A MICROCONTROLLER](https://reader034.fdocuments.net/reader034/viewer/2022050802/55a696bb1a28ab702d8b4657/html5/thumbnails/12.jpg)
Testing GSM Modem
Before using the GSM modem with E-Block system it needs to be test by
HyperTerminal using different AT Command
•AT+CREG?
•AT%CGREG?
•ATD
•ATH
Checking of GSM, GPRS Setting, Outgoing & Incoming Call
![Page 13: GSM 1308 MODEM CONTROL USING PIC-16F877A MICROCONTROLLER](https://reader034.fdocuments.net/reader034/viewer/2022050802/55a696bb1a28ab702d8b4657/html5/thumbnails/13.jpg)
Compiling ProcedureRunning the simulation
![Page 14: GSM 1308 MODEM CONTROL USING PIC-16F877A MICROCONTROLLER](https://reader034.fdocuments.net/reader034/viewer/2022050802/55a696bb1a28ab702d8b4657/html5/thumbnails/14.jpg)
Project Software
To complete this project there are two software has been used. Their names are given below:
•Flowcode
•PPP
Steps of Flowcode
![Page 15: GSM 1308 MODEM CONTROL USING PIC-16F877A MICROCONTROLLER](https://reader034.fdocuments.net/reader034/viewer/2022050802/55a696bb1a28ab702d8b4657/html5/thumbnails/15.jpg)
Clock setting of Microcontroller
•Crystal clock
•RC clock
Clock signal control the speed of operation.
![Page 16: GSM 1308 MODEM CONTROL USING PIC-16F877A MICROCONTROLLER](https://reader034.fdocuments.net/reader034/viewer/2022050802/55a696bb1a28ab702d8b4657/html5/thumbnails/16.jpg)
Selection and Editing of Components
![Page 17: GSM 1308 MODEM CONTROL USING PIC-16F877A MICROCONTROLLER](https://reader034.fdocuments.net/reader034/viewer/2022050802/55a696bb1a28ab702d8b4657/html5/thumbnails/17.jpg)
RS232 setting
RS232 is the communicator, which Tx and Rx data modem and PIC micro.
![Page 18: GSM 1308 MODEM CONTROL USING PIC-16F877A MICROCONTROLLER](https://reader034.fdocuments.net/reader034/viewer/2022050802/55a696bb1a28ab702d8b4657/html5/thumbnails/18.jpg)
Call Macro icon properties
Call to another Macro. Macro means small programs which used many
time.
![Page 19: GSM 1308 MODEM CONTROL USING PIC-16F877A MICROCONTROLLER](https://reader034.fdocuments.net/reader034/viewer/2022050802/55a696bb1a28ab702d8b4657/html5/thumbnails/19.jpg)
Call Component Macro
![Page 20: GSM 1308 MODEM CONTROL USING PIC-16F877A MICROCONTROLLER](https://reader034.fdocuments.net/reader034/viewer/2022050802/55a696bb1a28ab702d8b4657/html5/thumbnails/20.jpg)
loop icon properties
Loop while:1 means loop forever.
Loop until: until the condition is true.
Loop count: How many time loop are running.
![Page 21: GSM 1308 MODEM CONTROL USING PIC-16F877A MICROCONTROLLER](https://reader034.fdocuments.net/reader034/viewer/2022050802/55a696bb1a28ab702d8b4657/html5/thumbnails/21.jpg)
Decision properties
![Page 22: GSM 1308 MODEM CONTROL USING PIC-16F877A MICROCONTROLLER](https://reader034.fdocuments.net/reader034/viewer/2022050802/55a696bb1a28ab702d8b4657/html5/thumbnails/22.jpg)
Calculation icon properties
Provide the logical function
![Page 23: GSM 1308 MODEM CONTROL USING PIC-16F877A MICROCONTROLLER](https://reader034.fdocuments.net/reader034/viewer/2022050802/55a696bb1a28ab702d8b4657/html5/thumbnails/23.jpg)
String Manipulation
AT+CREG
AT%CGREG?
AT+CLIP=1,1 to see caller ID
ATD
ATA
ATH
![Page 24: GSM 1308 MODEM CONTROL USING PIC-16F877A MICROCONTROLLER](https://reader034.fdocuments.net/reader034/viewer/2022050802/55a696bb1a28ab702d8b4657/html5/thumbnails/24.jpg)
Delay
Programmed is running too fast, So Add the delay function
![Page 25: GSM 1308 MODEM CONTROL USING PIC-16F877A MICROCONTROLLER](https://reader034.fdocuments.net/reader034/viewer/2022050802/55a696bb1a28ab702d8b4657/html5/thumbnails/25.jpg)
Open the HEX file Send the program
:020000001C2DB5
:08000800FF00030EFC000A0ECC
:0C001000FD00040EFE008A110A12452DAE
:1000200000000000C10B10280800C308031D192898
:10003000080009300000FF3E031D1A2800000000E0
:10004000C30B1928080083160313DA010230DB0002
:100050001030DC006F30DD00E001DD08031908001E
:100060005C08DE00DF015B18DE17DB185F1483130A
:100070005F1883175E0884000008E100E11B742804
![Page 26: GSM 1308 MODEM CONTROL USING PIC-16F877A MICROCONTROLLER](https://reader034.fdocuments.net/reader034/viewer/2022050802/55a696bb1a28ab702d8b4657/html5/thumbnails/26.jpg)
Developed Program
Program for calling system:
It has three state:
Idle
Ringing
Connected
When the modem detects an incoming call it transmits the message “RING” at regular
intervals (approximately 2 seconds).
Steps to Write Program:
LCD Initializing
Sending AT+CLIP
Checking incoming call
Taking Number from Keypad
Speed Dialing
Sending ATA
Sending ATH
![Page 27: GSM 1308 MODEM CONTROL USING PIC-16F877A MICROCONTROLLER](https://reader034.fdocuments.net/reader034/viewer/2022050802/55a696bb1a28ab702d8b4657/html5/thumbnails/27.jpg)
Main Program for calling
![Page 28: GSM 1308 MODEM CONTROL USING PIC-16F877A MICROCONTROLLER](https://reader034.fdocuments.net/reader034/viewer/2022050802/55a696bb1a28ab702d8b4657/html5/thumbnails/28.jpg)
Taking Number from Keypad
![Page 29: GSM 1308 MODEM CONTROL USING PIC-16F877A MICROCONTROLLER](https://reader034.fdocuments.net/reader034/viewer/2022050802/55a696bb1a28ab702d8b4657/html5/thumbnails/29.jpg)
Speed dialing
![Page 30: GSM 1308 MODEM CONTROL USING PIC-16F877A MICROCONTROLLER](https://reader034.fdocuments.net/reader034/viewer/2022050802/55a696bb1a28ab702d8b4657/html5/thumbnails/30.jpg)
Receiving a Call Call termination
![Page 31: GSM 1308 MODEM CONTROL USING PIC-16F877A MICROCONTROLLER](https://reader034.fdocuments.net/reader034/viewer/2022050802/55a696bb1a28ab702d8b4657/html5/thumbnails/31.jpg)
Main Program’s Tx Macro Main Program’s Rx Macro
![Page 32: GSM 1308 MODEM CONTROL USING PIC-16F877A MICROCONTROLLER](https://reader034.fdocuments.net/reader034/viewer/2022050802/55a696bb1a28ab702d8b4657/html5/thumbnails/32.jpg)
Program for sending sms
Steps to Write Program:
Taking Number from Keypad
The AT command required to configure
this option is Message Format
command:
AT+CMGF=1
The AT command to send a text
message is:
AT+CMGS=<”number”>
Writing message
<CTRL-Z> to finish sending
![Page 33: GSM 1308 MODEM CONTROL USING PIC-16F877A MICROCONTROLLER](https://reader034.fdocuments.net/reader034/viewer/2022050802/55a696bb1a28ab702d8b4657/html5/thumbnails/33.jpg)
Sending Number Sending Message
![Page 34: GSM 1308 MODEM CONTROL USING PIC-16F877A MICROCONTROLLER](https://reader034.fdocuments.net/reader034/viewer/2022050802/55a696bb1a28ab702d8b4657/html5/thumbnails/34.jpg)
Program for receiving smsThe AT command required to achieve this is the New Message Indication
command:
AT+CNMI=2,2
![Page 35: GSM 1308 MODEM CONTROL USING PIC-16F877A MICROCONTROLLER](https://reader034.fdocuments.net/reader034/viewer/2022050802/55a696bb1a28ab702d8b4657/html5/thumbnails/35.jpg)
Simulation and Result
Software Output
Speed dialling (out going call):
Hardware Output
![Page 36: GSM 1308 MODEM CONTROL USING PIC-16F877A MICROCONTROLLER](https://reader034.fdocuments.net/reader034/viewer/2022050802/55a696bb1a28ab702d8b4657/html5/thumbnails/36.jpg)
Speed dialling call termination
If we press ‘*’ Key it will terminate by sending ATH command
![Page 37: GSM 1308 MODEM CONTROL USING PIC-16F877A MICROCONTROLLER](https://reader034.fdocuments.net/reader034/viewer/2022050802/55a696bb1a28ab702d8b4657/html5/thumbnails/37.jpg)
Taking and Dialing a Number from Keypad
If we press the ‘5’ key on keypad a option will be appeared showing “Enter No” on Software LCD .than we have
to enter a mobile number which will be saved in a variable named “K_Buffer”.
if we press the ‘#’ Key on keypad, the entered number will be dialled By a AT command that is
“ATD01710036458;”
![Page 38: GSM 1308 MODEM CONTROL USING PIC-16F877A MICROCONTROLLER](https://reader034.fdocuments.net/reader034/viewer/2022050802/55a696bb1a28ab702d8b4657/html5/thumbnails/38.jpg)
Incoming Call
Hardware output
Now if we press the ‘#’ key on the keypad the incoming call will be received by sending a AT command to
modem as “ATA”
If we press ‘*’ Key it will terminate.
![Page 39: GSM 1308 MODEM CONTROL USING PIC-16F877A MICROCONTROLLER](https://reader034.fdocuments.net/reader034/viewer/2022050802/55a696bb1a28ab702d8b4657/html5/thumbnails/39.jpg)
Sending of sms: When we will press the ‘#’ key a AT command that is “AT+CMGS=<”01717405762”>
” is sent to the modem
Software Output Hardware output
![Page 40: GSM 1308 MODEM CONTROL USING PIC-16F877A MICROCONTROLLER](https://reader034.fdocuments.net/reader034/viewer/2022050802/55a696bb1a28ab702d8b4657/html5/thumbnails/40.jpg)
Receiving of sms
The figure is showing received message from a remote mobile phone
![Page 41: GSM 1308 MODEM CONTROL USING PIC-16F877A MICROCONTROLLER](https://reader034.fdocuments.net/reader034/viewer/2022050802/55a696bb1a28ab702d8b4657/html5/thumbnails/41.jpg)
Conclusion
There are three existing program has been modified separately for
calling, sending and receiving sms which is necessary to developed a
general phone.
But it works slowly because of during the execution of large program the
device faces some delay as its fixed clock speed and also for limitation of
LCD display and KEYPAD
![Page 42: GSM 1308 MODEM CONTROL USING PIC-16F877A MICROCONTROLLER](https://reader034.fdocuments.net/reader034/viewer/2022050802/55a696bb1a28ab702d8b4657/html5/thumbnails/42.jpg)
For Your Time