SPI1 on LPC2148

I am trying to get a DS3234 clock to communicate with a logomatic v2 via the spi1 port

I found and used the code posted by gussy at the link below

viewtopic.php?f=11&t=13523&hilit=ssp+lpc2148

After running:

void SPI1_Init(void)

{

/* setup pins for SSP (SCK, MISO, MOSI, SS) */

PINSEL1 |= PINSEL1_SCK | PINSEL1_MISO | PINSEL1_MOSI | PINSEL1_SSEL;

/* setup SSP */

SSPCR0 = SSP_DSS | SSP_FRF | SSP_CPOL | SSP_CPHA | SSP_SCR;

SSPCPSR = CPSDVSR; /* Prescaler, UM10120_1.pdf page 167 */

SSPCR1 = (1 << 1); /* Enable the module */

int a;

a = SSPDR; //GCC warning clear

while( (SSPSR & (1<<1)) == 0 );

}

which does set the ss line

I run the following simple loop to write to SPI1

While(1)

{

SPI1_send(34)

dummy = SPI1_recv()

delay_ms(1000)

rprintf(“done”)

}

the system is sending Done at 1s intervals so it is not locked up, however using a scope I have not been able to see the CS pin go low let alone anything on the MOSI line

Has anyone successfully used this (or any other) SPI1 code and if so I will very much appreciate any suggestions.

Thanks,

Stefan

The problem was solved. The CS1 pin was configured as EINT3