Hello
I have Arduino Duemilanove
I have ADIS16354 inertial unit (Datasheet:
http://www.analog.com/static/imported-files/data_sheets/ADIS16354.pdf)
I know how to read data from adress, and show data using serial.print
//This is only a piece of code to read - it is complete, code work, but not correctly, often sends same values - that is not correct
Xacc_OUT 0x0A //MSB bit
Xacc_OUT 0x0B //LSB bit
pin 10 CS - slave select
pin 11 DIN - MOSI - Master-out, Slave-in
pin 12 DOUT - MISO - Master-in, Slave out
pin 13 SCK - SCLK - Serial clock
//read x
digitalWrite(CS,LOW);
hi=SPI.transfer(0x0a);
delayMicroseconds(160);
//lo=SPI.transfer(0x0b); // this value doesn't matter
digitalWrite(CS,HIGH);
data=(hi<<8);
Serial.print("X Accel: ");
Serial.println((hi<<8), DEC);
delay(100);
How to read 16-bit data from specific adress 0x0A or 0x0B ?
I read guides, tutorials here on the forum on the internet, I read SPI.h library, and I still did not understand how to read 16-bit data, respectively how to combine them together.
Someone help me?
How to do it for a specific address 0x0A to the X accelerometer?