资源简介
通过特殊渠道向台湾原厂获得的A7102的C语音驱动源码
代码片段和文件信息
/********************************************************************* **
** Device: A7102
** File: main.c
** Author: JPH
** Target: Winbond W77LE58
** Tools: ICE
** Updated: 2009-08-26
** Description:
** This file is a sample code for your reference.
**
** Copyright (C) 2008 AMICCOM Corp.
**
*********************************************************************/
#include “define.h“
#include “w77le58.h“
#include “a7102reg.h“
#include “Uti.h“
/*********************************************************************
** I/O Declaration
*********************************************************************/
#define SCS P1_0 //spi SCS
#define SCK P1_1 //spi SCK
#define SDIO P1_2 //spi SDIO
#define CKO P1_3 //multi function pin CKO
#define IRQ P1_4 //multi function pin IRQ
#define PIN_TRS P1_5 //TRS
#define PIN_TRE P1_6 //TRE
#define PWR_ON P1_7 //PWR on
/*********************************************************************
** Constant Declaration
*********************************************************************/
#define TIMEOUT 50
#define t0hrel 1000
#define CMD_CTRLW 0x00 //000xxxxx control register write
#define CMD_CTRLR 0x80 //100xxxxx control register read
#define CMD_IDW 0x20 //001xxxxx ID write
#define CMD_IDR 0xA0 //101xxxxx ID Read
#define CMD_DATAW 0x40 //010xxxxx TX FIFO Write
#define CMD_DATAR 0xC0 //110xxxxx RX FIFO Read
#define CMD_TFR 0x60 //0110xxxx TX FIFO reset
#define CMD_RFR 0xE0 //1110xxxx RX FIFO reset
#define CMD_RFRST 0x70 //x111xxxx RF reset
#define OverTemperature 25
/*********************************************************************
** Global Variable Declaration
*********************************************************************/
Uint8 data timer;
Uint8 data TimeoutFlag;
Uint16 idata RxCnt;
Uint32 idata Err_ByteCnt;
Uint32 idata Err_BitCnt;
Uint16 idata TimerCnt0;
Uint8 data *Uartptr;
Uint8 data UartSendCnt;
Uint8 data CmdBuf[11];
Uint8 xdata tmpbuf[64];
Uint8 data InitTemp;
Uint16 data PLL1;
Uint16 data PLL2;
const Uint8 code BitCount_Tab[16] = {0112122312232334};
const Uint8 code ID_Tab[4]={0x540x750xC50x2A}; //ID code
const Uint8 code PN9_Tab[]=
{ 0xFF0x830xDF0x170x320x090x4E0xD1
0xE70xCD0x8A0x910xC60xD50xC40xC4
0x400x210x180x4E0x550x860xF40xDC
0x8A0x150xA70xEC0x920xDF0x930x53
0x300x180xCA0x340xBF0xA20xC70x59
0x670x8F0xBA0x0D0x6D0xD80x2D0x7D
0x540x0A0x570x970x700x390xD20x7A
0xEA0x240x330x850xED0x9A0x1D0xE0
}; // This table are 64bytes PN9 pseudo random code.
const Uint16 code A7102Config_Master[]=
{
0x0078 //SYSTEM CLOCK register CSC=0GRC=15GRS=800KHzSDR=0
0x0043 //PLL1 register freq=433.201MHz
0xB00A //PLL2 regis
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 769 2007-04-06 14:29 RC_A7102_x0 Reference code for 433MHz FIF\A7102reg.h
文件 1518 2008-05-06 09:03 RC_A7102_x0 Reference code for 433MHz FIF\define.h
文件 22019 2010-03-08 13:45 RC_A7102_x0 Reference code for 433MHz FIF\main.c
文件 1548 2006-12-06 13:44 RC_A7102_x0 Reference code for 433MHz FIF\Uti.c
文件 351 2006-12-06 13:44 RC_A7102_x0 Reference code for 433MHz FIF\uti.h
文件 3647 2006-05-17 17:39 RC_A7102_x0 Reference code for 433MHz FIF\W77LE58.h
目录 0 2010-08-09 13:18 RC_A7102_x0 Reference code for 433MHz FIF
文件 579542 2010-07-16 12:00 A7102B Datasheet v0[1].3 (Preliminary).pdf
----------- --------- ---------- ----- ----
609394 8
- 上一篇:程序设计实践(ACM)
- 下一篇:手机号码归属地数据(txt文本)
评论
共有 条评论