msp430单片机模拟IIC总线读取MMA7660三轴加速度传感器
if (X_value_final>
TimerA_UART_print("X_value---->
TimerA_UART_print("Z_value---->
----------------------------------------------------------
void TimerA_UART_print(char *string)
{
}
void output(unsigned int num , int n )
{
char *p,pd[4];
while (n--)
TimerA_UART_tx((*p++));
}
//------------------------------------------------------------------------------
// Timer_A UART - Transmit Interrupt Handler
//------------------------------------------------------------------------------
#pragma vector = TIMER0_A0_VECTOR
__interrupt void Timer_A0_ISR(void)
{
}
//------------------------------------------------------------------------------
// Timer_A UART - Receive Interrupt Handler
//------------------------------------------------------------------------------
#pragma vector = TIMER0_A1_VECTOR
__interrupt void Timer_A1_ISR(void)
{
}
//----------------------华丽的分割线2--------------------------------------------------------
//file :MMA7660FC.h
#ifndef _MMA7660FC_H
#define _MMA7660FC_H
#define MMA7660FC_ADD
#define MMA7660FC_MW_ADD 0x98
#define MMA7660FC_MR_ADD 0x99
#define SlaveAddress 0x98
#define X_outAddr
#define Y_outAddr
#define Z_outAddr
// IIC Register Address
#define MMA7660_XOUT
#define MMA7660_YOUT
#define MMA7660_ZOUT
#define MMA7660_TILT
#define MMA7660_SRST
#define MMA7660_SPCNT
#define MMA7660_INTSU
#define MMA7660_MODE
#define MMA7660_SR
#define MMA7660_PDET
#define MMA7660_PD
#endif
////////////////////////////////////////////////////////////////////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\
//以上为所有程序源码!编译工具CCS V5.0
msp430单片机模拟IIC总线MMA7660三轴加速度传感 相关文章:
- Windows CE 进程、线程和内存管理(11-09)
- RedHatLinux新手入门教程(5)(11-12)
- uClinux介绍(11-09)
- openwebmailV1.60安装教学(11-12)
- Linux嵌入式系统开发平台选型探讨(11-09)
- Windows CE 进程、线程和内存管理(二)(11-09)