problem with the GSM controller


Closed Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2008
    Location
    Bosnia
    Posts
    3

    Default problem with the GSM controller

    I worked on a GSM controller for my school project.
    The GSM controller should controlling a 3 phase motor, I added an option to controlling them over push button's!

    But i haw a problem with the communication to GSM phone!

    I used 16F628 and Siemens M55 as GSM modem (PDU )!

    The problem is when i try to read the message from phone with AT+CMGR=1, then the pic begins to send constantly that command to phone (faster and often then he should)! the phone answers every time with the last message as it should, but the pic doesn't recognize that!
    When I disconnect the GSM from PIC, PIC begins to work as it should.

    To connect the GSM to PIC i used that schematic



    Without the "amplifier" the pic doesn't recognize the GSM!

    here is the part of code i wrote:

    Code:
    DEFINE OSC 12
    DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive
    DEFINE HSER_TXSTA 24h ' Enable transmit, BRGH = 1
    DEFINE HSER_SPBRG 77  ' 9600 Baud @ 0,16%
    DEFINE HSER_CLROERR 1 ' Clear overflow automatically
    DEFINE HSER_BAUD 9600
    SYMBOL SDA = porta.0
    SYMBOL SCL = porta.1
    DEFINE I2C_SDA PORTA.0
    DEFINE I2C_SCL PORTA.1
    DEFINE I2C_SCLOUT 1
    SYMBOL LED = PORTB.3
    SYMBOL RE1 = PORTB.4
    SYMBOL RE2 = PORTB.5
    SYMBOL RE3 = PORTB.6
    SYMBOL RE4 = PORTB.7
    symbol SW1 = PORTA.2
    symbol SW2 = PORTA.3
    symbol SW3 = PORTA.4
    symbol SW4 = PORTA.5
    symbol SW5 = PORTB.0
    OUTPUT LED
    OUTPUT RE1
    OUTPUT RE2
    OUTPUT RE3
    OUTPUT RE4
    input SW1
    input SW2
    input SW3
    input SW4
    input SW5
    CMCON=7                         'Ugasi komparatore
    VRCON=0                         'Ugasi VREF
    broj var byte [12]              'Aray promjenjive za tel. broj
    pdu var byte [4]                'PDU text poruke
    tempb VAR BYTE [12]             'Temp za tel. broj
    adr VAR BYTE                    'promjenjiva za brojanje
    a var BYTE
    i VAR BYTE
    c VAR BYTE
    init:
        high LED
        Hserout ["ATZ", 13, 10]                 'Standardne postavke
        hserin 2000, init, [WAIT ("OK")]      'Čekaj OK odgovor
        HSEROUT ["ATE0", 13]
        pause 300
        low led
    sms_me:   
        HIGH LED                            'upali LED1
        HSEROUT ["AT+CPMS=ME", 13, 10]          'Postavi memoriju tel. za SMS
        HSERIN 2000, sms_me, [WAIT ("OK")]  'Čekaj OK                     
        pause 300
        low led
    
       
    taste:
    
        iF SW1=0 THEN
            i=1
        ELSE
            IF SW2=0 THEN
                i=2
            ELSE
                IF SW3=0 THEN
                    i=3
                ELSE
                    IF SW4=0 THEN
                        i=4
                    ELSE
                        IF SW5=0 THEN
                            i=5
                        ELSE
                            GOTO sms
                        ENDIF
                    ENDIF
                ENDIF
            ENDIF
        ENDIF
        GOTO rele
       
    sms:
        HIGH LED   
        HSEROUT ["AT+CMGR=1", 13, 10]           'Pročitaj zadnji primljen SMS
        HSERIN 4000, taste, [WAIT ("+CMGR:"), SKIP 1, str a\1, SKIP 26, STR BROJ\12, SKIP 20, STR pdu\4]
        IF A=0 THEN
            GOTO taste
        ENDIF
    I hope someone can help me, because i must have it finished on Monday

    P.S. SRY for my veryyyyyyy bad English

    THX

  2. #2
    Join Date
    Apr 2009
    Posts
    36


    Did you find this post helpful? Yes | No

    Default

    hi, im new in pbp but i think u should use max232 or 74hc244 between gsm and pic instead the transistors,i hope it will works

  3. #3
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    HSERIN likes to idle in a HIGH state, so even without the "amplifier" it requires a pull up resistor, or it just locks up on boot.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  4. #4
    Join Date
    Dec 2008
    Location
    Bosnia
    Posts
    3


    Did you find this post helpful? Yes | No

    Default

    @malwww, with the integrated USART i don't need them, because PIC and GSM works on the "same" signal voltage.

    I tried the pull up without the "amp" but the GSM voltage is to low, and the PIC won't them recognize again!

    I have no more ideas, helpppp!!

  5. #5
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Dariolo View Post

    I tried the pull up without the "amp" but the GSM voltage is to low, and the PIC won't them recognize again!

    I have no more ideas, helpppp!!
    So lower the voltage your PIC is operating on. The data sheet says the PIC you have selected will operate on voltages from 2.0 to 5.5 volts
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

Similar Threads

  1. strange serout2 problem
    By KaanInal in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 7th January 2010, 10:33
  2. Problem with SMS IO Controller
    By dario.costa in forum GSM
    Replies: 4
    Last Post: - 30th November 2009, 08:04
  3. Need advise how find problem in PID controller
    By phoenix_1 in forum Off Topic
    Replies: 0
    Last Post: - 28th October 2009, 02:22
  4. USART Problem , but don't know where, in pc? or in PIC?
    By precision in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 15th July 2007, 09:12
  5. 1 slave 1 master 1 MAX232 1 problem ?
    By SuB-ZeRo in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 31st July 2005, 23:59

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