sms alert


Results 1 to 3 of 3

Thread: sms alert

Threaded View

  1. #1
    Join Date
    Nov 2007
    Location
    sri lanka
    Posts
    24

    Default sms alert

    dear..
    i have sms aler project hardware and code.it's working stating time and 2 or 3 hours then not working .please help me. wavecom M1206B modem and max232 circuit.(for max 232 circuit 16v/10uf capacitor)

    DEFINE OSC 4
    DEFINE HSER_TXSTA 20h
    DEFINE HSER_RCSTA 90h
    DEFINE HSER_BAUD 2400
    DEFINE HSER_SPBRG 25
    DEFINE HSER_CLROERR 1
    PortDStatus var BYTE
    TRISB=%00000000
    PORTB=%00000000
    trisD=%00001111
    portD=%00000000
    GSM_CHECK:
    portb=%11110000
    pause 15000
    HSEROUT ["AT",13]
    HSERIN 5000, GSM_CHECK, [WAIT("OK")]
    PAUSE 100
    portb=%01110000
    HSEROUT ["at+cmgs=",34,"0718623462",34,13]
    PAUSE 100
    HSEROUT ["system ok",26]
    HSERIN 5000, BEGIN, [WAIT("OK")]
    pause 200
    PORTB=%00000000
    'get initial status
    PortDStatus.0 = PORTD.0
    PortDStatus.1 = PORTD.1
    PortDStatus.2 = PORTD.2
    BEGIN:
    HSEROUT ["AT",13]
    HSERIN 5000, GSM_CHECK, [WAIT("OK")]
    PAUSE 100
    high PORTB.3
    if PORTD.0 != PortDStatus.0 then
    pause 10
    PortDStatus.0 = PORTD.0
    if PORTD.0 = 1 then
    gosub SEND_SMS0
    else
    gosub SEND_SMS1
    endif
    endif
    if PORTD.1 != PortDStatus.1 then
    pause 10
    PortDStatus.1 = PORTD.1
    IF PORTD.1 = 1 then
    gosub SEND_SMS2
    else
    gosub SEND_SMS3
    endif
    endif
    if PORTD.2 != PortDStatus.2 then
    pause 10
    PortDStatus.2 = PORTD.2
    IF PORTD.2 = 1 then
    gosub SEND_SMS4
    else
    gosub SEND_SMS5
    endif
    endif
    PAUSE 100
    LOW PORTB.3
    GOTO BEGIN
    SEND_SMS0:
    HIGH PORTB.4
    HSEROUT ["at+cmgs=",34,"0718623462",34,13]
    HSEROUT ["unit ,1,Synchronise",26]
    HSERIN 15000, BEGIN, [WAIT("OK")]
    HSEROUT ["at+cmgs=",34,"0715354064",34,13]
    HSEROUT ["unit ,1,Synchronise",26]
    HSERIN 15000, BEGIN, [WAIT("OK")]
    HSEROUT ["at+cmgs=",34,"0712537063",34,13]
    HSEROUT ["unit ,1,Synchronise",26]
    HSERIN 15000, BEGIN, [WAIT("OK")]
    LOW PORTB.4
    return
    SEND_SMS1:
    HIGH PORTB.4
    HSEROUT ["at+cmgs=",34,"0718623462",34,13]
    HSEROUT ["unit ,1, triped",26]
    HSERIN 15000, BEGIN, [WAIT("OK")]
    HSEROUT ["at+cmgs=",34,"0715354064",34,13]
    HSEROUT ["unit ,1, triped",26]
    HSERIN 15000, BEGIN, [WAIT("OK")]
    HSEROUT ["at+cmgs=",34,"0712537063",34,13]
    HSEROUT ["unit ,1, triped",26]
    HSERIN 15000, BEGIN, [WAIT("OK")]
    LOW PORTB.4
    return
    SEND_SMS2:
    HIGH PORTB.5
    HSEROUT ["at+cmgs=",34,"0718623462",34,13]
    HSEROUT ["unit,2,Synchronise",26]
    HSERIN 15000, BEGIN, [WAIT("OK")]
    HSEROUT ["at+cmgs=",34,"0715354064",34,13]
    HSEROUT ["unit,2,Synchronise",26]
    HSERIN 15000, BEGIN, [WAIT("OK")]
    HSEROUT ["at+cmgs=",34,"0712537063",34,13]
    HSEROUT ["unit,2,Synchronise",26]
    HSERIN 15000, BEGIN, [WAIT("OK")]
    LOW PORTB.5
    return
    SEND_SMS3:
    HIGH PORTB.5
    HSEROUT ["at+cmgs=",34,"0718623462",34,13]
    HSEROUT ["unit,2,triped",26]
    HSERIN 15000, BEGIN, [WAIT("OK")]
    HSEROUT ["at+cmgs=",34,"0715354064",34,13]
    HSEROUT ["unit,2,triped",26]
    HSERIN 15000, BEGIN, [WAIT("OK")]
    HSEROUT ["at+cmgs=",34,"0712537063",34,13]
    HSEROUT ["unit,2,triped",26]
    HSERIN 15000, BEGIN, [WAIT("OK")]
    LOW PORTB.5
    return
    SEND_SMS4:
    HIGH PORTB.6
    HSEROUT ["at+cmgs=",34,"0718623462",34,13]
    HSEROUT ["unit ,3, Synchronise",26]
    HSERIN 15000, BEGIN, [WAIT("OK")]
    HSEROUT ["at+cmgs=",34,"0715354064",34,13]
    HSEROUT ["unit ,3, Synchronise",26]
    HSERIN 15000, BEGIN, [WAIT("OK")]
    HSEROUT ["at+cmgs=",34,"0712537063",34,13]
    HSEROUT ["unit ,3, Synchronise",26]
    HSERIN 15000, BEGIN, [WAIT("OK")]
    LOW PORTB.6
    return
    SEND_SMS5:
    HIGH PORTB.6
    HSEROUT ["at+cmgs=",34,"0718623462",34,13]
    HSEROUT ["unit,3,triped",26]
    HSERIN 15000, BEGIN, [WAIT("OK")]
    HSEROUT ["at+cmgs=",34,"0715354064",34,13]
    HSEROUT ["unit,3,triped",26]
    HSERIN 15000, BEGIN, [WAIT("OK")]
    HSEROUT ["at+cmgs=",34,"0712537063",34,13]
    HSEROUT ["unit,3,triped",26]
    HSERIN 15000, BEGIN, [WAIT("OK")]
    LOW PORTB.6
    return
    end
    Attached Files Attached Files

Similar Threads

  1. Replies: 0
    Last Post: - 27th May 2014, 04:24
  2. Replies: 11
    Last Post: - 19th August 2009, 16:23
  3. Send SMS!
    By natural077 in forum General
    Replies: 0
    Last Post: - 3rd December 2008, 06:48
  4. send sms
    By anushka in forum GSM
    Replies: 2
    Last Post: - 19th January 2007, 20:27
  5. Free Stuff Alert
    By Bruce in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 17th March 2006, 00:02

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts