Shop OBEX P1 Docs P2 Docs Learn Events
Please Delete This Post — Parallax Forums

Please Delete This Post

beazleybubbeazleybub Posts: 102
edited 2008-07-14 01:40 in BASIC Stamp
I discovered this post to become an unintentional train wreck and request it to be deleted.

I appreciate the help everyone gave me but it was in a wild goose chase because the code I was trying to use was completely invalid for my particular application and would have never worked.

I would like to thank everyone and I apologies for this mess.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
What if there was nothing? Nothing is something!

Post Edited (beazleybub) : 7/27/2008 10:11:20 PM GMT
200 x 135 - 9K

Comments

  • Beau SchwabeBeau Schwabe Posts: 6,563
    edited 2008-07-13 17:11
    beazleybub,

    No need for $50... just follow this link below...

    http://www.parallax.com/Portals/0/Downloads/docs/prod/oem/24LC128-v2.0.pdf

    The 24LC128 is 32 times bigger than the FM24C04A, but the communication should be the same. The only difference is thst you will only be able to access 0-511 data bytes rather than 0-16383, but everything else should be the same.

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

    IC Layout Engineer
    Parallax, Inc.

    Post Edited (Beau Schwabe (Parallax)) : 7/13/2008 8:11:06 PM GMT
  • Mike GreenMike Green Posts: 23,101
    edited 2008-07-13 19:44
    You would need to read the location and compare its contents to what's expected (a verify cycle).
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-07-13 21:21
    Have you Run the program (attached)·from the PDF?· It cues you for an address and the data to store and all.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-07-13 21:48
    I programmed my stamp with the attachment that I'd U/L'd, and I don't have an eeprom connected.· It·prompts you for the input data & address but it doesn't regurgitate the stored info as it would with a device connected when the line
    DEBUG CR, "[color=red]Value stored at location[/color] ", DEC eeprom_add,
    " is ", DEC i2cwork.LOWBYTE, CR, CR, CR
    
    

    executes.

    Post Edit -- screenshot added

    Post Edited (PJ Allen) : 7/13/2008 9:53:56 PM GMT
    800 x 600 - 83K
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-07-13 22:01
    I'm using a B-o-E.·

    On your H-W-B it's OK.

    What's it on when it's not OK?
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-07-13 22:09
    I don't have an eeprom in...
    but what's the failure as you see it?
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-07-13 22:13
    For one thing, once it executes the lines after 'Reading section it needs a place to go, because right now it's falling into your Subroutines --
    ' Reading Section
    GOSUB I2C_Start
    PAUSE 10
    GOSUB Control_Byte_Write
    GOSUB Addrs
    GOSUB I2C_Start
    GOSUB Control_Byte_Read
    SHIFTIN SDA, SCL, LSBFIRST, [noparse][[/noparse]i2cwork\8] ' Send Byte To Device
    GOSUB I2C_Stop
     
    [color=red]**** Needs a place to GOTO (maybe Main: ?)[/color]
    [color=#ff0000]You tell me.  :)[/color]
     
    ' -----[noparse][[/noparse] Subroutines ]-----------------------------------------------------
    I2C_Stop: ' I2C Stop Bit Sequence
    LOW SDA
    INPUT SCL
    
    
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-07-13 22:19
    You probably missed an additional Reply that I made right before your last.
    How about it?· [noparse][[/noparse]Needs to go somewhere?]
  • FranklinFranklin Posts: 4,747
    edited 2008-07-13 22:22
    GOSUB I2C_Stop  
    ' -----[noparse][[/noparse] Subroutines ]-----------------------------------------------------
    
     
    I2C_Stop: ' I2C Stop Bit Sequence
    LOW SDA
    INPUT SCL
    INPUT SDA ' SDA --> High While SCL High
    RETURN
    
    
    

    This will gosub 12c-stop then return to the top of i2c-stop and execute it again then have no place to return. Is that what you want?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • FranklinFranklin Posts: 4,747
    edited 2008-07-13 22:24
    I don't know, where is your current code?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • FranklinFranklin Posts: 4,747
    edited 2008-07-13 22:48
    Main:
    DEBUG HOME
    DEBUG ? temp
    DEBUG ? i2cWork
    DEBUG ? i2cAck
    DEBUG ? fram_add
    
    

    What values do you get here?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-07-14 00:32
    You have this subroutine:
    Addrs: ' I2C Address Byte Sequence
    i2cWork = fram_add
    SHIFTOUT SDA, SCL, MSBFIRST, [noparse][[/noparse]i2cWork.HIGHBYTE\8] ' Send Byte To Device
    SHIFTIN SDA, SCL, MSBPRE, [noparse][[/noparse]i2cAck\1] ' Get Acknowledge Bit
    SHIFTOUT SDA, SCL, MSBFIRST, [noparse][[/noparse]i2cWork.LOWBYTE\8] ' Send Byte To Device
    SHIFTIN SDA, SCL, MSBPRE, [noparse][[/noparse]i2cAck\1] ' Get Acknowledge Bit
    RETURN
    You're telling 12cwork that it is equal to fram_add.· Where is fram_add determined?··[noparse][[/noparse]·no-where ]

    Post Edit -- If you're using only one address, then what happens if you make that line: i2cwork = 0?

    Post Edited (PJ Allen) : 7/14/2008 12:42:30 AM GMT
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-07-14 01:23
    What do we get with this mod?

    Write_Data: ' I2C Write Byte Sequence
    i2cWork = temp
    DEBUG "I2CWork check·= ", DEC i2cwork.lowbyte, ", temp= ", DEC temp
    SHIFTOUT SDA, SCL, MSBFIRST, [noparse][[/noparse]i2cWork\8] 'Send Byte To Device
    SHIFTIN SDA, SCL, MSBPRE, [noparse][[/noparse]i2cAck\1] ' Get Acknowledge Bit
    RETURN
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-07-14 01:34
    Then you're not branching to Write_Data?· You could replace the previous Mod. with DEBUG "writing..." and if that doesn't show up it's because you're never getting there.

    Write_Data: ' I2C Write Byte Sequence
    DEBUG "Writing...", CR
    i2cWork = temp
    DEBUG "I2CWork check·= ", DEC i2cwork.lowbyte, ", temp= ", DEC temp
    SHIFTOUT SDA, SCL, MSBFIRST, [noparse][[/noparse]i2cWork\8] 'Send Byte To Device
    SHIFTIN SDA, SCL, MSBPRE, [noparse][[/noparse]i2cAck\1] ' Get Acknowledge Bit
    RETURN

    Post Edit -- Typo?· What typo?· Looks the same from here.

    Post Edited (PJ Allen) : 7/14/2008 1:39:20 AM GMT
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-07-14 01:40
    You could add a DEBUG to "announce" each subroutine, that'd give you a clue.

    Post Edit -- I think it's not case sensitive.
Sign In or Register to comment.