23LC1024 SPI RAM driver insanity

I am literally descending into insanity right now and all I've got to blame is a little eight-leggy boi.

Since I couldn't find any Spin/PASM drivers for it, I tried writing my own. Oddly, the RAM seems to be really picky with the drivers:

naiveram.spin - seems to work, but super slow
sdiram.spin - uses SDI mode, slightly less slow, but reliable (and can be used together with an SD driver)
sdiram_seq.spin - like sdiram, except it tries to reduce the amount of commands sent by keeping the session going between calls. Works only with some access patterns? Puzzled.
23lc1024.spin - attempt to write a PASM driver. (in8 and out8 are confirmed to work with the RAM) Seems to stop working after sdiram ACCESSES the RAM (initializing it to SDI mode is fine?) until it is powercycled. Also potentially depends on the phase of the moon and the weather.

Can someone please tell me what I'm missing? (Or point me to a PASM driver that works?)

Comments

Sign In or Register to comment.