• 大小: 4KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-06-09
  • 语言: 其他
  • 标签:

资源简介

群星系列(流明)单片机的I2C写法,包括怎样调用各种库函数的实例

资源截图

代码片段和文件信息

#include 
 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

#define FM3130RAM 0x50 //(0xa0 >> 1)
#define FM3130RTC 0x68 //(0xb0 >> 1)

#define CoordinateVAdd 0x80
#define CoordinateIAdd 0x82
#define ReturnZeroAdd  0x100
void SigleSent(unsigned char addunsigned char data);
unsigned char ReadRTCCtl(void);

const unsigned int ItemValueAdd[9][0x0c] = 
{
         {0x1000x1010x1020x1030x1040x1050x1060x1070x1080x1090x10a0x10b}
         {0x1100x1110x1120x1130x1140x1150x1160x1170x1180x1190x11a0x11b}
         {0x1200x1210x1220x1230x1240x1250x1260x1270x1280x1290x12a0x12b}
         {0x1300x1310x1320x1330x1340x1350x1360x1370x1380x1390x13a0x13b}
         {0x1400x1410x1420x1430x1440x1450x1460x1470x1480x1490x14a0x14b}
         {0x1500x1510x1520x1530x1540x1550x1560x1570x1580x1590x15a0x15b}
         {0x1600x1610x1620x1630x1640x1650x1660x1670x1680x1690x16a0x16b}
         {0x1700x1710x1720x1730x1740x1750x1760x1770x1780x1790x17a0x17b}
         //follow number is virtual
         {0x1800x1810x1820x1830x1840x1850x1860x1870x1880x1890x18a0x18b}
};
const unsigned int SetCircuitAdd = 0x200;
const unsigned int FactorV0Add[4] = {0x3000x3010x3020x303};
const unsigned int FactorV1Add[4] = {0x3100x3110x3120x313};
const unsigned int FactorI0Add[4] = {0x3200x3210x3220x323};
const unsigned int FactorI1Add[4] = {0x3300x3310x3320x333};

const unsigned int NoiceV0Add = 0x350;
const unsigned int NoiceV1Add = 0x351;
const unsigned int NoiceI0Add = 0x352;
const unsigned int NoiceI1Add = 0x353;

const unsigned int CipherAdd[2] = {0x10800x1084};
const unsigned int PartitionAdd = 0x1100; 
const unsigned int CodeAdd = 0x1105;
          
const unsigned int  AuthorityTimeAdd[6]  = {0x10900x10910x1092
                                           0x10930x10940x1095};
unsigned char AuthorityTime[6];  

const unsigned char TimeReg0[2] = {0x080x80}; // en alarm & not check 
const unsigned char TimeReg2[6] = {0x000x800x800x800x800x80};

const unsigned char TimeRegAdd[7] = {0x020x030x040x050x060x070x08};
unsigned char TimeRegVal[7];  // NOTE BCD CODE
unsigned char TimeRegItem[7][2];  // NOTE BCD CODE
unsigned long UserCipher;


/******************THIS CIPHER FOR USER ADJUST***************************/
const unsigned long OriginalCipher = 654321;
/*************************************************************************/
void SigleSent(unsigned char addunsigned char data);
//void UnRTCLock(void);
//void RTCLock(void);
extern unsigned int SetCircuitValue;
extern unsigned char PartItem[0x04];
extern unsigned char CodeItem[0x0a];
extern  unsigned char ItemValue[9][0x0c];
extern unsigned char SetCircuitItem[3];
ex

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      47578  2010-03-01 09:18  I2C.c

----------- ---------  ---------- -----  ----

                47578                    1


评论

共有 条评论

相关资源