Shop OBEX P1 Docs P2 Docs Learn Events
23k256? Help!! — Parallax Forums

23k256? Help!!

RavenkallenRavenkallen Posts: 1,057
edited 2010-10-23 21:10 in Propeller 1
Well, i have tried to interface a 23k256 to a Propeller using Mike Green's winbond flash driver(that also supports the SRAM). I am not really sure how to even set up the RAM hardware wise. I have pull-ups on the CS line and the hold line and the rest are directly connected to the Prop pins...Plus, i am not sure if i set up everything right in the software side of things...Does anybody have experience using these(i want to get to know these so i can work the C3 like a pro)....Thanks in advance.

RK

Comments

  • BigFootBigFoot Posts: 259
    edited 2010-10-21 17:48
    We use a four 10K resistors to pull up the signals for the SD card,
    this should also work fine for the Sram chip.

    Since the propellers I/O lines float for more than a second on boot
    up, it is a good idea to have pull ups or pull downs on any critical
    signals.
  • RavenkallenRavenkallen Posts: 1,057
    edited 2010-10-21 18:22
    I tried that and it didn't work...Thanks for the thought, though.
  • RavenkallenRavenkallen Posts: 1,057
    edited 2010-10-23 21:10
    Well, i figured it out(i used the SPI_spin object instead)...This is the code i used to get it to work. I used pullups only on the HOLD pin and the CS pin...

    CON

    _clkmode = xtal1 + pll16x
    _xinfreq = 5_000_000


    obj

    spi: "spi_spin"
    ser: "parallax serial terminal"

    var

    byte var1, var2, var3

    pub main
    waitcnt(clkfreq * 2 + cnt)
    ser.startrxtx(31, 30, 0, 19_200)
    dira[3]~~
    outa[3] := 1
    waitcnt(clkfreq/2 + cnt)
    spi.start(100, 0)
    waitcnt(clkfreq/2 + cnt)
    outa[3] := 0
    spi.shiftout(1, 0, 5, 8, %0000_0010)
    spi.shiftout(1, 0, 5, 16, %0000_0000_0000_0001)
    spi.shiftout(1, 0, 5, 8, "h")
    outa[3] := 1
    waitcnt(clkfreq/2 + cnt)
    outa[3] := 0
    spi.shiftout(1, 0, 5, 8, %0000_0011)
    spi.shiftout(1, 0, 5, 16, %0000_0000_0000_0001)
    var1 := spi.shiftin(2, 0, 0, 8)
    outa[3] := 1
    ser.char(var1)
Sign In or Register to comment.