Shop OBEX P1 Docs P2 Docs Learn Events
bs2 serial clock out — Parallax Forums

bs2 serial clock out

qazxsw21000qazxsw21000 Posts: 13
edited 2011-09-12 20:03 in BASIC Stamp
I am trying to get my BS2 homework board to read and write to an EEPROM chip. FYI: the chip is part number XLS93C46P. Problem is, it has a serial clock in pin. Does the BS2 have a clock output option of some sort?

Comments

  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-09-12 15:28
    Yes.
    With SHIFTOUT one pin is declared for the data out and one for clock.
    If the device can't work with the SHIFTOUT regime then you'll have to bit-bang it.
  • ercoerco Posts: 20,256
    edited 2011-09-12 16:13
    Chitty Chitty Bit Bang?
  • qazxsw21000qazxsw21000 Posts: 13
    edited 2011-09-12 16:25
    Thank you. But as it turns out that the data I need to send to the chip is not listed in the datasheet. :(
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-09-12 17:21
    ...the data I need to send to the chip is not listed in the datasheet.

    The instruction set is listed on page 3 (2-77)

    It's not a clinic, it's a datasheet.

    XL93LC46.pdf

    Maybe you should look for an I2C eeprom, there are PBasic examples to follow for those.
  • RDL2004RDL2004 Posts: 2,554
    edited 2011-09-12 18:44
    I didn't read the entire data sheet but it looks like you should be able to use SHIFTIN and SHIFTOUT like most SPI devices. Read in the PBasic help files about those two commands.

    I'm attaching a short program I wrote some years ago to demonstrate using serial (SPI) FRAM from Ramtron. It's not a drop in for your eeprom, yours is a 16 bit device, not 8, and the op codes are different but maybe it will get you started.
  • qazxsw21000qazxsw21000 Posts: 13
    edited 2011-09-12 20:03
    Now I'm playing with it. I think I have cleared it's memory. I have stored the value as x. How do I see if x has any data in it?
Sign In or Register to comment.