资 源 简 介
zigebee 自己从网上查到的数据手册 方便下载
#include"iocc2530.h"
#include"uart.h"
#include"clock.h"
/*管脚定义是
SDA定义为P0.7
SCL定义为P0.6 */
//#define SCL P0_6
//#define SDA P0_7
#define TRUE 1
#define FALSE 0 //错误提示,全局变量
#define SlaveAddress 0x90 //定义器件在IIC总线中的从地址,根据SA0地址引脚不同修改
#define SET_SDA_OUT P0DIR |= 0x8c;
#define SET_SDA_IN P0DIR &= ~0x8c;
#define SET_SCL_OUT P0DIR |= 0x4c;
#define SCL_H() P0DIR |= 0x40; P0_6 = 1;
#define SCL_L() P0DIR |= 0x40; P0_6 = 0;
#define SDA_H() P0DIR |= 0x80;P0_7 = 1;
#define SDA_L() P0DIR |