Shop OBEX P1 Docs P2 Docs Learn Events
Problem with an A/D COVERTER — Parallax Forums

Problem with an A/D COVERTER

HillsHills Posts: 13
edited 2005-12-11 20:51 in BASIC Stamp
Hi

I'm connecting an Ir SHARP distance sensor ( GP2D120 ) to my basic stamp 2 with an 8-bit A/D converter ( ADC0816 ). But I have a little problem. I don't know which pin of the A/D converter ADC0816 has to be connecetd to the basic stamp 2 ( the output of the A/D converter, the digital· 8-bit output ) because it has 8 output pins instead of one. I'm lost and I would like someone to help me. For more information about the ADC0816, you can see the datasheet by going to this link :

http://thayer.dartmouth.edu/~engs031/databook/adc0816.pdf







Post Edited (Hills) : 12/11/2005 8:17:13 PM GMT

Comments

  • Bruce BatesBruce Bates Posts: 3,045
    edited 2005-12-11 20:45
    Hills -

    Although I didn't go into your problem in depth, it appears that you're using an ADC with a PARALLEL output rather then one with a SERIAL output. To use the unit you've got, you will need to read all 8 output pins, to access the incoming data. It can be done, but it's hardly worth the waste of pin ports.

    A much better choice woiuld be an ADC with a SERIAL output, such as this one from National Semiconductor:
    http://www.national.com/pf/DC/ADC0831.html

    With that or any similar ADC with a synchronous serial output, you only need to use the SHIFTIN command to access the data serially, using far fewer pins.

    Regards,

    Bruce Bates
  • HillsHills Posts: 13
    edited 2005-12-11 20:51
    Thanks a lot. I'll try to find another A/D converter
Sign In or Register to comment.