Good idea Duncan,

But I want to find exactly the pin that is 1.
When you say word(variable)that can have 10bits???

Nikos