Array -- something wrong?


Closed Thread
Results 1 to 24 of 24

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default

    Chris --

    I've never used array either in picbasic anyway.

    You're probably right -- there has to be more to the serin code than what I have shown. ? But all I see with SERIN in the books is how I have it set up.

    I do get some action if I use separate byte variables rather than an array --

    like [QUAL1,QUAL2],b0,b1,b2,b3,b4 etc

    but I really want to use an array -- and to learn how as well.

    Everything is setup fine on the breadboard -- I see the data with my scope etc.

    Maybe someone can point to the problem, in the mean time I need to study some more on it.

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


    Did you find this post helpful? Yes | No

    Default

    Look at SERIN2.
    Dave
    Always wear safety glasses while programming.

  3. #3


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Michael View Post
    Chris --

    You're probably right -- there has to be more to the serin code than what I have shown. ? But all I see with SERIN in the books is how I have it set up.

    .
    Working with the condition that you know you will receive 13 bytes of data in advance

    For Bytes = 0 to 12
    SerIn PORTA.0,N1200,[QUAL1,QUAL2],DATAIN[Bytes]
    Next

    Does the SerIn command also have a timeout which is similar to how I remember Hserin working, IE if no data is received for a predefined period the command makes a jump to another label in order to escape the loop.

  4. #4


    Did you find this post helpful? Yes | No

    Default

    Ok -- I'll try that -- I would have thought it would automatically load all the bytes you declare in the array.

    Whatever -- I'll try it. thanks.

  5. #5


    Did you find this post helpful? Yes | No

    Default

    still no luck -- 2 days on this.

    I think "STR" needs to be in there somewhere but as always the PBP manual is extremely vague and can't google much on it.

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


    Did you find this post helpful? Yes | No

    Default

    Did you see post #10 ?
    Dave
    Always wear safety glasses while programming.

  7. #7


    Did you find this post helpful? Yes | No

    Default

    yeah but?

    I looked at SERIN2 in the PBP manual, don't know what you're getting at.

    I may just forget the array idea -- went back to 13 bytes in a row and now that isn't even cooking.

    Trying to fiddle with the timeout to see if that's it -- but once again, reading the PBP manual on certain subjects is fruitless.

    For example, they say there is an optional timeout and say it's in milliseconds -- AND THAT'S IT.

    No examples -- no info about "default timeouts" -- I've said it before, it's the worst manual I've ever had.

    By the way, my other SERIN projects work great (even ones I've interfaced to the PC with VBnet).

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


    Did you find this post helpful? Yes | No

    Default

    From the manual... SERIN2 part
    STR followed by a byte array variable, count and optional ending character will receive a string of characters. The string length is determined by the count or when the optional character is encountered in the input.
    Dave
    Always wear safety glasses while programming.

Members who have read this thread : 1

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