270Views3Replies

Author Options:

How to use GP2D12 with a 8051 microcontroller? Answered


Discussions

0
None
Jayefuu

8 years ago

The sensor outputs an analogue voltage between 0 and 5V. You'll need to put this through an ADC then read this with one of the 4 8-bit ports of the 8051.

What else did you want/need to know? Your question wasn't very descriptive.

0
None
ahemJayefuu

Answer 8 years ago

Thanks! Maybe thats what I needed!
Can you help me by telling the IC that would be perfect for the job and if there is any direct formula to convert the output of ADC into the distance form or will I have to program a distance for all of the 255 levels of the output?

0
None
Jayefuuahem

Answer 8 years ago

I've only used a 12-bit ADC on a dev. board so no sorry I couldn't recommend an 8-bit one. Google "8 bit ADC IC" and I'm sure you'll find plenty that will be suitable.

I would expect that the voltage output at different distances would be on the data sheet for the GP2d12