Page 1 of 1

AR1010 FM Receiver IC2 problem

Posted: Mon Dec 03, 2018 6:30 pm
by Martinsdz
Hello
I wanted to ask for help maybe someone can help explain how to properly talk to the module AR1010
I can not understand the principle, With the "TEA5767HN FM Radio" module everything works fine but the sensitivity is very poor,
would like to switch to AR1010 module.
Here's the code:
AR1010.fcf_avr
(32.43 KiB) Downloaded 42 times

maybe someone can help what i'm doing wrong?

Re: AR1010 FM Receiver IC2 problem

Posted: Mon Dec 03, 2018 7:26 pm
by mnf
Hi,

You need to shift the i2c address left one bit - 0x20 << 1 - leave bit 0 as 0 for a write and or ((0x20 << 1) | 1) for a read.

I'd create an extra macro - SendByte (or some such name) to simplify the code (So for example you'd have SendByte(0x20, 10) - or similar..

Note that the AR1010 seems to be superceded by newer models?

Martin

Re: AR1010 FM Receiver IC2 problem

Posted: Tue Dec 04, 2018 11:33 am
by Martinsdz
Hi
To build a macros so far I'm not capable, so for the time being I'm building blocks.
I found the "ar1010 programming guide" after this datasheet is required to perform the initialization procedure
R0 00H 0xFFFB
R1 01H 0x5B15
R2 02H 0xD0B9
R4 03H 0xA010
Etc.
I send:
IC2 start> IC adersse +0 (write)> register> data> stop
IC2 start> 0x20> 0x00> 0xFFFB> stop>
IC2 start> 0x20> 0x01> 0x5B15> stop>
IC2 start> 0x20> 0x02> 0xD0B9> stop>
IC2 start> 0x20> 0x03> 0xA010> stop>
Etc.
Is the data transfer procedure correct?

Yes, I know that this IC is old, after all the feedback she has the best sound.

Re: AR1010 FM Receiver IC2 problem

Posted: Tue Dec 04, 2018 7:41 pm
by mnf
The address 0x20 should be shifted left one bit (0x40)

Martin

Re: AR1010 FM Receiver IC2 problem

Posted: Tue Dec 04, 2018 9:52 pm
by Martinsdz
why does the address should be shifted left?

Re: AR1010 FM Receiver IC2 problem

Posted: Wed Dec 05, 2018 8:35 pm
by Martinsdz
Hi
Ok, I'll deal with it, I2c can send 8dit or 10bit instead of 16bit so it was important to convert from 16 to 2x8
IC2 start> IC adersse +0 (write)> register> convert (16> 2x8)> data> data> stop
IC2 start> 0x20> 0x00> (H = 0xFFFB >> 8; L = 0xFFFB & 0xFF)> H> L> stop>
IC2 start> 0x20> 0x01> (H = 0x5B15 >> 8; L = 0x5B15 & 0xFF)> H> L> stop>
IC2 start> 0x20> 0x02> (H = 0xD0B9 >> 8; L = 0xD0B9 & 0xFF)> H> L> stop>
IC2 start> 0x20> 0x03> (H = 0xA010 >> 8; L = 0xA010 & 0xFF)> H> L> stop>

Thanks

Re: AR1010 FM Receiver IC2 problem

Posted: Sat Dec 08, 2018 10:51 pm
by mnf
& see something like https://robot-electronics.co.uk/i2c-tutorial as to how to shift the address (bit 0) is 0 for write and 1 for read....

Re: AR1010 FM Receiver IC2 problem

Posted: Sun Dec 09, 2018 5:54 pm
by Martinsdz
Hi
It's clear. I'll optimize the code when I check and understand all the features. I've been working with writing, everything works,
the problem is with the reading:
start> id (Wr)> registry adresse> restart> id (r)> read 15: 8> read 7: 0> stop
Start> 0x20 (Wr)> 0x13 (Wr)> Restart> 0x21 (Wr)> H (R)> L (R)> Stop
it looks like after the 0x21 command disappears clock signal, the transmitter pulls data pin low and microcontroller lockup
What am I doing wrong?

Re: AR1010 FM Receiver IC2 problem

Posted: Tue Dec 11, 2018 7:42 pm
by mnf
I did some code that uploaded data via i2c for the am2320 temp/humidity sensor

(at viewtopic.php?f=66&t=19786)

Which may or may not be a helpful template?

Martin