Go Down

Topic: ADC (Read 378 times) previous topic - next topic

Sweta25

Hello,
I am using an Arduino Uno in order to convert my input values (from light sensors) to digital form. What I require is the digital value in terms of 1's and 0's...how can i get it???
Thanks in advance

JimboZA

I for one don't actually understand the question....
Gone for good

groundfungus

Serial.print(analogRead(Apin), BIN);  ??

Grumpy_Mike

Quote
What I require is the digital value in terms of 1's and 0's...how can i get it???
The digital value is already in terms of 1s and 0s (no apostrophe needed). The conversion only comes when you want to print it out or display it in any other number base. So why do you think you need it in 1s and 0s?

JimboZA

The digital value is already in terms of 1s and 0s ....... why do you think you need it in 1s and 0s?
That was what I was wondering. Is this an XY Problem, perhaps?
Gone for good

groundfungus

Hard telling what kind of problem it is at this point.

Sweta25

Actually I am using the Arduino as an ADC whereby I will convert my sensors' inputs into digital form so that I can use them in my FPGA...

rockwallaby

Again, like so many other threads we get, this is another guessing game, with so little information being given by the OP.

I'll take a guess, and ask.

You want to read in an analog signal using an Arduino and then you wish to output the ADC result on the digital output lines to then feed into your FPGA, is that what you want to do?
____
Paul
http://paulalting.com

Grumpy_Mike

Actually I am using the Arduino as an ADC whereby I will convert my sensors' inputs into digital form so that I can use them in my FPGA...
This is a bit odd, because the sort of level you have to be at to play with FPGAs is way above the level of this question.

If you want to output a parallel value, then you either have to do it one pin at a time or in about two or three transfers with direct port transfer.
http://www.arduino.cc/en/Reference/PortManipulation

Sweta25

To Paul,
You rightly guessed it....The output which is digital form, is transmitted serially. I programmed my FPGA to convert it in parallel form and further used it..Sorry I wrongly asked the question

groundfungus

Really?  It was a guessing game all along?

Grumpy_Mike

Really?  It was a guessing game all along?
I guess we all loose.
Even Paul's guess was wrong so I don't know why the OP said it was right.

Go Up