3轴加速度传感器tica, SimSun, sans-serif">ADXL335和STC 型单片机AT89C52的倾角测量
//*****************************************************
//名称:单片机串口输出ADXL335角度值
//使用单片机:stc12c5a60s2
//供电:电压5v
//晶振:11.0592m
//X轴->(ADC0)P1.0
//Y轴->(ADC1)P1.1
//Z轴->(ADC1)P1.2
//用pc串口助手显示时,选择字符显示
//参考宏晶网址例程
//*****************************************************
#include "reg51.h"
#include "intrins.h"
#include <math.h> //Keil library
#include <stdio.h> //Keil library
//#define FOSC 18432000L
#define FOSC 11059200L //晶振11.0592M
#define BAUD 9600
typedef unsigned char BYTE;
typedef unsigned int WORD;
#define uchar unsigned char
#define uint unsigned int
一周热门 更多>