Shop OBEX P1 Docs P2 Docs Learn Events
23K256 Ram — Parallax Forums

23K256 Ram

Mike HuseltonMike Huselton Posts: 746
edited 2009-02-24 06:56 in Propeller 1
Which object is correct to use for SPI data transfers with the 23K256 SRAM? Many pieces of code claim to do SPI - which is the best from our forum's experience?
I want only one piece of code - not many pieces and having to decide who goes first. In other words, an object, with properties and methods. Mike Green, OBC, any advice?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
JMH

Post Edited (James Michael Huselton) : 2/24/2009 4:08:27 AM GMT

Comments

  • Mike HuseltonMike Huselton Posts: 746
    edited 2009-02-24 04:08
    Do you reccomend Femtobasic routines? Anyone?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    JMH
  • jazzedjazzed Posts: 11,803
    edited 2009-02-24 04:20
    Too hard to extract the basic read write stuff from that ... reads like a novel. Beau's SPI stuff is pretty spartan. Of course I like my code best [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve
  • Mike HuseltonMike Huselton Posts: 746
    edited 2009-02-24 04:34
    Thanks, Steve. That is a start. I'll try Beau.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    JMH
  • jazzedjazzed Posts: 11,803
    edited 2009-02-24 04:50
    See this: http://forums.parallax.com/showthread.php?p=602056
    Search for "SPI Engine Demo"

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve
  • Mike HuseltonMike Huselton Posts: 746
    edited 2009-02-24 05:13
    Jazzed,

    Excellent suggestion! Beau also provides Spin and Assembly methods tongue.gif .

    I was going to PM Tim Moore, as he had an object on the Exchange for a SPI SRAM example, which is zeroing in on my target.
    So, I'll review both Tim's and Beau's techniques. My target is the 24K256 SPI SRAM.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    JMH
  • AribaAriba Posts: 2,690
    edited 2009-02-24 06:00
    JMH

    Here is an Object that I have written to access the 2N256S08 SPI RAMs from AMIS (now ON semiconductor).
    I have started with Tim Moores code, but changed it for single byte random access (no bursts).

    Then I found a way to boost the SPI speed to 20MHz for writes! This is done with the help of the 2 counters: 1 generates the clock, and the second acts as fast shift register.

    Just uncomment the Testcode at beginning of the source to try it out. Set the right pins for your connection and, if you don't use PropTerminal change the "PC_Text" object to "TV_Text" or "VGA_Text".

    I'm very interested if this code also works with Microchip RAMs. I see no difference in the Datasheet.

    Andy
  • jazzedjazzed Posts: 11,803
    edited 2009-02-24 06:56
    Nice work Andy!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve
Sign In or Register to comment.