TC35i GSM With PIC 16F690 help


Closed Thread
Results 1 to 34 of 34

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Red face

    Done it to 84, so now it is transmitting in True mode. NOW the code is entering gosub one as expected BUT not gosub two.
    Changed the code to the following:
    main:
    gosub one
    Serout2 tx,baud,["AT+CMGF=1",13]
    Serin2 rx,baud,5000,main,[wait("OK"),i]
    gosub two
    goto main

    As always code never enters label two which means it is not getting the required response. I attach my setup photo, though not very clear but the schematic is the same except the pin change to 10 & 12 instead of your 17 & 18.
    Attached Images Attached Images  
    Last edited by financecatalyst; - 29th September 2009 at 19:15. Reason: Adding more info

  2. #2
    Join Date
    Sep 2009
    Posts
    755


    Did you find this post helpful? Yes | No

    Default

    tc35i factory settings for bounrate is 2400 not 9600!
    Becouse you use max its not inverted signal.
    on 2400 and true settings should be 396 if you use 4mhz crystal.
    here example of code how to star communication with modem if max232 is used:
    Code:
     Init:
    serout tx,0,["AT",13]
    serin2 rx,396,1000,init,[WAIT("OK")]

  3. #3


    Did you find this post helpful? Yes | No

    Exclamation

    Quote Originally Posted by pedja089 View Post
    tc35i factory settings for bounrate is 2400 not 9600!
    Becouse you use max its not inverted signal.
    on 2400 and true settings should be 396 if you use 4mhz crystal.
    here example of code how to star communication with modem if max232 is used:
    Code:
     Init:
    serout tx,0,["AT",13]
    serin2 rx,396,1000,init,[WAIT("OK")]
    Tried you way as well. I am using internal oscillator and I put it to 4MHz this time. After that I tried your instructions above but results are the same. Two questions I want to ask you
    First: Why have you used "0" in the instruction serout tx,0,...
    Second: why have you not used serout2 and used just serout & serin2 instead of serin?

  4. #4
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    tc35i factory settings for bounrate is 2400 not 9600!
    TC35i is autobauding from 4.8Kbps to 115Kbps. 2400 bauds setting will not activate the auto-function.

    Al.
    All progress began with an idea

  5. #5
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    I think you need to check your modem with hyperterminal to check if it works correctly. If your computer doesn't have a serial port, you can obtain a serial to USB converter (check if compatible with your operating system)

    Al.
    All progress began with an idea

  6. #6


    Did you find this post helpful? Yes | No

    Red face

    Quote Originally Posted by aratti View Post
    I think you need to check your modem with hyperterminal to check if it works correctly. If your computer doesn't have a serial port, you can obtain a serial to USB converter (check if compatible with your operating system)

    Al.
    I will try that hopefully tomm, and will post my findings. Thank you all for your help upto now.

  7. #7


    Did you find this post helpful? Yes | No

    Red face

    By the way, can someone tell me the expected voltages across 232 pins and modem Rx & Tx pin. I just have a funny feeling that problem is with the hardware part instead of software.

  8. #8
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by financecatalyst View Post
    I am using internal oscillator and I put it to 4MHz this time.
    The internal OSC most often is NOT accurate enough for communications. Try an external.

    Look at post #5 for the expected voltage levels.
    Dave
    Always wear safety glasses while programming.

  9. #9
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    Code:
    baud con 84 ' baud rate = 9600 Inverted
    Rx var Portb.7 ' Declaring rx pin
    Tx var Portb.5 ' Declaring tx pin
    
    Change your code as per the above, then it should work.

    Edited:
    Remember to allow the modem to settle after powerup, before start serial communication (See modem led blink)
    Al.
    Last edited by aratti; - 29th September 2009 at 19:49.
    All progress began with an idea

  10. #10


    Did you find this post helpful? Yes | No

    Exclamation

    Quote Originally Posted by aratti View Post
    Code:
    baud con 84 ' baud rate = 9600 Inverted
    Rx var Portb.7 ' Declaring rx pin
    Tx var Portb.5 ' Declaring tx pin
    
    Change your code as per the above, then it should work.

    Al.
    No Luck still. In the datasheet, portb.5 is Rx & portb.7 is Tx! Why you advised to mark it the other way. Though it's still not working.
    Also 9600 Inverted is NOT 84 (just looked into the PBP manual) it is 16468
    Program is the same as above (With your modifications) i.e. Baud 84 & ports interchanged.

Similar Threads

  1. Want to learn GSM & PIC programming
    By financecatalyst in forum GSM
    Replies: 5
    Last Post: - 25th February 2014, 10:22
  2. GSM With PIC?
    By financecatalyst in forum General
    Replies: 1
    Last Post: - 20th September 2009, 00:12
  3. SERIN AND SEROUT PROBELM USING 16f690 PIC
    By Charles in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 18th January 2007, 04:59
  4. gsm card reader using pic
    By ninebarmaximus in forum General
    Replies: 0
    Last Post: - 6th December 2005, 19:08
  5. Serial Pic to Pic using HSER
    By Chadhammer in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 12th March 2005, 00:14

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