亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ar1000fsamplev085.c

?? FM收音ICAR1010的DEMO程序
?? C
?? 第 1 頁 / 共 2 頁
字號:
// ----- AR1000 VerF Sample Code ( v0.85, No-RDS ) by AIROHA Technology Corp. -------
// Version : 0.85   ( No-RDS)  for using internal XO or external 32.768 KHz reference clock
// Files : AR1000FSample.c , AR1000FSample.h
//
// This sample code presents following functions of AR1000/AR1010:
//
//       1. power-on sequence
//       2.frequency calculation and basic tune 
//	3. tune with Hi/Lo side rejection (** recommended procedure for tune )
//       4.seek with Hi/Lo side rejection ( and smute)
//       5.volume control
//	6. scan(** recommended procedure for scan )	
//	7. standby and wakeup procedure
//  
// This sample code could be compatiable with RDS function. However,the RDS related 
// opertions are beyond the scope of this sample code and are not presented here.
// ---------------------------------------------------------------------------------------------------------------
//
// Upgrade from 0.84 to 0.85
// - update register setting
//
// Upgrade from 0.82 to 0.83
// - Conditional compilation ( INTERNAL_XO)
// - DEMO: standby and wakeup
// Upgrade from 0.81 to0.82a
// - register update to ARF_V21_070813  ( disable xo_en & xo output  )
// - volume control update 
// - make sure hmute is always ON all over the seek and Hi/Lo-tune process
//   that is ,   AR1000_I2C_TUNE_HiLo (  )  and  AR1000_I2C_TUNE(  )  will MUTE ON
//   but not MUTE OFF. Caller must MUTE OFF explicitly.
// - completely scan procedure
// - errata:  
//                 "if (rssi < 0) ..... "    in AR1000_I2C_TUNE_HiLo (  )   
// 		
// Upgrade from 0.80 to 0.81
// - make sure RDS interrupt is OFF before seek and tune
// - max output of volume is recommended  (as default setting)

#include "AR1000FSample.h"

// the initial setting of AR1000 register ( base on ARF_V23_080121 )

#define INTERNAL_XO   // mark this line if you're using external reference clock
#ifdef INTERNAL_XO
code unsigned int AR1000reg[18]={ //using  AR1000 XO function
	0xFFFB,		// R0 -- the first writable register .
	0x5B15,		// R1.
	0xD0B9,		// R2.
	0xA010,		// R3, seekTHD = 16
	0x0780,		// R4
	0x28AB,		// R5
	0x6400,		// R6
	0x1EE7,		// R7
	0x7141,		// R8
	0x007D,		// R9
	0x82C6,		// R10  disable wrap
	0x4E55,		// R11. <--- 
	0x970C,		// R12.
	0xB845,		// R13
	0xFC2D,		// R14
	0x8097,		// R15
	0x04A1,		// R16
	0xDF6A		// R17
};    
#else
code unsigned int AR1000reg[18]={ // using External 32.768KHz Reference Clock
	0xFF7B,		// R0 -- the first writable register .  (disable xo_en)
	0x5B15,		// R1.
	0xD0B9,		// R2.
	0xA010,		// R3   seekTHD = 16
	0x0780,		// R4
	0x28AB,		// R5
	0x6400,		// R6
	0x1EE7,		// R7
	0x7141,		// R8
	0x007D,		// R9
	0x82C6,		// R10  disable wrap
	0x4F55,		// R11. <--- (disable xo_output)
	0x970C,		// R12.
	0xB845,		// R13
	0xFC2D,		// R14
	0x8097,		// R15
	0x04A1,		// R16
	0xDF6A		// R17
};    
#endif

// Volume Control
// there are two different fields about volume control in AR1000F
//  Volume   :  D7  ~D10 in register R3
//  Volume2 :  D12~D15 in register R14
//  17 combinations of ( volume2 + volume)  are  recommended.
//  
//  
// code unsigned char AR1000vol[19]={ // volume control  (increasing) 070822
	// 0x0F,	// step 0
	// 0xCF,	// step 1
	// 0xDF,	// step 2
	// 0xFF,	// 3
	// 0xCB,	// 4
	// 0xDB,	// 5
	// 0xFB,	// 6
	// 0xFA,	// 7
	// 0xF9,	// 8
	// 0xF8,	// 9
	// 0xF7,	//10
	// 0xD6,	//11
	// 0xE6,	//12
	// 0xF6,	//13
	// 0xE3,	//14
	// 0xF3,	//15
	// 0xF2,	//16 
	// 0xF1,	//17
	// 0xF0	//18 <------ default setting
// };
idata DATA_TYPE_S Reg_Data[18]; 

void main  ( void )
{
	unsigned int val;
	// Get IC version
	val = AR1000_I2C_Read_Data(ADDR_CHIPID);	
	if( val != CHIPNO_AR1000 ) {
		// this is not AR1000
		return;
	}
	
	val = AR1000_I2C_Read_Data(ADDR_DEVID);	

	// MUST-BE : AR1000 Power-On Sequence
	AR1000_init();

	// DEMO: Hi/Lo Tune  to the station - 98.1MHZ
	AR1000_RDSInt_OFF // Remeber to OFF RDS Interrupt before seek and tune , if you are using RDS Interrupt
	AR1000_I2C_TUNE_HiLo(981);//, UEBAND, SPACE100K); // to 98.1 MHz	
	AR1000_RDSInt_ON  // Turn on RDS interrupt  if you want
	AR1000_MUTE_OFF      
	AR1000_I2C_Write_Data(1);	
	
	// DEMO: the complete SEEK function 
	//
	// use default SEEKTH 
	//
	AR1000_RDSInt_OFF // Remeber to OFF RDS Interrupt before seek and tune , if you are using RDS Interrupt
	AR1000_I2C_SEEK(SEEKUP, UEBAND, SPACE100K); 
	AR1000_RDSInt_ON  // Turn on RDS interrupt  if you want
	
	// DEMO: the scan function 
	//
	// use the native seek capibility of AR1000 to accomplish  scan function 
	//	
	AR1000_RDSInt_OFF // Remeber to OFF RDS Interrupt before seek and tune , if you are using RDS Interrupt
	val = AR1000_I2C_SCAN(SEEKUP, UEBAND, SPACE100K);
	AR1000_RDSInt_ON  // Turn on RDS interrupt  if you want
	// totally  "val" stations are found  by scan !

	// DEMO: standby mode
	AR1000_I2C_STANDBY();
	
	//DEMO:wakeup 
	AR1000_I2C_WAKEUP(981); // wake up and tune to 98.1MHz

	return;
}


void AR1000_init(void)
{
 
	char Cnt1; // init R1, R2, ....R17 then R0
    unsigned int status;

	Reg_Data[0].i=AR1000reg[0]&0xFFFE;
	AR1000_I2C_Write_Data(0);
	
  	for(Cnt1=1;Cnt1<18;Cnt1++)
  	{
  		Reg_Data[Cnt1].i=AR1000reg[Cnt1]; 
  		AR1000_I2C_Write_Data(Cnt1);

	}
	
	Reg_Data[0].i=AR1000reg[0];
	AR1000_I2C_Write_Data(0);
	
	//Power-On Calibration begins
	// then wait for STC flag
	// maybe you need to delay for a while
	// delay ( 100 ms )
	status = AR1000_I2C_Read_Data(ADDR_STATUS);
	status &=MASK_STC; // check STC flag 
	while( status == 0)
	{
		// maybe you can delay for a while
		// delay ( 100 ms )
		status = AR1000_I2C_Read_Data(ADDR_STATUS);
		status &=MASK_STC; // check STC flag 
	}
	//Power-On Calibration Ends

	//SetAR1000_volume(19);	// max. output is recommended !! it is already set in the default register setting
						// you dont need to set it again
	
  	return;
}

void AR1000_I2C_TUNE_HiLo(unsigned int FreqKHz)// unsigned int band, unsigned char space)
{
  unsigned int status;
  unsigned int flag;
  unsigned int rssi;
  
  AR1000_MUTE_ON   // Set Muto ON before TUNE
  AR1000_I2C_Write_Data(1);
  
  AR1000_SEEK_OFF;	//clear SEEK 
  //Reg_Data[3].BIT.B13=space;  // set SPACE 
  //Reg_Data[3].i = (Reg_Data[3].i & 0xE7FF) | band;  // Set BAND
  AR1000_I2C_Write_Data(3);

  //Read Low-Side LO Injection
  //R11 --> clear  D15,  clear D0/D2,  D3 is the same as default
  Reg_Data[11].i = Reg_Data[11].i&0x7FFA; 
  AR1000_I2C_Write_Data(11);
  
  //TUNE to FreqKHz with current setting
  SetAR1000_Freq2CHAN(FreqKHz); // this function will turn on TUNE 
 
  // TUNE  begins
  // then wait for STC flag
  
  // maybe you need to delay for a while
  // delay ( 100 ms )
  status = AR1000_I2C_Read_Data(ADDR_STATUS);
  flag = status & MASK_STC; // check STC flag 
  while( flag == 0)
  {
		// maybe you can delay for a while
		// delay ( 100 ms )
		status = AR1000_I2C_Read_Data(ADDR_STATUS);
		flag = status & MASK_STC; // check STC flag 
  }
  //Low-side TUNE Ends 
  
  status = AR1000_I2C_Read_Data(ADDR_RSSI);
  rssi = (status & MASK_RSSI);

  //Read Hi-Side LO Injection
  // R11-->set D15, set D0/D2,  D3 is the same as default
  Reg_Data[11].i = Reg_Data[11].i|0x8005;
  AR1000_I2C_Write_Data(11);
  //TUNE to FreqKHz with current setting
  SetAR1000_Freq2CHAN(FreqKHz); // this function will turn on TUNE 
 
  // TUNE  begins
  // then wait for STC flag
  
  // maybe you need to delay for a while
  // delay ( 100 ms )
  status = AR1000_I2C_Read_Data(ADDR_STATUS);
  flag = status & MASK_STC; // check STC flag 
  while( flag == 0)
  {
		// maybe you can delay for a while
		// delay ( 100 ms )
		status = AR1000_I2C_Read_Data(ADDR_STATUS);
		flag = status & MASK_STC; // check STC flag 
  }
  //High-side TUNE Ends 
  
  status = AR1000_I2C_Read_Data(ADDR_RSSI);
  rssi = rssi- (status & MASK_RSSI);	
  if (rssi < 0) //errata in 0.82
  { 	
	// LO
	// R11--> clear D15, set D0/D2, D3 is the same as default
	Reg_Data[11].i = (Reg_Data[11].i&0x7FFF)|0x0005; 
	AR1000_I2C_Write_Data(11);
  }else{ 
	//HI
	//R11-->  set D15, clear D0/D2, D3 is the same as default
	Reg_Data[11].i = (Reg_Data[11].i|0x8000)&0xFFFA; 
	AR1000_I2C_Write_Data(11);
  }
  
  
  //fine-tune !!
  //TUNE to FreqKHz with current setting
  SetAR1000_Freq2CHAN(FreqKHz); // this function will turn on TUNE 
 
  // TUNE  begins
  // then wait for STC flag
  
  // maybe you need to delay for a while
  // delay ( 100 ms )

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美va亚洲va香蕉在线| 中文字幕精品综合| 北条麻妃国产九九精品视频| 亚洲精品久久7777| 久久久亚洲精华液精华液精华液| 日本大香伊一区二区三区| 黑人巨大精品欧美一区| 亚洲午夜电影网| 国产精品久久久久久久裸模| 日韩亚洲欧美一区| 欧美日韩中字一区| aaa国产一区| 国产精品18久久久久久vr| 午夜精品一区二区三区免费视频| 中文一区二区在线观看| 精品国产一区a| 欧美肥胖老妇做爰| 欧洲另类一二三四区| 99热精品一区二区| 成人h动漫精品一区二| 国产精品一区二区男女羞羞无遮挡| 亚洲1区2区3区4区| 亚洲一区欧美一区| 一区二区高清免费观看影视大全| 欧美激情在线一区二区三区| 2024国产精品视频| 精品国产乱码久久| 日韩午夜在线观看视频| 欧美卡1卡2卡| 91.成人天堂一区| 欧美精品三级日韩久久| 欧美亚洲综合在线| 欧美三级乱人伦电影| 91国产精品成人| 欧洲一区在线电影| 日本精品一级二级| 91精彩视频在线观看| 色婷婷综合久久久| 日本久久电影网| 欧美日韩国产天堂| 在线电影一区二区三区| 91精品国产综合久久久久| 欧美精品v国产精品v日韩精品 | 欧美巨大另类极品videosbest | 午夜一区二区三区视频| 五月天激情小说综合| 午夜精品影院在线观看| 免费观看在线综合色| 美腿丝袜亚洲一区| 国产美女精品一区二区三区| 国产精品影视在线观看| 福利电影一区二区| 91亚洲精华国产精华精华液| 一本到一区二区三区| 欧美二区三区91| 久久久综合精品| 最新国产の精品合集bt伙计| 成人免费在线视频观看| 亚洲图片欧美综合| 老司机免费视频一区二区| 国产伦精品一区二区三区免费迷 | 亚洲午夜精品久久久久久久久| 亚洲成人动漫在线免费观看| 青草av.久久免费一区| 国产精品一区二区在线观看网站| 成人精品免费视频| 欧美在线视频日韩| 欧美成人一级视频| 1024精品合集| 日韩精品免费视频人成| 国产精品一区二区91| 在线观看视频一区二区欧美日韩| 91.com在线观看| 国产日韩精品一区| 亚洲午夜一二三区视频| 国内一区二区视频| 一本久道中文字幕精品亚洲嫩| 欧美一区二区视频在线观看| 国产清纯在线一区二区www| 亚洲欧美一区二区三区国产精品| 天堂精品中文字幕在线| 国产不卡在线视频| 欧美精品成人一区二区三区四区| 国产日韩欧美激情| 日韩主播视频在线| 成人一区二区三区| 91精品欧美一区二区三区综合在| 中文字幕不卡三区| 蜜桃av一区二区三区| 91亚洲资源网| 久久久99免费| 丝袜a∨在线一区二区三区不卡| 国产成人高清视频| 欧美一区二区大片| 亚洲欧美日韩在线| 国产高清一区日本| 日韩欧美黄色影院| 亚洲成年人影院| www.日韩在线| 久久久久久久久伊人| 美国十次综合导航| 欧美午夜视频网站| 成人免费在线播放视频| 国产精品888| 26uuu国产日韩综合| 天堂一区二区在线| 欧美日韩一区久久| 亚洲图片另类小说| 成人妖精视频yjsp地址| 欧美精品一区二区高清在线观看| 午夜精品福利一区二区三区av | 欧美群妇大交群的观看方式| 中文字幕色av一区二区三区| 国内精品国产三级国产a久久| 欧美肥妇毛茸茸| 亚洲成人精品一区| 欧美三级午夜理伦三级中视频| 成人欧美一区二区三区黑人麻豆| 国产91在线|亚洲| 久久久精品tv| 韩国一区二区视频| 精品少妇一区二区三区在线播放 | 亚洲国产成人av好男人在线观看| 成人a区在线观看| 国产精品美女久久福利网站| 国产精品一区二区久激情瑜伽| 精品动漫一区二区三区在线观看| 免费观看一级欧美片| 日韩一区二区三区高清免费看看| 五月天精品一区二区三区| 欧美日韩你懂得| 天堂va蜜桃一区二区三区漫画版| 欧美日精品一区视频| 香蕉成人伊视频在线观看| 欧美视频一区二区在线观看| 亚洲精品老司机| 色婷婷国产精品综合在线观看| 亚洲欧美日韩人成在线播放| 色欧美乱欧美15图片| 一区二区三区在线免费播放| 91黄视频在线| 丝袜美腿高跟呻吟高潮一区| 日韩午夜在线影院| 国产精品一区二区男女羞羞无遮挡| 国产无遮挡一区二区三区毛片日本 | 亚洲激情综合网| 色94色欧美sute亚洲线路一ni| 亚洲亚洲人成综合网络| 91.xcao| 国产精品性做久久久久久| 国产三区在线成人av| 99精品视频免费在线观看| 亚洲激情自拍偷拍| 91精品国产麻豆国产自产在线 | 舔着乳尖日韩一区| 欧美大片日本大片免费观看| 国产美女精品在线| 亚洲天堂2014| 欧美狂野另类xxxxoooo| 韩国在线一区二区| 亚洲人成亚洲人成在线观看图片 | 狠狠色丁香久久婷婷综| 国产精品另类一区| 欧美性大战xxxxx久久久| 精品综合免费视频观看| 亚洲国产成人一区二区三区| 欧美在线综合视频| 秋霞av亚洲一区二区三| 国产日产欧美一区| 色哦色哦哦色天天综合| 另类小说色综合网站| 中文字幕不卡的av| 制服丝袜中文字幕一区| 国产不卡视频一区| 亚洲线精品一区二区三区| 精品国产乱码久久久久久影片| www.欧美.com| 麻豆精品视频在线| 亚洲免费观看高清完整版在线 | 成人涩涩免费视频| 天天亚洲美女在线视频| 国产欧美日韩亚州综合| 欧美精品乱码久久久久久按摩| 国产精品一二三| 婷婷中文字幕综合| 亚洲欧洲成人自拍| 337p日本欧洲亚洲大胆色噜噜| 91精品91久久久中77777| 国产成人在线免费观看| 亚洲v精品v日韩v欧美v专区| 欧美国产日产图区| 3751色影院一区二区三区| 91视频观看视频| 精彩视频一区二区三区| 婷婷综合另类小说色区| 亚洲日本va午夜在线影院| 久久精品这里都是精品| 91精品国产综合久久久蜜臀粉嫩| 91麻豆.com| 成人小视频在线|