Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

I2C Radio tuner problem

Status
Not open for further replies.

szabi

New Member
Hi!
I got from a car radio, a TEA6820T+TEA6811 based stereo tuner.
https://www.alldatasheet.com/datasheet-pdf/pdf/19744/PHILIPS/TEA6820T.html
https://www.alldatasheet.com/datasheet-pdf/pdf/19745/PHILIPS/TEA6811.html
For testing im using the parallel port in EPP mode. I made some software I2C routins, which I use for sending data according to datasheets, and it worked very well from start. However I spent almost 2 days trying to receive data from the IF IC (TEA6820) without any success. Im using a 74LS244 tri-state bus driver, checked the hardware separately and works fine.
By applying a slow clock rate, I can debug the whole reading process, and realized, that the IF IC does not react at all, the SDA line remains high all the time.
Code:
Function ReadDATA: Byte;
var
i,j : byte;
begin
x:=0;
DlPortWritePortUchar(LPT_Port,2); //Read buffer enable
For i := 0 to 7 do
begin
  DlPortWritePortUchar(LPT_Port+2,4);//Sleep(0); SCL High
  j:=(DlPortReadPortUchar(LPT_Port+1) AND $20);
  if j>0 then j:=1 else j:=0;
  x:=(x SHL 1) OR j;
  DlPortWritePortUchar(LPT_Port+2,0);//Sleep(0); SCL Low
end;
//DlPortWritePortUchar(LPT_Port+2,0);Sleep(0); //SCL low for ACK/WRITE
DlPortWritePortUchar(LPT_Port,4+1);Sleep(0); //SDA high for NACK/WRITE
 SCL; //Ack

result := x;
end;
Code:
Start;
 WriteDATA($C3); //TEA6820T read address
 ReadDATA;
Stop;

For now I'm only interested in first byte, particularily the level information for auto scan.

I would also highly appreciate, if somebody could explain the method of calculating the division ratios for the AM part.
The first thing that doesn't fits is the 1KHz step, (TEA6811 datasheet, page 12) since the IF IC can only deliver a minimum of 3KHz reference frequency.
We got a 10.7MHz AM IF from the front-end IC. I am totally confused on how to calculate the division ratios. (for N2=3 or 5,(any reference) I got nothing trough the whole tuning range, for 10 an 15 it worked with div rates around 55-60000)
(an example for FM: receive freq=100MHZ; reference=3KHz [100000+72200(FM IF)]/3 = 57400
Thank you!
 
Last edited:
I attach the schematics for SDA, maybe this will help?
Regards.
 

Attachments

  • I2C.JPG
    I2C.JPG
    18.7 KB · Views: 152
szabi said:
Hi!
I got from a car radio, a TEA6820T+TEA6811 based stereo tuner.
https://www.alldatasheet.com/datasheet-pdf/pdf/19744/PHILIPS/TEA6820T.html
https://www.alldatasheet.com/datasheet-pdf/pdf/19745/PHILIPS/TEA6811.html
For testing im using the parallel port in EPP mode. I made some software I2C routins, which I use for sending data according to datasheets, and it worked very well from start. However I spent almost 2 days trying to receive data from the IF IC (TEA6820) without any success. Im using a 74LS244 tri-state bus driver, checked the hardware separately and works fine.
By applying a slow clock rate, I can debug the whole reading process, and realized, that the IF IC does not react at all, the SDA line remains high all the time.
Code:
Function ReadDATA: Byte;
var
i,j : byte;
begin
x:=0;
DlPortWritePortUchar(LPT_Port,2); //Read buffer enable
For i := 0 to 7 do
begin
  DlPortWritePortUchar(LPT_Port+2,4);//Sleep(0); SCL High
  j:=(DlPortReadPortUchar(LPT_Port+1) AND $20);
  if j>0 then j:=1 else j:=0;
  x:=(x SHL 1) OR j;
  DlPortWritePortUchar(LPT_Port+2,0);//Sleep(0); SCL Low
end;
//DlPortWritePortUchar(LPT_Port+2,0);Sleep(0); //SCL low for ACK/WRITE
DlPortWritePortUchar(LPT_Port,4+1);Sleep(0); //SDA high for NACK/WRITE
 SCL; //Ack

result := x;
end;
Code:
Start;
 WriteDATA($C3); //TEA6820T read address
 ReadDATA;
Stop;

For now I'm only interested in first byte, particularily the level information for auto scan.

I would also highly appreciate, if somebody could explain the method of calculating the division ratios for the AM part.
The first thing that doesn't fits is the 1KHz step, (TEA6811 datasheet, page 12) since the IF IC can only deliver a minimum of 3KHz reference frequency.
We got a 10.7MHz AM IF from the front-end IC. I am totally confused on how to calculate the division ratios. (for N2=3 or 5,(any reference) I got nothing trough the whole tuning range, for 10 an 15 it worked with div rates around 55-60000)
(an example for FM: receive freq=100MHZ; reference=3KHz [100000+72200(FM IF)]/3 = 57400
Thank you!

TRY USING "11111001" AS FIRST BYTE.(Page27 0f 6820 datasheet table2&3) there is no 10.7 for am
it is a range in418 to480 or so . see page 30 of the same datasheet.(IF counter readout function)
 
Sorry, but i think i don't understand you.
The first AM IF is 10.7MHz
·
FM mixer for conversion from FM-IF1 = 72.2 MHz to
FM-IF2 = 10.7 MHz
AM mixer for conversion from AM-IF1 = 10.7 MHz to
AM-IF2 = 450 kHz
I dont understand how to program the front-end IC TEA6811 to obtain the desired frequency. The TEA6820 contains the second mixer 10.7->450KHz, and I dont need the 2nd IF counter value.
11111001 for 1st byte means 25KHz step, mono!
If you were thinking about 2nd byte, then divider for mixer2 would be 2, which should be 6 for 10.7MHz IF1. Page 13 Note 7.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top