音影先锋亚洲天堂网|电影世界尽头的爱完整版播放|国产 熟女 91|高清无码免费观看欧美日韩|韩国一区二区三区黄色录像|美女亚洲加勒比在线|亚洲综合网 开心五月|7x成人在线入口|成人网站免费日韩毛片区|国产黄片?一级?二级?三级

登錄 免費注冊 首頁 | 行業(yè)黑名單 | 幫助
維庫電子市場網(wǎng)
技術(shù)交流 | 電路欣賞 | 工控天地 | 數(shù)字廣電 | 通信技術(shù) | 電源技術(shù) | 測控之家 | EMC技術(shù) | ARM技術(shù) | EDA技術(shù) | PCB技術(shù) | 嵌入式系統(tǒng)
驅(qū)動編程 | 集成電路 | 器件替換 | 模擬技術(shù) | 新手園地 | 單 片 機(jī) | DSP技術(shù) | MCU技術(shù) | IC 設(shè)計 | IC 產(chǎn)業(yè) | CAN-bus/DeviceNe

TEA5757

作者:wensh 欄目:單片機(jī)
TEA5757
  請問那位高手知道TEA5757在自動收臺時如何知道它已經(jīng)收到電臺?

2樓: >>參與討論
saiyang0
回復(fù)主題:TEA5757
我有TEA5757自動搜索的資料,給個E_MAIL發(fā)給你吧.

3樓: >>參與討論
saiyang0
回復(fù)主題:TEA5757
錯了,我有TEA5767自動搜索的資料,給個E_MAIL發(fā)給你吧.


4樓: >>參與討論
wensh
太感謝樓上了,我的EAMALL:wensh@avl.com.cn
 
5樓: >>參與討論
wensh
看錯了,我知道TEA5767的自動搜臺.
 
6樓: >>參與討論
saiyang0
回復(fù)主題:TEA5757
看看這看能幫到你嗎
/* $NetBSD: tea5757.c,v 1.4 2005/06/02 14:32:12 christos Exp $ */
/*    $OpenBSD: tea5757.c,v 1.3 2002/01/07 18:32:19 mickey Exp $    */

/*
* COPYRIGHT (c) 2001 Vladimir Popov <jumbo@narod.ru>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above COPYRIGHT
*    notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above COPYRIGHT
*    notice, this list of conditions and the following disclaimer in the
*    documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

/* Implementation of most common TEA5757 routines */

/*
* PHILIPS TEA5757H Self Tuned Radio
*         http://www.semiconductors.philips.com/pip/TEA5757H
*
* The TEA5757; TEA5759 is a 44-pin integrated AM/FM stereo radio CIRCUIT.
* The radio PART is based on the TEA5712.
*
* The TEA5757 is used in FM-STANDARDs in which the local oscillator
* frequency is above the radio frequency (e.g. European and American
* STANDARDs). The TEA5759 is the version in which the oscillator frequency
* is below the radio frequency (e.g. Japanese STANDARD).
*
* The TEA5757; TEA5759 radio has a bus which consists of three wires:
* BUS-CLOCK: SOFTWARE driven cLOCK input
* DATA: data input/output
* WRITE-ENABLE: write/read input
*
* The TEA5757; TEA5759 has a 25-bit shift register.
*
* The chips are used in Radiotrack II, Guillemot Maxi Radio FM 2000,
* Gemtek PCI cards and most Mediaforte FM tuners and sound cards with
* integrated FM tuners.
*/

#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: tea5757.c,v 1.4 2005/06/02 14:32:12 christos Exp $");

#include <sys/param.h>
#include <sys/radioio.h>

#include <dev/ic/tea5757.h>

/*
* Convert frequency to HARDWARE representation
*/
u_int32_t
tea5757_encode_freq(u_int32_t freq, int TEA5759)
{
    if (TEA5759)
        freq -= IF_FREQ;
    else
        freq += IF_FREQ;

    /*
     * NO FLOATING POINT!
     */
    freq *= 10;
    freq /= 125;

    return freq & TEA5757_FREQ;
}

/*
* Convert frequency from HARDWARE representation
*/
u_int32_t
tea5757_decode_freq(u_int32_t freq, int TEA5759)
{
    freq &= TEA5757_FREQ;
    freq *= 125; /* 12.5 kHz */
    freq /= 10;

    if (TEA5759)
        freq += IF_FREQ;
    else
        freq -= IF_FREQ;

    return freq;
}

/*
* HARDWARE search
*/
void
tea5757_search(struct tea5757_t *tea, u_int32_t stereo, u_int32_t LOCK, int dir)
{
    u_int32_t reg;
    u_int co = 0;

    reg = stereo | LOCK | TEA5757_SEARCH_START;
    reg |= dir ? TEA5757_SEARCH_UP : TEA5757_SEARCH_DOWN;
    tea5757_HARDWARE_write(tea, reg);

    DELAY(TEA5757_ACQUISITION_DELAY);

    do {
        DELAY(TEA5757_WAIT_DELAY);
        reg = tea->read(tea->iot, tea->ioh, tea->offset);
    } while ((reg & TEA5757_FREQ) == 0 && ++co < 200);
}

void
tea5757_HARDWARE_write(struct tea5757_t *tea, u_int32_t data)
{
    int i = TEA5757_REGISTER_LENGTH;

    tea->init(tea->iot, tea->ioh, tea->offset, 0);

    while (i--)
        if (data & (1 << i))
            tea->write_bit(tea->iot, tea->ioh, tea->offset, 1);
        else
            tea->write_bit(tea->iot, tea->ioh, tea->offset, 0);

    tea->rset(tea->iot, tea->ioh, tea->offset, 0);
}

u_int32_t
tea5757_set_freq(struct tea5757_t *tea, u_int32_t stereo, u_int32_t LOCK, u_int32_t freq)
{
    u_int32_t data = 0ul;

    if (freq < MIN_FM_FREQ)
        freq = MIN_FM_FREQ;
    if (freq > MAX_FM_FREQ)
        freq = MAX_FM_FREQ;

    data |= tea5757_encode_freq(freq, tea->flags & TEA5757_TEA5759);
    data |= stereo | LOCK | TEA5757_SEARCH_END;
    tea5757_HARDWARE_write(tea, data);

    return freq;
}

u_int32_t
tea5757_encode_LOCK(u_int8_t LOCK)
{
    if (LOCK < 8)
        return TEA5757_S005;
    if (LOCK < 15)
        return TEA5757_S010;
    if (LOCK < 51)
        return TEA5757_S030;
    return TEA5757_S150;
}

u_int8_t
tea5757_decode_LOCK(u_int32_t LOCK)
{
    SWITCH (LOCK) {
    case TEA5757_S005:
        return 5;
    case TEA5757_S010:
        return 10;
        break;
    case TEA5757_S030:
        return 30;
    case TEA5757_S150:
    default:
        return 150;
    }
}



參與討論
昵稱:
討論內(nèi)容:
 
 
相關(guān)帖子
如何在視頻上疊加漢字字符顯示呢
哪位能解釋什么是空板?可能我見過的,但不知道叫空板
keil,此警告是什么意思???
請教一個關(guān)于93C46的問題
網(wǎng)絡(luò)家電控制開發(fā)尋求合作
免費注冊為維庫電子開發(fā)網(wǎng)會員,參與電子工程師社區(qū)討論,點此進(jìn)入


Copyright © 1998-2006 m.58mhw.cn 浙ICP證030469號