RDA5807M radio module - I2C question

Hi everyone,

I'm looking to work with my RDA5807 module without the library because I'm having a hard time understanding the logic of the commands in the library. And it doest'n seem so difficult to controll it using the wire library using the datasheet. With stress on seem....

Let's say I want to perform a soft reset.
According to the datasheet I should change the value of bit 1 in register 02H from 0 to 1.

I found the following example code on this forum in another post:

Wire.beginTransmission(0x11);          // Device address 0x11 (random access)
   Wire.write(0x02);                      // Register address 0x02
   Wire.write(0xC0); Wire.write(0x03);    // write 0xC002 into Reg.3 (soft reset, enable)
   Wire.endTransmission();                // stop condition

I really don't get how these writes accomplish what I described before according to the datasheet.

Can someone clarify that, so can examine the rest of the code myself.

Thanks!

Bram
Bram

Ar you sure that the code is working? Because the comments are not right acording to the code.

I was acyually doing reasearch while waiting for my module to arrive. So no, I haven't tested it yet.

But I might have an idea of what is going in. It can be totally wrong too.

What if het accesses register 0x02 (like he should according to the datasheet to do a soft reset and then has to write a bit to every place in that register. Because that levelled structure is quite strange for I2C I think?
So he accesses the register 0x02 and then writes in dec 192 and 3 to it. So in binary that is 11000000 00000011.
But you'd enable other stuff too then (including mute). So this might be totally wrong.

What do you think about that idea?

I'll try to test this when it arrives.