|
The OP
Published on 2014-11-18 17:30
Only look at the author
This post is from stm32/stm8
Latest reply
This post was last edited by wuqibuyou on 2014-11-21 11:06If you use the same counter and use the edge alignment mode, the phases will definitely be the same, with very little difference, because the comparison action of the comparator is not through the CPU, but is automatically compared by the hardware, so the speed is still quite fast. However, it is best not to use interrupts to handle it, because after entering the interrupt, the CPU will act, which is very slow. You can turn on the pwm output, which is already the fastest you can do. You can use an oscilloscope to see if the waveform meets the requirements. I think it should be fine. As for how to write the program, you can look at what is in the library function. Basically, it initializes the timer and output module, which is quite simple. But I don't have any ready-made code at hand now. . . And I used dsp and 430 before. I just got started with stm and I am not very familiar with this thing. So, if you really can't write it yourself, I will work hard for you. If you can get it done, it will be great.
Details
Published on 2014-11-21 11:04
| ||
|
|
||
|
推荐
Published on 2014-11-18 18:57
Only look at the author
This post is from stm32/stm8
Comments | ||
|
|
||
|
|
|
zhaojun_xf
Currently offline
|
2
Published on 2014-11-18 17:59
Only look at the author
|
|
Personal signature我的博客
|
|
|
|
|
4
Published on 2014-11-18 20:05
Only look at the author
This post is from stm32/stm8
| ||
|
|
||
|
|
This post is from stm32/stm8
| ||
|
|
||
|
|
This post is from stm32/stm8
Comments
If you use the same counter and use the edge alignment mode, the phases will definitely be the same, with very little difference, because the comparison action of the comparator is not done by the CPU, but is automatically compared by the hardware, so the speed is still quite fast. However, it is best not to use interrupts to process, because after entering the interrupt, the CPU will act.
Details
Published on 2014-11-21 11:04
| ||
|
|
||
|
|
|
7
Published on 2014-11-21 11:04
Only look at the author
This post is from stm32/stm8
| ||
|
|
||
|
|
曾经的版主且威望大于2000,或对EEWORLD论坛有突出贡献的坛友
EEWorld Datasheet Technical Support
EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews
Room 1530, Zhongguancun MOOC Times Building,
Block B, 18 Zhongguancun Street, Haidian District,
Beijing 100190, China
Tel:(010)82350740
Postcode:100190
京公网安备 11010802033920号

