Problems with LCDs and SPI

Hi, i am trying to get ot grips with 16 x 2 LCDs. To do this i wanted to run the standard Hello World example. I may have caused myself a problem because i wanted to try and do this with Shift registers and in the process ended up loading the new LCD libraries with spi included. Not being able to get this to work i went back to basics, realising i should have started there, and loaded up the standard LCD Hello world sketch from the examples folder,the problem is that all i get are errors.

C:\Users\jimpe_000\Documents\Arduino\libraries\LiquidCrystal\LiquidCrystal.cpp: In member function 'void LiquidCrystal::initSPI(uint8_t)':
C:\Users\jimpe_000\Documents\Arduino\libraries\LiquidCrystal\LiquidCrystal.cpp:117: error: 'SPI' was not declared in this scope
C:\Users\jimpe_000\Documents\Arduino\libraries\LiquidCrystal\LiquidCrystal.cpp:120: error: 'SPI_CLOCK_DIV2' was not declared in this scope
C:\Users\jimpe_000\Documents\Arduino\libraries\LiquidCrystal\LiquidCrystal.cpp:124: error: 'SPI_MODE0' was not declared in this scope
C:\Users\jimpe_000\Documents\Arduino\libraries\LiquidCrystal\LiquidCrystal.cpp: In member function 'void LiquidCrystal::spiSendOut()':
C:\Users\jimpe_000\Documents\Arduino\libraries\LiquidCrystal\LiquidCrystal.cpp:403: error: 'SPI' was not declared in this scope

and the sketch wont compile. If i add #include <SPI.h> then the sketch compiles and uploads but i get nothing on the LCD, not even the individual blocks, just a blue screen that wont even dim with a pot in the circuit. I have tried two different UNO boards and two different LCDs, i cant help feeling it's the SPI but dont know enough about it to debug. i have even tried uninstalling and re-installing the IDE but no luck. I have checked the connections i dont know how many times and everything seems fine.

the sketch wont compile.

What sketch would that be ?

Oops, this one. This is where i get the error message and it wont even compile. If i include the spi library it compiles and uploads but nothing happens.

/*
LiquidCrystal Library - Hello World

Demonstrates the use a 16x2 LCD display. The LiquidCrystal
library works with all LCD displays that are compatible with the
Hitachi HD44780 driver. There are many of them out there, and you
can usually tell them by the 16-pin interface.

This sketch prints "Hello World!" to the LCD
and shows the time.

The circuit:

  • LCD RS pin to digital pin 12
  • LCD Enable pin to digital pin 11
  • LCD D4 pin to digital pin 5
  • LCD D5 pin to digital pin 4
  • LCD D6 pin to digital pin 3
  • LCD D7 pin to digital pin 2
  • LCD R/W pin to ground
  • 10K resistor:
  • ends to +5V and ground
  • wiper to LCD VO pin (pin 3)

Library originally added 18 Apr 2008
by David A. Mellis
library modified 5 Jul 2009
by Limor Fried (http://www.ladyada.net)
example added 9 Jul 2009
by Tom Igoe
modified 22 Nov 2010
by Tom Igoe

This example code is in the public domain.

*/

// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("hello, world!");
}

void loop() {
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
lcd.setCursor(0, 1);
// print the number of seconds since reset:
lcd.print(millis()/1000);
}

I have just tried a couple of other LCD sketches and they all come up with the same error message unless i include the spi library.They wont compile without it but wont run with it

The LiquidCrystal library in my Arduino 1.0.5 libraries folder doesn't have a member function called initSPI. Are you using a newer version of Arduino, or is this a non-standard (as in it was not installed by Arduino installer) LiquidCrystal library?

The library i now have was a replacement and supposed to be able to be used with Shift registers and use SPI or not, it doesn't seem that way and i cant uninstall it to get back to where i was.