Main Site Documentation

FEZ Spider with I2C SI4703 FM Module


#1

Hello everyone

This is my first thread here, please move it if i’ve placed it wrong. I habe a Problem which is maybe very Simple for you, but i don’t get it.

I have a Sparkfun SI4703 Evaluation Board (https://www.sparkfun.com/products/10663) which is connected over I2C with the FEZ Spider Board on Port 4 and a Breakout Board. The I2C Connection is “established” and Working. The Module is also initialized with the following Code to 2 Wire I2C Mode:

OutputPort RST = new OutputPort((Cpu.Pin)Pin.IO1, false);
            OutputPort SDA = new OutputPort((Cpu.Pin)Pin.IO0, false);

            RST.Write(false);
            SDA.Write(false);

            Thread.Sleep(10);

            RST.Write(true);
            SDA.Write(true);

            Thread.Sleep(200);
            
            I2CDevice.Configuration con = new I2CDevice.Configuration(0x10, 400);
            I2CDevice MyI2C = new I2CDevice(con);

But my Problem now is, that i don’t know how i have to write and Read to and from the Register. A Screenshot of the register is attached. Probably the 2 Bytes length is confusing me…

What command do i need, as example, to write the ENABLE Bit in Register 02h to 1 ?

This is not working:

 { 2,1 };
            xActions[0] = I2CDevice.CreateWriteTransaction(RegisterNum);

Has anyone a hint for me ?

Best Regards from Switzerland (:


#2

I’m not much of an I2C user, but have you checked out the I2C document here?

https://www.ghielectronics.com/docs/12/i2c


#3

Hi Jason

Yes, but there is only an Example for reading wich checks if the Register is accessible…
I’d like to know how to write to this Register.

I also don’t know for what this numbers in the square Brackets are for ?


#4

@ manu_xD - have a look at this thread, includes code


#5

@ Justin

Thank you so much! Just what i need (:

Best Regards


#6

@ manu_xD - Your welcome, let us know how you get on :slight_smile: