STM32F4的正交编码器

时间:2021-08-23 09:09:22
【文件属性】:

文件名称:STM32F4的正交编码器

文件大小:300KB

文件格式:RAR

更新时间:2021-08-23 09:09:22

rar'

RCC->APB1ENR|=1<<3; //TIM5 ʱÖÓʹÄÜ RCC->AHB1ENR|=1<<0; //ʹÄÜPORTAʱÖÓ GPIO_Set(GPIOA,PIN0|PIN1,GPIO_MODE_AF,GPIO_OTYPE_PP,GPIO_SPEED_100M,GPIO_PUPD_PU);//¸´Óù¦ÄÜ,ÏÂÀ­ GPIO_AF_Set(GPIOA,0,2); //PA0,AF2 GPIO_AF_Set(GPIOA,1,2); //PA0,AF2 TIM5->ARR=ENCODER_TIM_PERIOD-1;; //É趨¼ÆÊýÆ÷×Ô¶¯ÖØ×°Öµ TIM5->PSC=0X0; //Ô¤·ÖƵÆ÷ TIM5->CCMR1|=1<<1; //CC1S=01 Ñ¡ÔñÊäÈë¶Ë IC1Ó³Éäµ½TI1ÉÏ TIM5->CCMR1|=1<<9; //CC2S=01 Ñ¡ÔñÊäÈë¶Ë IC2Ó³Éäµ½TI2ÉÏ TIM5->CCER|=0<<1; //CC1P=0


【文件预览】:
STM32正交编码器
----Output()
----工程缩减.bat(415B)
----SYSTEM()
--------usart()
--------delay()
--------sys()
----User()
--------STM32F1.h(219B)
--------main.c(1KB)
--------stm32f10x_it.c(4KB)
--------stm32f10x_conf.h(3KB)
--------stm32f10x_it.h(2KB)
--------font.h(34KB)
----Listing()
----Libraries()
--------FWlib()
--------CMSIS()
----Doc()
--------Readme.c(166B)
----Project()
--------RVMDK(uv5)()
----HARDWARE()
--------lcd.c(28KB)
--------lcd.h(7KB)
--------encode.h(98B)
--------encode.c(1KB)

网友评论