You're right, I confused. It was an input to adjust the RF gain..( so long time ago I used to use..)There is a pin named AGC but my father told me that its an input and I need to set it to a fixed 2.5V-3.3V.
Or you're talking about soldering a wire somewhere on the tuner's PCB ?
I opened this thread because I didn't know Is there a relation between the carrier magnitude and the IF's one.
I asked that in the first post but didn't expressed myself good because my english is not perfect.
"Does larger signal means larger IF out or the IF have same amplitude for different signal levels ?"
If there is a relation: I can use an analog tuner, convert its IF to DC voltage with a diode, capacitor and measure that.
If no: I will desolder the SAW filter and the IC that controls the AGC from the TV board and use that.
About BER, I think its only about satellite tuners but Im not sure.
I know it from sat receivers.
betwix, Are you talking about a relation between the carrier amplitude and the IF out amplitude or you are talking about a relation between the carrier and the amplitude of the power detector in the NTSC demodulator after the SAW filter ?
Can I make a spectrum analyser with 50hz sawtooth sweep or this is too fast ?
Because I have an old TV and I can connect the varicap input to the vertical deflection coil 50hz sawtooth pulses.
Then I can show the result via the horizontal coil using a transistor to drive it.
void loop()
{
display.setCursor(0,0);
display.println("45M______________108M");
for(int i=0; i<dw; i++)
{
tuner.freq_tuner( i*30+1 );
adcIn = analogRead(adc);
display.drawPixel(i, 62-adcIn/23, WHITE);
display.display();
}
display.clearDisplay();
}
/* * * * * * * * *
RF Electronics
Spectrum Scanner
v.0.0.5
* * * * * * * * */
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
//#include "rfe.h" // rfe logo
#define OLED_RESET 4
Adafruit_SSD1306 display(OLED_RESET);
#if (SSD1306_LCDHEIGHT != 64)
#error("Height incorrect, please fix Adafruit_SSD1306.h!");
#endif
/****
***/
int dw;
const float pi = 6.047619047619048;
byte buffer[5];
byte signal;
byte firstRun = 1;
byte prev[2];
bool disp = false;
/***
****/
void setup()
{
// Display init
display.begin(SSD1306_SWITCHCAPVCC, 0x3C); //0x3D too
// Clear the buffer.
display.clearDisplay();
// draw the logo
/*
display.invertDisplay(true);
display.drawBitmap(0, 0, rfe, 128, 64, 1);
display.display();
delay(2000);
display.invertDisplay(false);
display.clearDisplay();
*/
//loading_animation();
display.setTextSize(1);
display.setTextColor(WHITE);
dw = display.width();
TEA_init();
}
void loop()
{
display.setCursor(0,0);
display.println("87M ____________ 108M");
for(int i=0; i<dw; i++)
{
//radio.selectFrequency( round((float)i/pi * 10) / 10.0 + 87.00 ); // pi = (dw-1)/(108-87)
//radio.selectFrequency( round_to_dp((float)i/pi, 2) + 87.00 ); // pi = (dw-1)/(108-87)
//radio.selectFrequency( i/6 + 87 );
//setFrequency( (float)(i/6 + 87) );
//setFrequency( round_to_dp((float)i/pi, 2) + 87.00 );
setFrequency( round((float)i/pi * 10) / 10.0 + 87.00 );
Wire.requestFrom(0x60,5); //reading TEA5767
while(!Wire.available()) ;
for (int i=0; i<5; i++)
buffer[i]= Wire.read();
signal = buffer[3];
//display.drawPixel(i, 62-radio.getPowerLevel()/5, WHITE);
if(firstRun)
{
display.drawPixel(i, 63-signal/13, WHITE);
firstRun = 0;
}
else
display.drawLine(prev[0], prev[1], i, 63-signal/13, WHITE);
prev[0] = i;
prev[1] = 63-signal/13;
display.display();
}
prev[0] = 0;
prev[1] = 63;
firstRun = 1;
display.invertDisplay(disp);
if(disp) disp=false;
else disp=true;
display.clearDisplay();
}
void setFrequency(float frequency)
{
unsigned int frequencyB;
unsigned char frequencyH=0;
unsigned char frequencyL=0;
frequencyB = 4 * (frequency * 1000000 + 225000) / 32768;
frequencyH = frequencyB >> 8;
frequencyL = frequencyB & 0XFF;
//delay(100);
Wire.beginTransmission(0x60);
Wire.write(frequencyH);
Wire.write(frequencyL);
Wire.write(0xB0);
Wire.write(0x10);
Wire.write((byte)0x00);
Wire.endTransmission();
//delay(100);
}
void TEA_init()
{
unsigned int frequencyB;
unsigned char frequencyH=0;
unsigned char frequencyL=0;
float frequency=87.5;
frequencyB=4*(frequency*1000000+225000)/32768; //calculating PLL word
frequencyH=frequencyB>>8;
frequencyL=frequencyB&0XFF;
delay(100);
TWBR = (F_CPU/400000L - 16)/2;
Wire.beginTransmission(0x60); //writing TEA5767
Wire.write(frequencyH);
Wire.write(frequencyL);
Wire.write(0xB0);
Wire.write(0x10);
Wire.write(0x00);
Wire.endTransmission();
delay(100);
}
float round_to_dp( float in_value, int decimal_place )
{
float multiplier = (float)pow( 10.0f, decimal_place );
in_value = ((float)round( in_value * multiplier )) / multiplier;
return in_value;
}
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?