Port bit manipulation useing variables


Closed Thread
Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    Dec 2004
    Location
    nebraska
    Posts
    79


    Did you find this post helpful? Yes | No

    Default

    Hey
    Thanks for your answer but I don't completly follow.

    PortB.0[W0] = Coilstate

    What is the .0 for.
    I want to do something like this.

    PortB.[W0] = Coilstate

    But It does not compile.
    Where W0 is the pin or bit of port B to change.

    Thanks
    Nick

  2. #2
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    Nick, PortB.0[W0] = Coilstate is a workaround to obtain PortB.[W0] = Coilstate and have the code compiling.

    Cheers

    Al.
    All progress began with an idea

  3. #3
    Join Date
    Dec 2004
    Location
    nebraska
    Posts
    79


    Did you find this post helpful? Yes | No

    Default

    Thanks Al, that worked

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