文件名称:2.STM32多路舵机控制程序.rar
文件大小:1.97MB
文件格式:RAR
更新时间:2022-12-22 06:10:28
15
#define POSA 0 #define POSB 500 #define POSC 1000 #define POSD 1500 #define POSE 2000 #define POSF 2500 #define POSG 0 /**********************************************************************************/ /*****************************Ö÷º¯Êý***********************************************/ int main(void) { Timer_Init(); //¶¨Ê±Æ÷³õʼ»¯ SysTick_Init(); //ϵͳµÎ´ð¶¨Ê±Æ÷³õʼ»¯ GPIO_Config(); //GPIO³õʼ»¯ USART1_Config(); //³õʼ»¯´®¿Ú1 USART3_Config(); //³õʼ»¯´®¿Ú3 Timer_ON(); //¿ªÆô¶¨Ê±Æ÷ while (1) { /*CPWM[0]=POSA;CPWM[1]=POSA;CPWM[2]=POSA;CPWM[3]=POSA;CPWM[4]=POSA;CPWM[5]=POSA; CPWM[6]=POSA;CPWM[7]=POSA;CPWM[8]=POSA;CPWM[9]=POSA;CPWM[10]=POSA;CPWM[11]=POSA; CPWM[12]=POSA;CPWM[13]=POSA;CPWM[14]=POSA;CPWM[15]=POSA;CPWM[16]=POSA;CPWM[17]=POSA; CPWM[18]=POSA;CPWM[19]=POSA;CPWM[20]=POSA;CPWM[21]=POSA;CPWM[22]=POSA;CPWM[23]=POSA; Delay_ms(1000);*/ CPWM[0] =POSB;CPWM[1] =POSB;CPWM[2] =POSB;CPWM[3] =POSB;CPWM[4] =POSB;CPWM[5] =POSB; CPWM[6] =POSB;CPWM[7] =POSB;CPWM[8] =POSB;CPWM[9] =POSB;CPWM[10]=POSB;CPWM[11]=POSB; CPWM[12]=POSB;CPWM[13]=POSB;CPWM[14]=POSB;CPWM[15]=POSB;CPWM[16]=POSB;CPWM[17]=POSB; CPWM[18]=POSB;CPWM[19]=POSB;CPWM[20]=POSB;CPWM[21]=POSB;CPWM[22]=POSB;CPWM[23]=POSB; Delay_ms(1000); CPWM[0]=1500;CPWM[1]=1500;CPWM[2]=1500;CPWM[3]=1500;CPWM[4]=1500;CPWM[5]=1500; CPWM[6]=1500;CPWM[7]=1500;CPWM[8]=1500;CPWM[9]=1500;CPWM[10]=1500;CPWM[11]=1500; CPWM[12]=1500;CPWM[13]=1500;CPWM[14]=1500;CPWM[15]=1500;CPWM[16]=1500;CPWM[17]=1500; CPWM[18]=1500;CPWM[19]=1500;CPWM[20]=1500;CPWM[21]=1500;CPWM[22]=1500;CPWM[23]=1500; Delay_ms(1000); CPWM[0]=2300;CPWM[1]=2300;CPWM[2]=2300;CPWM[3]=2300;CPWM[4]=2300;CPWM[5]=2300; CPWM[6]=2300;CPWM[7]=2300;CPWM[8]=2300;CPWM[9]=2300;CPWM[10]=2300;CPWM[11]=2300; CPWM[12]=2300;CPWM[13]=2300;CPWM[14]=2300;CPWM[15]=2300;CPWM[16]=2300;CPWM[17]=2300; CPWM[18]=2300;CPWM[19]=2300;CPWM[20]=2300;CPWM[21]=2300;CPWM[22]=2300;CPWM[23]=2300; Delay_ms(1000); } } /*******
【文件预览】:
2.STM32多路舵机控制程序
----CMSIS()
--------startup_stm32f10x_md.s(12KB)
--------system_stm32f10x.h(2KB)
--------core_cm3.c(17KB)
--------core_cm3.h(84KB)
--------stm32f10x.h(619KB)
--------system_stm32f10x.c(36KB)
--------startup_stm32f10x_hd.s(15KB)
----Output()
--------usart1.o(301KB)
--------timer_count.d(778B)
--------stm32f10x_it.o(303KB)
--------test.axf(357KB)
--------stm32f10x_tim.o(329KB)
--------stm32f10x_it.crf(281KB)
--------adc.crf(276KB)
--------gpio.o(303KB)
--------core_cm3.crf(4KB)
--------stm32f10x_rcc.o(306KB)
--------misc.o(295KB)
--------test.htm(188KB)
--------test.plg(393B)
--------system_stm32f10x.o(296KB)
--------main.d(815B)
--------systick.crf(275KB)
--------usart1.d(830B)
--------stm32f10x_exti.d(855B)
--------test.lnp(703B)
--------stm32f10x_tim.crf(297KB)
--------stm32f10x_dma.d(838B)
--------misc.d(685B)
--------stm32f10x_gpio.o(302KB)
--------gpio.__i(320B)
--------test.tra(2KB)
--------stm32f10x_dma.o(299KB)
--------stm32f10x_tim.d(838B)
--------adc.o(297KB)
--------stm32f10x_usart.d(872B)
--------stm32f10x_it.d(975B)
--------stm32f10x_usart.o(306KB)
--------stm32f10x_adc.d(838B)
--------main.crf(280KB)
--------system_stm32f10x.crf(277KB)
--------startup_stm32f10x_md.o(6KB)
--------stm32f10x_gpio.crf(279KB)
--------stm32f10x_usart.crf(281KB)
--------timer_count.crf(277KB)
--------usart1.crf(281KB)
--------test.sct(479B)
--------timer_count.o(298KB)
--------stm32f10x_adc.crf(283KB)
--------stm32f10x_adc.o(309KB)
--------startup_stm32f10x_md.d(67B)
--------stm32f10x_exti.o(299KB)
--------systick.o(297KB)
--------core_cm3.o(10KB)
--------stm32f10x_dma.crf(279KB)
--------test.hex(31KB)
--------system_stm32f10x.d(822B)
--------adc.d(642B)
--------gpio.d(782B)
--------stm32f10x_gpio.d(855B)
--------gpio.crf(284KB)
--------systick.d(710B)
--------stm32f10x_rcc.crf(283KB)
--------stm32f10x_exti.crf(278KB)
--------main.o(301KB)
--------core_cm3.d(114B)
--------misc.crf(276KB)
--------stm32f10x_rcc.d(838B)
----USER()
--------stm32f10x_it.h(2KB)
--------timer_count.h(172B)
--------stm32f10x_conf.h(3KB)
--------test.uvopt(14KB)
--------test_Target 1.dep(16KB)
--------test.plg(2KB)
--------test.uvproj.saved_uv4(18KB)
--------startup_stm32f10x_md.s(12KB)
--------test.uvprojx(19KB)
--------test.uvoptx(13KB)
--------RTE()
--------usart1.h(261B)
--------test.uvguix.Administrator(69KB)
--------test.uvgui.lenovo(72KB)
--------test_uvproj.bak(0B)
--------stm32f10x_it.c(5KB)
--------test_uvopt.bak(14KB)
--------SysTick.h(197B)
--------timer_count.c(7KB)
--------gpio.h(176B)
--------adc.c(4KB)
--------adc.h(113B)
--------SysTick.c(2KB)
--------main.c(2KB)
--------usart1.c(7KB)
--------test.uvgui_lenovo.bak(70KB)
--------gpio.c(8KB)
----Listing()
--------startup_stm32f10x_md.lst(41KB)
--------test.map(80KB)