ADC to 8Bit Pins

Ok, so it seems that you just need a binary output, which by good fortune because that is exactly what you are getting from your analog input.

get the decimal number form analogRead and turn it to binary

The analogRead() function does not return "750" as such, it returns 001011101110, ALL data on a processor is binary, we may choose to think of it in HEX, DEC or whatever but it's all binary.

So take your value, >> 2 or / 4, and write it to a port.

Now if you are using a small Arduino there is not a contiguous 8 pins in a single port so probably a series of digitalWrite()s will be required.


Rob