• Like
Gsm based campus display system project report
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

Gsm based campus display system project report

  • 15,418 views
Published

 

Published in Education
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
  • hello mr. kashyap would you plz help me for the programming of this project.
    Are you sure you want to
    Your message goes here
  • pls send me-gsm based combo robot project
    Are you sure you want to
    Your message goes here
  • hii mr ..kashyap . kindly send me the c code for this project ..

    my id : pardeep_acet74@yahoo.com

    thanks in advance..
    Are you sure you want to
    Your message goes here
  • could you please send me the program for this project....email:sherylsarageorge@gmail.com
    Are you sure you want to
    Your message goes here
  • hi sir. we are currently working a project related to this. ahm we have a problem programming our AT89s52, we dont know what codes should be use and how to program it.. can you help us? ahmm message me in facebook or email me at dexterpineda03@yahoo.com.. thank you very much sir ..
    Are you sure you want to
    Your message goes here
No Downloads

Views

Total Views
15,418
On SlideShare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
919
Comments
8
Likes
6

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. “ GSM BASED CAMP D PUS DIS SPLAY SYSTEM ” (USIN MIC NG CROCON NTROL LLER A AT89S52 2) A PROJE ECT REPO ORT Subm mitted by YAP SHA (09030 KASHY AH 00111022 2) PRAGNE HAR (090 ESH SUTH 03001110 086) YUVRA RATHO (090300111114 AJ OD 4)In partia fulfilmen of the re al nt equiremen for the award of t nts the deggree of BACHE ELOR O ENGIN OF NEERING In ELECTR RONICS & COMMU UNICATI IONL.D.R.P Institute o Techno of ology & Re esearch, G Gandhinag gar Guja arat Tech hnologica Univers al sity, Ahm medabad Decem mber, 2012
  • 2. AcknowledgementWe place on record and warmly acknowledge the continuous encouragement, invaluablesupervision, timely suggestions and inspired guidance offered by our guideProf. Dilip H. Patel, professor, Department of Electronics & Communication engineering, atLDRP Institute of Technology & Research, Gandhinagar, in bringing this report to asuccessful completion.We are grateful to Prof. S.E.Mendhe, Head of the Department of Electronics &Communication engineering for permitting us to make use of the facilities available in thedepartment to carry out the project successfully. Last but not the least we express our sincerethanks to all of our friends and our parents who have patiently extended all sorts of help foraccomplishing this undertaking. Shah Kashyap B. (090300111022) Suthar Pragnesh G. (090300111086) Rathod Yuvraj S. (090300111114)
  • 3. AbstractIn the last couple of decades, communication technology has developed by leapsand bounds. It has already established its importance in sharing the informationright from household matters to worldwide phenomena. Apart from sharinginformation, it is also used for remote control of machines and electronicappliances. In our day-to-day life, we use many such appliances at home, officeand public places for our comfort and convenience. Every device requires oneor the other kind of operation control for which it has a HMI (human-machineinterface).Communication technology not only helps us to exchange information withhuman beings but also allows us to carry out monitoring and controlling ofmachines from remote locations. This remote control of appliances is possiblewith wired or wireless communication interfaces embedded in the machines.The use of “Embedded System in Communication” has given rise to manyinteresting applications. One of such applications is public addressing system(PAS). Many companies are manufacturing audio / video systems like publicannouncement system, CCTV, programmable sign boards etc. But all thesesystems are generally hard-wired, complex in nature and difficult to expand. So,by adding wireless communication interface such as GSM to these systems, wecan overcome their limitations.    
  • 4. L.D.R.P Institute of Technology & Research, Gandhinagar Electronics & Communication Engineering Department 2012 CERTIFICATE Date:This is to certify that the dissertation entitled “ GSM BASED CAMPUS DISPLAYSYSTEM ” has been carried out by SHAH KASHYAP B., SUTHAR PRAGNESH G.,RATHOD YUVRAJ S. under my guidance in fulfilment of the degree of Bachelor ofEngineering in Electronics & Communication (7th Semester/8th Semester) of GujaratTechnological University, Ahmedabad during the academic year 2012-13.Guides: Head of the Department:Prof. Dilip H. Patel Prof. S.E. Mendhe(Internal)  
  • 5. Table Of Contents Acknowledgement ii Abstract iii Certificate iv Table of Content v List of Figures vii List of Tables viiiChapter : 1 Introduction 1 1.1 Project Overview 2 1.2 Information transfer 2 1.3 Components Overview 3Chapter : 2 Design Overview 5 2.1 Design on paper 6 2.2 Schematic Interfacing 7Chapter : 3 Hardware Profile 8 3.1 GSM Modem 9 3.1.1 Accesing GSM Modem 10 3.1.2 Testing of GSM Modem 11 3.1.3 List of Important AT Commands 15 3.2 LCD Display 21 3.2.1 Important Signals 22 3.2.1.1 Enable (EN) 23 3.2.1.2 Register Select (RS) 23 3.2.1.3 Read/Write (R/W) 23
  • 6. 3.3 Microcontroller AT89S52 26 3.3.1 Features 26 3.3.2 Description 27 Chapter : 4 Interfacing 28 4.1 Microcontroller-Modem Interfacing 29 4.1.1 DTE and DCE 29 4.1.2 RS-232 29 4.1.2.1 RS-232 Signals 31 4.2 Microcontroller-LCD Interfacing 32Chapter : 5 Software Solvency 34 5.1 End User Perspective 35 5.2 Control Flow 36 5.2.1 Initialization 36 5.2.2 Serial Transfer using TI and RI flags 36 5.2.3 Validity check & Display 36Chapter : 6 Implementation at the institute level 37 6.1 Overview 38 6.2 Proposal 38Chapter : 7 Conclusion 39 7.1 Conclusion & Future Improvements 40References : 42
  • 7. List of FiguresFigure 2.1 Design OverviewFigure 2.2 Schematic DiagramFigure 3.1 Matrix Simado GD-T11 GSM ModulesFigure 3.2 MS HyperTerminals Connection Description dialog boxFigure 3.3 HyperTerminals Properties dialog boxFigure 3.4 MS HyperTerminals Connect to dialog boxFigure 3.5 MS HyperTerminals main windowFigure 3.6 AT89S52 MicrocontrollerFigure 4.1 Female 9 Pin PlugFigure 4.2 Pin Configuration Of LCD InterfaceFigure 5.1 Flowchart
  • 8. List of TablesTable 3.1 Pin Configuration of LCDTable 3.1 Control Codes of LCDTable 4.1                        RS-232 Signals
  • 9. Chapter – 1Introduction
  • 10. 1.1 Project OverviewThe Campus Display System (CDS) is aimed at the colleges and universities for displayingday-to-day information continuously or at regular intervals during the working hours. BeingGSM-based system, it offers flexibility to display flash news or announcements faster thanthe programmable system. GSM-based campus display system can also be used at otherpublic places like schools, hospitals, railway stations, gardens etc. without affecting thesurrounding environment.The CDS mainly consists of a GSM receiver and a display toolkit which can be programmedfrom an authorized mobile phone. It receives the SMS, validates the sending MobileIdentification Number (MIN) and displays the desired information after necessary codeconversion. It can serve as an electronic notice board and display the important noticesinstantaneously thus avoiding the latency. Being wireless, the GSM based CDS is easy toexpand and allows the user to add more display units at anytime and at any location in thecampus depending on the requirement of the institute.1.2 Information Transfer1.1.2 Information TransferA coordinated sequence of user and telecommunications system actions that causesinformation present at a source user to become present at a destination user.An information-transfer transaction usually consists of three consecutive phases called theaccess phase, the information-transfer phase, and the disengagement phase.1.2 BroadcastA term to describe communication where a piece of information is sent or transmitted fromone point to all other points. There is just one sender, but the information is simultaneouslysent to all connected receivers.
  • 11. In networking, a distinction is made between broadcasting and multicasting. Broadcastingsends a message to everyone on the network whereas multicasting sends a message to a selectlist of recipients.One of the most common examples is broadcast through a cellular network service. Thisserves multiple end users at different locations in a simulcast fashion. Practically everycellular system has some kind of broadcast mechanism. This can be used directly fordistributing information to multiple mobiles, commonly, for example in a mobile telephonysystem, the most important use of broadcast information is to set up channels for one to onecommunication between the mobile Trans-receiver and the base station. This is calledpaging. The details of the process of paging vary somewhat from network to network, butnormally we know a limited number of cells where the phone is located (this group of cells iscalled a location area in the GSM system). Paging takes place by sending the broadcastmessage on all of those cells.This project aims at integrating the expansiveness of a wireless cellular network and the easeof information transfer through the SMS with the coverage of campus display boards. It canalso be a modest effort to realize the complete potential of public display boards ininstantaneous information broadcast in swift response to events of interests.1.3 Components OverviewThis system uses the following components.MicrocontrollerCDS is based on AT89S52 microcontroller which is a variant of 8052. It is an 8-bitmicrocontroller with 8KB on-chip Flash memory, 256 bytes RAM, three timer / counters, oneserial and four 8-bit parallel ports. It can also address up to 64KB of external data memoryRAM and program memory.LCDThe GSM based CDS uses HD44780 LCD for displaying the text data. It is 20 character x 2line display module. But in practice, it should be replaced by the large multiline, multi-colour commercial display units
  • 12. GSM ModemA GSM modem is a wireless modem that works with a GSM wireless network. A wirelessmodem behaves like a dial-up modem.The main difference between them is that a dial-up modem sends and receives data through afixed telephone line while a wireless modem sends and receives data through radio waves.Like a GSM mobile phone, a GSM modem requires a SIM card in order to operate.In this project, we must take into account the fact that the modem requires a wired connectionat one end and wireless at the other. Matrix Simado GDT11 is a Fixed Cellular Terminal(FCT) for data applications. It is a compact and portable terminal that can satisfy various datacommunication needs over GSM. It can be connected to a computer with the help of astandard RS232C serial port. Simado GDT11 offers features like Short Message Services(SMS), Data Services (sending and receiving data files), Fax Services and Web Browsing.The Simado GDT11 is easy to set up.Computers use AT commands to control modems. Both GSM modems and dial-up modemssupport a common set of standard AT commands. GSM modem can be used just like a dial-up modem. In addition to the standard AT commands, GSM modems support an extended setof AT commands. These extended AT commands are defined in the GSM.Computer InterfaceFinally, this project uses RS232 serial interface for interfacing the GSM modem with a PC.This interface is used to setup the GSM modem. A hyper terminal application is used to issueAT commands to the GSM modem.MAX-232The MAX232 is a dual driver/receiver that includes a capacitive voltage generator to supplyEIA-232 voltage levels from a single 5-V supply. Each receiver converts EIA-232 inputs to5-V TTL/CMOS levels. These receivers have a typical threshold of 1.3 V and a typicalhysteresis of 0.5 V, and can accept ±30-V inputs.
  • 13. Chapter-2Design Overview
  • 14. 2.1. Design on PaperAs explained in the introduction chapter, the realization of complete potential of the displayboards and the wireless medium in information transfer is the major issue that the followingthesis of the following project deals with. Figure 2.1 Design OverviewAs we see in the above figure, there are at least three interfacing circuits, MAX-232 withMicrocontroller, LCD display with microcontroller, and MAX-232 with GSM MODEM.It is not a hidden fact that interfacing a MODEM with a normal PC is quite easy with the helpof the AT commands sent to it from the Hyper Terminal window. But we must take intoaccount the fact that the MODEM requires a wired connection at one end and wireless at theother. Dedicating a general purpose computer at each and every site of the display boards,although makes the task a lot easier but is too expensive to be a possibility. Hence we employAtmel 89S52 microcontroller with 64 Kb EEROM storage memory.
  • 15. The complexity of coding substantially increases, but once programmed the module works atits robust best since it is a dedicated embedded system and not a general purpose computer.The design procedure involves identifying and assembling all the required hardware andensuring fail safe interfacing between all the components. Then we have the coding processwhich has to take care of the delays between two successive transmissions and mostimportantly the validation of the sender’s number. The number of valid mobile numbers canbe more than one. The limiting constraint is the RAM of the microcontroller rather than thecoding-complexities. Figure 2.2 Schematic diagram
  • 16. Chapter-3Hardware Profile
  • 17. 3.1. GSM MODEMA GSM modem is a wireless modem that works with a GSM wireless network. A wirelessmodem behaves like a dial-up modem. The main difference between them is that a dial-upmodem sends and receives data through a fixed telephone line while a wireless modem sendsand receives data through radio waves. Like a GSM mobile phone, a GSM modem requires aSIM card from a wireless carrier in order to operate. Matrix Simado GDT11 is a FixedCellular Terminal (FCT) for data applications. It is a compact and portable terminal that cansatisfy various data communication needs over GSM. It can be connected to a computer withthe help of a standard RS232C serial port. Simado GDT11 offers features like Short MessageServices (SMS), Data Services(sending and receiving data files), Fax Services and WebBrowsing. Remote login and data file transfer are also supported. It is the perfect equipmentfor factory plants, resorts,dams and construction sites where wired connectivity is notavailable or not practicable.The Simado GDT11 is easy to set up. It finds its applications in IT companies, Banks andFinancial Institutions, Logistic Companies, Service Providers, Remote Project Sites,Professionals, and such other business establishments.Computers use AT commands to control modems. Both GSM modems and dial-up modemssupport a common set of standard AT commands. GSM modem can be used just like a dial-up modem. In addition to the standard AT commands, GSM modems support an extended setof AT commands. These extended AT commands are defined in the GSM standards. With theextended AT commands, various things can be done: Reading, writing and deleting SMS messages. Sending SMS messages. Monitoring the signal strength. Monitoring the charging status and charge level of the battery. Reading, writing and searching phone book entries.
  • 18. Fig. 3.1: Matrix Simado GD-T11 GSM module3.1.1 Accessing GSM MODEM using Microsoft HyperTerminalMicrosoft HyperTerminal is a small program that comes with Microsoft Windows.We use it to send AT commands to the GSM modem. It can be found atStart -> Programs -> Accessories -> Communications -> HyperTerminal.Before programming our SMS application, it is required to check if the GSM modem andSIM card are working properly first. The MS HyperTerminal is a handy tool when it comesto testing the GSM device. It is a good idea to test the GSM devices beforehand.When a problem occurs, sometimes it is difficult to tell what causes the problem. The causecan be the program, the GSM device or the SIM card. If GSM device and SIM card with MSHyperTerminal and they operate properly, then it is very likely that the problem is caused bythe program or other hard wares. For Linux users, Mincom can be used instead ofHyperTerminal.
  • 19. 3.1.2 Testing of GSM MODEMTo use MS HyperTerminal to send AT commands to the GSM modem, the followingprocedure is followed.1. We put a valid SIM card into the GSM modem. We can obtain a SIM card bysubscribing to the GSM service of a wireless network operator.2. Since in our case the modem drivers were pre installed, we need not to install anysuch drivers.3. Then we start up MS HyperTerminal by selecting Start -> Programs ->Accessories -> Communications -> HyperTerminal.4. In the Connection Description dialog box (as shown in the screenshot givenbelow), we enter any name and choose an icon we like for the connection. Thenwe click the OK button.Figure 3.2 : The screenshot of MS HyperTerminals Connection Description dialog box
  • 20. 5. In the Connect To dialog box, choose the COM port that your mobile phone or GSMmodem is connecting to in the Connect using combo box. For example, choose COM1 if yourmobile phone or GSM modem is connecting to the COM1 port.Then click the OK button.(Sometimes there will have more than one COM port in theConnect using combo box. To know which COM port is used by your mobile phone or GSMmodem, follow the procedure below.In Windows 98:Go to Control Panel -> Modem. Then click the Diagnostics tab. In the list box, youcan see which COM port the mobile phone or GSM modem is connected to.In Windows 2000 and Windows XP:Go to Control Panel -> Phone and Modem Options.6. The Properties dialog box comes out. Enter the correct port settings for your mobile phoneor GSM modem. Then click the OK button. (To find the correct port settings that should beused with your mobile phone or GSM modem, one way is to consult the manual of yourmobile phone or GSM modem. Another way is to check the port settings used by the wirelessmodem driver that you installed earlier.To check the port settings used by the wireless modem driver on Windows 98,follow these steps:a. Go to Control Panel -> Modem.b. Select your mobile phone or GSM modem in the list box.c. Click the Properties button.d. The Properties dialog box appears. The Maximum speeds field on the General tabcorresponds to HyperTerminals Bits per second field. Click the Connection tab and you canfind the settings for data bits, parity and stop bits.Click the Advanced button and you can find the setting for flow control.
  • 21. To check the port settings used by the wireless modem driver on Windows 2000and Windows XP, follow these steps:a. Go to Control Panel -> Phone and Modem Options -> Modems tab.b. Select your mobile phone or GSM modem in the list box.c. Click the Properties button.d. The Properties dialog box appears. Click the Advanced tab and then click theChange Default Preferences button.e. The Change Default Preferences dialog box appears. The Port speed field onthe General tab corresponds to HyperTerminals Bits per second field. You canalso find the setting for flow control on the General tab. On the Advanced tab,you can find the settings for data bits, parity and stop bits.)Figure 3.3 : The screenshot of MS HyperTerminals Properties dialog box
  • 22. Figure 3.4 : The screenshot of MS HyperTerminals Connect to dialog box7. Type "AT" in the main window. A response "OK" should be returned from the mobilephone or GSM modem.Type "AT+CPIN?" in the main window. The AT command "AT+CPIN?" is used to querywhether the mobile phone or GSM modem is waiting for a PIN (personal identificationnumber, i.e. password). If the response is "+CPIN: READY", it means the SIM card does notrequire a PIN and it is ready for use. If your SIM card requires a PIN, you need to set the PINwith the AT command "AT+CPIN=<PIN>".
  • 23. Figure 3.5 the screenshot of MS HyperTerminals main windowIf you get the responses above, your mobile phone or GSM modem is working properly.You can start typing your own AT commands to control the mobile phone or GSMModem.3.1.3 List of important AT commandsAT Commands :AT commands are used to control MODEMs. AT is the abbreviation for Attention. Thesecommands come from Hayes commands that were used by the Hayes smart modems. TheHayes commands started with AT to indicate the attention from the MODEM. The dial upand wireless MODEMs (devices that involve machine to machine communication) need ATcommands to interact with a computer. These include the Hayes command set as a subset,along with other extended AT commands.AT commands with a GSM/GPRS MODEM or mobile phone can be used to accessfollowing information and services:
  • 24. 1. Information and configuration pertaining to mobile device or MODEM and SIM card.2. SMS services.3. MMS services.4. Fax services.5. Data and Voice link over mobile network. The Hayes subset commands are called the basic commands and the commands specific to a GSM network are called extended AT commands.   Types of AT Commands: There are four types of AT commands:   Explanation of commonly used AT commands: 1) AT - This command is used to check communication between the module and the computer. For example, AT OK The command returns a result code OK if the computer (serial port) and module are connected properly. If any of module or SIM is not working, it would return a result code ERROR. 2) +CMGF - This command is used to set the SMS mode. Either text or PDU mode can be selected by assigning 1 or 0 in the command.
  • 25. SYNTAX: AT+CMGF=<mode> 0: for PDU mode 1: for text modeThe text mode of SMS is easier to operate but it allows limited features of SMS. ThePDU (protocol data unit) allows more access to SMS services but the operator requires bitlevel knowledge of TPDUs. The headers and body of SMS are accessed in hex format inPDU mode so it allows availing more features.For example, AT+CMGF=1 OK3) +CMGW - This command is used to store message in the SIM.SYNTAX: AT+CMGW=” Phone number”> Message to be stored Ctrl+zAs one types AT+CMGW and phone number, ‘>’ sign appears on next line where one cantype the message. Multiple line messages can be typed in this case. This is why the messageis terminated by providing a ‘Ctrl+z’ combination. As Ctrl+z is pressed, the followinginformation response is displayed on the screen.+CMGW: Number on which message has been stored4) +CMGS - This command is used to send a SMS message to a phone number. SYNTAX: AT+CMGS= serial number of message to be send.As the command AT+CMGS and serial number of message are entered, SMS is sent to theparticular SIM.
  • 26. For example, AT+CMGS=1 OK5) ATD - This command is used to dial or call a number. SYNTAX: ATD<Phone number>(Enter)For example,ATD1234567896) ATA - This command is used to answer a call. An incoming call is indicated by a message‘RING’ which is repeated for every ring of the call. When the call ends ‘NO CARRIER’ isdisplayed on the screen.SYNTAX: ATA (Enter)As ATA followed by enter key is pressed, incoming call is answered. For example,RINGRINGATA7) ATH - This command is used to disconnect remote user link with the GSM module.SYNTAX: ATH (Enter)List of AT commands:The AT commands for both, GSM module and the mobile phone, are listed below. Some ofthese commands may not be supported by all the GSM modules available. Also there mightbe some commands which won’t be supported by some mobile handsets.
  • 27. Testing :Command DescriptionAT Checking communication between the module and computer.Call control :Command DescriptionATA Answer commandATD Dial commandATH Hang up callATL Monitor speaker loudnessATM Monitor speaker modeATO Go on-lineATP Set pulse dial as defaultATT Set tone dial as defaultAT+CSTA Select type of addressAT+CRC Cellular result codesData card Control :Command DescriptionATI IdentificationATS Select an S-registerATZ Recall stored profileAT&F Restore factory settingsAT&V View active configurationAT&W Store parameters in given profileAT&Y Select Set as power up optionAT+CLCK Facility lock commandAT+COLP Connected line identification presentationAT+GCAP Request complete capabilities listAT+GMI Request manufacturer identificationAT+GMM Request model identificationAT+GMR Request revision identificationAT+GSN Request product serial number identification (IMEI)Phone control :Command DescriptionAT+CBC Battery chargeAT+CGMI Request manufacturer identificationAT+CGMM Request model identificationAT+CGMR Request revision identificationAT+CGSN Request product serial number identificationAT+CMEE Report mobile equipment errorAT+CPAS Phone activity statusAT+CPBF Find phone book entriesAT+CPBR Read phone book entryAT+CPBS Select phone book memory storageAT+CPBW Write phone book entryAT+CSCS Select TE character setAT+CSQ Signal quality
  • 28. Computer data interface :Command DescriptionATE Command EchoATQ Result code suppressionATV Define response formatATX Response range selectionAT&C Define DCD usageAT&D Define DTR usageAT&K Select flow controlAT&Q Define communications mode optionAT&S Define DSR optionAT+ICF DTE-DCE character framingAT+IFC DTE-DCE Local flow controlAT+IPR Fixed DTE rateService :Command DescriptionAT+CLIP Calling line identification presentationAT+CR Service reporting controlAT+DR Data compression reportingAT+ILRR DTE-DCE local rate reportingNetwork Communication parameter :Command DescriptionATB Communications standard optionAT+CBST Select bearer service typeAT+CEER Extended error reportAT+CRLP Radio link protocolAT+DS Data compressionMiscellaneous :Command DescriptionA/ Re-execute command lineAT? Command helpAT*C Start SMS interpreterAT*T Enter SMS block mode protocolAT*V Activate V.25bis modeAT*NOKIATEST Test commandAT+CESP Enter SMS block mode protocolSMS Text mode :Command DescriptionAT+CSMS Select message serviceAT+CPMS Preferred message storageAT+CMGF Message formatAT+CSCA Service centre addressAT+CSMP Set text mode parametersAT+CSDH Show text mode parametersAT+CSCB Select cell broadcast message typesAT+CSAS Save settingsAT+CRES Restore settingsAT+CNMI New message indications to TEAT+CMGL List messagesAT+CMGR Read messageAT+CMGS Send messageAT+CMSS Send message from storageAT+CMGW Write message to memoryAT+CMGD Delete message
  • 29. SMS PDU mode :Command DescriptionAT+CMGL List MessagesAT+CMGR Read messageAT+CMGS Send messageAT+CMGW Write message to memory3.2 LCD DisplayOne of the most common devices attached to an 8051 is an LCD display. Some of themost common LCDs connected to the 8051 are 16x2 and 20x2 displays. This means 16characters per line by 2 lines and 20 characters per line by 2 lines, respectively. In recentyears the LCD is finding widespread use replacing LED’s.This is due to the following reasons:1. Declining prices2. Ability to display numbers, characters and graphics.3. Incorporation of a refreshing controller into the LCD.4. Ease of programming.Fortunately, a very popular standard exists which allows us to communicate with the vastmajority of LCDs regardless of their manufacturer. The standard is referred to asHD44780U, which refers to the controller chip which receives data from an externalsource (in this case, the 8051) and communicates directly with the LCD. The 44780standard requires 3 control lines as well as either 4 or 8 I/O lines for the data bus. Theuser may select whether the LCD is to operate with a 4-bit data bus or an 8-bit data bus.
  • 30. If a 4-bit data bus is used the LCD will require a total of 7 data lines (3 control lines plusthe 4 lines for the data bus). If an 8-bit data bus is used the LCD will require a total of 11data lines (3 control lines plus the 8 lines for the data bus).Pin Symbol I/O DescriptionTable 3.1 Pin Configuration of LCD3.2.1 Important Signals
  • 31. The following pins are important to LCD’s while programming3.2.1.1 Enable (EN)The EN line is called "Enable." This control line is used to tell the LCD that you aresending it data. To send data to the LCD, your program should make sure this line is low(0) and then set the other two control lines and/or put data on the data bus. When theother lines are completely ready, bring EN high (1) and wait for the minimum amount oftime required by the LCD datasheet (this varies from LCD to LCD), and end by bringingit low (0) again.3.2.1.2 Register Select (RS)The RS line is the "Register Select" line. When RS is low (0), the data is to be treated as acommand or special instruction (such as clear screen, position cursor, etc.). When RS ishigh (1), the data being sent is text data which should be displayed on the screen. Forexample, to display the letter "T" on the screen you would set RS high.3.2.1.3 Read/Write (R/W)The RW line is the "Read/Write" control line. When RW is low (0), the information onthe data bus is being written to the LCD. When RW is high (1), the program is effectivelyquerying (or reading) the LCD. Only one instruction ("Get LCD status") is a readcommand. All others are write commands--so RW will almost always be low.Finally, the data bus consists of 4 or 8 lines (depending on the mode of operation selectedby the user). In the case of an 8-bit data bus, the lines are referred to as DB0, DB1, DB2,DB3, DB4, DB5, DB6, and DB7.Above is the quite simple schematic. The LCD panels Enable and Register Select isconnected to the Control Port. The Control Port is an open collector / open drain output.While most Parallel Ports have internal pull-up resistors, there are a few which dont.Therefore by incorporating the two 10K external pull up resistors, the circuit is more18 portable for a wider range of computers, some of which may have no internal pull upresistors.We make no effort to place the Data bus into reverse direction. Therefore we hard wirethe R/W line of the LCD panel, into write mode. This will cause no bus conflicts on the
  • 32. data lines. As a result we cannot read back the LCDs internal Busy Flag which tells us ifthe LCD has accepted and finished processing the last instruction. This problem isOvercome by inserting known delays into our program.The 10k Potentiometer controls the contrast of the LCD panel. Nothing fancy here. Aswith all the examples, Ive left the power supply out.You can use a bench power supply set to 5v or use a onboard +5 regulator. Remember a fewde-coupling capacitors, especially if you have trouble with the circuit working properly.
  • 33. Table 3.2 Control codes of LCD
  • 34. 3.3 Microcontroller AT89S52Features:• Compatible with MCS-51® Products• 8K Bytes of In-System Programmable (ISP) Flash Memory– Endurance: 1000 Write/Erase Cycles• 4.0V to 5.5V Operating Range• Fully Static Operation: 0 Hz to 33 MHz• Three-level Program Memory Lock• 256 x 8-bit Internal RAM• 32 Programmable I/O Lines• Three 16-bit Timer/Counters• Eight Interrupt Sources• Full Duplex UART Serial Channel• Low-power Idle and Power-down Modes• Interrupt Recovery from Power-down Mode• Watchdog Timer• Dual Data Pointer• Power-off FlagDescription:The AT89S52 is a low-power, high-performance CMOS 8-bit microcontroller with 8Kbytes of in-system programmable Flash memory. The device is manufactured usingAtmel’s high-density nonvolatile memory technology and is compatible with the industry-standard 80C51 instruction set and pinout.The on-chip Flash allows the program memory to be reprogrammed in-system or by aconventional nonvolatile memory programmer.By combining a versatile 8-bit CPU with in-system programmable Flash ona monolithic chip, the Atmel AT89S52 is a powerful microcontroller which provides aHighly-flexible and cost-effective solution to many embedded control applications.
  • 35. The AT89S52 provides the following standard features: 8K bytes of Flash, 256 bytes ofRAM, 32 I/O lines, Watchdog timer, two data pointers, three 16-bit timer/counters,a six-vector two-level interrupt architecture, a full duplex serial port, on-chip oscillator,and clock circuitry. In addition, the AT89S52 is designed with static logic for operationdown to zero frequency and supports two software selectable power saving modes.The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port, andinterrupt system to continue functioning. The Power-down mode saves the RAM contentsbut freezes the oscillator, disabling all other chip functions until the next interrupt orhardware reset. Figure 3.6 AT89S52 Microcontroller
  • 36.       Chapter‐4                Interfacing    
  • 37.  4.1 Microcontroller – MODEM Interfacing  4.1.1. DTE and DCE The terms DTE and DCE are very common in the data communications market. DTE is short for Data Terminal Equipment and DCE stands for Data Communications Equipment. But what do they really mean?  As  the  full  DTE  name  indicates  this  is  a  piece  of  device  that  ends  a  communication  line, whereas the DCE provides a path for communication.  Lets say we have a computer on which wants to communicate with the Internet through a modem and a dial‐up connection. To get to the Internet you tell your modem to dial the number of your provider. After your modems has dialed the number, the modem of the provider will answer your call and your will hear a lot of noise. Then it becomes quiet and you see your login prompt or your dialing program tells you the connection is established. Now you have a connection with the server from your provider and you can wander the Internet. In this example you PC is a Data Terminal (DTE). The two modems (yours and that one of your provider) are DCEs, they make the communication between you and your provider possible. But now we have to look at the server of your provider. Is that a DTE or DCE? The answer is a DTE. It ends the communication line between you and the server. When you want to go from your provided server to another place it uses another interface. So DTE and DCE are interfacing dependent. It is e.g. possible that for your connection to the server, the server is a DTE, but that that same server is a DCE for the equipment that it is attached to on the rest of the Net.  4.1.2. RS‐232 In telecommunications, RS‐232 is a standard for serial binary data signals connecting between a DTE (Data terminal equipment) and a DCE (Data Circuit‐terminating Equipment). It is commonly used in computer serial ports. In RS‐232, data is sent as a time‐series of bits. Both synchronous and asynchronous transmissions are supported by the standard. In addition to the data circuits, the standard defines a number of control 
  • 38. circuits used to manage the connection between the DTE and DCE. Each data or control circuit only operates in one direction that is, signaling from a DTE to the attached DCE or the reverse. Since transmit data and receive data are separate circuits, the interface can operate in a full duplex manner, supporting concurrent data flow in both directions. The standard does not define character framing within the data stream, or character encoding.     Figure 4.1 Female 9 pin plug    
  • 39. Table 4.1 RS‐232 Signals  4.1.2.1 RS‐232 Signals   Transmitted Data (TxD)          Data sent from DTE to DCE.   Received Data (RxD)          Data sent from DCE to DTE.   Request To Send (RTS) Asserted (set to 0) by DTE to prepare DCE to receive data. This may require action on the part of the DCE, e.g. transmitting a carrier or reversing the direction of a half‐duplex line.   Clear To Send (CTS)   Asserted by DCE to acknowledge RTS and allow DTE to transmit.   Data Terminal Ready (DTR) Asserted by DTE to indicate that it is ready to be connected. If the DCE is a modem, it should go "off hook" when it receives this signal. If this signal is disserted, the modem should respond by immediately hanging up.   Data Set Ready (DSR) Asserted by DCE to indicate an active connection. If DCE is not a modem (e.g. a null‐modem cable or other equipment), this signal should be permanently asserted (set to 0), possibly by a jumper to another signal.   Carrier Detect (CD)   Asserted by DCE when a connection has been established with remote equipment.   Ring Indicator (RI)   Asserted by DCE when it detects a ring signal from the telephone line. 
  • 40.           4.2 Microcontroller‐LCD Interfacing                                Figure 4.2 Pin Configuration of LCD interfacing  Above is the quite simple schematic. The LCD panel’s Enable and Register Select is connected to the Control Port. The Control Port is an open collector / open drain output. While most Parallel Ports have internal pull‐up resistors, there are a few which don’t. Therefore by incorporating the two 10K external pull up resistors, the circuit is more portable for a wider range of computers, some of which may have no internal pull up resistors. 
  • 41.  We make no effort to place the Data bus into reverse direction. Therefore we hard wire the R/W line of the LCD panel, into write mode. This will cause no bus conflicts on the data lines. As a result we cannot read back the LCD’s internal Busy Flag which tells us if the LCD has accepted and finished processing the last instruction.  This problem is overcome by inserting known delays into our program.  The 10k Potentiometer controls the contrast of the LCD panel. Nothing fancy here. As with all the examples, I’ve left the power supply out. You can use a bench power supply set to 5v or use a onboard +5 regulator. The user may select whether the LCD is to operate with a 4‐bit data bus or an 8‐ bit data bus. If a 4‐bit data bus is used, the LCD will require a total of 7 data lines.  If an 8‐bit data bus is used, the LCD will require a total of 11 data lines. The three control lines are EN, RS, and RW. Note that the EN line must be raised/lowered before/after each instruction sent to the LCD regardless of whether that instruction is read or write text or instruction. In short, you must always manipulate EN when communicating with the LCD. EN is the LCD’s way of knowing that you are talking to it.  If you don’t raise/lower EN, the LCD doesn’t know you’re talking to it on the other lines.              
  • 42. Chapter-5Software Solvency
  • 43. 5.1 End User Perspective Figure 5.1 FlowchartThe above given flowchart gives the end user perspective on the control flow. Duringnormal operations the LCD reads a message from a fixed memory location in themicrocontroller and displays it continuously, until a new message arrives for validation.It is then when a branching occurs basing on the validity of the sender’s number and furthertaking into account the priority assigned to the new message in comparison to theprevious one.
  • 44. 5.2 Control Flow5.2.1. InitializationThe baud rate of the modem was set to be 4800 bps using the commandAT+IPR=4800.The ECHO from the modem was turned off using the commandATE/ATE0 at the hyper terminal. For serial transmission and reception to be possibleboth the DTE and DCE should have same operational baud rates. Hence to set themicrocontroller at a baud rate of 4800bps, we set terminal count of Timer 1 at 0FFh(clock frequency = 1.8432). The TCON and SCON registers were set accordingly.5.2.2. Serial transfer using TI and RI flagsAfter setting the baud rates of the two devices both the devices are now ready to transmitand receive data in form of characters. Transmission is done when TI flag is set andsimilarly data is known to be received when the Rx flag is set. The microcontroller thensends an AT command to the modem in form of string of characters serially just when theTI flag is set. After reception of a character in the SBUF register of the microcontroller(response of MODEM with the read message in its default format or ERROR message orOK message), the RI flag is set and the received character is moved into the physicalmemory of the microcontroller.5.2.3. Validity Check & DisplayAfter serially receiving the characters the code then checks for start of the sender’snumber and then compares the number character by character with the valid number prestored in the memory. Since we are employing just one valid number, we are able to dothe validation process dynamically i.e. without storing the new message in anotherlocation in the memory. For more than one valid numbers we would require morememory locations to first store the complete (valid/invalid) message in the memory andthen perform the comparison procedure.After validity check the control flow goes into the LCD program module to display thevalid message stored in the memory. In case of multiple valid numbers all invalid storedmessages are deleted by proper branching in the code to the “delete-message” module.
  • 45. Chapter-6 Implementationat the Institute level
  • 46. 6.1 OverviewInformation sharing holds an important role in the daily work of our instituteLDRP-ITR. Thecurrent means of information transfer are notice and circulars. New notice orcircular isonly checked at the end of the day. This makes the process very time consumingand inefficient.Looking into current trend of information transfer in the campus, it is seen thatimportant notice take time to be displayed in the notice boards. This latency is notexpected in most of the cases and must be avoided.6.2 ProposalIt is proposed to implement this project at the institute level. It is proposed toplace display boards at major access points. These include canteens, entrance gate, hostelarea etc. But, theThe GSM based display toolkit can be used as a add-on to these display boards and make ittruly wireless. The display board programs itself with the help of theincoming SMS withproper validation. The valid senders may include the Director, Deans and Registrars. Thecentralized system can be placed as the Computer Center for access by any other valid userswith authentications. SMS from these users is treated to be valid and is displayed. Other SMSfrom any other mobile phone is discarded. Thus information from valid sources can bebroadcasted easily. Such a system proves to be helpful for immediate information transferand can be easily implemented at the institute level.
  • 47. Chapter-7Conclusion
  • 48. 7.1 ConclusionThe prototype of the GSM based display toolkit was efficiently designed. This prototypehas facilities to be integrated with a display board thus making it truly mobile. The toolkitaccepts the SMS, stores it, validates it and then displays it in the LCD module. The SMSis deleted from the SIM each time it is read, thus making room for the next SMS. Themajor constraints incorporated are the use of ‘*’ as the termination character of the SMSand the display of one SMS as a time. These limitations can be removed by the use ofhigher end microcontrollers and extended RAM.The prototype can be implemented using commercial display boards. In this case,it can solve the problem of instant information transfer in the campus.7.2 Future ImprovementsThe use of microcontroller in place of a general purpose computer allows us to theorizeon many further improvements on this project prototype. Temperature display duringperiods wherein no message buffers are empty is one such theoretical improvement thatis very possible. The ideal state of the microcontroller is when the indices or storagespace in the SIM memory are empty and no new message is there to display.With proper use of interrupt routines the incoming message acts as an interrupt, thetemperature display is halted and the control flow jumps over to the specific interrupt serviceroutine which first validates the sender’s number and then displays the information field.Another very interesting and significant improvement would be to accommodate multiplereceiver MODEMS at the different positions in a geographical area carrying duplicate SIMcards. With the help of principles of TDMA technique, we can choose to simulcast and /orbroadcast important notifications. After a display board receives the valid messagethrough the MODEM and displays it, it withdraws its identification from the network &synchronously another nearby MODEM signs itself into the network and starts to receivethe message. The message is broadcast by the mobile switching center for a continuous
  • 49. time period during which as many possible display board MODEMS “catch” the messageand display it as per the constraint of validation.Multilingual display can be another added variation of the project. The display boards are oneof the single most important media for information transfer to the maximum number of endusers. This feature can be added by programming the microcontroller to use differentencoding decoding schemes in different areas as per thelocal language. This will ensure theincrease in the number of informed users. Graphical display can also be considered as a longterm but achievable and target able output. MMS technology along with relatively high endmicrocontrollers to carry on the tasks of graphics encoding and decoding along with a moreexpansive bank of usable memory can make this task a walk in the park.
  • 50. ReferencesWebsites: http://en.wikipedia.org/wiki/Wikipedia http://www.atmel.com/   http://images.google.com http://www.8052.com http://www.datasheetcatalog.com http://www.keil.com/forum/docsDocuments: Datasheet : MATRIX SIMADO GDT11 GSM MODEM Manual Datasheet: ATMEL 89S52 Microcontroller Datasheet : LCD HD44780 Datasheet: MAX232 from Texas Instruments