LPC1768 SPI problem

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

LPC1768 SPI problem

1,528 次查看
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.
标签 (1)
0 项奖励
回复
2 回复数

1,150 次查看
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 项奖励
回复

1,150 次查看
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 项奖励
回复