AR1010 FM Receiver IC2 problem

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

Martinsdz
Posts: 5
Joined: Mon Dec 03, 2018 6:01 pm
Contact:

AR1010 FM Receiver IC2 problem

Postby Martinsdz » Mon Dec 03, 2018 6:30 pm

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 44 times

maybe someone can help what i'm doing wrong?

mnf
Valued Contributor
Valued Contributor
Posts: 541
Joined: Wed May 31, 2017 11:57 am
Has thanked: 53 times
Been thanked: 302 times
Contact:

Re: AR1010 FM Receiver IC2 problem

Postby mnf » Mon Dec 03, 2018 7:26 pm

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

Martinsdz
Posts: 5
Joined: Mon Dec 03, 2018 6:01 pm
Contact:

Re: AR1010 FM Receiver IC2 problem

Postby Martinsdz » Tue Dec 04, 2018 11:33 am

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.

mnf
Valued Contributor
Valued Contributor
Posts: 541
Joined: Wed May 31, 2017 11:57 am
Has thanked: 53 times
Been thanked: 302 times
Contact:

Re: AR1010 FM Receiver IC2 problem

Postby mnf » Tue Dec 04, 2018 7:41 pm

The address 0x20 should be shifted left one bit (0x40)

Martin

Martinsdz
Posts: 5
Joined: Mon Dec 03, 2018 6:01 pm
Contact:

Re: AR1010 FM Receiver IC2 problem

Postby Martinsdz » Tue Dec 04, 2018 9:52 pm

why does the address should be shifted left?

Martinsdz
Posts: 5
Joined: Mon Dec 03, 2018 6:01 pm
Contact:

Re: AR1010 FM Receiver IC2 problem

Postby Martinsdz » Wed Dec 05, 2018 8:35 pm

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

mnf
Valued Contributor
Valued Contributor
Posts: 541
Joined: Wed May 31, 2017 11:57 am
Has thanked: 53 times
Been thanked: 302 times
Contact:

Re: AR1010 FM Receiver IC2 problem

Postby mnf » Sat Dec 08, 2018 10:51 pm

& 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....

Martinsdz
Posts: 5
Joined: Mon Dec 03, 2018 6:01 pm
Contact:

Re: AR1010 FM Receiver IC2 problem

Postby Martinsdz » Sun Dec 09, 2018 5:54 pm

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?

mnf
Valued Contributor
Valued Contributor
Posts: 541
Joined: Wed May 31, 2017 11:57 am
Has thanked: 53 times
Been thanked: 302 times
Contact:

Re: AR1010 FM Receiver IC2 problem

Postby mnf » Tue Dec 11, 2018 7:42 pm

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
Attachments
am2320.fcfx
(13.96 KiB) Downloaded 39 times