Controlling MAX7311 port extender


Closed Thread
Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    May 2006
    Location
    Del Rio, TX, USA
    Posts
    343


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mrx23
    How can MAXIM swap the Control Byte and a Address byte order?
    Isn't that standard?
    In reality, nothing is "swaped", its just that PBP has chosen to label the bytes in their software I2C in a "non-standard manner". This is because they use the labels used for EEPROMs. (worth looking at a datasheet)

    I2CREAD DataPin,ClockPin,Control,{Address,}[Var{,Var...}]{,Label}

    As listed, Control is the first byte sent. Bit 0 of this byte controls the direction of communication, either a read or write operation. In many I2C devices, the first byte sent, with bit 0 as the R/W bit, is called the slave address (but not with EEPROMs).
    Address is also confusing, since PBP uses this to refer to the internal register address being accessed in the device, not the actual bus address of the device. It will be the byte/word sent after the slave-address/control byte, and is called different things based on the device, but "command-byte" or "control-byte" are common. (but not with EEPROMs)

    You definately need a good understanding of the I2C protocol to translate PBPs I2C commands to a device other than an EEPROM


    Quote Originally Posted by mrx23
    If I want the 66 slave address (that is 0x42), I will have to set like this:
    AD2 GND
    AD1 GND
    AD0 Vdd
    Yes, it looks that way to me.

    Hope this clears it up a little more,
    Steve

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Caught me with a typo

    I also want to mention that you shouldn't have the 2 - 1.0K resistors between the two chips.

    All you need are the 2 - 4.7k pull-ups.
    <br>
    DT

Similar Threads

  1. Why (or how to) make a port array for OW
    By Roy___ in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 23rd February 2009, 00:30
  2. Change On Interrupt, PIC16F884
    By elec_mech in forum mel PIC BASIC Pro
    Replies: 17
    Last Post: - 14th November 2008, 18:25
  3. port config.
    By tamertokgoz in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 25th July 2008, 13:25
  4. Microcontroller with 2 way paging application problem
    By oneohthree in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 20th April 2007, 18:27
  5. STATUS re-curtain W
    By zugvogel1 in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 13th February 2005, 16:21

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts