Shop OBEX P1 Docs P2 Docs Learn Events
EEPROM and Crystal problem — Parallax Forums

EEPROM and Crystal problem

SexieWASDSexieWASD Posts: 41
edited 2009-09-23 17:37 in Propeller 1
I have an odd problem. My prop now identifies properly, and I can load a program into ram fine, but If I try to load a program into the EEPROM it fails with the "EEPROM programming error on COM 3" message, Also If I add:
CON
_xinfreq = 5_000_000
_clkmode = xtal1 + pll16x



To the top it doesn't throw an error loading it into ram, but a simple program to change one pin to output low doesn't change the pin.
I've tried a couple different 5MHz crystals from parallax, along with a few different 24LC256-I/SN EEPROM chips.
Any ideas?

Also, I really wish the forum search would allow searching thread titles only, It's hard to find anything, I suspect that there are more threads on eeprom hiding from me.

Comments

  • mctriviamctrivia Posts: 3,772
    edited 2009-09-20 01:02
    The eeprom could be due to not hooking up eeprom correctly verify write enable, address lines, and i2c pins are correct

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    propmod_us and propmod_1x1 are in stock. Only $30. PCB available for $5

    Want to make projects and have Gadget Gangster sell them for you? propmod-us_ps_sd and propmod-1x1 are now available for use in your Gadget Gangster Projects.

    Need to upload large images or movies for use in the forum. you can do so at uploader.propmodule.com for free.
  • SexieWASDSexieWASD Posts: 41
    edited 2009-09-20 01:38
    SCL is on P28 -> voltage just floats, not being pulled up by the prop, I've tried with a pull up and still no luck.
    SDA is on P29 with a 2.2k pullup to 3.3V
    WP is tied to ground
    VDD is 3.3V
    All address pins and VSS are tied to ground.

    I thought that maybe I had the EEPROM chip upside down, because the label was opposite from the data sheet, but then the prop wasn't identified at all, so it's back to the other way, using the circle to identify pin #1.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2009-09-20 01:40
    What Prop board are you using? Just in case it's made up on some matrix board check these thing:

    EEPROM pins 1,2,3,4,7 connected to ground. Pin 8 to 3.3V and of course pin 5 to P29 and pin 6 to P28 with at least a pullup on P29.
    Make sure you have a decoupling capacitor connected correctly across the Prop and/or the EEPROM supply!
    Also, what code are you using to change a pin low?

    In all this if you simply provide the code/schematic/layout upfront it would be a lot faster and simpler to answer.

    *Peter*
    P.S. just caught your post. What do you mean upside-down?
  • SexieWASDSexieWASD Posts: 41
    edited 2009-09-20 01:55
    Here is the layout, I am sorry, but I don't have a schematic for it.
    helpme-1.jpg

    The other chip on the SCL SDA lines is an I/O Expander www.cypress.com/?docID=2696
    The squares on the SCL SDA lines are for pull ups, but the resistor for SCL isn't installed.

    By upside down I mean that the print/lettering is printed opposite as in the datasheet so I was confused as to which way to solder the chip, but have tried both ways, and am back to using the pin #1 mark (indented circle) on the EEPROM.

    Here is the test code I used

    CON
    _xinfreq = 5_000_000
    _clkmode = xtal1 + pll16x
    PUB LedOn ' Method declaration
    dira[noparse][[/noparse]0] := 1 ' Set P4 to output
    outa[noparse][[/noparse]0] := 1 ' Set P4 high
    repeat
    
    



    The comments aren't accurate, I copy/pasted from the education kit pdf

    Post Edited (SexieWASD) : 9/20/2009 2:02:04 AM GMT
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2009-09-20 02:05
    The EEPROM on the Cypress device occupies the same address as the Prop's EEPROM at $A0 unless you tie the Cypress chip's address select (Pin 13) high (can't tell if you did).

    Your code will make p0 high, not low.

    *Peter*

    P.S. There is also a possibility that you have a damaged EEPROM.
  • SexieWASDSexieWASD Posts: 41
    edited 2009-09-20 02:42
    P13 on the I/O is high, and sorry I meant it won't pull it high when using the crystal, but will if the con block is deleted.
    That was my first though after checking the pins, but I have tried a few EEPROMs, and it doesn't matter which one is used, the problem remains.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2009-09-20 03:50
    So the code example is different then because it uses P0 and not P13. However I can conclude from you reversal of the eeprom that you may have damaged the Prop chip, in this case the PLL has failed so the PLL16x mode will fail. Sometimes though a slower mode will work. You might have to replace the damaged chip.

    What was the outcome with the Cypress address line? If it's tied high then the Prop should be able to load it's EEPROM.

    *Peter*
  • Nick MuellerNick Mueller Posts: 815
    edited 2009-09-20 06:18
    I'd cut the traces for SDA and SCL to the CYxxxx and see what happens. I bet programming works then. What speed is the CYxxx? 400kHz?

    What you write into the CON section has nothing to do what the Prop does during programming the EEPROM (at least I think so).

    I do have the *impression* that the Prop is a bit picky about what EEPROM is connected to the I2C. The timing is hardcoded in the chip.
    As long as your code works from RAM the way it should you have won. You could program the EEPROM with my 3PClient (make a search). You then should PM me for the current version (I didn't update the thread).


    HTH,
    Nick

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Never use force, just go for a bigger hammer!

    The DIY Digital-Readout for mills, lathes etc.:
    YADRO
  • SexieWASDSexieWASD Posts: 41
    edited 2009-09-20 22:05
    Peter called it, the code worked with PLL8x. I swapped all of the chips over to a new board, except the prop chip which I replaced with a new one and it is all working well now, even the same EEPROM works fine with the new prop. I'm not sure why it failed before I reversed the EEPROM chip, maybe I stayed a bit too long with the soldering iron.
  • propellerheadszpropellerheadsz Posts: 6
    edited 2009-09-23 17:30
    I have basically the same problem. I can identify the propeller, however, when i try to load eeprom i get an error when verifying.

    I'm using the schmartmodule board. I've desoldered and soldered a new eeprom.

    i'm using this eeprom:

    http://www.mouser.com/ProductDetail/Atmel/AT24C32C-TH-B/?qs=j6lVIf5KywDdkSEK3cFLcA==

    mouser part #: 556-A24C32CTH-B (just in case the link doesn't work)

    I looked at the proto prop dev board and they seem to be using:

    http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=AT24C512B-TH25-B-ND

    digikey part #: AT24C512B-TH25-B-ND

    Not sure if that should matter however, mine has 32k and the other has 512k

    i'll get this part and see if that's the prob.

    sound about right?
  • Mike GreenMike Green Posts: 23,101
    edited 2009-09-23 17:37
    Unfortunately EEPROM manufacturers specify their EEPROMs in terms of the number of bits they hold, not the number of bytes. What you have is a 32K bit or 4K byte EEPROM. The 24C512 is a 64K byte EEPROM which will work fine. A lot of Propeller boards use a 24C256 or equivalent which is a 32K EEPROM, the minimum size needed.
Sign In or Register to comment.