Philips Semiconductors
AN10369
Philips ARM LPC microcontroller family
{
Initialize();
/* Do forever */
while(1)
{
/* Write data out */
SPDR=DATA;
/* Wait for transfer to be completed */
while(!(SPSR
&
SPIF)){}
}
}
/*************** System Initialization ***************/
void Initialize()
{
/* Configure Pin Connect Block */
PINSEL0=0x5500;
/* Set pclk to same as cclk */
VPBDIV=0x1;
/* Set to highest speed for SPI at 10 MHz- > 1.25 MHz */
SPCCR=0x8;
/* Device selected as master */
SPCR=0x20;
}
/*********************************************************/
3.3 Output
Waveforms from Oscilloscope are shown in Fig 3.
© Koninklijke Philips Electronics N.V. 2005. All rights reserved.
Application note
Rev. 01 — 06 April 2005
7 of 17