Shop OBEX P1 Docs P2 Docs Learn Events
Propeller EEPROM — Change I2C Address? — Parallax Forums

Propeller EEPROM — Change I2C Address?

jbleeckerjbleecker Posts: 5
edited 2008-07-10 15:04 in Propeller 1
Hello,

I'm working on a project that has a few things sitting on the I2C bus, including a DS32C35, which is a combo RTC and FRAM. Sadly, it also sits at the same I2C slave address (0x50) as the standard EEPROM recommended for the Propeller. (I think, but don't know, that storage of this sort, no matter what the manufacturer, generally has an address of 0x50, based on my experience.) The DS32C35 cannot have its address changed, unfortunately.

I can hardwire the Propeller's EEPROM at another address, but don't know if the Propeller's bootloader will find it. That's an option, if the Propeller can somehow find the chip — don't know enough to know how the bootloader looks for it. Or, perhaps there's a way to tell the chip to look at a different address if I hardwire A0 high or something to make the address 0x51.

The default hold-the-whipped-cream non-fat option is to have some sort of jumper that takes the DS32C35 off the wire while uploading the Propeller firmware. That's an option, definitely — but a little messy. (I'm spinning boards, so a one-off programming jig could work, but it makes upgrading a little hassle-y.)

I'm new to the Propeller, but prowled about a bit to see if there was ever any such a discussion, but so far haven't come across anything. What do the experts think?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Julian Bleecker
http://www.nearfuturelaboratory.com

Comments

  • TimmooreTimmoore Posts: 1,031
    edited 2008-07-09 21:33
    Simplest answer is to connect it to 2 different pins and use the I2C object configured for those pins.
  • jbleeckerjbleecker Posts: 5
    edited 2008-07-09 21:39
    Okay — good idea. But the bootloader? Does it only use specific pins for the I2C communication to the EEPROM or can you dangle the EEPROM off of any two pins (which seems squirrelly.)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Julian Bleecker
    http://www.nearfuturelaboratory.com
  • Mike GreenMike Green Posts: 23,101
    edited 2008-07-09 21:45
    The Propeller's bootloader (which includes the downloader) requires the EEPROM to be on pins 28/29 and requires it to be the first EEPROM on that I2C bus. Since the bootloader is in ROM, that can't be changed. As timmoore mentioned, you can use any pair of I/O pins for an I2C bus for the DS32C35. You could even share the SDA pin used by the bootloader for the DS32C35. Since the RTC has a different SCL pin, you could put the RTC on the boot EEPROM I2C bus and use one other I/O pin for the FRAM's SCL pin.
  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-07-09 21:47
    The boot eeprom must have the generic EEPROM address ($50) and must have the physical portion of it's address set to 0. That said, it appears that the FRAM portion has it's own SCL, and the address only seems to pertain to the FRAM. If you use a different line for FRAM SCL it could co-exist with the existing EEPROM (not a pretty solution, but a solution). Another option would be to use the DS32B35 which does have 3 external address bits.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • jbleeckerjbleecker Posts: 5
    edited 2008-07-09 22:04
    Ah, okay —·great ideas. That fixes it..the project has enough spare pins to accommodate hanging the DS32C35 off a different I2C bus.

    Thanks fellas.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Julian Bleecker
    http://www.nearfuturelaboratory.com
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-07-10 00:24
    Who did your breakout boards? I've never seen something that looked printed like that..

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card? - PropDOS
    Need a part? Got spare electronics? - The Electronics Exchange
  • jbleeckerjbleecker Posts: 5
    edited 2008-07-10 03:20
    I did the schematic and board layout in Eagle, but had them fab'd in China. Particulars on that whole bit are here:

    www.nearfuturelaboratory.com/2007/07/18/more-pcb-stuff/

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Julian Bleecker
    http://www.nearfuturelaboratory.com
  • Beau SchwabeBeau Schwabe Posts: 6,559
    edited 2008-07-10 03:57
    jbleecker,

    If you do get strapped for I/O pins, then you might be able to do a simple I2C trick..... keep the SDA and SCL lines that go to your EEPROM the way that they are, but swap them with the DS32C35 and adjust your software for the swap. Sometimes this works with devices that have the same address as you mention.

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

    IC Layout Engineer
    Parallax, Inc.
  • hippyhippy Posts: 1,981
    edited 2008-07-10 15:04
    That sounds like a clever idea and a useful trick.

    Because the Propeller hard-drives SCL during boot loading though there is a theoretical risk of damage should the DS32C35 ( or whatever ) think it was being addressed and pull SCL low while the Propeller forced it high. I'm not sure how real such a risk would be ( minimal at best I expect ) and AFAIR the Propeller is reportedly near immune to having its outputs shorted to 0V.

    With soft-driven SDA and SCL I2C configurations this wouldn't even be an issue. There'd be possible data corruption but no hardware damage. I'd always recommend soft-driven I2C drivers whenever possible, the code isn't any more complicated and removes risk of damage.
Sign In or Register to comment.