MSP430單片機硬件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)
{
}
//====================================
//系統(tǒng)時鐘初始化
//====================================
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個字節(jié)
//===================================================
unsigned char EEPROM_ByteRead(unsigned char mAddr,unsigned char sAddr)
{
}
//======================================
//n=讀N個字節(jié),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)
{
//=================================
//=================================
評論