//ICC-A
VR application builder : 2010-9-21 10:22:14
// Target : M16
// Crystal: 8.0000Mhz
#include
#include
#define uchar unsigned char
#define uint unsigned int
uint
discrepancy=0;
//function declaration
void port_init(void);
void motor(uchar index, uchar speed);
//input PWM wave(
PWM
波输入
)
void sensor_state(void);
//get the running condition
(运行情况)
void
revise_to_line(void
);
/0=run
forward,1=left,2=right,3=sever
left,4=sever
right
void delayms(uint MS) ;
//call this routine to initialize all peripherals
【
调用这个程序初始化所有的外围设备】
void init_devices0(void)
{
//stop errant interrupts until set up
CLI();
//disable al