⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 s3530a.h__.htm

📁 高精度实时时钟芯片s-3530A的I2C接口设计
💻 HTM
字号:
<html><head><title>s3530a.rar - S3530A.h</title></head><body>
<script language="JavaScript">
function openwin(url)
{
 window.open(url, 'ProgramSourceCode');
}
</script>
<textarea cols=105 rows=17>文件头:
#include "CLSdef.H"



#ifndef _S3530A_

#define _S3530A_





#define 	WRITE	0x00						// SMBus WRITE command

#define		READ 	0x01						// SMBus READ command



// Device addresses (7 bits, lsb is a don't care)

#define		CLOCK3530_ADDRESS_RESET		0x60		//1 ack

#define		CLOCK3530_ADDRESS_STATUS	0x62		//2 ack

#define		CLOCK3530_ADDRESS_DATEHOUR	0x64		//8 ack  year month day week hour minute second

#define		CLOCK3530_ADDRESS_HOUR		0x66		//4 ack  hour minute second

#define		CLOCK3530_ADDRESS_INT1		0x68		//3 ack  

#define		CLOCK3530_ADDRESS_INT2		0x6A		//3 ack  







// SMBus states:

// MT = Master Transmitter

// MR = Master Receiver

#define	SMB_BUS_ERROR	0x00			// (all modes) BUS ERROR

#define	SMB_START		0x08			// (MT & MR) START transmitted

#define	SMB_RP_START	0x10			// (MT & MR) repeated START

#define	SMB_MTADDACK	0x18			// (MT) Slave address + W transmitted;

										//  ACK received

#define	SMB_MTADDNACK	0x20			// (MT) Slave address + W transmitted;

										//  NACK</textarea><BR>
<table width=756 border=0>
<tr><td width=1 bgcolor=#B0B0B0></td><td>
<script type="text/javascript"><!--
google_ad_client = "pub-8055710228382273";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_text = "333333";
google_color_url = "666666";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td>
<td width=15 bgcolor=#E4E0D8></td></tr></table>
<textarea cols=105 rows=12>文件尾:
 data byte transmitted; NACK rec'vd

#define	SMB_MTARBLOST	0x38			// (MT) arbitration lost

#define	SMB_MRADDACK	0x40			// (MR) Slave address + R transmitted;

										//  ACK received

#define	SMB_MRADDNACK	0x48			// (MR) Slave address + R transmitted;

										//  NACK received

#define	SMB_MRDBACK		0x50			// (MR) data byte rec'vd; ACK transmitted

#define	SMB_MRDBNACK	0x58			// (MR) data byte rec'vd; NACK transmitted





//-----------------------------------------------------------------------------------

//Global VARIABLES

//-----------------------------------------------------------------------------------





 extern  void ResetRealClock(void) ;

 extern  void SetRealClock(void) ;

 extern void GetRealClock(void) ;

 extern  CDateTime GetRealTime(void) ;

 extern  unsigned char  GetRealClockStatus(void) ;

 extern void SetRealClockStatus(unsigned char status);

 extern void SMBUS_ISR (void)  ;          

 extern void SET_S3530A(CDateTime g_objDateTime ) ;





#endif 



</textarea><BR>
<a href=http://www.pudn.com><small><font color=#A0A0A0>程序员联合开发网</font></small></a>&nbsp;&nbsp;<a href="/downloads64\sourcecode\embed/detail226330.html"><small><font color=#A0A0A0>返回s3530a.rar</font></small></a>
&nbsp;&nbsp;<a href="javascript:openwin('/view_src.asp?id=226330&f=S3530A/S3530A.h');"><small><font color=#A00000>在线阅读整个文件</font></small></a>
</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -