Shop OBEX P1 Docs P2 Docs Learn Events
Pin 28/29 - Eproms and I2c — Parallax Forums

Pin 28/29 - Eproms and I2c

pacmanpacman Posts: 327
edited 2009-11-19 01:57 in Propeller 1
Forgive me if this has been asked before (I searched and couldn't find the answer).

Can P28/29 be used for program load at power-up then just a 'normal' i2c bus?

So power on, read program from eprom, then do i2c 'stuff' (which may/may not be further reading/writing to eprom).

Obviously I would have to be careful with addressing of anything on the bus.

Does anyone have a link to a 'system' that uses this sort of process?

Is this a really bad idea?

Any "gotchas" I need to look out for?

Thanks in advance

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
=================
The future is in our hands.
Which way to the future?
=================

Comments

  • mynet43mynet43 Posts: 644
    edited 2009-11-18 22:40
    pacman,

    You should have no problem doing this.

    I've attached a schematic of a circuit I used to download register data to a TI codec chip. Works fine!

    Each i2c device has it's own address, so they don't conflict. The other ones just ignore data to someone else.

    Have fun,

    Jim
    1024 x 788 - 102K
  • Mike GreenMike Green Posts: 23,101
    edited 2009-11-18 22:41
    P28/29 works fine as a general I2C bus.· I've put extra EEPROM and an I/O expander there.· Others have put a RTC on those lines.· The biggest issue is when you want to mix 3.3V and 5V devices.· There's a whole ("sticky")·thread on this subject ... It's not a big deal.
  • mctriviamctrivia Posts: 3,772
    edited 2009-11-18 22:44
    My I'd object writes to the program eeprom.

    There is no problem putting more devices on i2c bus

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    24 bit LCD Breakout Board coming soon. $21.99 has backlight driver and touch sensitive decoder.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2009-11-18 23:15
    This opens up some possibilities - especially for those of us who have used up all the propeller pins!

    Hmm - DS1337 real time clock?

    Lots of analog I/O - eg para.maxim-ic.com/en/search.mvp?fam=prec_adc&129=8&tree=master such as datasheets.maxim-ic.com/en/ds/MAX11606-MAX11611.pdf. Multiple analog inputs on one chip, 3v3 supply.

    There are more possibilities I'm sure. I'm tempted to bring out these two pins plus power/ground via a header on my next board.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.smarthome.viviti.com/build
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2009-11-19 00:10
    Dr_Acula said...
    This opens up some possibilities - especially for those of us who have used up all the propeller pins!

    Hmm - DS1337 real time clock?

    Lots of analog I/O - eg para.maxim-ic.com/en/search.mvp?fam=prec_adc&129=8&tree=master such as datasheets.maxim-ic.com/en/ds/MAX11606-MAX11611.pdf. Multiple analog inputs on one chip, 3v3 supply.

    There are more possibilities I'm sure. I'm tempted to bring out these two pins plus power/ground via a header on my next board.

    You mean you don't bring these pins out!!!??? Shame James, I thought it was a given. On any prop or non-prop board I design I always run an I2C header, you never know sometimes what little thing you need to add. Anyway, I2C has never been a point-to-point bus like SPI, it's meant for multiple devices. The 3.3V vs 5V thing is not a problem if pull-ups go 3.3V and the 5V device has compatible thresholds (check the datasheet, some do).

    Use PCF8563 for a good n cheap I2C RTC, it's also low low power at 0.25ua.
    CY8C95xx (20,40,60) for I/O pins, inc EEPROM, PWM, watchdog.

    @Paul
    Gotchas: Just make sure that these I2C lines do not run too long a distance or can be compromised as they are the program loader lines after all.

    BTW, I use the SCL and SDA for a general clock and data out for SPI or shift-registers, this is no problem and I2C devices will only respond to a valid I2C start condition and address anyway as they have to ignore the chatter on the bus. This being the case too I have heard of some who have added more devices at the same address as other devices on the same bus but they swap the SCL and SDA to the chip. In software you swap the lines around to access these alternate chips but the "normal" chips fail to respond because they won't ever see a valid address (and vice versa).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    *Peter*
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2009-11-19 01:22
    Re Peter "You mean you don't bring these pins out!!!???"

    Um, no *hangs head in shame*

    Right, enough of that! Is there a standard for I2C plugs and sockets? I had a quick look and found a few options eg www.mcc-us.com/ipicon.htm, but immediately one problem comes up with 4 pin systems - do you use 3V3 or 5V? Or just do everything in 3V3?

    How about the connector? Polarized headers www.futurlec.com/ConnPolHead.shtml. Or modular www.futurlec.com/ConnModular.shtml The former takes less space, but it is a bit fiddly making up the cables.

    I'm thinking it would be simpler to add an I2C connector rather than trying to design the 'perfect' board all at once.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.smarthome.viviti.com/build
  • Cluso99Cluso99 Posts: 18,069
    edited 2009-11-19 01:57
    Shame James... LOL

    The TriBlade uses these pins for sram control (-WE & -OE) as well as the Eeprom. On RamBlade these pins are also used for the data bus to the sram, but I have built a disable circuit to prevent the Eeprom from getting a valid sequence as I thought this could be possible although unlikely.

    James... Connector:
    Why not use the 6 pin PropMod connection and bring out pins 30 & 31 also. This way you could plug in the RS232 board and get 2 serial connections or RTS/CTS plus TX/RX. SCL is the better one for output from the prop (P28).

    Alternately, use 4 pins where the 3v3/5v is the RST pin and make it like the PropPlug.

    Another choice, 4 pins like the USB footprint with power/ground outside 2 pins and SCL/SDA pins on the centre 2 pins. This can then be used with 10K pullups (to 5V?) to talk with a USB keyboard in PS2 mode. Just make sure the pins are 0.040" dia holes on 0.1" grid. You can use a single footprint for the USB/PS2/2x4 pin header here, but the pins have to swap on the USB or change software.

    As long as you have the space, allow for polarisation and mark it - it then is optional.

    More options than you wanted Hey smile.gif

    Pacman: hope this answers your question... yes we all use these pins for other things too, as well as I2C.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Links to other interesting threads:

    · Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)
    · Search the Propeller forums·(uses advanced Google search)
    My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm

    Post Edited (Cluso99) : 11/19/2009 2:02:08 AM GMT
Sign In or Register to comment.