//MSP430IIC接口是很便利的物件,可是仍是有很多人弃之不必,当然有各种原因,可是假如你的确要用IIC接口,并且容许的话,用它仍是很舒畅的,或许开端不太顺,可是一旦搞通了你会领会到他的优点。
#include <msp430x16x.h>
unsigned char RX_BUF[10];
unsigned char TX_BUF[16];
unsigned char Rece_data[16];
int RX_COUNTER;
int TX_COUNTER;
void Init_IIC(void);
void EEPROM_WriteN(unsigned char mAddr,unsigned char sAddr,unsigned char n);
unsigned char EEPROM_ByteRead(unsigned char mAddr,unsigned char sAddr);
void EEPROM_ReadN(unsigned char mAddr,unsigned char sAddr,unsigned char n);
//=======================================
//USART0中止
//=======================================
#pragma vector = USART0TX_VECTOR
__interrupt void I2C_ISR(void)
{
}
//====================================
//体系时钟初始化
//====================================
void INIT_SYSTIMER(void)
{
}
//=================================
void delay(unsigned int i)
{
//=================================================
void Init_IIC(void)
{
}
//=================================================
//关于FM24L16的写操作
//16>n>0
//0x50<=mAddr<=0x57
//=================================================
void EEPROM_WriteN(unsigned char mAddr,unsigned char sAddr,unsigned char n)
{
}
//===================================================
//读1个字节
//===================================================
unsigned char EEPROM_ByteRead(unsigned char mAddr,unsigned char sAddr)
{
}
//======================================
//n=读N个字节,mAddr页地址;sAddr子地址
//======================================
void EEPROM_ReadN(unsigned char mAddr,unsigned char sAddr,unsigned char n)
{
unsigned char i;
unsigned char k;
unsigned char m=0;
}
//==================================
void SAVE_DATA(unsigned char mAddr,unsigned char sAddr,unsigned char n)
{
}
//==================================
int main(void)
{
//=================================
//=================================
MSP430单片机硬件IIC
MSP430IIC接口是很方便的物件,但是还是有很多人弃之不用,当然有各种原因,但是如果你确实要用IIC接口,而且容许的话,用它还是很舒服的
声明:本文内容来自网络转载或用户投稿,文章版权归原作者和原出处所有。文中观点,不代表本站立场。若有侵权请联系本站删除(kf@86ic.com)https://www.86ic.net/yingyong/5g/259776.html