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

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

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

ソリューションへジャンプ
1,519件の閲覧回数
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

タグ(2)
1 解決策
1,313件の閲覧回数
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 件の賞賛
3 返答(返信)
1,314件の閲覧回数
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 件の賞賛
1,313件の閲覧回数
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 件の賞賛
1,313件の閲覧回数
Monica
Senior Contributor III

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