Shop OBEX P1 Docs P2 Docs Learn Events
SX Addressing - Non Addressable Chips - Page 2 — Parallax Forums

SX Addressing - Non Addressable Chips

2»

Comments

  • DigitalDjDigitalDj Posts: 207
    edited 2005-07-22 03:22
    Peter,

    Is your program just setup for 4 busses?

    Kevin
    ·
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2005-07-22 05:35
    Yes.

    You may be able to duplicate some parts to support more buses,

    but I think you need to upgrade to a SX52 then, which has 4K

    of program memory. The current program is for the· SX28 and

    leaves only page 3 free.

    But 4 buses will support your 8 chips.

    regards peter
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2005-07-23 13:31
    Hi all,

    after lurking to this thread for a while, I had another look at the LM4970 datasheet today, and another idea came to my mind:

    Why not hooking all LM4970 devices together on just one I²C bus, and using the devices' address pins for selection. The attached schematic shows eight devices connected to an SX28 where the RA0/1 pins handle the I²C bus, and the RB pins are used to select one of the LM4970 devices.

    This setup also simplifies the software. There is just one set of routines (instead of several for the different busses)) required to handle the I²C bus, IOW, generating a start condition, always sending address $F4 (%11110100), followed by one or more data bytes, followed by a stop condition. Before issuing an I²C communication, the SX must pull low one of its RB pins in order to select one of the LM4970s, where all other RB pins must be high. This means that only the selected device will repond to address $F4, where all others would respond to address $F6 (which is not sent, of course).

    You could use the SXes free RC pins for selecting eight additional LM4970s hooked to the same I²C bus. In case, I/O pins are required for some other purpose, a multiplexer, like the 74ACT138 could be used to select 8 LM4970s with just three SX I/O pins. You could cascade two or more 74ACT138s in order to select 16 or more LM4970s with just one SX pin more per 8 devices.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    Günther
    1579 x 1188 - 110K
  • DigitalDjDigitalDj Posts: 207
    edited 2005-07-25 02:12
    Gunther,

    If i wanted to add another 8 lm4970's what I/O pins could i use for the serial connection or would i need to use 2 74ACT138's to accomplish this to have the extra I/O's?

    Kevin
    ·
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2005-07-25 05:19
    Kevin,

    Like Gunther said, you can tie pins from ports B and C to 16 LM7940's, and have

    a single I2C bus. By making just one of the pins from B and C low, you select

    one of the 16 LM7940's.

    You can also combine my setup with that approach:

    Tie pins from port C to 4x 8 LM7040's, each set of 8 LM7940's on its own

    I2C bus. That allows for 32 LM7940's in total without the need for any

    extra chips. If you include A2 and A3 as two extra select pins, you can

    address 4x 10 = 40 LM7940's. I think that is the maximum amount

    that can be accomplished without extra chips.



    regards peter




    Post Edited (Peter Verkaik) : 7/25/2005 8:32:47 AM GMT
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2005-07-25 08:44
    Kevin,

    as you can see in the schematic, there are two free pins at port A (RA2, RA3) which could be used for the serial connection, provided you don't need any more I/O pins for other purposes.

    Peter's approach is even more "tricky" by combining both methods: using two or more busses and selecting devices via the ADR input. You should keep in mind the required code size though. Using the "plain" concept, I have shown, requires one set of I²C routines where using two or more busses requires additional code to handle the different busses. Therefore, If I had to extend the system beyound 16 LM7940s, I would prefer one or more external multiplexers in order to keep the code as simple as possible.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    Günther
Sign In or Register to comment.