Hi,
I am using accelerometer mma7455 which supprots spi interface. After configuring the microcontrollers spi and connecting the accelerometer, what should i do to get the output from the accelerometer to Microcontroller???????Pls Help....
Hi,
Send commands as two bytes ( wr bit + register address) followed by Data byte over SPI interface. For reading data from a specific register, again send one bytes ( Rd bit + Reg. address) and then read the byte from the addressed register. For reading the byte you can simply send down a dumy byte and read the SPI register after sending, if you are using hardware SPI. You can set the SPI mode as Mode 0 in this case.
Hi, I'm having a problem using the same accelerometer, MMA7455.
I'm a AVR ATmega16 to communicate with the accelerometer. I have already used ATmega16 to communicate with other devices using the SPI and they worked well. But with MMA7455, I just can't make it work.
I read the datasheet first and tried to communicate the devices. I was doing exactly like you said and it doesn't work.
I drive thw CS pin low, then send the address byte (wr bit followed by the 5bit register address and the LSB is a don't care bit). After that I send the 8bit data. Drive CS pin high again.