Forward Serial Data from pic to pc


Closed Thread
Results 1 to 10 of 10

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    Receive into pic2 as an array, then forward the array. ?
    Dave
    Always wear safety glasses while programming.

  2. #2
    Join Date
    Apr 2008
    Posts
    12


    Did you find this post helpful? Yes | No

    Default

    wait, sorry. My enter key is messing up, wasn't finished
    Last edited by Muller; - 2nd September 2008 at 22:26.

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


    Did you find this post helpful? Yes | No

    Default

    To receive an array you need to HSERIN something like this
    Code:
    [WAIT("A"),STR NUMS\8]
    Dave
    Always wear safety glasses while programming.

  4. #4
    Join Date
    Apr 2008
    Posts
    12


    Did you find this post helpful? Yes | No

    Default

    sorry, again.. I wish I could delete the messages. My enter key, instead of jumping a line, sends the message earlier. sorry

  5. #5
    Join Date
    Apr 2008
    Posts
    12


    Did you find this post helpful? Yes | No

    Default

    And when I want to send it, why do I get that error?

    ERROR: Macro HSEROUTSTRN?W not found in macro file.

    Isn't <code> hserout [STR nums\8] </code> right?

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


    Did you find this post helpful? Yes | No

    Default

    We are passing each other

    Can you post the whole code. Something is missing.
    Dave
    Always wear safety glasses while programming.

  7. #7
    Join Date
    Apr 2008
    Posts
    12


    Did you find this post helpful? Yes | No

    Default

    OK, I found out what I was doing wrong.. THe array I was trying to send was a word, not a byte.. Sorry..

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


    Did you find this post helpful? Yes | No

    Default

    Thats what was missing
    Dave
    Always wear safety glasses while programming.

  9. #9
    Join Date
    Apr 2008
    Posts
    12


    Did you find this post helpful? Yes | No

    Default

    OK, I tried that Dave. With bad results, here's my code:

    Pic2 code
    <code>
    RXIn:
    if RCIF then

    @ INT_DISABLE TMR0_INT
    for index = 0 to 3
    hserin [serialdata]
    dataA(index) = serialdata
    next index
    usbservice
    gosub dousbout
    @ INT_ENABLE TMR0_INT

    endif
    @ INT_RETURN

    </code>

    pic1 code:

    <code>
    hserout [var1(0), var1(1), var1(2), var1(3)] 'it only has 4 bytes now
    </code>

    I tried:
    <code>
    hserout [STR var1\4]
    </code>
    but it gave me an error (ERROR: Macro HSEROUTSTRN?W not found in macro file.)
    Last edited by Muller; - 2nd September 2008 at 22:31.

Similar Threads

  1. Read/Write Problem
    By Tobias in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 10th February 2010, 02:51
  2. Send data to PC USB
    By konter in forum Off Topic
    Replies: 2
    Last Post: - 18th December 2009, 22:57
  3. PIC to PIC "wired" serial one-way communication - SERIN2/SEROUT2
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 14th April 2008, 21:02
  4. PC serial port funny
    By nicjo in forum Serial
    Replies: 13
    Last Post: - 6th February 2007, 06:34
  5. Receiving data from more than one serial Port
    By PICtron in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 15th March 2005, 11:20

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