Skip to Main Content

How to work with Registers in Embedded Programming?

md.nawazish.khan-JavaNetApr 22 2015 — edited Apr 22 2015

Hi all,

I am very new to embedded programming and Java ME8.1 is very helpful in this regard. Here is my question:

I see a lot of applications written in Java ME 8.1 (or even C for that matter) which begins by initializing Registers in the very first place. Some thing like the following:

     private I2CDevice fxos8700q;

    final int FXOS8700Q_STATUS = 0x00;

    final int FXOS8700Q_OUT_X_MSB = 0x01;

    final int FXOS8700Q_OUT_Y_MSB = 0x03;

    final int FXOS8700Q_OUT_Z_MSB = 0x05;

    final int FXOS8700Q_M_OUT_X_MSB = 0x33;

    final int FXOS8700Q_M_OUT_Y_MSB = 0x35;

    final int FXOS8700Q_M_OUT_Z_MSB = 0x37;

    final int FXOS8700Q_WHOAMI = 0x0D;

    final int FXOS8700Q_XYZ_DATA_CFG = 0x0E;

    final int FXOS8700Q_CTRL_REG1 = 0x2A;

    final int FXOS8700Q_M_CTRL_REG1 = 0x5B;

    final int FXOS8700Q_M_CTRL_REG2 = 0x5C;

    final int FXOS8700Q_WHOAMI_VAL = 0xC7;

    final int UINT14_MAX = 16383; (Source:

And I am finding it hard to get a hang of all of this initialization. In the first place, somebody please let me know (1) how and where to get these register information (2) How would I know which register(s) I need to initialize (3) how to know with what value I should initialize a register.

Thus, in general how to work with registers in Java ME 8.1.



Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked due to inactivity on May 20 2015
Added on Apr 22 2015
1 comment