A7105(2.4G)与STC89C52单片机无线收发程序(接收程序)
#include
#include
typedef
typedef unsigned char uchar;
//A7105寄存器地址定义
#define MODE_REG
#define MODE_CONTROL_REG
#define CALIBRATION_REG
#define FIFO_REGISTER1_REG 0x03
#define FIFO_REGISTER2_REG 0x04
#define FIFO_DATA_REG
#define ID_DATA_REG
#define RC_OSC1_REG
#define RC_OSC2_REG
#define RC_OSC3_REG
#define CKO_CONTROL_REG
#define GIPO1_CONTROL_REG
#define GIPO2_CONTROL_REG
#define CLOCK_REG
#define DATA_RATE_REG
#define PLL1_REG
#define PLL2_REG
#define PLL3_REG
#define PLL4_REG
#define PLL5_REG
#define TX1_REG
#define TX2_REG
#define DELAY1_REG
#define DELAY2_REG
#define RX_REG
#define RX_GAIN1_REG
#define RX_GAIN2_REG
#define RX_GAIN3_REG
#define RX_GAIN4_REG
#define RSSI_THRESHOLD_REG 0x1d
#define ADC_CONTROL_REG
#define CODE1_REG
#define CODE2_REG
#define CODE3_REG
#define IF_CALIBRATION1_REG
#define IF_CALIBRATION2_REG
#define VCO_CURRENT_CAL_REG
#define VCO_SINGLE_BAND_CAL1_REG
#define VCO_SINGLE_BAND_CAL2_REG
#define BATTERY_DETECT_REG
#define TX_TEST_REG
#define RX_DEM_TEST1_ERG
#define RX_DEM_TEST2_REG
#define CPC_REG
#define CRYSTAL_TEST_REG
#define PLL_TEST_REG
#define VCO_TEST1_REG
#define VCO_TEST2_REG
#define IFAT_REG
#define RSSI_CALE_REG
#define FILTER_TEST_REG
//A7105命令定义
#define CMD_SLEEP
#define CMD_IDLE
#define CMD_STBY
#define CMD_PLL
#define CMD_RX
#define CMD_TX
#define CMD_TX_FIFO_RESET
#define CMD_RX_FIFO_RESET
//ID CODE define
#define ID_CODE0
#define ID_CODE1
#define ID_CODE2
#define ID_CODE3
#define RF_DATA_PACKET_SIZE
sbit SCK=P3^5;
sbit SCS=P3^4;
sbit SDIO=P3^6;
sbit GPIO1=P3^7;
sbit LED=P2^0;
sbit Key=P2^4;
const uchar code A7105_Default_Par[]=
{
};
uchar const Hop_Tab[]={20,40,80,120,160};
uchar RX_DATA_Buffer[RF_DATA_PACKET_SIZE];
const uchar code LED_BIT[]={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,
18,19,20,21,22,23,24,25,26,27,28,29,30,31,31,32,33,34,35,36,37,38,39,40,
41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63};
bit RX_Flag;
uchar timer,seq,Err_Hop_Ctn,timer_ctn;
uchar Read_ID[4];
A7105STC89C52单片机无线收 相关文章:
- A7105(2.4G)与STC89C52单片机无线收发程序(发射程序)(11-27)
- Windows CE 进程、线程和内存管理(11-09)
- RedHatLinux新手入门教程(5)(11-12)
- uClinux介绍(11-09)
- openwebmailV1.60安装教学(11-12)
- Linux嵌入式系统开发平台选型探讨(11-09)