23k256? Help!!
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
RK
Comments
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.
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)