智能车制作
标题:
基于07组委会的(简化)四驱源程序代码(未完)(武汉工程大学kcmxi)
[打印本页]
作者:
miracledavid
时间:
2009-10-16 12:37
标题:
基于07组委会的(简化)四驱源程序代码(未完)(武汉工程大学kcmxi)
#include <machine.h>
#include "h8_3048.h"
#define PWM_CYCLE 49151 /* PWM 16ms */
/* PWM_CYCLE = */
/* 16[ms] / 325.5[ns] */
/* = 49152 */
#define F_PWM_CYCLE 3071
#define SERVO_CENTER 5000
#define HANDLE_STEP 26
#define MASK2_2 0x66
#define MASK2_0 0x60
#define MASK0_2 0x06
#define MASK3_3 0xe7
#define MASK0_3 0x07
#define MASK3_0 0xe0
#define MASK4_0 0xf0
#define MASK0_4 0x0f
#define MASK4_4 0xff
#define speed_r(x,y) speed(x,y) /* speed = speed_r */
#define speed2_r(x,y) speed2(x,y) /* speed2 = speed2_r */
void init( void );
void timer( unsigned long timer_set );
int check_crossline( void );
int check_rightline( void );
int check_leftline( void );
unsigned char sensor_inp( unsigned char mask );
unsigned char dipsw_get( void );
unsigned char pushsw_get( void );
unsigned char startbar_get( void );
void led_out( unsigned char led );
void speed( int accele_l, int accele_r );
void speed2( int accele_l, int accele_r );
void speed_f( int accele_l, int accele_r );
void speed2_f( int accele_l, int accele_r );
void handle( int angle );
帖子字数有限,原帖地址:
http://www.renesas-mcu.com/read.php?tid=309
作者:
12629431
时间:
2010-2-6 17:45
学习啦
欢迎光临 智能车制作 (http://111.231.132.190/)
Powered by Discuz! X3.2