首页 rda5807P编程指南

rda5807P编程指南

举报
开通vip

rda5807P编程指南 RDA5807P 2008.8.26 RDA5807P 编程指南 V1.0 The information conta...

rda5807P编程指南
RDA5807P 2008.8.26 RDA5807P 编程指南 V1.0 The information contained herein is the exclusive property of RDA and shall not be distributed, reproduced, or disclosed in whole or in part without prior written permission of RDA. 1 RDA5807P The information contained herein is the exclusive property of RDA and shall not be distributed, reproduced, or disclosed in whole or in part without prior written permission of RDA. 2 一. 描述: RDA5807P 提供两种不同的软件控制模式:RDA5807P Mode 和 TEA5767 Mode. 在 TEA5767 Mode 下控制接口为 I2C; 在 RDA5807P Mode 下控制接口为 I2C 和 SPI,在 PIN7:MODE 上设置高低电 平来选择. MODE:0 Æ I2C;MODE Æ SPI. 当控制接口为 I2C 时用 CHIP ID 来区分工作模式: TEA5767 MODE CHIP ID = 1100000B; RDA5807P MODE CHIP ID = 0010000B. RDA5807P 二:TEA5767 Mode 1.I2C 控制接口 TEA5767 MODE 的 I2C 接口与 I2C-Bus Specification 2.1 兼容,包含 2 个信号:SCLK 和 SDIO。I2C 接口是由 START,命令字节,数据字节,及每个字节后的 ACK 或 NACK 比特, 和 STOP 组成。命令字节包括一个 7比特的 chip 地址 (1100000b) 和一个读写 r/w 命令比 特。ACK(或 NACK)由接收器发出。 TEA5767 MODE 的 I2C 接口中寄存器的地址是不可见的。TEA5767 MODE 的 I2C 接口每次传 输 5byte 的数据。数据结构:地址,字节 1,字节 2,字节 3,字节 4,字节 5(必须按照此顺序传 输数据).数据传输时每一字节都是先传输 MSB.地址字节的最后 1bit=0 关于同志近三年现实表现材料材料类招标技术评分表图表与交易pdf视力表打印pdf用图表说话 pdf 示当前操作为写 操作,反之为读操作. 对 TEA5767 MODE 进行写操作时,MCU 写入寄存器, TEA5767 MODE 在 MCU 写入每个字节后 都会返回一个 ACK。MCU 会给出 STOP 来结束操作。 对 TEA5767 MODE 进行读操作时,在 MCU 给出命令字节后,TEA5767 MODE 会送出数据字 节,MCU收到数据后产生ACK信号.除了最后一个字节,MCU在读到每个字节后都要给出ACK, 在读到最后一个字节后,MCU 给出 NACK,使 TEA5767 MODE 把总线交给 MCU,然后 MCU 发出 STOP,结束整个操作。 The information contained herein is the exclusive property of RDA and shall not be distributed, reproduced, or disclosed in whole or in part without prior written permission of RDA. 3 RDA5807P 细节请参考时序图: 图 1 I2C 接口写数据时序 图 2 I2C 接口读数据时序 I2C Timing Characteristics Parameter Symbol Test Condition Min Typ Max Unit SCLK Frequency fscl 0 - 400 KHz SCLK High Time thigh 0.6 - - us SCLK Low Time tlow 1.3 - - us Setup Time for START Condition tsu:sta 0.6 - - us Hold Time for START Condition thd:sta 0.6 - - us Setup Time for STOP condition tsu:sto 0.6 - - us SDIO Input to SCLK ↑ Setup tsu:dat 100 - - ns SDIO Input to SCLK ↓ Hold thd:dat 0 - 900 ns STOP to START Time tbuf 1.3 - - us SDIO Output Fall Time tf:out 20+0.1Cb - 250 ns SDIO Input, SCLK Rise/Fall Time tr:in tf:in 20+0.1Cb - 300 ns Input Spike Suppression tsp - - 50 ns SCLK, SDIO Capacitive Loading Cb - - 50 pF The information contained herein is the exclusive property of RDA and shall not be distributed, reproduced, or disclosed in whole or in part without prior written permission of RDA. 4 RDA5807P 2.状态转换 TEA5767 MODE 有 5 种状态:复位初始化(Reset&Initial),设置频点(Tune),搜台 (Seek),工作(Working),休眠(Sleep)。可以在 TEA5767 MODE 中配置相应寄存器实 现. 在芯片上电和复位后,软件通过编写 TEA5767 MODE 中 STBY(04H,bit 6)寄存器,将 STBY 其置为 1,即可使进入上电状态。软件通过编程相应寄存器,即可使 RDA5807P 进入 Tune 或 Seek 状态,这些操作之后,RDA5807P 进入正常工作状态(Working)。软件通过将 STBY 置为 0,可使 RDA5807P 进入睡眠状态,此时所有寄存器值保持不变(与未睡眠之前相 同)。在睡眠状态时,软件可通过编写 STBY 为 1,即可将 RDA5807P 回到正常工作(Working) 状态。 Sleep Tune Working The information contained herein is the exclusive property of RDA and shall not be distributed, reproduced, or disclosed in whole or in part without prior written permission of RDA. 5 Reset &Initial Seek Power on 图 3 RDA5807P 状态转移图 2.1 复位初始化(Reset&Initial) 上电过程中,TEA5767 MODE 需要正确的 Reset 和初始化过程来进行上电。 RDA5807P 图 4 Reset&Initial 时序图 编程伪程序: Supply VA and VD. Supply VIO Provide 32.768KHz crystal clock. (optional, if use TCXO) (or 13MHz clk) Wait 1ms Mov 0x50, 02H //write STBY =1 Wait 0.5s //optional, for wait RCLK stable if use DCXO …… 注意:对 I2C 接口而言,TEA5767 MODE的寄存器设置是由一连串的写操作来完成的, 2.2 设置频点(Tune) 软件可以通过配置写寄存器 01H,02H PLL_w[13:0]寄存器来选择 FM 频道。然后可以通 过读取读寄存器01H中的PLL_r[13:0]来判断写频点动作是否正确.也可以通过读取读寄存 器 02H 中的 IF[6:0]和 LEV[3:0]来判断写进去的频点是否为一个可用的台.整个 Tune 过程 要持续 10ms,如需判断真台与否则需要 20ms。频点计算 方法 快递客服问题件处理详细方法山木方法pdf计算方法pdf华与华方法下载八字理论方法下载 NDEC:要设置的频点号(十进制数) FRF:要设置的频点(单位HZ) The information contained herein is the exclusive property of RDA and shall not be distributed, reproduced, or disclosed in whole or in part without prior written permission of RDA. 6 RDA5807P The information contained herein is the exclusive property of RDA and shall not be distributed, reproduced, or disclosed in whole or in part without prior written permission of RDA. 7 Fif:芯片解调中频=225000HZ FREFS:芯片的参考频率(单位HZ) 把NDEC取整后转换为十六进制数写入PLL_w[13:0],如下表: FRFMHZ FREFS=13MHZ(XTAL=0,HLSI=1) FREFS=32.768KHZ(XTAL=1,HLSI=1) 88.3 7082 1BAA 10806.2744 10806 2A36 94.2 7410 1D82 11526.4893 11526 2D06 编程伪程序: Mov 0x2A, 01H //Set channel number to 94.2MHz, FREFS=32.768KHZ(XTAL=1,HLSI=1) Mov 0x06, 02H *Wait 35ms Read 01H, 02H //read stauts Stop Tune 注意:对 I2C 接口而言,TEA5767 MODE 的寄存器设置是由一连串的写操作来完成的,所以软件要注意写寄存器的顺序。 2.3 搜台(Seek) TEA5767 MODE 支持两种不同的 SEEK 方式: 1:内部自动搜台; 2:外部软件搜台. 在内部自动搜台模式下软件可以通过设定 01H 寄存器的 SM 和 03H 寄存器的 SUD 来设置 TEA5767 MODE 进行向上(向下)搜台。TEA5767 MODE 会跳到下一个(向上或下由 SEEKUP 确定)频道来判断其是否是真台。当 TEA5767 MODE 找到一个台,会停止 SEEK 操作并把 RF 位置 1.或者在整个频道都没有找到台 B并且内部触到所选频段的边界,Seek 操作会停止; 并把 RF,BLF 都位置 1, TEA5767 MODE 停留在边界处。Seek 结束后,软件可以通过读取 01H 和 02H 寄存器来得到当前频道号,IF[6:0]和 LEV[3:0]值和其他一些状态信息。TEA5767 MODE 内部 Seek 操作是由一连串的 Tune 操作组成,每个频点的 Tune 和搜台判断需要 20ms, 所以 Seek 操作的时间取决于被搜频点号的数量。 RDA5807P TEA5767 MODE 内部搜台模式编程 流程 快递问题件怎么处理流程河南自建厂房流程下载关于规范招聘需求审批流程制作流程表下载邮件下载流程设计 如下图所示。 图 3 TEA5767 MODE 硬件搜台模式编程流程图 编程伪程序: Step1: Mov 0xAA, 01H //Set channel number to 88.3MHz, FREFS=32.768KHZ(XTAL=1,HLSI=1) Mov 0x36, 02H //set mute *Wait 35ms Step2: The information contained herein is the exclusive property of RDA and shall not be distributed, reproduced, or disclosed in whole or in part without prior written permission of RDA. 8 RDA5807P The information contained herein is the exclusive property of RDA and shall not be distributed, reproduced, or disclosed in whole or in part without prior written permission of RDA. 9 Mov 0xEA, 01H // set SEEK and SEEKUP for seek operation Mov 0x36, 02H Mov 0x90, 03H *Wait for RF=1 //optional, wait for seek complete, if use polling method Read 0A, 0BH //read stauts If BLF=1, go to step3; else memorize PLL_r[13:0] and go to step2. Step3: Stop Seek 注意:对 I2C 接口而言,TEA5767 MODE 的寄存器设置是由一连串的写操作来完成的,所以软件要注意写寄存器的顺序。 TEA5767 MODE 软件搜台模式是通过软件设置频点,通过读取 IF[6:0]和 LEV[3:0]的信息来 判断是否是可用台的方法.编程流程如下图所示。(这种搜台方式,软件控制起来比较灵活, 并且适用于带搜台频点显示功能的软件) RDA5807P 图 4 TEA5767 MODE 软件搜台模式编程流程图 编程伪程序: Step1: Mov NHEX, 01H,02H //Set channel number NHEX, FREFS=32.768KHZ(XTAL=1,HLSI=1) Step2: Wait 35ms //minus 35ms Read 01, 02H //read stauts If freq beyond band limit, go to Step4. Else go to Step3. Step3: If IF[6:0]>TH value & LEV[3:0]>TH value, memorize READCHAN. The information contained herein is the exclusive property of RDA and shall not be distributed, reproduced, or disclosed in whole or in part without prior written permission of RDA. 10 RDA5807P The information contained herein is the exclusive property of RDA and shall not be distributed, reproduced, or disclosed in whole or in part without prior written permission of RDA. 11 Mov NHEX++/--, 01H,02H Go to Step2. Step4: Stop Seek. 注意:对 I2C 接口而言,TEA5767 MODE 的寄存器设置是由一连串的写操作来完成的,所以软件要注意写寄存器的顺序。 2.4 休眠(Sleep) 在空闲时,软件可以通过编程 TEA5767 MODE 中 STBY(置 0)使 RDA5807P 进入睡眠模式, 以便减小功耗。在睡眠模式,芯片的模拟和数字模块电源都被关掉,但各寄存器值保持不 变, I2C 接口依然可以工作。软件可以通过编程 STBY(置 1)使芯片进入工作模式。进入 工作模式后,软件需要重新设置所需要的频点,即重新进行一次 Tune 操作。 编程伪程序: Enter Sleep Mode: Mov 0x50, 04H //clear STBY bit low to bring RDA5807P into sleep mode Exit Sleep Mode: Mov 0x10, 04h //set STBY bit high to bring RDA5807P into working mode Wait 0.5s //optional, wait RCLK stable, if in DCXO mode Mov 0x2A, 01H //Set channel number to 94.2MHz, FREFS=32.768KHZ(XTAL=1,HLSI=1) Mov 0x06, 02H Wait 35ms Read 0A, 0BH //read stauts Stop Tune 注意:对 I2C 接口而言,TEA5767 MODE 的寄存器设置是由一连串的写操作来完成的,所以软件要注意写寄存器的顺序。 RDA5807P The information contained herein is the exclusive property of RDA and shall not be distributed, reproduced, or disclosed in whole or in part without prior written permission of RDA. 12 3.Register Definition Write mode DATA BYTE 1 DATA BYTE 2 DATA BYTE 3 DATA BYTE 4 DATA BYTE 5 DATA BYTE BIT NAME FUNCTION 1st 7 MUTE If MUTE = 1 then L and R audio are muted; if MUTE = 0 then L and R audio are not muted 1st 6 SM Search Mode: if SM = 1 then in search mode; if SM = 0 then not in search mode 1st 5 PLL_w[13] PLL_w[13:0]: Setting of synthesizer programmable counter for search or preset 1st 4 PLL_w[12] 1st 3 PLL_w[11] 1st 2 PLL_w[10] 1st 1 PLL_w [9] 1st 0 PLL_w [8] 2nd 7 PLL_w [7] 2nd 6 PLL_w [6] 2nd 5 PLL_w [5] 2nd 4 PLL_w [4] 2nd 3 PLL_w [3] 2nd 2 PLL_w [2] 2nd 1 PLL_w [1] 2nd 0 PLL_w[0] 3rd 7 SUD Search Up/Down: if SUD = 1 then search up; if SUD = 0 then search down 3rd 6 SSL[1] SSL [1:0]: Search Stop Level. 00=not allowed in search mode 01=low; level ADC output = 5 10=mid; level ADC output = 7 11=high; level ADC output = 10 3rd 5 SSL[0] . 3rd 4 HLSI HIGH/LOW Side Injection: if HLSI = 1 then HIGH side LO injection; if HLSI = 0 then LOW side LO injection 3rd 3 MS Mono to Stereo: if MS = 1 then forced mono; if MS = 0 then stereo ON 3rd 2 ML Mute Left: if ML = 1 then the left audio channel is muted and forced mono; if ML = 0 then the left audio channel is not muted 3rd 1 MR Mute Right: if MR = 1 then the right audio channel is muted and forced mono; if MR = 0 then the right audio channel is not muted 3rd 0 SWP1 Software programmable port 1: if SWP1 = 1 then port 1 is RDA5807P The information contained herein is the exclusive property of RDA and shall not be distributed, reproduced, or disclosed in whole or in part without prior written permission of RDA. 13 DATA BYTE BIT NAME FUNCTION HIGH; if SWP1 = 0 then port 1 is LOW 4th 7 SWP2 Software programmable port 2: if SWP2 = 1 then port 2 is HIGH; if SWP2 = 0 then port 2 is LOW 4th 6 STBY Standby: if STBY = 1 then in standby mode; if STBY = 0 then not in standby mode 4th 5 BL Band Limits: if BL = 1 then Japanese FM band; if BL = 0 then US/Europe FM band 4th 4 XTAL If XTAL = 1 then fxtal = 32.768 kHz; if XTAL = 0 then fxtal = 13 MHz 4th 3 SMUTE Soft MUTE: if SMUTE = 1 then soft mute is ON; if SMUTE = 0 then soft mute is OFF 4th 2 HCC High Cut Control: if HCC = 1 then high cut control is ON; if HCC = 0 then high cut control is OFF 4th 1 SNC Stereo Noise Canceling: if SNC = 1 then stereo noise canceling is ON; if SNC = 0 then stereo noise canceling is OFF 4th 0 SI Search Indicator: if SI = 1 then pin SWPORT1 is output for the ready flag; if SI = 0 then pin SWPORT1 is software programmable port 1 5th 7 PLLREF If PLLREF = 1 then the 6.5 MHz reference frequency for the PLL is enabled; if PLLRE =0 then the 6.5 MHz reference frequency for the PLL is disabled 5th 6 DTC If DTC = 1 then the de-emphasis time constant is 75 ms; if DTC = 0 then the de-emphasis time constant is 50 ms 5th 5 - [5:0]:not used; position is don’t care 5th 4 - 5th 3 - 5th 2 - 5th 1 - 5th 0 - Read mode DATA BYTE 1 DATA BYTE 2 DATA BYTE 3 DATA BYTE 4 DATA BYTE 5 DATA BYTE BIT NAME FUNCTION 1st 7 RF Ready Flag: if RF = 1 then a station has been found or the band limit has been reached; if RF = 0 then no station has been found 1st 6 BLF Band Limit Flag: if BLF = 1 then the band limit has been reached; if BLF = 0 then the band limit has not been reached 1st 5 PLL_r[13] PLL_r[13:0]: Setting of synthesizer programmable counter for search or preset 1st 4 PLL_r [12] RDA5807P The information contained herein is the exclusive property of RDA and shall not be distributed, reproduced, or disclosed in whole or in part without prior written permission of RDA. 14 DATA BYTE BIT NAME FUNCTION 1st 3 PLL_r [11] 1st 2 PLL_r [10] 1st 1 PLL_r [9] 1st 0 PLL_r [8] 2nd 7 PLL_r [7] 2nd 6 PLL_r [6] 2nd 5 PLL_r [5] 2nd 4 PLL_r [4] 2nd 3 PLL_r [3] 2nd 2 PLL_r [2] 2nd 1 PLL_r [1] 2nd 0 PLL_r [0] 3rd 7 STEREO Stereo indication: if STEREO = 1 then stereo reception; if STEREO = 0 then mono reception 3rd 6 IF[6] IF[6:0]: IF counter result 3rd 5 IF[5] 3rd 4 IF[4] 3rd 3 IF[3] 3rd 2 IF[2] 3rd 1 IF[1] 3rd 0 IF[0] 4th 7 LEV[3] LEV[3]: level ADC output 4th 6 LEV[2] 4th 5 LEV[1] 4th 4 LEV[0] 4th 3 CI[3] Chip Identification: these bits have to be set to logic 0 4th 2 CI[2] 4th 1 CI[1] 4th 0 - this bit is internally set to logic 0 5th 7 - reserved for future extensions; these bits are internally set to logic 0 5th 6 - 5th 5 5th 4 - 5th 3 - 5th 2 - 5th 1 - 5th 0 - RDA5807P 三:5807P Mode 1.I2C 接口模式 将 MODE 引脚接低电平,即进入 I2C 接口模式。 RDA5807P 的 5807P Mode 中 I2C 接口与 I2C-Bus Specification 2.1 兼容,包含 2 个信 号:SCLK 和 SDIO。I2C 接口是由 START,命令字节,数据字节,及每个字节后的 ACK 或 NACK 比特,和 STOP 组成。命令字节包括一个 7比特的 chip 地址(0010000b)和一个读写 r/w 命令比特。ACK(或 NACK)由接收器发出。 5807P Mode 的 I2C 接口中寄存器的地址是不可见的。RDA5807P Mode 的 I2C 接口有一个 固定的起始寄存器地址(写操作时为 02H,读操作时为 0AH),并有一个内部递增计数器。 对 RDA5807P Mode 进行写操作时,MCU 写入寄存器的顺序如下:02H 的高字节,02H 的低字 节,03H 的高字节,……,直到结束。RDA5807P Mode 在 MCU 写入每个字节后都会返回一个 ACK。MCU 会给出 STOP 来结束操作。对 RDA5807P Mode 进行读操作时,在 MCU 给出命令字 节后,RDA5807P Mode会送出数据字节,顺序如下:0AH高字节,0AH低字节,0BH高字节,……, 直到 RDA5807P Mode 接收到从 MCU 发出的 NACK, MCU 送出 STOP,读操作结束。除了最后 一个字节,MCU 在读到每个字节后都要给出 ACK,在读到最后一个字节后,MCU 给出 NACK, 使 RDA5807P Mode 把总线交给 MCU,然后 MCU 发出 STOP,结束整个操作。 图 9 I2C 接口写数据时序 图 10 I2C 接口读数据时序 The information contained herein is the exclusive property of RDA and shall not be distributed, reproduced, or disclosed in whole or in part without prior written permission of RDA. 15 RDA5807P I2C Timing Characteristics Parameter Symbol Test Condition Min Typ Max Unit SCLK Frequency fscl 0 - 400 KHz SCLK High Time thigh 0.6 - - us SCLK Low Time tlow 1.3 - - us Setup Time for START Condition tsu:sta 0.6 - - us Hold Time for START Condition thd:sta 0.6 - - us Setup Time for STOP condition tsu:sto 0.6 - - us SDIO Input to SCLK ↑ Setup tsu:dat 100 - - ns SDIO Input to SCLK ↓ Hold thd:dat 0 - 900 ns STOP to START Time tbuf 1.3 - - us SDIO Output Fall Time tf:out 20+0.1Cb - 250 ns SDIO Input, SCLK Rise/Fall Time tr:in tf:in 20+0.1Cb - 300 ns Input Spike Suppression tsp - - 50 ns SCLK, SDIO Capacitive Loading Cb - - 50 pF 2.SPI3 线接口 将 MODE 引脚接高电平,即进入 3线接口模式。 每次寄存器写操作要 25 比特长度,由高到低依次包括 4比特的寄存器高位地址,1比特 r/w ,4 比特的寄存器地位地址和 16 比特数据(高比特先写)。RDA5807P Mode 在 SCLK 的上升沿对命令字节和数据字进行采样。 每次寄存器读操作也需要 25 比特长度,由高到低依次包括 4比特的寄存器高位地址,1 比特 r/w ,4 比特寄存器低位地址和 16 比特数据(高比特先读)。在 MCU 写入命令字节 和从 RDA5807P Mode 开始读出数据之间有半个 SCLK 的间隙。RDA5807P Mode 在 SCLK 的上 升沿对命令字节进行采样,也在 SCLK 的上升沿向 MCU 输出数据。 The information contained herein is the exclusive property of RDA and shall not be distributed, reproduced, or disclosed in whole or in part without prior written permission of RDA. 16 RDA5807P 图 11 3 线接口写数据时序 图 12 3 线接口读数据时序 Three-wire Timing Characteristics Parameter Symbol Test Condition Min Typ Max Unit SCLK Frequency fclk 0 - 10 MHz SCLK High Time thigh 25 - - ns SCLK Low Time tlow 25 - - ns SDIO Input, SEN to SCLK ↑ Setup ts 10 - - ns SDIO Input, SEN to SCLK ↑ Hold th 10 - - ns SCLK ↑ to SDIO Output Valid tcdv Read 2 - 10 ns SEN↑ to SDIO Output High Z tsdz Read 2 - 10 ns The information contained herein is the exclusive property of RDA and shall not be distributed, reproduced, or disclosed in whole or in part without prior written permission of RDA. 17 RDA5807P 3.状态转换 RDA5807P 中 5807P Mode 有 5 种状态:复位初始化(Reset&Initial),设置频点(Tune), 搜台(Seek),工作(Working),休眠(Sleep)。 在芯片上电和复位后,软件通过编写 ENABLE(02H,bit 0)寄存器,将其置为 1,即可使 RDA5807P 进入上电状态。软件通过编程相应寄存器,即可使 RDA5807P 进入 Tune 或 Seek 状态,这些操作之后,RDA5807P 进入正常工作状态(Working)。软件通过将 ENABLE 置为 0,可使 RDA5807P 进入睡眠状态,此时所有寄存器值保持不变(与未睡眠之前相同)。在 睡眠状态时,软件可通过编写 ENABLE 为 1,即可将 RDA5807P 回到正常工作(Working)状 态。 Sleep Tune Working
本文档为【rda5807P编程指南】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
下载需要: 免费 已有0 人下载
最新资料
资料动态
专题动态
is_455364
暂无简介~
格式:pdf
大小:1MB
软件:PDF阅读器
页数:30
分类:互联网
上传时间:2011-11-03
浏览量:177