mobile1.0
所属分类:单片机开发
开发工具:C/C++
文件大小:3008KB
下载次数:11
上传日期:2010-10-27 11:28:24
上 传 者:
zm694844985
说明: Wheeled mobile robot to achieve the speed control
文件列表:
模块化m法1.0\application\Delay.c (428, 2009-12-05)
模块化m法1.0\application\Delay.h (74, 2009-12-05)
模块化m法1.0\application\Encoder_timer_config.c (1661, 2009-12-05)
模块化m法1.0\application\Encoder_timer_config.h (101, 2009-12-05)
模块化m法1.0\application\GPIO_config.c (1759, 2009-12-05)
模块化m法1.0\application\GPIO_config.h (95, 2009-12-05)
模块化m法1.0\application\LED Control.c (851, 2009-12-05)
模块化m法1.0\application\LED_Control.h (102, 2009-12-05)
模块化m法1.0\application\main.c (2985, 2009-12-05)
模块化m法1.0\application\measure_speed.c (1322, 2009-12-05)
模块化m法1.0\application\measure_speed.h (118, 2009-12-05)
模块化m法1.0\application\Motor_Stop.c (557, 2009-12-05)
模块化m法1.0\application\Motor_Stop.h (81, 2009-12-05)
模块化m法1.0\application\PID.c (1229, 2009-12-05)
模块化m法1.0\application\PID.h (66, 2009-12-05)
模块化m法1.0\application\PWM.c (1564, 2009-12-05)
模块化m法1.0\application\PWM.h (87, 2009-12-05)
模块化m法1.0\application\Pwm_Timer_config.c (2335, 2009-12-05)
模块化m法1.0\application\Pwm_Timer_config.h (102, 2009-12-05)
模块化m法1.0\application\RCC_config.c (2307, 2009-12-05)
模块化m法1.0\application\RCC_config.h (88, 2009-12-05)
模块化m法1.0\application\Systick_config.c (582, 2009-12-05)
模块化m法1.0\application\Systick_config.h (91, 2009-12-05)
模块化m法1.0\application\SysTick_Int.c (1533, 2009-12-05)
模块化m法1.0\application\SysTick_Int.h (87, 2009-12-01)
模块化m法1.0\application\variable_define.c (2295, 2009-12-05)
模块化m法1.0\application\variable_define.h (57, 2009-12-05)
模块化m法1.0\driver\TFT018\8x16.h (45135, 2007-12-29)
模块化m法1.0\driver\TFT018\8x8h.h (45137, 2007-12-29)
模块化m法1.0\driver\TFT018\GB1616.h (9630, 2008-05-06)
模块化m法1.0\driver\TFT018\MyType.h (1487, 2007-12-05)
模块化m法1.0\driver\TFT018\TFT018.c (11683, 2009-02-25)
模块化m法1.0\driver\TFT018\TFT018.h (2571, 2008-04-21)
模块化m法1.0\initial\STM32_Init.c (258864, 2009-03-03)
模块化m法1.0\initial\STM32_Init.h (924, 2007-10-30)
模块化m法1.0\initial\STM32_Init1.c (258899, 2009-02-25)
模块化m法1.0\JLinkArm_T法测速.ini (248, 2009-12-05)
模块化m法1.0\JLinkLog.txt (50772, 2009-12-05)
模块化m法1.0\library\inc\cortexm3_macro.h (2240, 2009-02-26)
... ...
#include "stm32f10x_lib.h"
/* Private variables ---------------------------------------------------------*/
u16 CCR1_Val;
u16 CCR2_Val;
u16 CCR3_Val;
u16 CCR4_Val;
char left; //define left wheel
char right; //define right wheel
char forward; //motor forward
char backward; //motor backward
int setleftspeed; //setting left wheel speed
int setrightspeed; //setting right wheel speed
s32 PIDleftspeed; //output of left wheel after PID
s32 PIDrightspeed; //output of right wheel after PID
u16 rightspeed; //right wheel speed by measurement
u16 leftspeed; //left wheel speed by measuremeng
u16 flag; // pwm input flag
u16 nn; //countting variable
s16 kp_1; //proportion of left wheel PID
s16 kp_2; //proportion of right wheel PID
s16 e1k_1; //the first moment error of the left wheel PID
s16 e1k_2; //the second moment error of the left wheel PID
s16 e2k_1; //the first moment error of the right wheel PID
s16 e2k_2; //the second moment error of the right wheel PID
s16 error_1; //the left wheel error in PID
s16 error_2; //the right wheel error in PID
u16 leftdat; //the variable reading the TIM2 counter
u16 rightdat; //the variable reading the TIM1 counter
/*private functions*********************************************************************/
void NVIC_Configuration(void); //NVIC configuration
void PID(char wheel); //PID arithmetic function
void Mot_stop(void); //motor stopping function
void LED_ON(void); //LED control
void LED_GLITER(void);
void systickconf(void); // systick configuration
void Encoderconf(void); //TIM1,TIM2 configuration
void Measure_left(void); // measure left speed
void Measure_right(void); //measure right speed
void Delay(vu32 nCount); //Delay timing
void RCC_Configuration(void); //clock configuration
void MOT_Configuration(void); //TIM4 configuration
void GPIO_Configuration(void); //GPIO configuration
void TimingDelay_Decrement(void); //systick interrupt service
void MOT_Driver(char wheel,char direction); //pwm driver the DC motor
近期下载者:
相关文件:
收藏者: