23LC1024 driver
Dr_Acula
Posts: 5,484
I'm doing some experiments with the 23LC1024 128k sram chip. I'm starting with a generic driver for the 23K256. I think this larger chip is just a bigger chip but it isn't working so maybe the driver is different?
The .cfg file is
and the c file is the generic hello world
and this works with the 23K256 chip but not with the new 23LC1024 chip. There is a reference within this file to spi_sram_cache.dat and I'm wondering if this references the driver code.
Is this .dat file the correct file for the chip parameters, and if so, are they different to the 23K256 by any chance?
Has anyone tried this new larger chip? http://ww1.microchip.com/downloads/en/DeviceDoc/25142A.pdf
Many thanks in advance.
The .cfg file is
# centimanes.cfg clkfreq: 80000000 clkmode: XTAL1+PLL16X baudrate: 115200 rxpin: 31 txpin: 30 cache-driver: spi_sram_cache.dat cache-size: 8K cache-param1: 0x05070601 # 0xooiiccpp - oo=mosi ii=miso cc=sck pp=cs-protocol cache-param2: 0x04000000 # 0xssxxxxxx - ss=cs load-target: ram
and the c file is the generic hello world
#include <stdio.h> #include <propeller.h> int main(void) { int n = 1; while(1) { waitcnt(CLKFREQ/10+CNT); printf("Hello World %d\n", n); n++; } return 0; }
and this works with the 23K256 chip but not with the new 23LC1024 chip. There is a reference within this file to spi_sram_cache.dat and I'm wondering if this references the driver code.
Is this .dat file the correct file for the chip parameters, and if so, are they different to the 23K256 by any chance?
Has anyone tried this new larger chip? http://ww1.microchip.com/downloads/en/DeviceDoc/25142A.pdf
Many thanks in advance.
Comments
Yes, spi_sram_cache.dat is the cache driver.
(I don't need the 4 bit mode).
Thanks++ in advance.
spi_sram24_cache.zip
What are you doing with the /HOLD pin? Do you have it pulled high? That will be required to use single bit SPI mode.
Thanks,
David
One minor error in the files in post #11 - the last line in the .cfg file was left out "load-target: ram"
I have added this back in and attached is the corrected file. This is running on pins 4,5,6,7 and it should be fairly easy to work out from the .cfg file how to change to other pins.
The 23LC1024 128k chip really is much better than the 32k one because it can fit any spin program.
I know there are flash ram solutions, but as heater pointed out in another thread, he thinks the zicog might be next to be translated from spin. And one thing the zicog needs is a way of emulating 64k of Z80 ram, and for that you need proper ram, not flash ram, as there are lots of reads and writes. So this little 23LC1024 chip driver is going to be very handy.
Thanks again!
-Tor
xmmc. Is that the right one?
@Tor, I posted some thoughts on a Z80 emulation running in C on this thread http://forums.parallax.com/showthread.php/147205-Translating-the-Spin-Obex-to-C There are some cool things we can do in C that ought to make it run much faster than the Spin/Pasm emulation.
Is all I'll need to get startet with them in the current propgcc tree (I compile from mercurial repository)?
"Default" pins for the RAM still are 4..7?