gsm modem with 16f877a


Closed Thread
Results 1 to 14 of 14

Hybrid View

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

    Default Re: gsm modem with 16f877a

    HI.
    how to get tower infomation modem,anybody help me.
    thank you
    kumara

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

    Default Re: gsm modem with 16f877a

    CHECK:
    portb=%11110000
    HSEROUT ["AT",13]
    HSERIN 5000, ERR, [WAIT("OK")]
    pause 200
    PORTb=%00000000
    HIGH PORTB.4
    PAUSE 15000
    HSEROUT ["at+cmgs=",34,"07xxxxxxxxx",34,13]
    PAUSE 100
    HSEROUT ["SYSTEM OK",26]
    HSERIN 5000, ERR, [WAIT("OK")]
    HSEROUT ["at+cmgs=",34,"0719099795",34,13]
    PAUSE 100
    HSEROUT ["SYSTEM OK",26]
    HSERIN 5000, ERR, [WAIT("OK")]
    low portb.4

    'get initial status
    PortDStatus.0 = PORTD.0
    PortDStatus.1 = PORTD.1
    PortDStatus.2 = PORTD.2
    BEGIN:
    HIGH PORTB.7
    PAUSE 200
    LOW PORTB.7
    if PORTD.0 != PortDStatus.0 then 'sensed change in PORTD.0
    pause 10 'debounce 10 ms
    PortDStatus.0 = PORTD.0 'save new status for PORTD.0
    if PORTD.0 = 1 then
    gosub SEND_SMS0 'send new status report
    else 'PORTD.0 = 0
    gosub SEND_SMS2
    endif
    endif
    if PORTD.1 != PortDStatus.1 then 'sensed change in PORTD.1
    pause 10
    PortDStatus.1 = PORTD.1 'save new status for PORTD.1
    IF PORTD.1 = 1 then
    gosub SEND_SMS1
    else 'PORTD.1 = 0
    gosub SEND_SMS3
    endif
    endif
    if PORTD.2 != PortDStatus.2 then 'sensed change in PORTD.1
    pause 10
    PortDStatus.2 = PORTD.2 'save new status for PORTD.1
    IF PORTD.2 = 1 then
    gosub SEND_SMS4
    else 'PORTD.1 = 0
    gosub SEND_SMS5
    endif
    endif
    PAUSE 10

Members who have read this thread : 0

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