Pages: [1]   Go Down
Author Topic: Arduino Duemilanove with 8-bit atmega328 - how to read 16-BIT REGISTER CONTENTS  (Read 416 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 14
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have Arduino Duemilanove with ATmega328 chip - is 8-bit chip.
I have sensor ADIS16354  (datasheet http://www.analog.com/static/imported-files/data_sheets/ADIS16354.pdf )
has 16-bit output register contents.
On picture is SPI Sequence for Read Commands. (from datasheet)

It is possible to read the data with my Arduino?
If yes so how?
Thanks for advice.
Logged

Central Europe
Offline Offline
Edison Member
*
Karma: 6
Posts: 1220
Use the Source, Luke.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Easy: after you received 8 bits, store the byte and read another 8 bits. If you store the second byte in the right place, you can access the resulting value directly as a 16-bit integer.

Korman
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 14
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How do I know that I store the second bite at the right place?
Would be a simple program / code for example ?
Help anyone?
« Last Edit: June 30, 2011, 01:10:14 pm by mmichalll » Logged

Pages: [1]   Go Up
Jump to: