Shop OBEX P1 Docs P2 Docs Learn Events
EEPROM Questions — Parallax Forums

EEPROM Questions

KPRKPR Posts: 189
edited 2009-04-23 04:26 in Propeller 1
I'm new so I always have questions.. I was thinking of building a propboard with multiple versions of firmware in eeprom.. I am assuming that I can get a 1 M bit eeprom (128k) and wire it with a dip switch to select the banks of memory in the eeprom in I would guess 4 32k blocks or 2 64k blocks..

Is my thinking correct? and if so would I get spi based eeproms ( 25LC1024 ) or just regular ones ( 24LC1025 )..

Thanks..

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New ICON coming, gotta wait for the INK to heal, now we have colour!

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-04-21 18:35
    You can get a 128K x 8 EEPROM, but you can't use a dip switch to select which bank the boot loader/downloader is to use. It doesn't work that way. The bootloader and downloader will only access the first 32K of the first EEPROM attached to pins 28 (SCL) / 29 (SDA). You can use a loader program stored in that 32K block of EEPROM to read programs and data from other parts of the first EEPROM on those pins or from other EEPROMs on those pins or from other EEPROMs on other pairs of pins.

    I would suggest using an Atmel 24C1024B or a Microchip 24LC1025 I2C EEPROM

    I wrote a Propeller OS some time ago that would manage multiple large EEPROMs. It stored a directory entry in the top 16 bytes of each 32K block it found and could load programs from a block by name. You could also have named 32K data areas although that feature wasn't finished.

    Look at the threads under "Propeller OS" here: http://forums.parallax.com/showthread.php?p=609066
  • jazzedjazzed Posts: 11,803
    edited 2009-04-21 18:53
    If you have room you could use multiple EEPROMS with switches attached to each of the A[noparse][[/noparse]0..2] pins. Then you can dial-up the program you want to boot.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve


    Propalyzer: Propeller PC Logic Analyzer
    http://forums.parallax.com/showthread.php?p=788230
  • virtuPICvirtuPIC Posts: 193
    edited 2009-04-21 19:07
    What about building a boot loader-loader? I mean, you put a boot loader at the first 32K that reads the switch and decides which firmware to load. If your code is clever enough and not all firmwares to choose from need full 32K you can even put more than 4 into an 128K EEPROM.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Airspace V - international hangar flying!
    www.airspace-v.com/ggadgets for tools & toys
  • KPRKPR Posts: 189
    edited 2009-04-21 20:18
    Ok.. I was confused.. I read Mike's and jazzed messages wrong.. I have ordered 3 25LC1024-I/P chips so I'll figure something out.. but I do like jazzed's idea of multiple chips.. I never thought of that .. and it would be simple enough to make an 8 pin piggy back board to do that so space is not a concern.. Any suggested wiring??

    virtuPIC.. thats exactly what I wanna do.. I just figured it would be better/easier to get a 128k and load 4 32k images into it.. I guess I should have read the docs.. oh well I've been stupid for years.. ask my wife!

    What are standard eeproms to use.. 32k or 64k??

    Abysmal

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New ICON coming, gotta wait for the INK to heal, now we have colour!
  • jazzedjazzed Posts: 11,803
    edited 2009-04-21 20:48
    And here I was thinking that was your idea .... A guy walks into a bar with a Giraffe. The Giraffe gets drunk, lies on the floor, and the guy starts to leave. The bar tender says "Hey buddy you can't just leave that a lyin' there!" ... The guy says "That ain't a Lion that's a Giraffe!".

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve


    Propalyzer: Propeller PC Logic Analyzer
    http://forums.parallax.com/showthread.php?p=788230
  • mctriviamctrivia Posts: 3,772
    edited 2009-04-21 20:55
    32k byte is regular. the dip switch idea only requires 1 per chip only a0 is needed. keep high for ones you don't want

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Need to make your prop design easier or secure? Get a PropMod has crystal, eeprom, and programing header in a 40 pin dip 0.7" pitch module with uSD reader, and RTC options.
  • Cluso99Cluso99 Posts: 18,069
    edited 2009-04-21 21:05
    The 25LC1024 will NOT work on bootup by the propeller. It is a SPI interface and you must have an I2C interfaced eeprom (at least to do the original boot code).

    Essentially the PropDos/PropCMD programs list a set of files on an SD card and you can select which binary to load. Since they use the same underlying fsrwFemto and sdspiFemto drivers which also access the I2C eeprom you could originally load a variation on this and load the appropriate code from there (read switches on prop pins or else by an I2C expander).

    So you could use your SPI chip after the original boot process, but you may as well just use an AT24C1024 I2C eeprom and a bootloader to select the correct code to load from there. I use this method from my microSD card in the TriBladeProp to then load ZiCog (or whatever binary I want).

    Hope this helps smile.gif

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

    · Home of the MultiBladeProps: TriBladeProp, SixBladeProp, website (Multiple propeller pcbs)
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: Micros eg Altair, and Terminals eg VT100 (Index)
    · Search the Propeller forums (via Google)
    My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
  • OwenSOwenS Posts: 173
    edited 2009-04-21 21:45
    Or a Microchip 24x1025, which is very similar to the AT24C1024 [noparse][[/noparse]I believe the higher 64k addressing is slightly different].
  • KPRKPR Posts: 189
    edited 2009-04-22 16:35
    Just my luck.. when I ordered my parts, it was between the 25LC1024 and the 24LC1025 and when I was ordering the my brain seen the SPI tag and that was the one I chose since I have been reading up on too many things in the past few days.. So I need the I2C eeproms instead to boot..

    I'll be going back to the order desk today..

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New ICON coming, gotta wait for the INK to heal, now we have colour!
  • KPRKPR Posts: 189
    edited 2009-04-22 17:26
    Okay .. I was thinking of a small piggyback board like the following..

    Comments??

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New ICON coming, gotta wait for the INK to heal, now we have colour!
    651 x 740 - 8K
  • mctriviamctrivia Posts: 3,772
    edited 2009-04-22 19:09
    that should work though you can leave everything tied normally and switch just a0

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Need to make your prop design easier or secure? Get a PropMod has crystal, eeprom, and programing header in a 40 pin dip 0.7" pitch module with uSD reader, and RTC options.
  • mctriviamctrivia Posts: 3,772
    edited 2009-04-22 19:11
    you need pull up resistors on each after the switch

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Need to make your prop design easier or secure? Get a PropMod has crystal, eeprom, and programing header in a 40 pin dip 0.7" pitch module with uSD reader, and RTC options.
  • KPRKPR Posts: 189
    edited 2009-04-22 19:27
    mctrivia said...
    you need pull up resistors on each after the switch

    between the switch and the A0 of each eeprom.. the pullups on the SCL and SDA lines aren't good enough??

    I figured that the would be since in theory only one eeprom will be using them at a time to complete the circuit..

    Abysmal

    I guess I should have paid more attention is school..

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New ICON coming, gotta wait for the INK to heal, now we have colour!
  • jazzedjazzed Posts: 11,803
    edited 2009-04-22 20:00
    KPR, logic 1 and 0 are defined by voltage level. By pulling up an input like an address line by tying a resistor between it and power, you are saying to the chip that the address line's value is logic 1. When you turn on the switch which has ground attached to the other side, you are setting the address line's value to logic 0. The only reason you pull up SCL and SDA is that in the idle state, the values on those pins will be logic 1 in the event that no other device is driving the pins ... which is most of the time. Your chip ground at must be tied directly to board ground ... if you read any chip specification, it will tell you what each pin is for although it takes some knowledge and experience to know what they mean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve


    Propalyzer: Propeller PC Logic Analyzer
    http://forums.parallax.com/showthread.php?p=788230
  • KPRKPR Posts: 189
    edited 2009-04-22 20:46
    Thanks jazzed.. I goggled pull up resistor and it said basically what you said.. just going home.. I'll post a revised pic later just so I am completely clear.. Man it would be soooo much nicer if the addressing where just a matter of blocks.. by this I mean the 24lc1025 has 4 addressable addresses using A0 and A1 because A2 is always tied to ground.. so I figured it would just be a matter of selecting the "block" i wanted..

    I figured 128kx8 / 4 = 32kx8 so

    Pin Pin Start End
    A0 A1 Block Block
    off off 0 32k
    on off 32k 64k
    off on 64k 96k
    on on 96k 128k

    I have a lot more to read.. man I'm too old for this my brain hurts..

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New ICON coming, gotta wait for the INK to heal, now we have colour!
  • mctriviamctrivia Posts: 3,772
    edited 2009-04-22 21:08
    the purpose of the address pins is so you can have up to 8 chips on 1 bus.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Need to make your prop design easier or secure? Get a PropMod has crystal, eeprom, and programing header in a 40 pin dip 0.7" pitch module with uSD reader, and RTC options.
  • jazzedjazzed Posts: 11,803
    edited 2009-04-22 21:29
    24LC1025 is an interesting device.
    You can only address up to 4 devices using A0 & A1. A2 for each chip must be tied to VCC.

    From the spec ww1.microchip.com/downloads/en/DeviceDoc/21941F.pdf

    "The A2 input is non-configurable Chip Select. This pin
    must be tied to VCC in order for this device to operate."
    
    
    


    24FC1025 interface is rated at 1MHz where 24LC1025 is rated at 400KHz.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve


    Propalyzer: Propeller PC Logic Analyzer
    http://forums.parallax.com/showthread.php?p=788230
  • mctriviamctrivia Posts: 3,772
    edited 2009-04-22 21:34
    that is true only of that 1 chip. most use it as an address line

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Need to make your prop design easier or secure? Get a PropMod has crystal, eeprom, and programing header in a 40 pin dip 0.7" pitch module with uSD reader, and RTC options.
  • KPRKPR Posts: 189
    edited 2009-04-22 23:02
    jazzed said...

    24LC1025 is an interesting device.
    You can only address up to 4 devices using A0 & A1. A2 for each chip must be tied to VCC.

    I was reading that on my commute home along with the docs for the 1 meg Atmel chip..

    Not being all that electronically savvy, anyone got an example diagram?

    Abysmal

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New ICON coming, gotta wait for the INK to heal, now we have colour!
  • jazzedjazzed Posts: 11,803
    edited 2009-04-23 03:35
    Here's a quick .png file you can use for reference.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve


    Propalyzer: Propeller PC Logic Analyzer
    http://forums.parallax.com/showthread.php?p=788230

    Post Edited (jazzed) : 4/23/2009 3:52:31 AM GMT
    591 x 770 - 20K
  • mctriviamctrivia Posts: 3,772
    edited 2009-04-23 03:37
    that will not work. all 4 have the same address.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Need to make your prop design easier or secure? Get a PropMod has crystal, eeprom, and programing header in a 40 pin dip 0.7" pitch module with uSD reader, and RTC options.
  • jazzedjazzed Posts: 11,803
    edited 2009-04-23 03:51
    You're right mac. Drawing updated.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve


    Propalyzer: Propeller PC Logic Analyzer
    http://forums.parallax.com/showthread.php?p=788230
  • KPRKPR Posts: 189
    edited 2009-04-23 04:07
    jazzed said...
    You're right mac. Drawing updated.

    Updated drawing.. you gonna share.. and how come no pullup resistors?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New ICON coming, gotta wait for the INK to heal, now we have colour!
  • jazzedjazzed Posts: 11,803
    edited 2009-04-23 04:11
    Because i'm cheap? [noparse]:)[/noparse]

    You can replace 3.3V on the address lines with 3.3V + resistor if you like but that is not really necessary.
    Add pull-up to SDA at least ... sorry 'bout that.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve


    Propalyzer: Propeller PC Logic Analyzer
    http://forums.parallax.com/showthread.php?p=788230
  • mctriviamctrivia Posts: 3,772
    edited 2009-04-23 04:12
    you need the pull up on your schematic because you had a switch pulling down to ground. his schematic does not need it because they are permanently set high.


    Simple digital switch rull of thumb. pull up if your switch goes to ground. pull down if your switch goes to the power rail.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Need to make your prop design easier or secure? Get a PropMod has crystal, eeprom, and programing header in a 40 pin dip 0.7" pitch module with uSD reader, and RTC options.
  • KPRKPR Posts: 189
    edited 2009-04-23 04:26
    hahaha..

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New ICON coming, gotta wait for the INK to heal, now we have colour!
Sign In or Register to comment.