Jul 25, 2007

Writing SPI (Serial Peripheral Interface) C++ library

Today I started writing my own SPI library. Arduino can't use the hardware SPI (MOSI and MISO) pin connections due the pcb-layout.

It is handy if you can define your own MOSI and MISO pinouts.

work done:
  • SPI library

has to be done:
  • correct .c and .h includes... still some 'bizarre' error... maybe due the change of operating system (Vista) where I'm compiling on?
The last version (only some random noise is shown...). I guess somewhere a wrong initialization command... (or could also be an not exact voltage on my display Vcc and Vdd)

By special request: The source code:


Herb said...

I was going to do the same thing, but thought I look to see if others have done this. Would you share your code with me?

SunriseAt2008 said...

Hi herb

No problem.

Sorry for the late response.

Leave your email and I'll mail you the code.

Nate said...

I am about to do this! Maybe I can have your code, too?

n a t e vi l l a u m e [aT] ho tm a i l [dotcom]

I hope you can parse that address!

SunriseAt2008 said...

Hi nate and herb

No problem at all.

I'll dig up my code! - Could take a while, I'm overbooked this week @work, but you'll get the code! -


Nate said...

Don't worry about it being perfect. I would just appreciate being able to see someone else's code to see if I'm on the right track.


SunriseAt2008 said...

Hi nate

I modified the post and posted my code.

This is the last version which shows some noise on the display.

I hope you can get at least some ideas out of it!


dimas said...

Could you also send the code to
dmitry dot e dot sorokin at gmail dot com


Arek said...

Could you also send the code to
arekczarnik at googlemail dot com

Aditya said...

Could you please email me code @