把开工程中的Abstract.txt文件有对工程的描述,PWM从PB0.8和PB0.9输出,稍后将它加入软件逻辑分析仪里。
The 'PWM' project is a simple program for the STM32F103RBT6
using Keil 'MCBSTM32' Evaluation Board and demonstrating
the use of PWM (Pulse Width Modulation) with Timer TIM4 .
- TIM4 is running at 100Hz.
LEDs PB8, PB9 are dimmed using the PWM function of TIM4 channel3,channel4
The Timer program is available in different targets:
Simulator: - configured for software Simulator
MCBSTM32: - runs from Internal Flash located on chip
(used for production or target debugging)
把开工程中的Abstract.txt文件有对工程的描述,PWM从PB0.8和PB0.9输出,稍后将它加入软件逻辑分析仪里。
The 'PWM' project is a simple program for the STM32F103RBT6
using Keil 'MCBSTM32' Evaluation Board and demonstrating
the use of PWM (Pulse Width Modulation) with Timer TIM4 .
Example functionality:
- Clock Settings:
- XTAL = 8.00 MHz
- SYSCLK = 72.00 MHz
- HCLK = SYSCLK = 72.00 MHz
- PCLK1 = HCLK/2 = 36.00 MHz
- PCLK2 = HCLK = 72.00 MHz
- ADCLK = PCLK2/6 = 12.00 MHz
- SYSTICK = HCLK/8 = 9.00 MHz
- TIM4 is running at 100Hz.
LEDs PB8, PB9 are dimmed using the PWM function of TIM4 channel3,channel4
The Timer program is available in different targets:
Simulator: - configured for software Simulator
MCBSTM32: - runs from Internal Flash located on chip
(used for production or target debugging)
第二、选择软件仿真
第三、编译程序,如果程序没有错的话,将出现以下线框编译信息,然后进入调试,点出红色的“D"按,如下图所示
第五步、把不用的bit屏蔽掉,并按bit形式显示,配置如图
第六步,点“GO”按钮进入全速运行,OK,PWM波形出来了,用IN和OUT可以调扫描时间,如下图
评分
查看全部评分