LPC1768 SPI problem

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC1768 SPI problem

1,119 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lc88 on Mon Oct 20 01:16:54 MST 2014
Hello,

I have a Landtiger (http://developer.mbed.org/users/wim/notebook/landtiger-baseboard/) development board (I probably won't use its LCD display) with LPC1768 on it. My problem is that I need to communicate with ADXL362 accelerometer (Digilent pmodACL2) and L3G4200D (Digilent pmodGyro) via SPI. Is it possible to achieve it using hardware SPI (or SSP in SPI mode) embedded in LPC1768 chip ? I'm asking this question due to information enclosed in documentation of devices listed above. For example the accelerometer needs at least 3 bytes per on communication cycle (i. e. period when chip select signal is active) while LPC's SPI module can send/receive no more than 16 bits of data in one transfer cycle. I would also like to know whether LPC1768 could use its SPI hardware to work as master in multislave mode (I've got accelerometer and gyroscope)
Please help me.
Labels (1)
0 Kudos
Reply
2 Replies

741 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mazyarseyedi on Sun Mar 01 22:37:47 MST 2015
if you go for micowire half -duplex you should be able to have a opcode of 8 bits and receive 16 bits
look at usermanual section 18.5.3 figures 82 and 83
it seems you can have contiuos transfer (sending 8 bits and receiving 16 and repeating it)
also you may use only legacy spi
0 Kudos
Reply

741 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by LabRat on Mon Oct 20 01:56:29 MST 2014

Quote: lc88
For example the accelerometer needs at least 3 bytes per on communication cycle (i. e. period when chip select signal is active) while LPC's SPI module can send/receive no more than 16 bits of data in one transfer cycle.



:quest:

Then just send/receive 3 x 8 bits and switch CS like Tom shows it in this sample:

http://developer.mbed.org/users/tkreyche/notebook/adxl362_tkreyche/
0 Kudos
Reply