Shop OBEX P1 Docs P2 Docs Learn Events
interfacing ADC0841 — Parallax Forums

interfacing ADC0841

charlieknoxcharlieknox Posts: 27
edited 2005-04-12 14:59 in BASIC Stamp
HI Folks· - anyone got experience or ideas on interfacing an ADC0841 analog to digital converter ( http://cache.national.com/ds/DC/ADC0841.pdf ) to the Basic Stamp 2?· I am familiar to and have used the ADC0831, but·need to use the 0841 if that is possible.· Any help in that regard would be much appreciated.

Thank you!

Charlie

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-04-12 04:51
    I'm betting you're going to have to write the code yourself. That chip requires a lot of IO lines (11 if you ignore INTR\), and most Stamp users avoid consuming so much IO for a single device.

    That said, based on the data sheet I would do this (connect the ADC0841 bus to P0 - P7):

    Setup:
    · HIGH AdcCS
    · HIGH AdcWR
    · HIGH AdCRd

    Main:
    · ' your code here
    · GOTO Main

    Get_ADC0841:
    · LOW AdcCS··········· ' select device
    · PULSOUT AdcWr, 1···· ' start conversion
    · HIGH AdcCS
    · PAUSE 0············· ' allow for conversion
    · LOW AdcCS
    · PULSOUT AdcRd, 1···· ' transfer value to outputs
    · HIGH AdcCS
    · adcVal = INL········ ' read value
    · RETURN

    Mind you this code is off the top of my head, very late at night (I should be in bed), and without the part to test with....

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA


    Post Edited (Jon Williams) : 4/12/2005 5:14:19 AM GMT
  • charlieknoxcharlieknox Posts: 27
    edited 2005-04-12 14:59
    Thanks Jon!· You have confirmed my suspicion of what I would have to do.· I appreciate your response.

    Thanks again,

    Charlie
Sign In or Register to comment.