07-20-2012 01:37 AM
I try to grab date from the adxl345 in SPI mode by using USB 8451.
In order to make sure that adxl345 is working, I used microcontroller (adruino) to control adxl345 and obtain data from them.
It is working well. But when I try to do the samething in the labview, I get nothing from the adxl345.
In order to simplify my problem, I try to write a single data (0x08) to a register (address 0x2D) and read data from this regisitor again.
After exciting this program shown below, I get a value (0x00).
Anyone can give me some hint to solve this problem.
Best,
07-23-2012 01:02 AM
You might need to check the command format: for example, some device need an opcode to write before your address and data.
The shipping example of 845x "ATML AT25080A" just demonstrated this.
07-23-2012 07:18 AM
Based on a quick scan of the datasheet, your commands don't make any sense. In the first call you're trying to write a value of 8 to the 2D register, which is the POWER_CTL registers. Well, that register has the MSB hard-coded to 0, so setting the register to a value of 8 makes no sense. In the second call you're trying to access register AD, which doesn't even exist.
07-22-2014 05:25 AM
To check an ADXL345 you could use the following VI. It read the 0 register. If all is OK you get E5.
Note: SPI connections are tricky. Read data sheets carefully, My first try don't work because SDI and SDO were permuted...