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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? cc1100.c

?? cc1100的程序編程
?? C
?? 第 1 頁 / 共 2 頁
字號(hào):
//
//CC1100.h
//
// Copyright (c) NewMSG. All rights reserved. 2007
// purpose : Test CC1100
// http://www.newmsg.com	
// http://www.newmsg.com/bbs

// [public]

#include <reg52.h>
#include <intrins.h>
#include "CC1100.h"


#define 	WRITE_BURST     	0x40						//連續(xù)寫入
#define 	READ_SINGLE     	0x80						//讀
#define 	READ_BURST      	0xC0						//連續(xù)讀
#define 	BYTES_IN_RXFIFO     0x7F  						//接收緩沖區(qū)的有效字節(jié)數(shù)
#define 	CRC_OK              0x80 						//CRC校驗(yàn)通過位標(biāo)志

/****************************************************************************************
//全局變量定義
/****************************************************************************************/
/*
//10k E
RF_SETTINGS code rfSettings = {
	0x00,
    0x06,   // FSCTRL1   Frequency synthesizer control.
    0x00,   // FSCTRL0   Frequency synthesizer control.
    0x10,   // FREQ2     Frequency control word, high byte.
    0xA7,   // FREQ1     Frequency control word, middle byte.
    0x62,   // FREQ0     Frequency control word, low byte.
    0xC8,   // MDMCFG4   Modem configuration.
    0x93,   // MDMCFG3   Modem configuration.
    0x03,   // MDMCFG2   Modem configuration.
    0x22,   // MDMCFG1   Modem configuration.
    0xF8,   // MDMCFG0   Modem configuration.
    0x00,   // CHANNR    Channel number.
    0x34,   // DEVIATN   Modem deviation setting (when FSK modulation is enabled).
    0x56,   // FREND1    Front end RX configuration.
    0x10,   // FREND0    Front end RX configuration.
    0x18,   // MCSM0     Main Radio Control State Machine configuration.
    0x16,   // FOCCFG    Frequency Offset Compensation Configuration.
    0x6C,   // BSCFG     Bit synchronization Configuration.
    0x43,   // AGCCTRL2  AGC control.
    0x40,   // AGCCTRL1  AGC control.
    0x91,   // AGCCTRL0  AGC control.
    0xA9,   // FSCAL3    Frequency synthesizer calibration.
    0x2A,   // FSCAL2    Frequency synthesizer calibration.
    0x00,   // FSCAL1    Frequency synthesizer calibration.
    0x11,   // FSCAL0    Frequency synthesizer calibration.
    0x59,   // FSTEST    Frequency synthesizer calibration.
    0x81,   // TEST2     Various test settings.
    0x35,   // TEST1     Various test settings.
    0x09,   // TEST0     Various test settings.
    0x0B,   // IOCFG2    GDO2 output pin configuration.
    0x06,   // IOCFG0D   GDO0 output pin configuration. Refer to SmartRF?Studio User Manual for detailed pseudo register explanation.
    0x04,   // PKTCTRL1  Packet automation control.
    0x05,   // PKTCTRL0  Packet automation control.
    0x00,   // ADDR      Device address.
    0xFF    // PKTLEN    Packet length.
};
*/
/*
// 250k E
const RF_SETTINGS rfSettings = {
	0x00,
    0x0B,   // FSCTRL1   Frequency synthesizer control.
    0x00,   // FSCTRL0   Frequency synthesizer control.
    0x10,   // FREQ2     Frequency control word, high byte.
    0xA7,   // FREQ1     Frequency control word, middle byte.
    0x62,   // FREQ0     Frequency control word, low byte.
    0x2D,   // MDMCFG4   Modem configuration.
    0x3B,   // MDMCFG3   Modem configuration.
    0x73,   // MDMCFG2   Modem configuration.
    0x22,   // MDMCFG1   Modem configuration.
    0xF8,   // MDMCFG0   Modem configuration.

    0x00,   // CHANNR    Channel number.
    0x00,   // DEVIATN   Modem deviation setting (when FSK modulation is enabled).
    0xB6,   // FREND1    Front end RX configuration.
    0x10,   // FREND0    Front end RX configuration.
    0x18,   // MCSM0     Main Radio Control State Machine configuration.
    0x1D,   // FOCCFG    Frequency Offset Compensation Configuration.
    0x1C,   // BSCFG     Bit synchronization Configuration.
    0xC7,   // AGCCTRL2  AGC control.
    0x00,   // AGCCTRL1  AGC control.
    0xB2,   // AGCCTRL0  AGC control.

    0xEA,   // FSCAL3    Frequency synthesizer calibration.
    0x0A,   // FSCAL2    Frequency synthesizer calibration.
    0x00,   // FSCAL1    Frequency synthesizer calibration.
    0x11,   // FSCAL0    Frequency synthesizer calibration.
    0x59,   // FSTEST    Frequency synthesizer calibration.
    0x88,   // TEST2     Various test settings.
    0x31,   // TEST1     Various test settings.
    0x0B,   // TEST0     Various test settings.
    0x0B,   // IOCFG2    GDO2 output pin configuration.
    0x06,   // IOCFG0D   GDO0 output pin configuration. Refer to SmartRF?Studio User Manual for detailed pseudo register explanation.

    0x04,   // PKTCTRL1  Packet automation control.
    0x05,   // PKTCTRL0  Packet automation control.
    0x00,   // ADDR      Device address.
    0x0c    // PKTLEN    Packet length.
};
 */

/*
 // 38.4k  E
 const RF_SETTINGS rfSettings = {
	0x00,
    0x06,   // FSCTRL1   Frequency synthesizer control.
    0x00,   // FSCTRL0   Frequency synthesizer control.
    0x10,   // FREQ2     Frequency control word, high byte.
    0xA7,   // FREQ1     Frequency control word, middle byte.
    0x62,   // FREQ0     Frequency control word, low byte.
    0xCA,   // MDMCFG4   Modem configuration.
    0x83,   // MDMCFG3   Modem configuration.
    0x83,   // MDMCFG2   Modem configuration.
    0x22,   // MDMCFG1   Modem configuration.
    0xF8,   // MDMCFG0   Modem configuration.

    0x00,   // CHANNR    Channel number.
    0x34,   // DEVIATN   Modem deviation setting (when FSK modulation is enabled).
    0x56,   // FREND1    Front end RX configuration.
    0x10,   // FREND0    Front end RX configuration.
    0x18,   // MCSM0     Main Radio Control State Machine configuration.
    0x16,   // FOCCFG    Frequency Offset Compensation Configuration.
    0x6C,   // BSCFG     Bit synchronization Configuration.
    0x43,   // AGCCTRL2  AGC control.
    0x40,   // AGCCTRL1  AGC control.
    0x91,   // AGCCTRL0  AGC control.

    0xA9,   // FSCAL3    Frequency synthesizer calibration.
    0x2A,   // FSCAL2    Frequency synthesizer calibration.
    0x00,   // FSCAL1    Frequency synthesizer calibration.
    0x11,   // FSCAL0    Frequency synthesizer calibration.
    0x59,   // FSTEST    Frequency synthesizer calibration.
    0x81,   // TEST2     Various test settings.
    0x35,   // TEST1     Various test settings.
    0x09,   // TEST0     Various test settings.
    0x0B,   // IOCFG2    GDO2 output pin configuration.
    0x06,   // IOCFG0D   GDO0 output pin configuration. Refer to SmartRF?Studio User Manual for detailed pseudo register explanation.

    0x04,   // PKTCTRL1  Packet automation control.
    0x05,   // PKTCTRL0  Packet automation control.
    0x00,   // ADDR      Device address.
    0x0c    // PKTLEN    Packet length.
};
*/

 // 100k E
 const RF_SETTINGS rfSettings = {
	0x00,
    0x08,   // FSCTRL1   Frequency synthesizer control.
    0x00,   // FSCTRL0   Frequency synthesizer control.
    0x10,   // FREQ2     Frequency control word, high byte.
    0xA7,   // FREQ1     Frequency control word, middle byte.
    0x62,   // FREQ0     Frequency control word, low byte.
    0x5B,   // MDMCFG4   Modem configuration.
    0xF8,   // MDMCFG3   Modem configuration.
    0x03,   // MDMCFG2   Modem configuration.
    0x22,   // MDMCFG1   Modem configuration.
    0xF8,   // MDMCFG0   Modem configuration.

    0x00,   // CHANNR    Channel number.
    0x47,   // DEVIATN   Modem deviation setting (when FSK modulation is enabled).
    0xB6,   // FREND1    Front end RX configuration.
    0x10,   // FREND0    Front end RX configuration.
    0x18,   // MCSM0     Main Radio Control State Machine configuration.
    0x1D,   // FOCCFG    Frequency Offset Compensation Configuration.
    0x1C,   // BSCFG     Bit synchronization Configuration.
    0xC7,   // AGCCTRL2  AGC control.
    0x00,   // AGCCTRL1  AGC control.
    0xB2,   // AGCCTRL0  AGC control.

    0xEA,   // FSCAL3    Frequency synthesizer calibration.
    0x2A,   // FSCAL2    Frequency synthesizer calibration.
    0x00,   // FSCAL1    Frequency synthesizer calibration.
    0x11,   // FSCAL0    Frequency synthesizer calibration.
    0x59,   // FSTEST    Frequency synthesizer calibration.
    0x81,   // TEST2     Various test settings.
    0x35,   // TEST1     Various test settings.
    0x09,   // TEST0     Various test settings.
    0x0B,   // IOCFG2    GDO2 output pin configuration.
    0x06,   // IOCFG0D   GDO0 output pin configuration. Refer to SmartRF?Studio User Manual for detailed pseudo register explanation.

    0x04,   // PKTCTRL1  Packet automation control.
    0x05,   // PKTCTRL0  Packet automation control.
    0x00,   // ADDR      Device address.
    0x0c    // PKTLEN    Packet length.
};
//------------------------------------------------------------------------------------------------------
// Chipcon
// Product = CC1100
// Chip version = E
// Crystal accuracy = 40 ppm
// X-tal frequency = 26 MHz
// RF output power = 0 dBm
// RX filterbandwidth = 540.000000 kHz
// Deviation = 0.000000 
// Datarate = 250.000000 kbps
// Modulation = (7) MSK
// Manchester enable = (0) Manchester disabled
// RF Frequency = 433.000000 MHz
// Channel spacing = 199.951172 kHz
// Channel number = 0
// Optimization = Sensitivity
// Sync mode = (3) 30/32 sync word bits detected
// Format of RX/TX data = (0) Normal mode, use FIFOs for RX and TX
// CRC operation = (1) CRC calculation in TX and CRC check in RX enabled
// Forward Error Correction = (0) FEC disabled
// Length configuration = (1) Variable length packets, packet length configured by the first received byte after sync word.
// Packetlength = 255
// Preamble count = (2)  4 bytes
// Append status = 1
// Address check = (11) No address check
// FIFO autoflush = 0
// Device address = 0
// GDO0 signal selection = ( 6) Asserts when sync word has been sent / received, and de-asserts at the end of the packet
// GDO2 signal selection = (11) Serial Clock
/*
const RF_SETTINGS rfSettings = {
	0x00,

    0x0B,   // FSCTRL1   Frequency synthesizer control.
    0x00,   // FSCTRL0   Frequency synthesizer control.
    0x10,   // FREQ2     Frequency control word, high byte.
    0xA7,   // FREQ1     Frequency control word, middle byte.
    0x62,   // FREQ0     Frequency control word, low byte.
 //250k
	0x2D,   // MDMCFG4   Modem configuration.
    0x3B,   // MDMCFG3   Modem configuration.
    0x73,   // MDMCFG2   Modem configuration.
    0x22,   // MDMCFG1   Modem configuration.
    0xF8,   // MDMCFG0   Modem configuration.

	// 1.2k
	0xF5,		//MDMCFG4 (x)
    0x83,		//MDMCFG3 (x)
    0x03,		//MDMCFG2 (x)
    0x22,		//MDMCFG1 (x)
    0xF8,		//MDMCFG0 (x)

    0x00,   // CHANNR    Channel number.

    //0x00,   // DEVIATN   Modem deviation setting (when FSK modulation is enabled).
	0x15,	//DEVIATN (x)
    0xB6,   // FREND1    Front end RX configuration.
    0x10,   // FREND0    Front end RX configuration.
    0x18,   // MCSM0     Main Radio Control State Machine configuration.
    0x1D,   // FOCCFG    Frequency Offset Compensation Configuration.
    0x1C,   // BSCFG     Bit synchronization Configuration.
    0xC7,   // AGCCTRL2  AGC control.
    0x00,   // AGCCTRL1  AGC control.
    0xB2,   // AGCCTRL0  AGC control.

    0xEA,   // FSCAL3    Frequency synthesizer calibration.
    0x0A,   // FSCAL2    Frequency synthesizer calibration.
    0x00,   // FSCAL1    Frequency synthesizer calibration.
    0x11,   // FSCAL0    Frequency synthesizer calibration.
    0x59,   // FSTEST    Frequency synthesizer calibration.
    0x88,   // TEST2     Various test settings.
    0x31,   // TEST1     Various test settings.
    0x0B,   // TEST0     Various test settings.
    0x0B,   // IOCFG2    GDO2 output pin configuration.
    0x06,   // IOCFG0D   GDO0 output pin configuration. Refer to SmartRF?Studio User Manual for detailed pseudo register explanation.

    0x04,   // PKTCTRL1  Packet automation control.
	//0x05,   // PKTCTRL1  Packet automation control.	//地址檢測(cè) 
    0x45,   // PKTCTRL0  Packet automation control.	//可變長(zhǎng)數(shù)據(jù)包,通過同步詞匯后的第一個(gè)位置配置數(shù)據(jù)包長(zhǎng)度
    //0x00,   // ADDR      Device address.
	0x0A,   // ADDR      Device address. // 數(shù)據(jù)包過濾時(shí)使用的地址
    //0x0c    // PKTLEN    Packet length.
	0xFF    // PKTLEN    Packet length.	  255 bytes
};
 */
/*
const RF_SETTINGS rfSettings = {
	0x00,
    0x06,   // FSCTRL1   Frequency synthesizer control.
    0x00,   // FSCTRL0   Frequency synthesizer control.
    0x10,   // FREQ2     Frequency control word, high byte.
    0xA7,   // FREQ1     Frequency control word, middle byte.
    0x62,   // FREQ0     Frequency control word, low byte.
    0xF5,   // MDMCFG4   Modem configuration.
    0x83,   // MDMCFG3   Modem configuration.
    0x03,   // MDMCFG2   Modem configuration.
    0x22,   // MDMCFG1   Modem configuration.
    0xF8,   // MDMCFG0   Modem configuration.

    0x00,   // CHANNR    Channel number.
    0x15,   // DEVIATN   Modem deviation setting (when FSK modulation is enabled).
    0x56,   // FREND1    Front end RX configuration.
    0x10,   // FREND0    Front end RX configuration.
    0x18,   // MCSM0     Main Radio Control State Machine configuration.
    0x16,   // FOCCFG    Frequency Offset Compensation Configuration.
    0x6C,   // BSCFG     Bit synchronization Configuration.
    0x03,   // AGCCTRL2  AGC control.
    0x40,   // AGCCTRL1  AGC control.
    0x91,   // AGCCTRL0  AGC control.

    0xE9,   // FSCAL3    Frequency synthesizer calibration.
    0x2A,   // FSCAL2    Frequency synthesizer calibration.
    0x00,   // FSCAL1    Frequency synthesizer calibration.
    0x1F,   // FSCAL0    Frequency synthesizer calibration.
    0x59,   // FSTEST    Frequency synthesizer calibration.
    0x88,   // TEST2     Various test settings.
    0x31,   // TEST1     Various test settings.
    0x0B,   // TEST0     Various test settings.
    0x0B,   // IOCFG2    GDO2 output pin configuration.
    0x06,   // IOCFG0D   GDO0 output pin configuration. Refer to SmartRF?Studio User Manual for detailed pseudo register explanation.

    0x04,   // PKTCTRL1  Packet automation control.
	//0x05,   // PKTCTRL1  Packet automation control.	//地址檢測(cè) 
    0x45,   // PKTCTRL0  Packet automation control.	//可變長(zhǎng)數(shù)據(jù)包,通過同步詞匯后的第一個(gè)位置配置數(shù)據(jù)包長(zhǎng)度
    //0x00,   // ADDR      Device address.
	0x0A,   // ADDR      Device address. // 數(shù)據(jù)包過濾時(shí)使用的地址
    //0x0c    // PKTLEN    Packet length.
	0xFF    // PKTLEN    Packet length.	  255 bytes
};
*/
// PATABLE (0 dBm output power)
INT8U PaTabel[8] = {0x60 ,0x60 ,0x60 ,0x60 ,0x60 ,0x60 ,0x60 ,0x60};
//INT8U PaTabel[8] = {0xC0 ,0xC0 ,0xC0 ,0xC0 ,0xC0 ,0xC0 ,0xC0 ,0xC0};


//*****************************************************************************************
//函數(shù)名:delay(unsigned int s)
//輸入:時(shí)間
//輸出:無
//功能描述:普通廷時(shí),內(nèi)部用
//*****************************************************************************************		
static void delay(unsigned int s)
{
	unsigned int i;
	for(i=0; i<s; i++);
	for(i=0; i<s; i++);
}


void halWait(INT16U timeout) {
    do {
        _nop_();
		_nop_();
		_nop_();
		_nop_();
		_nop_();
		_nop_();
		_nop_();
		_nop_();
		_nop_();
		_nop_();
		_nop_();
		_nop_();
		_nop_();
		_nop_();
		_nop_(); 
    } while (--timeout);

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲香肠在线观看| 欧美视频一区二区三区在线观看| 一区二区三区在线观看视频 | 一区二区三区在线免费播放| 日韩精品一区二区三区视频| 精品国产髙清在线看国产毛片| 欧美成人激情免费网| 国产精品丝袜一区| 日韩高清不卡一区二区| a级高清视频欧美日韩| 欧美日韩一区二区在线视频| 久久综合视频网| 午夜激情久久久| 99久久精品免费| 久久综合久久综合久久| 亚洲成va人在线观看| 91视频精品在这里| 国产欧美精品一区二区三区四区| 日本一区二区三区四区在线视频| 偷窥少妇高潮呻吟av久久免费| 成人av网站在线观看| 欧美精品一区二区三| 麻豆精品一二三| 欧美电影影音先锋| 亚洲伊人色欲综合网| 色悠久久久久综合欧美99| 亚洲国产成人在线| 成人激情黄色小说| 国产精品天美传媒| eeuss国产一区二区三区| 国产精品欧美一区喷水| 国产大陆a不卡| 亚洲精品欧美综合四区| 色综合天天视频在线观看| 亚洲狠狠丁香婷婷综合久久久| 欧美一区二区国产| 蜜臀久久久99精品久久久久久| 久久奇米777| 91免费观看在线| 天堂va蜜桃一区二区三区漫画版 | 国产精品成人免费在线| av中文字幕一区| 亚洲444eee在线观看| 久久久亚洲高清| 欧美视频中文一区二区三区在线观看| 亚洲一区免费观看| 欧美精品一区二区三区在线播放| 不卡区在线中文字幕| 美女在线视频一区| 亚洲码国产岛国毛片在线| 久久亚洲春色中文字幕久久久| 91亚洲永久精品| 国产精品中文字幕日韩精品| 亚洲综合色丁香婷婷六月图片| 久久综合狠狠综合久久综合88 | 天天影视色香欲综合网老头| 中文字幕成人av| 欧美一三区三区四区免费在线看 | 久久久久久久久久久99999| 色婷婷久久久亚洲一区二区三区| 精品写真视频在线观看 | 国产亚洲一区二区三区在线观看| 欧美视频一区二区三区| 色婷婷精品大视频在线蜜桃视频| 91免费视频网址| 97se亚洲国产综合自在线| 成人av午夜影院| www.亚洲精品| 色婷婷激情综合| 3d动漫精品啪啪一区二区竹菊| 欧美日本韩国一区| 亚洲精品一区二区三区香蕉| 亚洲靠逼com| www.爱久久.com| 一本色道**综合亚洲精品蜜桃冫| 91网页版在线| 在线播放欧美女士性生活| 91麻豆精品国产自产在线| 91精品欧美福利在线观看 | 日韩国产一区二| 九九视频精品免费| 成人性生交大片免费看中文网站| 99久久精品国产网站| 91精品国产综合久久福利| 欧美xxxxxxxxx| 亚洲欧美偷拍卡通变态| 久久超碰97人人做人人爱| 成人免费毛片高清视频| 在线成人高清不卡| 国产精品国产三级国产aⅴ入口| 亚洲成人av福利| 99精品国产99久久久久久白柏| 日韩欧美在线网站| 亚洲激情六月丁香| 91视频国产资源| 精品成人免费观看| 青青草国产精品亚洲专区无| a亚洲天堂av| 久久精品在线观看| 麻豆一区二区99久久久久| 欧美三级欧美一级| 亚洲成人免费看| 7777精品伊人久久久大香线蕉的| 亚洲精品视频在线| 欧美日韩中文国产| 肉丝袜脚交视频一区二区| 欧美一区二区播放| 五月开心婷婷久久| 欧美一区二区在线看| 美洲天堂一区二卡三卡四卡视频| 欧美精品久久99| 极品瑜伽女神91| 国产精品私房写真福利视频| 色综合久久综合网| 久久国产精品一区二区| 欧美电影在线免费观看| 久久国产视频网| 亚洲天堂av老司机| 欧美男生操女生| 国产成人精品aa毛片| 一区二区三区四区乱视频| 777亚洲妇女| 99re热视频精品| 免费成人在线网站| 亚洲精品欧美二区三区中文字幕| 777奇米成人网| 欧美综合一区二区| 国产一区欧美一区| 五月天欧美精品| 亚洲精品高清在线| 亚洲色图欧洲色图| 国产精品丝袜黑色高跟| 亚洲精品在线观看网站| 欧美午夜不卡在线观看免费| 国产精品一二三四五| 美国三级日本三级久久99| 亚洲六月丁香色婷婷综合久久| 欧美激情一区二区| 久久久.com| 国产欧美一区二区三区在线老狼| 日韩一级二级三级| 日韩午夜中文字幕| 欧美本精品男人aⅴ天堂| 欧美日韩电影一区| 欧美精品99久久久**| 欧美色图免费看| 日韩一卡二卡三卡| 亚洲精品一线二线三线| 亚洲精品在线免费观看视频| 久久精品视频免费观看| 国产日韩精品一区二区三区 | 日韩欧美的一区二区| 777久久久精品| 久久久精品天堂| 成人欧美一区二区三区白人| 亚洲乱码国产乱码精品精98午夜 | 亚洲女同一区二区| 五月激情综合婷婷| 成人丝袜高跟foot| 欧美日韩在线亚洲一区蜜芽| 91精品国产色综合久久不卡电影| 久久精品夜色噜噜亚洲aⅴ| 日韩一区欧美一区| 久久精品国产第一区二区三区| 国产精品乡下勾搭老头1| 色综合久久中文字幕综合网| 欧美日韩日日摸| 久久久久久99精品| 日本免费新一区视频| 成人一级视频在线观看| 欧美一区二区三区免费观看视频 | 中文字幕一区二区三区色视频| 久久精品国产精品青草| 在线中文字幕一区| 国产精品色哟哟| 激情六月婷婷久久| 91精品国产免费| 亚洲大片精品永久免费| 91福利在线免费观看| 中文字幕在线观看一区二区| 六月丁香婷婷久久| 日韩一区二区三区视频在线 | 成人晚上爱看视频| 中文字幕精品一区| av一区二区三区黑人| 亚洲国产成人午夜在线一区 | 国产精品国产三级国产aⅴ原创| 国产91在线观看| 国产欧美精品国产国产专区 | 亚洲成a人v欧美综合天堂下载 | 日韩一区二区免费视频| 亚洲欧美日本在线| 欧美三区在线视频| 蜜桃久久久久久| 久久久精品黄色| 一本色道久久综合亚洲aⅴ蜜桃 | 国产一区欧美二区| 成人欧美一区二区三区| 欧美色倩网站大全免费| 精品一区二区在线视频|