iTASK Final Presentation May 3, 2007 EE 296 Kazuki Morishita Archimedes
Goal ► SPI communication - observe transmit signals between master and slave. - observe transmit signals between master and slave. - make sure that they receive transmit signals. - make sure that they receive transmit signals. Archimedes
Hardware design Concentration is only on getting the ARM processors to communicate with each other using SPI. Archimedes
Hardware design (cont.) Hardware design (cont.) SPI pins Output pins Archimedes
Software design Yes No Archimedes
Software design (cont.) For this project, SCK’s period = about 25 us. With uVision compiler, CCLK = Meg * MSEL( =1). CCLK = Meg * MSEL( =1). PCLK rate = 20 Meg / VPBDIV( = 2). Thus SCK frequency = about 10 Meg/SPCCR ( = 254) ---> SCK period = about 25 us. PCLK rate = 20 Meg / VPBDIV( = 2). Thus SCK frequency = about 10 Meg/SPCCR ( = 254) ---> SCK period = about 25 us. Archimedes
Software design (cont.) Codes Master Slave Master Slave Archimedes
Signals on MOSI, MISO, SCK Archimedes S0SPDR = 0x16 SCK MOSI S0SPDR = 0x01 MISO ?
Problems ► MISO signal was small (< 25 us). ► Led did not flash as expected. ► Sometimes signal on MISO was inverted. ► Debugging was not easy. ---> IOSET1 = ‘1’ and check if the port is high. ---> IOSET1 = ‘1’ and check if the port is high. Archimedes
Improvements and Suggestions ► Read the user manual for LPC2119 well. ► No need to connect to a slave physically. ► Interrupt driven SPI ► Multiple slaves or/and masters Archimedes