- 38
- 0
- 约8.17千字
- 约 11页
- 2019-12-28 发布于江苏
- 举报
/**************************************************
********** 角度传感器ADXL345程序代码 **************
**************************************************/
#include iom8v.h
#include macros.h
#include math.h
#include stdio.h
typedef unsigned char uchar;
typedef unsigned int uint;
/*LCD引脚定义*/
#define CS_set PORTD |=BIT(6)
#define CS_clr PORTD =~BIT(6)
#define SID_set PORTD |=BIT(7)
#define SID_clr PORTD =~BIT(7)
#define SCLK_set PORTB |=BIT(0)
#define SCLK_clr PORTB =~BIT(0)
/*ADXL345角度传感器端口定义*/
#define SDA_set PORTC |=(14)
#define SDA_clr PORTC =~(14)
#define SDA_in DDRC =~(14)
#define SDA_out DDRC |=(
原创力文档

文档评论(0)