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


Closed Thread
Results 1 to 39 of 39

Hybrid View

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

    Default

    Well, my car is not moving... what might be the problem???

    Ioannis

  2. #2
    Join Date
    Mar 2010
    Posts
    20

    Default

    Hullo Ioannis, probably u needed details,my code is below,am using pic16f877,
    code:
    DEFINE OSC 8
    DEFINE HSER_TXSTA 20h
    DEFINE HSER_RCSTA 90h
    DEFINE HSER_BAUD 9600
    DEFINE HSER_CLROERR 1

    PushButton var PORTB.0

    Main:

    IF PushButton = 0 THEN SMS

    goto main

    SMS:

    HSEROUT ["AT" ,13,10]

    HSERIN 5000, SMS, [WAIT("OK")]

    HSEROUT ["AT+CMGF=1" ,13,10]

    HSERIN 5000, SMS, [WAIT("OK")]

    HSEROUT ["AT+CMGS=+256782277658"]

    HSEROUT [13,10]

    HSERIN 5000, SMS, [WAIT(">")]

    HSEROUT ["BUTTON HAS BEEN PRESSED!"]

    HSEROUT [26]

    HSERIN 15000, SMS, [WAIT("+CMG")]

    HSEROUT [10]

    end

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

    Default

    Your AT you see, is every 5 seconds, right?

    The Hserin command times out on 5000 msec because it does not receive any response, like an OK.

    I will repeat my self again now telling that simulation is not a panacea...

    Ioannis

  4. #4

    Default

    cant help much with code but i am currently doing very much the same with a 2550, as i found the f84/f88 to be short of code space.

    the t68i will connect direct to a pic and is 5v tolerant, it works at 9600 and better at 4800, but 1200 gave best performance with 0 errors.

    the t68i only works in pdu mode, but you can make the pdu stings in pduspy, and then just cut/paste them into your code for sending.

    decoding is a little more tricky.... but you can cheat by reading your message in pdu and comparing it to what it should look like in pdu, you never need to use plain text, and should stop thinking of sms messages as messages and think of them as response strings, and as with all response strings, you compare them to what they should look like, its just as easy to compare 'ok' to 'ok' as it is to compare 32'65'66'67 to 32'65'66'67 as it is to ' ABC' - why waste time converting in chip, when you can convert before compile and just use the converted string.....

    good luck.

    and move to a bigger chip lol

    /comments on his SW status, he says he has no manual, not that he's a pirate, have you never lost a manual?

    and on my own point here, if he is a pirate, I'd sooner he was using PB and contributing to the group and not to some other group!


    flies/bees/honey/donkeys/carrots/sticks.....

  5. #5
    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

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

  7. #7
    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

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