Problem displaying data from GPS module & using 16f877a


Closed Thread
Results 1 to 11 of 11

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Question

    Thanks for the info. I added the statement:
    baud1 con 16572
    and changed the following statement:
    serin2 portc.4,baud1,[WAIT("$GPRMC"),STR sms\35]

    Still no luck. Please help.
    ___________________
    WHY things get boring when they work just fine?

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


    Did you find this post helpful? Yes | No

    Default

    Code:
    serin2 portc.4,baud1,[WAIT("$GPRMC"),STR sms\35]
    Which is the value of baud1?

    When you use wait string, remember that they are case sensitive "$GPRMC" is different from "$gprmc"

    I already suggested you, in another thread, to use a timeout sequence. Your serin2 instruction will wait for the identifier and then it will wait for a string of 35 characters. If your GPRS will send only 34, serin2 will remain there waiting forever.

    One turn around is the use of the timeout:


    Code:
    GPRSLoop:
    sms[0]=0
    serin2 portc.4,baud1,500,GPRSTest,[WAIT("$GPRMC"),STR sms\35]
    GPRSTest:
    If sms[0]<>0 then goto label ??     ' here you check byte[0] for data presence 
    goto GPRSLoop
    Al.
    Last edited by aratti; - 23rd October 2009 at 01:28.
    All progress began with an idea

  3. #3
    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
    Thanks for the info. I added the statement:
    baud1 con 16572
    and changed the following statement:
    serin2 portc.4,baud1,[WAIT("$GPRMC"),STR sms\35]

    Still no luck. Please help.
    If a RS232 chip was needed to talk to a PC then baud1 should be 188.
    Dave
    Always wear safety glasses while programming.

  4. #4


    Did you find this post helpful? Yes | No

    Talking

    Thanks guys. Itīs up and running now. Love this Forum
    Last edited by financecatalyst; - 23rd October 2009 at 17:03.
    ___________________
    WHY things get boring when they work just fine?

  5. #5
    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
    Thanks guys. Itīs up and running now. Love this Forum
    In case someone else has a similar problem... What was the fix?
    Dave
    Always wear safety glasses while programming.

  6. #6


    Did you find this post helpful? Yes | No

    Red face

    Quote Originally Posted by mackrackit View Post
    In case someone else has a similar problem... What was the fix?
    The array was too small to hold the sequence of characters and code was kinda stuck there. I changed it to the following :

    Baud con 188
    sms var byte[65]
    start:
    serin2 portc.4,baud,500,start,[WAIT("$GPRMC"),STR sms\65\13] ' added 13 as well
    If sms[0]<>0 then goto display
    goto start

    These are the only corrections I have done and it fired up.
    ___________________
    WHY things get boring when they work just fine?

  7. #7
    Join Date
    Apr 2010
    Posts
    6


    Did you find this post helpful? Yes | No

    Default

    Could u please provide the full program ?

Similar Threads

  1. Using Nokia LCD
    By BobP in forum mel PIC BASIC Pro
    Replies: 300
    Last Post: - 3rd May 2018, 04:47
  2. Read/Write Problem
    By Tobias in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 10th February 2010, 01:51
  3. Big characters on HD44780 4x20
    By erpalma in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 7th January 2007, 02:21
  4. LCD + bar graph
    By DynamoBen in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 5th October 2005, 14:50
  5. Sinus calculating !
    By Don Mario in forum mel PIC BASIC Pro
    Replies: 29
    Last Post: - 28th November 2004, 23:56

Members who have read this thread : 2

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