ChipCtl.dll can control I2C to set TvTuner.
ChilCtl.dll also can control PHILIPS Saa7114/Saa7113.
BOOL WINAPI CHIPCTL_ReadTuner( DWORD dwSlotNumber, BYTE byAddr, BYTE *byKey );
BOOL WINAPI CHIPCTL_WriteTuner( DWORD dwSlotNumber, BYTE byAddr, BYTE *byData );
Ex1===>
LONG CWin200FDlg::OnSetChannel(UINT wParam,LONG lParam)
{
BOOL bResult = FALSE;
BYTE byData[4];
WORD wDividerRatio;
BYTE tuner_Write_Address = 0xc0;
wDividerRatio = (WORD)wParam;
byData[3] = (BYTE)lParam;
if(g_bIsLgNewTuner)
{
switch(byData[3])
{
case 0xa0:
byData[3] = 0x01; //Low
break;
case 0x90:
byData[3] = 0x02; //Mid
break;
case 0x30:
byData[3] = 0x08; //High
break;
default:
byData[3] = 0x02;
break;
}
}
byData[0]= (BYTE)((wDividerRatio >> 8 ) & 0x00ff); //N byte 1.
byData[1]= (BYTE)(wDividerRatio & 0x00ff);//N byte 2.
byData[2]= 0x8e; //control information byte 1.
BYTE bySlaveAddr = tuner_Write_Address; //0xc0
if(g_bIsLgNewTuner)
bySlaveAddr = tuner_LG_Write_Address; //0xc6
if(CHIPCTL_WriteTuner(SLOT_NUMBER, bySlaveAddr, byData) )
{
bResult = TRUE;
}
return bResult;
}
Ex2===>
LONG CWin200FDlg::OnScanChannel(UINT wParam,LONG lParam)
{
BOOL bResult = FALSE;
int m;
BYTE status;
BYTE bySlaveAddr = tuner_Read_Address;
if(g_bIsLgNewTuner)
bySlaveAddr = tuner_LG_Read_Address;
for( m = 0; m < 3; m++ )
{
Sleep(50);
// get status from the tuner
if ( CHIPCTL_ReadTuner( SLOT_NUMBER, bySlaveAddr, &status ) )
{
if ( status & 0x40 ) // PLL locked?(bit 6 of status=?1)
{
switch( (status & 0x07) )//check bit2,bit1,bit0 of status
{
case 0x00: //000
case 0x04: //100
//if(g_bIsLgNewTuner)
// bResult = TRUE;
break;
case 0x01: //001
case 0x02: //010
case 0x03: //011
bResult = TRUE;
//if(g_bIsLgNewTuner)
// bResult = FALSE;
break;
default:
break;
}
}
}
}
return bResult;
}
Download Driver Pack
After your driver has been downloaded, follow these simple steps to install it.
Expand the archive file (if the download file is in zip or rar format).
If the expanded file has an .exe extension, double click it and follow the installation instructions.
Otherwise, open Device Manager by right-clicking the Start menu and selecting Device Manager.
Find the device and model you want to update in the device list.
Double-click on it to open the Properties dialog box.
From the Properties dialog box, select the Driver tab.
Click the Update Driver button, then follow the instructions.
Very important: You must reboot your system to ensure that any driver updates have taken effect.
For more help, visit our Driver Support section for step-by-step videos on how to install drivers for every file type.