1. You can now buy finished microcontroller project from us, Check out the Store for the complete list of projects.
  2. Need a custom project, Send us some details about your project. So that we can quote the price for it.

Sending SMS through GSM Modem

Discussion in 'BASCOM 8051 Projects & Doubts' started by Binu, Mar 30, 2008.

  1. Binu

    Binu Administrator

    Likes Received:
    138
    Trophy Points:
    63
    The temperature data from DS1820 is sent through SMS.


    '**************************************
    ' sending SMS
    '**************************************
    Sub Sendsms
    Disable Serial
    Set Scon.1
    Print "AT+CMGS=" ; Chr(34) ; Send_number_const ; Chr(34)
    Reset Scon.1
    Enable Serial
    Wait 2
    Disable Serial
    Set Scon.1
    Print "Temperature:" ; T1 ; "." ; T ; Chr(26) '26-->"^Z"
    Reset Scon.1
    Enable Serial
    Cls
    Locate 1 , 1 : Lcd "SMS Sent..."
    Wait 1
    End Sub



    Download the full code to measure the temperature from DS1820 and to sent the temperature through SMS.

    [​IMG] Attachment: Sending_SMS_GSM_MODEM.zip ( 1190bytes )
  2. chetnbt

    chetnbt New Member

    Likes Received:
    0
    Trophy Points:
    0
    Does the code above you have given do following operations....

    1. Measure temperature using DS1820.
    2. The temperature is read by microcontroller(AT89C52).
    3. The temperature is displayed on the LCD display.
    4. Initialize the GSM modem.
    5. The temperature data is available at the serail port.
    6. The temperature data is SMSed to the number in the assembly code.

    along with this if does any other operation please do mention.And what is the extension SMS test.BAS</u>!!![^]

    CBT
  3. Binu

    Binu Administrator

    Likes Received:
    138
    Trophy Points:
    63
    Yes it do all the above functions.
    You have to compile the program with BASCOM from www.mcselec.com
  4. chetnbt

    chetnbt New Member

    Likes Received:
    0
    Trophy Points:
    0
    why did you generate code using BASCOM IDE why not other IDE

    "THIS IS THE ERROR I'VE GOT WHILE COMPILING"

    Error 8:eek:ut of internal memory in file :c:\DOCUMENTS AND SETTINGS\CHETAN\DESKTOP\SMS TEST.BAS ,LINE :25

    PLEASE HELP ME OUT.

    Dim Bd(9) As Byte
    Dim S As Byte , Tmp As Byte
    Dim Crc As Byte
    Dim T As Integer , T1 As Integer

    Dim Xx1(16) As Byte:ERROR LINE
    Dim I As Byte
    Dim Counts As Byte
    Dim Temps As Bit[/code]
  5. Binu

    Binu Administrator

    Likes Received:
    138
    Trophy Points:
    63
    you have to change the options. for this goto OPTIONS -&gt; Complier -&gt;MISC
    change the Byte End HEX to 50.
    Now compile. [8D]
  6. chetnbt

    chetnbt New Member

    Likes Received:
    0
    Trophy Points:
    0
    Hello binu sir byte end(hex) in deed was set at 50 but i changed it to 60 i could compile it properly. i've a doubt in the .RPT file below marked red
    as you can see the file size is too high that is 2320bytes.
    Compiler : BASCOM 8051 LIBRARY V 2.14
    Processor : 89S8252
    Report : SMS TEST
    Date : 04-03-2008
    Time : 16:06:43

    Baud Timer : 1
    Baudrate : 9600
    Frequency : 11059200
    Clock div. : 12
    ROM start : &H0
    RAM start : &H0
    LCD mode : 4-bit
    StackStart : &H57
    Used ROM : &H907 2311 (dec) &gt; doesn't fit into selected codesize : 2048

    --------------------------------------------------------------------------------
    Variable Type Address(hex) Address(dec)
    --------------------------------------------------------------------------------

    ERR Bit 20.4
    TEMPS Bit 20.5

    BD Byte (9) 0032 50
    S Byte 003B 59
    TMP Byte 003C 60
    CRC Byte 003D 61
    XX1 Byte (16) 0042 66
    I Byte 0052 82
    COUNTS Byte 0053 83
    SWRK Byte 0054 84
    SI Byte 0055 85
    SJ Byte 0056 86

    T Integer 003E 62
    T1 Integer 0040 64
    CONSTANTS
    --------------------------------------------------------------------------------
    Constant Value
    --------------------------------------------------------------------------------
    _BUILDVERSION 213
    SEND_NUMBER_CONST "+919972408865"
    CBT
  7. Binu

    Binu Administrator

    Likes Received:
    138
    Trophy Points:
    63
    Its gives a warning that the code size is greater than 2kb
  8. chetnbt

    chetnbt New Member

    Likes Received:
    0
    Trophy Points:
    0
    Does that mean an concern over the memory size of the controller. that means i have to use AT89C52 or the higher memory versions of controller. And one more thing is this IDE is simpler to use and reduce complexity of programming

    CBT
  9. Binu

    Binu Administrator

    Likes Received:
    138
    Trophy Points:
    63
    Yes, you can set it to any bytes so that it will warn you about the size of the program.
    This IDE is best for BASIC language.
  10. edesign

    edesign New Member

    Likes Received:
    0
    Trophy Points:
    0
    hello Sir,

    Sir can you help me write keyboard scan program in BASCOM? For AVR series BASCOM has inbuilt command getatkeyboard? Is there any such function in BASCOM 8051??

    Thanks
    Edesign
Loading...

Share This Page

Loading...