Searching in a binary data

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • crazygrey
    New Member
    • Nov 2007
    • 7

    Searching in a binary data

    I'm reading some data from a parallel port and getting the data in hex (or binary) format. I need to find the '0' bit in this binary sequence and map it to a number. The picture clears up the issue.



    B7-B4: Outputs that are written to the parallel port. When B7=0, the inputs (B3-B0) would be scanned to find a zero. For example,If the zero was found B3, the code should return #1 the node number. This sequence would be infinite. The idea is the same as the keypad matrix implemented in some microprocessors .

    I have no problem writing and reading the parallel port, the problem is how to search for the zero bit from B3-B0. After that I need to map it to a node (interaction) number.

    Any suggestions or help would be truly appreciated. Thanks
  • sydneytroz
    New Member
    • May 2007
    • 7

    #2
    Sorry, I posted this because couldn't find the subscribe link, I thought I could delete the post (becaues the link says Edit / DELETE), but it seems as though I can't do that either. Please ignore this post, it won't happen again.
    Last edited by sydneytroz; Feb 24 '08, 04:27 AM. Reason: (see post)

    Comment

    Working...