Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Cannot read valid data from MMA9555L

Status
Not open for further replies.

miladsh52@gmail.com

Newbie level 1
Joined
Jun 27, 2015
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
12
Hi everyone,

I'm working with MMA9555L module through an i2c interface, but I'm having a problem with pedometer function in MMA9555L. For a sanity check, I read back the version information which is ok and gets back the desired data but when I want to read the data from pedometer application, the slave returns 0x9C instead of 0x80 which shows the error "the command interpreter does not recognize a command code". How can I fix this error? Here is my code:


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
void main()
 
{
   void pedometerConfigRegs();           //sets the configuration registers of the pedometer application
                                                        //send these bytes to the part: 0x15, 0x20, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00,                                                                   0x00, 0x00, 0xE0, 0x00, 0xB6, 0x44, 0x04, 0x83, 0x05, 0x82, 0x00, 0x00, 0x00
   void pedometerReadValue();            //reads back from the slave
                                                        //send these bytes to the part: 0x15, 0x30, 0x00, 0x0C
   while(1)
   {
      read_i2c(16);
   }
}



Any help is highly appreciated.

Regards,

Milad.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top