polling information in rs-232


Closed Thread
Results 1 to 15 of 15

Hybrid View

  1. #1
    Join Date
    Mar 2006
    Location
    Pennsylvania, USA.
    Posts
    130


    Did you find this post helpful? Yes | No

    Default

    As you already have the hardware uart connected to the GPS unit, I'll ask how do you have the PC connected? 4800 baud is standard for a GPS unit, so you're good there. Skimask has correctly suggested that you will find that PicBasic's Hserin command does let you accept an entire string at once, instead of reading in a single character at a time and building a string like you are trying to do. You'll have to declare an array variable big enough to accept all of the characters in your string.
    I would use an interrupt to capture the incoming string from the GPS unit, and then either DEBUG or SEROUT to send the string out to the PC. There are a few serial interrupt example programs on the MicroEngineering Labs website, and there are a lot of examples on this forum, and debug and serout or serout2 are explained well in the manual.

    Jerry.
    If your oscilloscope costs more than your car...

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by b1arrk5 View Post
    I would use an interrupt to capture the incoming string from the GPS unit
    HSERIN also lets you terminate inputting with a certain character when using the STR option, thereby eliminating interrupts.

  3. #3
    Join Date
    Feb 2008
    Posts
    8


    Did you find this post helpful? Yes | No

    Default

    thanks to all, it finally worked... (not as i have expected though)

    what i wanted to achieve was to put all the characters in an array, but my programming skills are somehow limited for now (learning you know and HSERIN is tricky sometimes).

    but i guess i'll get there eventually

    i know it's a simple thing to do (for you guys or gals?) (noticed there's a Melanie with a lot of braincells around here)

    i am not that bad in VB but going back a sequential way of programming is like (for me that is) going the other way around!

    at 49 years old, i guess i am not that bad, just hope you all enlighten me of your knowledge somehow (but i don't want to be taken by the hand)

    i am probably a NEWBIE in this pic programming but not a BEGGER who wants to have the job done by others!

    So i guess i'll just keep on going on this little project of mine and thanks a lot again for the pointers.

    i'll stick around.
    Last edited by Tondunard; - 9th February 2008 at 17:09.

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


    Did you find this post helpful? Yes | No

    Default

    Hi Tondunard,
    Welcome from a 52 year old noobie to any kind of programming, I have been hangin' out here for about 19 months now, it is fun to revisit my earlier forrays into PBP. The learning curve seems to have a few bumps in it, but this is the place to find the straight talk.
    JS
    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.

  5. #5
    Join Date
    Feb 2008
    Posts
    8


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Joe S. View Post
    Hi Tondunard,
    Welcome from a 52 year old noobie to any kind of programming, I have been hangin' out here for about 19 months now, it is fun to revisit my earlier forrays into PBP. The learning curve seems to have a few bumps in it, but this is the place to find the straight talk.
    JS
    nice to meet you sir, hope i'll find some answers to all my questions (by searching this forum)

    Later

  6. #6
    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 Tondunard View Post
    hope i'll find some answers to all my questions (by searching this forum)
    Welcome to the forum. You got it. The way to learn is to try things and read this forum daily, not just when you have a problem. If time permits I like to work through some of the problems people have and see if I can figure them out. Just like a home work assignment.

    Some of the professors here are even funny
    Dave
    Always wear safety glasses while programming.

  7. #7
    Join Date
    Feb 2008
    Posts
    8


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    Welcome to the forum. You got it. The way to learn is to try things and read this forum daily, not just when you have a problem. If time permits I like to work through some of the problems people have and see if I can figure them out. Just like a home work assignment.

    Some of the professors here are even funny
    That's just great, hope i'll be able to do that someday.

    what i would like to achieve is to put a strip of data (60 characters) in a variable so that i can modify it later and resend-it every second.

    Can't seem to be able to put my finger on it, but i am so close.

    anyway, i'll search again (and again), and i will finally get it somehow

    what i have now is a hserin (to receive) and right after that a hserout.

    Putting incoming serial data in a variable is like a big miracle (lol).

    Timing is my big problem for now, while i receive (hserin) i don't have time to store the data somewhere (loosing characters)

    so far i made some progress, i'll get there eventually...


    Later

    Alain

Similar Threads

  1. RS 485 wireless communication
    By Armadus in forum mel PIC BASIC Pro
    Replies: 22
    Last Post: - 26th January 2006, 19:30
  2. Displaying Trend Information
    By Mike M. in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 3rd November 2005, 03:21
  3. RS 485 using 16F84A
    By ngeronikolos in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 18th May 2005, 14:46

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