Shop OBEX P1 Docs P2 Docs Learn Events
PASM SPI object moving up to 32 bytes? — Parallax Forums

PASM SPI object moving up to 32 bytes?

I'm trying to improve speed of SPI byte transfer in an old project. The old SPI PASM object(Propeller SPI engine v1.2) is shifting in selectable bits and I'm shifting in 8 bits at a time using i SPIN repeat loop. But this slows down the data transfer very much.
Old code:
REPEAT thebyte from 0 to bytes-1
BYTE[ptrData][thebyte] := SPIbus.shiftin (PINmosi, PINclk, SPIbus#MSBPRE, 8)

Does anyone have a PASM SPI object where I just can pass the datapointer and number of bytes i want shifted in on this location ?

Comments

  • Wuerfel_21Wuerfel_21 Posts: 4,448
    edited 2021-03-18 11:05

    I once wrote a driver for the 23LC1024 SPI RAM that is decently fast. If you comment out the part where it sends the command (line 118), I think it'll do the trick for you.

  • @Wuerfel_21 said:
    I once wrote a driver for the 23LC1024 SPI RAM that is decently fast. If you comment out the part where it sends the command (line 118), I think it'll do the trick for you.

    Thanks.. I will give it a try tomorrow.

Sign In or Register to comment.