Jump to content
Sign in to follow this  
Rei Vilo

[Energia Library] LaunchPad + StellarPad

Recommended Posts

Please find a first release of the library for 23K640 SPI SRAM.


SRAM_Distribution_103.zip Updated Jun 05, 2013


A couple of strange things:

  • SPI_CLOCK_DIV2 for MSP430G2553 gives 8 MHz
  • but SPI_CLOCK_DIV2 for LM4F120H5QR gives 4 MHz!
  • Surprisingly, the MSP430G2553 seems to require an extra
data[0] = SPI.transfer(0);

before starting to read the right address.

Share this post

Link to post
Share on other sites

I realize now that I posted this in the LM4F forum instead of here.  Here is the repost:


Question -


    If I want to use this library inside of another library how would I do it?  I have another library for the Nokia5110 that I want to use.  The only problem is that to do graphics efficiently on the 5110, you need to have a 504 byte screen buffer, and there just isn't enough RAM on the 2553 to pull it off.  So I wrote two extra functions for the SRAM library writeByte, and readByte to facilitate filling and reading the 504 byte screen buffer, which I would like to hold on the RAM chip.  


   So, that all said, I think I am doing something wrong.  The library I am using is Henning Karlsen's library for graphics on the 5110.  I am at work right now.  If anyone is interested in checking it out and seeing what I am done wrong, I will post the code when I get home.  I will zip everything, the modded libraries as well as the sketch.





I am now home from work, and I am attaching what I am using for the code.  The only mod to the SRAM library was to add the two functions (writeByte and readByte).  The 5110 graphics library has been modified to use those functions to fill and display the screen buffer. 


Any help, would be appreciated.







Share this post

Link to post
Share on other sites

I had 30min before work, copied and built it.


I will test when I get home.


In the mean time if someone could look at the code and see if I am implementing it correctly, I would appreciate it. I am mostly wondering if I wrote the two functions properly, and if I have created an instance of the SRAM object correctly in the 5110 graphics lib. It all compiles...just doesn't display on the screen.



Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this