23K256 Ram
Mike Huselton
Posts: 746
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
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
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
JMH
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
JMH
Search for "SPI Engine Demo"
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
Excellent suggestion! Beau also provides Spin and Assembly methods .
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
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
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve