Shop OBEX P1 Docs P2 Docs Learn Events
Several ADC0838 sharing a single data line with a BS2? — Parallax Forums

Several ADC0838 sharing a single data line with a BS2?

dinodino Posts: 3
edited 2005-12-08 19:32 in BASIC Stamp
Hi all,

I would like to connect several ADC0838 (8-channel 8-bit AD converters) to a BS2. I found several examples here in the forum showing how to program and connect either ADC0831 (1-channel) and also an 8-ch ADC0838 to a BS2.
The datasheet of the ADC converters states that one can use a "shared" line for both inputs and outputs (DI and DO) since DO is high-impedance when inactive. My question is: does anybody know if I can hook up several ADCs onto the same data line? I guess I would put in 1K resistors in front of each chip's DO to protect the output logic. The advantage obviously would be that I need only one shared CLK, one shared data line for all ADCs, and one CS line for each ADC.

Apologies if this is somewhat OT, but I'm trying to figure out the most efficient way for this...

Best Wishes,
Dino

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-11-17 15:24
    dino,

    ·· Yes, you can put a 1K resistor between DI/DO and use the same Stamp I/O pins for Data and Clock.· Each ADC should have it's own CS.· Breadboard the system using two ADC0838s first to get a handle on the connections and programming, then go from there.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • dinodino Posts: 3
    edited 2005-11-17 17:58
    Thanks so much Chris!
    I'll try that on the breadboard.

    Best,
    Dino
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-11-17 20:41
    dino,

    ·· If you haven't already done so, make one small change to that wiring setup.· What I said was what I meant with one small addendum...You should be attached to the DI side, as shown in the attached schematic.· Let us all know how this works out for you.· Should be fine, but I haven't used this particular chip like this yet.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
    369 x 206 - 9K
  • dinodino Posts: 3
    edited 2005-12-06 20:33
    Hi all,
    I thought I'll give a brief update about this "hooking up multiple ADC0838".

    It does work indeed. I've connected 11 ADC0838 to a BS2, they all share one single CLK line and a single data line. As discussed above, I've put 1K resistors in front of each output of the ADCs. It all works like a charm! I'm reading the states of approx. 75 pots and 10 switches using the 11 ADCs (88 lines total). Had to switch to a BS2p24 for the Scratchpad RAM which I need to store the previous state of each pot. All in all, very easy and straightforward. Now I have a huge 80+ pots hardware MIDI controller!!! Bloody fantastic!
    I also included a "programmer port" (a simple AMP MTA 0.1" connector) on my board which connects the programming (serial and ATN) lines of the BS2 with the corresponding pins of the USB board of Edu so that I can easily modify the program while the chip is seated on my board. Ideally, I would have included a socket for a DLP-USB232M module (the serial to USB converter FTDI chip on a 24pin DIP socket), but I had already etched the board...

    Another thing I would like to share: I did the whole development on my G5 Mac using Murat's "macbs2" application. It's a native Mac OS X app that allows programming of Stamps on the Mac. Together with the USB Board of Education this works beautifully!! I'm very happy.
    If anybody's interested, here's the link:

    http://www.muratnkonar.com/otherstuff/macbs2/index.shtml

    (Another happy Parallax customer... tongue.gif )

    With Best Wishes,
    Dino
  • achilles03achilles03 Posts: 247
    edited 2005-12-08 19:29
    Wouldn't multiple voltage outputs from the DOs interfere with each other? I assume that an inactive ADC has a high or low default DO value... ? (i.e. if 10 of the DOs are a default value, how can the BS2 determine what the state of the active ADC is?)
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-12-08 19:32
    They shouldn't...They should be inactive when the chip isn't selected.· This is common among SPI devices to allow sharing of the lines.· Often the resistors are for safety in case of a software/program problem, not a functional issue, although sometimes that is warranted as well.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
Sign In or Register to comment.