PLIZ CHECK MY SCHEMATIC,pic16f84->max232->gsm phone


Closed Thread
Results 1 to 39 of 39

Hybrid View

  1. #1
    Join Date
    Mar 2010
    Posts
    20

    Default simulation

    Thankyou Ioannis and f Lez for your contributions, i got the point of no response from the virtual terminal, am wondering how can i make it respond, like when pic16f877 sends ''AT'' ,terminal is supposed to respond ''OK'',
    Do i need to use two virtual terminals? pliz guide me
    regards

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,132

  3. #3
    Join Date
    Mar 2010
    Posts
    20

    Default code

    Thankyou Ioannis, i have decided to remove the option for the response from the phone since i think that can only be achieved practically not through simulation, BUT, i have encountered one problem!, When the push button(interrupt) is detected the microcontroller sends a message contineously, how can i stop this?, I want it to send a message only once on detection of an interrupt, my code is below
    regards
    code:

    BEGIN:
    if PORTD.2 = 0 then SEND_SMS
    GOTO BEGIN

    SEND_SMS:
    sound PORTB.2,[100,10,50,10]
    HIGH PORTB.6
    HSEROUT ["at+cmgs=",34,"+256782277658",34,13]
    PAUSE 1000
    HSEROUT ["An interruption has occured",34,13]
    LOW PORTB.6
    pause 1000
    HIGH PORTB.6
    HSEROUT ["at+cmgs=",34,"+256772021358",34,13]
    PAUSE 1000
    HSEROUT ["An interruption has occured",34,13]
    goto BEGIN

  4. #4
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,132

    Default

    Isn't it obvious? What are your code doing?

    1. Button pressed?

    2. Yes, goto send SMS

    3. Button pressed?

    4. Yes, goto send SMS

    5. .....

    You are in an endless loop.

    You may check if the button is released before sending another SMS.

    Or have a timer to send every say 10minutes if the button is still pressed.

    Or have a flag set in the sending SMS routine and cleared when the button is released

    Or...

    Ioannis

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