how switch data rate in the sensors mma7455l and mma7660fc with zstar3 or zstar or zstar2

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how switch data rate in the sensors mma7455l and mma7660fc with zstar3 or zstar or zstar2

Jump to solution
1,460 Views
orosalas
Contributor I

Hi

I'm working with sensors mma74455l and mma7660fc. I need to see how change sample rate with zstar protocol as I am communicating with them through the serial port. It is with the "m" but must take an argument which is the sampling rate that we want to occupy, the issue here is that I should not put. regards

Hola

Estoy trabajando con los sensores mma7455l y mma7660fc y necesito ver como cambio la velocidad de muestreo con el protocolo zstar3, ya que me estoy comunicando con ellos mediante el puerto serial. Se que es con el comando "m" pero debe llevar un argumento que es la velocidad de muestreo que nosotros deseamos ocupar, la cuestión aquí es que no se que debo poner. saludos

Tags (2)
1 Solution
1,254 Views
Joshevelle
Senior Contributor I

Hello Juan Manuel,

The MMA7660 output data rate can be set in register $08 [0:2], AMSR. Detailed information regarding its proper configuration can be found in page 19 of the following document:

http://cache.freescale.com/files/sensors/doc/data_sheet/MMA7660FC.pdf

In order for you to write into register $08 you should follow the sequence shown in page 3 of the following document:

http://cache.freescale.com/files/sensors/doc/app_note/AN3945.pdf

Let’s say you want a 32 g-cell measurements every 1000 ms, then you should write the following:

AMSR[2:0] = 010               // 32 Samples/Second Active and Auto-Sleep Mode

AWSR[1:0] = 00                 // 32 Samples/Second Auto-Wake Mode

FILT[2:0] = 011                   // 4 measurement samples at the rate set by AMSR[2:0] or AWSR[1:0] have to match before         // the device updates portrait/landscape data in TILT (0x03) register

Hence, register 0x08 = b01100010, which equals to 0x62. Therefore, Zstar command sequence would be as follow:

Send(0x20)         //command header

Send(‘m’)            //Character command for device Write Reg

Send(‘0’)             // Device address to write to – hi byte hi nibble

Send(´8´)             // Device address to write to – hi byte lo nibble

Send(‘6’)                             //Data byte – hi nibble

Send(‘2’)                             // Data byte – lo nibble

Hope it helps.

Regards,

Josh

View solution in original post

0 Kudos
3 Replies
1,255 Views
Joshevelle
Senior Contributor I

Hello Juan Manuel,

The MMA7660 output data rate can be set in register $08 [0:2], AMSR. Detailed information regarding its proper configuration can be found in page 19 of the following document:

http://cache.freescale.com/files/sensors/doc/data_sheet/MMA7660FC.pdf

In order for you to write into register $08 you should follow the sequence shown in page 3 of the following document:

http://cache.freescale.com/files/sensors/doc/app_note/AN3945.pdf

Let’s say you want a 32 g-cell measurements every 1000 ms, then you should write the following:

AMSR[2:0] = 010               // 32 Samples/Second Active and Auto-Sleep Mode

AWSR[1:0] = 00                 // 32 Samples/Second Auto-Wake Mode

FILT[2:0] = 011                   // 4 measurement samples at the rate set by AMSR[2:0] or AWSR[1:0] have to match before         // the device updates portrait/landscape data in TILT (0x03) register

Hence, register 0x08 = b01100010, which equals to 0x62. Therefore, Zstar command sequence would be as follow:

Send(0x20)         //command header

Send(‘m’)            //Character command for device Write Reg

Send(‘0’)             // Device address to write to – hi byte hi nibble

Send(´8´)             // Device address to write to – hi byte lo nibble

Send(‘6’)                             //Data byte – hi nibble

Send(‘2’)                             // Data byte – lo nibble

Hope it helps.

Regards,

Josh

0 Kudos
1,254 Views
TomE
Specialist II

You are in the wrong forum for these products. This forum is for problems with the forum.

Type "mma7660" into "Search" above right, and you'll find better forums and previous questions.

Tom

0 Kudos
1,254 Views
Monica
Senior Contributor III

It's been moved to Sensor's category :smileywink: