Page 1 of 1

Can 4 pins be added binary to decimal

Posted: Sun Nov 11, 2012 12:29 am
by markus747
I need to add ( RB0 (1) + RB1 (2) +RB2 (4) + RD7 (8) )
to come up the binary weighted value
like is it possible to use pin names in a C# statement
like: (RB0 + (2*RB1)+(4*RB2) + (8*RD7) )
I'm trying to change some programs from Basic to C#
But I can't find any where on forum where people are referring to Pin Names, Is there a format for using pin names as values? or do pins need to be stored to a variable?
I would greatly appreciate some kind of sample of how to do something like this. :)

Re: Can 4 pins be added binary to decimal

Posted: Sun Nov 11, 2012 11:45 am
by medelec35

Re: Can 4 pins be added binary to decimal

Posted: Sun Nov 11, 2012 1:21 pm
by Enamul
Hi,

I have answered in the following post...
http://www.matrixmultimedia.com/mmforum ... 841#p41841