Connect with us

SPI over several components.

Discussion in 'Electronic Basics' started by Conrad, Robert, Oct 12, 2003.

Scroll to continue with content
  1. Is it possible to setup a single SPI Master, and several dozen SPI slaves on
    basically the same chain?

    I want to setup my PIC16F74 as a SPI master, and then have it talk to
    several MAX7301's using only the single SPI output on the PIC. Anybody know
    of a way of doing this?
     
  2. Well I don't reccomend using an OLD PIC for new designs,
    but yes I have driven 27 slaves with one 18C452.
    Slave selects are a problem.

    --
    *
    | __O Thomas C. Sefranek
    |_-\<,_ Amateur Radio Operator: WA1RHP
    (*)/ (*) Bicycle mobile on 145.41, 448.625 MHz

    http://hamradio.cmcorp.com/inventory/Inventory.html
    http://www.harvardrepeater.org
     
  3. Kevin Kilzer

    Kevin Kilzer Guest

    At the rate you are going, you will probably solve it before you get
    this answer! :)

    The answer is yes, by definition. It would not be a "bus" if it could
    not address multiple devices.
    If you must use a microprocessor, that is another level of learning
    you will have to endure. Depending on your application this could be
    as easy as the parallel port on a PC and VisualBasic. Since you seem
    to already have a PIC, the documentation from Microchip is quite
    extensive, and I believe that they offer a subroutine library for SPI
    work.

    You will also need a compiler and emulator, and probably a way to
    design printed circuit boards. How you fell onto the PIC so quickly
    is a bit of a mystery, and you may want to shop around before
    selecting a device. Among many options, you should also consider the
    Hitachi H8 and Atmel AVR parts. I recommend the CodeVisionAVR C
    compiler for the AVR, which comes with an extensive SPI library and
    excellent technical support.

    But to answer your question from yesterday, the power-pole connectors
    by Anderson are a very good industrial option, easy to use, rugged and
    configurable. <<http://www.andersonpower.com/products/pp/pp.html>>

    Kevin
     
  4. Hehe, the problem is that I post a question, then play around with something
    else which leads me to a whole new train of thought which gives me an answer
    to my question, or a new solution that I didn't think about before.

    The reason I am locked into a PIC16F74 is that my programmer supports the
    PIC series, and I needed a UART and a large number of outputs. Then I ran
    into this SPI setup which was an option because the PIC I already have has
    support for it. =)

    The asm on the PIC is pretty easy for me though. My biggest problem is
    figuring out the timing/addressing issues related to UART programming, but I
    believe that I worked through that finally.

    Now I need to figure out how busing SPI is going to work (along with the
    software interface for it.) The MAX 7301 Data sheet seems to want me to tie
    DOUT to DIN on different chips, but the way my design is going to have to
    work this will not be possible (as the two chips are going to be in
    completely different control boxes.) and I will not be able to guarantee
    that there will be chips in every socket (they are remote, and one might go
    offline, so I must be able to handle this situation) I thought about tying
    DOUT from each chip to a different IO pin on the PIC but that isn't possible
    as I might have as many as 32 MAX7301's.

    This all seems really complicated though. I really only need to control 8
    outputs, and 2 inputs on each relay box. It seems like there would be a much
    easier way of doing this.

    The connectors you specified are still to large. I need a simple cabling
    solution that can support 12 wires in a small wire/plug. Something like
    RJ-11/RJ45 would be great but neither supports 12 wire connectors. I thought
    about using RJ-11 connectors but it would require 64 on the control box and
    that seems like it would make the box really large. I need to find a
    connector that makes the back portion of the control box as small as
    possible, makes finding or building cables easy, is cost effective, and can
    support current loads that will drive a relay.

    I hope I have confused things even worse =)
     
  5. Problem with Maestro is that it doesn't compile here. I always get some
    SPBRG value error.

    Even the default module example fails to work for me. I have an email
    pending to Microchip but there is no help in sight that I can find. Even
    goggle didn't turn up help for this issue. =(

    So for the time being I am forced to abandon these quick modules..
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-