Shop OBEX P1 Docs P2 Docs Learn Events
Hitachi H48C Accelerometer Module (28026) and SPI — Parallax Forums

Hitachi H48C Accelerometer Module (28026) and SPI

Mike CiaraldiMike Ciaraldi Posts: 2
edited 2010-02-04 17:16 in Accessories
The Parallax 28026 module includes an MCP3204 ADC chip, which has a conventional SPI interface.
That is, it has pins for clock, chip select, and two data lines (one in each direction).
On the module, the two data lines from the chip are combined to form a single bidirectional data line.
My questions:

1) How are the data lines combined? Is it just resistors, or something more active?
2) Are they connected all the time, or only when the module is selected?
3) Is there a schematic available for the module? I couldn't find one on the Parallax Web site.
4) I want to connect this module to a processor card which uses an SPI interface with two data lines, and to other sensors which also use two data lines. Ordinarily you can connect multiple devices to the same SPI master, as long as only one device gets selected at a time. Can I mix devices that use two data lines with those that use one data line? If so, what is the best way to do this electrically? I want a good signal, but I don't want to have a short circuit!

Thanks.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-02-04 15:31
    The data lines (Din / Dout) are probably connected directly together. This is commonly done with microcontrollers to save the use of an I/O pin. If you look at the timing diagrams in the MCP3204 datasheet, Dout is only asserted in response to a chip select and some control information received via Din.

    I haven't seen a schematic of the internals of the 28026 module.

    If your SPI master can handle both separate Din / Dout and a bidirectional single line Din / Dout, you might be able to use the same physical lines for everything since, when a chip is deselected, it presents a high impedance to both lines effectively disconnecting it. It all depends on the capabilities of the SPI master. For example, it would be easy to use any of Parallax's microcontrollers this way since they can all reconfigure their I/O pins to be inputs or outputs and use any I/O pin for a clocked data transfer in either direction as a master.
  • Beau SchwabeBeau Schwabe Posts: 6,559
    edited 2010-02-04 15:42
    Mike Ciaraldi,

    Attached is a schematic of the Hitachi H48C Accelerometer Module (#28026) ... The DOUT and DIN of the MCP3204 are connected via a 1K resistor.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • Mike CiaraldiMike Ciaraldi Posts: 2
    edited 2010-02-04 17:16
    Thanks to both of you for the info. I was worried that there might be an internal pull-up or pull-down. But since the DOUT pin gets Tri-stated (set to high impedance) when the chip is not sending, I think that there will not be a problem.

    By the way, we are connecting this to an ATMEL STK500 board containing an AVR 644P processor. We use this in one of WPI's Robotics Engineering courses. If anyone is interested, more on the program is available at robotics.wpi.edu/.
Sign In or Register to comment.