Microchip 23LC1024 SPI RAM and Updates!

Well, starting with the updates first!

As some of you may know, I’m at university, well through the first few weeks now. All seems well so far! None the less, university work renders me less able to post as often as I’d like to, or at least until the load relaxes a little (never i can imagine…) so sorry about the lack of posting and thanks for still reading!

First update is a university based one. Being the vice president of ShockSoc means that I get to decide this years engineering project. it had already been pretty much decided as a GoKart and so I’ve been designing it with the help of one of my mechanical engineering friends! After many design considerations, we decided to go for a Trike. My mechanical chummy is an absolute wizard at Creo and general CAD design, something which I am most definitely not (unless of course its using Eagle or LTspice, which I’m still not a wizard at but more so than any other form of CAD), so he has been helping create all the renders to which I’ve shown to my department for potential funding. Fortunately, a few weeks after I sent the proposal for an electric vehicle project, I received clarification and the magical yes! While being a bit nervous at the fact I now had responsibility, it was brilliant! Today, I placed an order for the Brushless DC drive unit, along with controller, throttle, battery system, wiring system and charging system, hopefully they should be here by next week.

We should hopefully be starting a dedicated blog for the Trike so keep tuned for any posts!

And for the second piece:

Microchip 23LC1024 SPI RAM chip

At the time of purchase, I didn’t actually have a massive use for this chip (http://goo.gl/MpVRjW) other than potentially using it as a masssssive buffer (uses?). None the less! It was fun to write a small drive and I’ve got a few performance specs too. After full on throwing data at the chip, -O3 optimizations and the fastest SPI clock available to the STM32F0 (24MHz) and a 3V power supply, gives a data transmission rate of… 515KB/s! …Oh… Well its not amazing but for single SPI, I suppose not too shoddy! For microcontrollers that have dual or quad SPI peripherals, this data rate can be drastically increased but the STM32F0 unfortunately only features a single channel SPI peripheral! There is probably a way to set up another SPI as a slave, clocking it off the primary SPI and sending the data in but I doubt it’d be worth it.

The library itself is really simple, it offers a few functions, namely:

  1. Initialize SPI RAM IC
  2. Write byte, word, double word and float
  3. Read byte, word, double word and float
  4. SPI RAM IO Access (changes between single SPI, double SPI and quad SPI)
  5. Mode register read
  6. Mode register write
  7. A simple speed test just spam writing data to the chip

Not a large amount of functionality and I’d like to add buffer writing/reading but its a good start!

I’ve also been working with SD cards using my STM32F0 and I got as far as creating a simple WAV player which was cool! I’ll hopefully post something about that at a later date

Either way, if you fancy having a look at my SPI RAM implementation, the code is on my GitHub!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s