LiquidCrystal (for SPI) library, not runnig on Zero board

I am using this Liquidcrystal for SPI library:

http://playground.arduino.cc/Main/LiquidCrystal

I'm using the latest Arduino IDE 1.6.7 and compiling the "Helloworld_SPI" example for the Zero board, I get some errors due to the "old" spisettings setup:

error: invalid conversion from 'uint8_t {aka unsigned char}' to 'BitOrder' [-fpermissive]

SPI.setBitOrder(_bitOrder);

Changing the following code:

	//set clockDivider to SPI_CLOCK_DIV2 by default which is 8MHz
	_clockDivider = SPI_CLOCK_DIV2;
	SPI.setClockDivider(_clockDivider);
	
	//set data mode to SPI_MODE0 by default
	_dataMode = SPI_MODE0;
	SPI.setDataMode(_dataMode);
	
	//set bitOrder to MSBFIRST by default
	_bitOrder = MSBFIRST; 
	SPI.setBitOrder(_bitOrder);

for the new way for the spisettings:

	SPI.beginTransaction(SPISettings(4000000, MSBFIRST, SPI_MODE0));

The sketch now compiles without errors :slight_smile:

BUT now when I program the Zero board with this sketch, the microcontroller does not run :o

trying to figure-out what is happening, I include some "serial.print" lines into the sketch for getting some feedback/debugging through the serial monitor but no debugging messages apear... nothing.... (even the setup part of the sketch), gets running. :o

Executing exactly the same sketch in a Leonardo board everything works perfectly but in the Zero board... nothing works.

¿any idea on what is wrong?

Thanks

//set clockDivider to SPI_CLOCK_DIV2 by default which is 8MHz// you set it a 4Mhz in your code I think that maybe the issue.

For Serial debug, on which port are you connected to? Programming Port or Native USB port?
For Programming port, the correct serial instance is Serial, for the native USB it's SerialUSB.
SerialUSB is like Serial on the Leonardo, you have to add while(!SerialUSB); at the beginning to wait until the serial terminal is open.
Using SPI.beginTransaction is the way to go. The clock speed should not be the issue, but you can try to lower it at 1MHz. By the way, SPI is not on pins 10-13, it is on the 6pin header.
Please share the whole code, it's easier to help :slight_smile: