Shop OBEX P1 Docs P2 Docs Learn Events
Help with a ADC0834 — Parallax Forums

Help with a ADC0834

ArchiverArchiver Posts: 46,084
edited 2002-01-12 16:45 in General Discussion
I have an ADC0834 4 channel ADC that I want to use to monitor 4 different
temperature probes. After looking through the data sheets, I still don't
understand how the different channels are selected. Has anyone worked with one
of these or know how this is done?

Hank

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2002-01-11 06:16
    Hank,

    The channel selection is made with the DI pin on the 0834. The
    addressing tables in the National data sheet show the bit
    combinations for the channel selection. The timing tables show
    how the bits are transmitted.

    Four wires are needed for the stamp connection: DI, DO, CS,
    and CLK. The code for a BS2 looks something like this

    ' adc_chan is %1100, %1101, %1110, or %1111 for channels
    ' 0 through 3 in single-ended mode
    ' first select the channel
    shiftout di_pin, clk_pin, msbfirst, [noparse][[/noparse]adc_chan]
    ' then read the data
    shiftin do_pin, clk_pin, msbpost, [noparse][[/noparse]data\8]

    Marylou
    _______________________________________


    --- In basicstamps@y..., "rcvehicles" <rcvehicles@y...> wrote:
    > I have an ADC0834 4 channel ADC that I want to use to monitor 4
    different temperature probes. After looking through the data sheets, I
    still don't understand how the different channels are selected. Has
    anyone worked with one of these or know how this is done?
    >
    > Hank
  • ArchiverArchiver Posts: 46,084
    edited 2002-01-12 05:51
    Thanks Marylou, I'll give that a try.

    Hank


    Original Message
    From: "zonie999" <apstumpf@u...>
    To: <basicstamps@yahoogroups.com>
    Sent: Friday, January 11, 2002 1:16 AM
    Subject: [noparse][[/noparse]basicstamps] Re: Help with a ADC0834


    > Hank,
    >
    > The channel selection is made with the DI pin on the 0834. The
    > addressing tables in the National data sheet show the bit
    > combinations for the channel selection. The timing tables show
    > how the bits are transmitted.
    >
    > Four wires are needed for the stamp connection: DI, DO, CS,
    > and CLK. The code for a BS2 looks something like this
    >
    > ' adc_chan is %1100, %1101, %1110, or %1111 for channels
    > ' 0 through 3 in single-ended mode
    > ' first select the channel
    > shiftout di_pin, clk_pin, msbfirst, [noparse][[/noparse]adc_chan]
    > ' then read the data
    > shiftin do_pin, clk_pin, msbpost, [noparse][[/noparse]data\8]
    >
    > Marylou
  • ArchiverArchiver Posts: 46,084
    edited 2002-01-12 16:45
    Hank,

    I forgot to mention that the 0834 chip must be enabled with with the
    CS pin.

    low cs_pin
    shiftout di_pin, clk_pin, msbfirst, [noparse][[/noparse]adc_chan]
    shiftin do_pin, clk_pin, msbpost, [noparse][[/noparse]data\8]
    high cs_pin

    Marylou
    ______________________________________


    --- In basicstamps@y..., "rcvehicles" <rcvehicles@y...> wrote:
    > Thanks Marylou, I'll give that a try.
    >
    > Hank
    >
    >
    >
    Original Message
    > From: "zonie999" <apstumpf@u...>
    > To: <basicstamps@y...>
    > Sent: Friday, January 11, 2002 1:16 AM
    > Subject: [noparse][[/noparse]basicstamps] Re: Help with a ADC0834
    >
    >
    > > Hank,
    > >
    > > The channel selection is made with the DI pin on the 0834. The
    > > addressing tables in the National data sheet show the bit
    > > combinations for the channel selection. The timing tables show
    > > how the bits are transmitted.
    > >
    > > Four wires are needed for the stamp connection: DI, DO, CS,
    > > and CLK. The code for a BS2 looks something like this
    > >
    > > ' adc_chan is %1100, %1101, %1110, or %1111 for channels
    > > ' 0 through 3 in single-ended mode
    > > ' first select the channel
    > > shiftout di_pin, clk_pin, msbfirst, [noparse][[/noparse]adc_chan]
    > > ' then read the data
    > > shiftin do_pin, clk_pin, msbpost, [noparse][[/noparse]data\8]
    > >
    > > Marylou
Sign In or Register to comment.