Forgot how to do this


Closed Thread
Results 1 to 3 of 3

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    Did you find this post helpful? Yes | No

    Default Re: Forgot how to do this

    Hi Larry,
    To access the individual bytes in an array you do:
    Code:
    Position VAR BYTE [3]
    For i = 0 to 2
       SERIN PORTA.1, 84, [POSITION[i]]
       SEROUT PORTA.0, 84, [POSITION[i]]  
    Next
    Note that the array is zero-indexed, first byte is Position[0], last byte is Position[2].

    The Position.0[i] thing you have in your notes is used when you want to access the individual bits in something not specifically declared as an array an of bits. For example Position.0[8] will access the least significant bit Position[1].

    Hope that makes sense.
    /Henrik.

  2. #2
    Join Date
    Aug 2009
    Location
    Paso Robles California
    Posts
    167


    Did you find this post helpful? Yes | No

    Default Re: Forgot how to do this

    Thanks Henrik ?
    this look like what I want, and yes my notes say bits but I skipped over that word (of course).

    Thank you
    Larry

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