MMA7455 Register Addressing
Discussion in "General help Guidance and Discussion" started by er Dec 12, 2013.
Thu Dec 12 2013, 10:26 pm
Hello everyone,
I am trying code MMA7455 Accelerometer in SPI mode. I am not able to retrieve any data from it. I have issue with addressing register of MMA7455.
After googling what i found is actual register addressing is done by..
can anyone help me to explain it..
I am trying code MMA7455 Accelerometer in SPI mode. I am not able to retrieve any data from it. I have issue with addressing register of MMA7455.
After googling what i found is actual register addressing is done by..
function_to_write((addr)&0x3f)<<1);
can anyone help me to explain it..
Sat Dec 14 2013, 03:20 am
If your don't have a very good understanding of SPI you will be
lucky to get the MMA7455 to work !
It can be either I2C or SPI and has 3 or 4 wire SPI.
Use other peoples designs and code where possible.
To answer your question..
The data sheet says
"The write command consists of an MSB (0=read, 1=write) to indicate
writing to the MMA7455L register, followed by a 6-bit address
and 1 don’t care bit."
Your code isolates the 6 bit address using &0x3f
It shifts the 6 bits one place to the left using <<1
Then sends the result.
In this case the top bit will be 0 meaning a read request.
The bottom bit will be zero.. but is the "don’t care bit."
lucky to get the MMA7455 to work !
It can be either I2C or SPI and has 3 or 4 wire SPI.
Use other peoples designs and code where possible.
To answer your question..
The data sheet says
"The write command consists of an MSB (0=read, 1=write) to indicate
writing to the MMA7455L register, followed by a 6-bit address
and 1 don’t care bit."
Your code isolates the 6 bit address using &0x3f
It shifts the 6 bits one place to the left using <<1
Then sends the result.
In this case the top bit will be 0 meaning a read request.
The bottom bit will be zero.. but is the "don’t care bit."
[ Edited Sat Dec 14 2013, 03:21 am ]
Sat Dec 14 2013, 05:25 pm
i am done with interfacing.. and it works..
But MMA7455 supports 2g,4g and 8g mode sensitivity. Can you tell me how this will affect raw data of acceleration???
datasheet says 2g = 64LSB/g. How to interpret it?? What does it mean..????
But MMA7455 supports 2g,4g and 8g mode sensitivity. Can you tell me how this will affect raw data of acceleration???
datasheet says 2g = 64LSB/g. How to interpret it?? What does it mean..????
Mon Dec 16 2013, 02:58 am
MMA7455 is a digital sensor so output is in digital format unlike some analog sensor which gives output as V/g and in this digital sensor its LSB/g or mg/LSB
you can convert 64LSB/g to mg/LSB as 64 mg/LSB which means.. if your digital output is
0000 0000 = 0g
0000 0001 = 0.064g
0000 0010 = 0.128g
... and so on...
Hope you get it now?
you can convert 64LSB/g to mg/LSB as 64 mg/LSB which means.. if your digital output is
0000 0000 = 0g
0000 0001 = 0.064g
0000 0010 = 0.128g
... and so on...
Hope you get it now?
Powered by e107 Forum System