////DS1302 Trickle Charge Timekeeping Chip
//MSP430高级实验开发组件 - DS1302时钟芯片
//时钟设置:
////ACLK=N/A,MCLK=SMCLK=default(DCO~800k)
//硬件连接:
////
////
////
////
////
////
////
////
////
//当前演示程序功能描述:
////
#include
#define DS1302_DIR
#define DS1302_IN
#define DS1302_OUT
#define DS1302_RST
#define DS1302_SCLK
#define DS1302_SDI
#define DS1302_RST_LO
#define DS1302_RST_HI
#define DS1302_SCLK_LO
#define DS1302_SCLK_HI
#define DS1302_SDI_LO
#define DS1302_SDI_HI
void DS1302_Delay(unsigned int dtime);
void DS1302_Reset(void);
void DS1302_WriteOneByte(unsigned char w_dat);
void DS1302_WriteData(unsigned char addr,unsigned char w_dat);
void DS1302_SettingData(void);
void DS1302_GetData(unsigned char *str);
unsigned char DS1302_ReadOneByte(void);
unsigned char DS1302_ReadData(unsigned char addr);
unsigned char SettingData[7]={
};
unsigned char ReadingData[7];
//延时函数
void DS1302_Delay(unsigned int dtime) {
//DS1302复位
void DS1302_Reset(void) {
}
//向DS1302写入一个字节
void DS1302_WriteOneByte(unsigned char w_dat) {
}
//从DS1302中读取一个字节
unsigned char DS1302_ReadOneByte(void) {
}
//向DS1302中写入地址后写入数据
void DS1302_WriteData(unsigned char addr,unsigned char w_dat) {
}
//向DS1302写入地址后,从DS1302中读取数据
unsigned char DS1302_ReadData(unsigned char addr) {
}
//按照SettingData的设置设置DS1302的时间
void DS1302_SettingData(void) {
}
//读取DS1302时间到ReadingData中
void DS1302_GetData(unsigned char *str) {
}
上一篇:MSP430 ADC12模块寄存器设置解读
下一篇:MSP430内部温度传感器测试程序
推荐阅读最新更新时间:2024-03-16 14:45