rs232


Closed Thread
Results 1 to 21 of 21

Thread: rs232

Hybrid View

  1. #1
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by rondo2 View Post
    Code:
    gps_data var byte
    
    serin2 TX,16468,[WAIT("$GPGGA"),str gps_data\6]
    Your gps_data is defined as a single byte. You want an array to work with, so you should define it as something like:

    Code:
    gps_data var byte[6]
    http://www.scalerobotics.com

  2. #2
    Join Date
    Jun 2009
    Posts
    17


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by scalerobotics View Post
    Your gps_data is defined as a single byte. You want an array to work with, so you should define it as something like:

    Code:
    gps_data var byte[6]


    hi thanks for pointing that out but still nothing.

    i changed my code to serin2 TX,84,[WAIT("$GPGGA"),WAIT(","),DEC2 H,DEC2 M,DEC2 S]


    PAUSE 200

    HIGH PORTC.0
    PAUSE 200
    LOW PORTC.0
    PAUSE 200

    SEROUT2 PORTC.1,16468,[dec2 H, dec2 M, dec2 S]

    GOTO MAIN

    still nothing

    the gps module is connected properly it is receiving 3.3v so unsure whats going on

    do you no if it must have a backup battery, because at the moment i don't have that pin connected to anything

  3. #3
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    What's your hardware setup? Got a picture? Can you show the whole code? I wonder what your TX pin is doing with the serial in, but I can't tell from here.

    The code you just posted is not inverted, so I assume you have the max232 back in?
    http://www.scalerobotics.com

  4. #4
    Join Date
    Jun 2009
    Posts
    17


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by scalerobotics View Post
    What's your hardware setup? Got a picture? Can you show the whole code? I wonder what your TX pin is doing with the serial in, but I can't tell from here.

    The code you just posted is not inverted, so I assume you have the max232 back in?
    hi

    my brother has my cam at the moment, i will get it off of him tomorrow.

    quick question - i'm using a 16F870 will it accept voltages as low as 3.3v on an I/O pin

  5. #5
    Join Date
    Apr 2006
    Location
    Alberta Canada
    Posts
    166


    Did you find this post helpful? Yes | No

    Default

    What does C.0 do? does it flash an LED?

    if its used for something else, then it might be a good idea to ad an LED and make it flash on and off as your program runs. I find that it helps me know where the program is getting hung up or if its running at all..

    One other thing, and im not sure if its right or not, but wheni use an external osc i need to set it to HS not XT.

  6. #6
    Join Date
    Jun 2009
    Posts
    17


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by dragons_fire View Post
    What does C.0 do? does it flash an LED?

    if its used for something else, then it might be a good idea to ad an LED and make it flash on and off as your program runs. I find that it helps me know where the program is getting hung up or if its running at all..

    One other thing, and im not sure if its right or not, but wheni use an external osc i need to set it to HS not XT.

    hi yes portc.0 is used to flash an led, so i know its recieving serial data.

    the pic micro it self is running as it output's a test message to the pc's serial port and that is sent fine

  7. #7
    Join Date
    Jun 2009
    Posts
    17


    Did you find this post helpful? Yes | No

    Default

    Also

    i measured the voltage on the pin which transmits the serial data fron the gps module, and it was only 1.5v, now is that normal.

    the pic micro will not see the data at such low levels will it ?
    Last edited by rondo2; - 30th June 2009 at 20:38.

Similar Threads

  1. Universal remote and Rs232
    By Michael in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 7th February 2010, 17:55
  2. UART vs software RS232
    By Michael in forum mel PIC BASIC Pro
    Replies: 27
    Last Post: - 5th September 2008, 18:27
  3. RS232 into 2 PC ports
    By manxman in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 30th August 2008, 13:33
  4. PIC18F4680 to PC via MAX232 (RS232 serial) no output
    By opticsteam1 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 14th April 2008, 20:39
  5. RS232 to Weigand
    By Stevenindon in forum Serial
    Replies: 0
    Last Post: - 6th April 2006, 04:35

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