# الدرس ٢٧-٤ : Generate PWM using Output Compare Example

**URL:** <https://almohandes.org/t/%D8%A7%D9%84%D8%AF%D8%B1%D8%B3-%D9%A2%D9%A7-%D9%A4-generate-pwm-using-output-compare-example/190386>\
**Category:** التحكم المبرمج\
**Created:** [30 سبتمبر 2018، 11:01ص UTC](https://almohandes.org/t/%D8%A7%D9%84%D8%AF%D8%B1%D8%B3-%D9%A2%D9%A7-%D9%A4-generate-pwm-using-output-compare-example/190386 "2018-09-30T11:01:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ahmedeldeep](https://almohandes.org/user_avatar/almohandes.org/ahmedeldeep/32/6086_2.png) [@ahmedeldeep](https://almohandes.org/u/ahmedeldeep)\
**Post date:** [30 سبتمبر 2018، 11:01ص UTC](https://almohandes.org/t/%D8%A7%D9%84%D8%AF%D8%B1%D8%B3-%D9%A2%D9%A7-%D9%A4-generate-pwm-using-output-compare-example/190386/1 "2018-09-30T11:01:42Z")

</div>

[![](https://almohandes.org/uploads/default/original/3X/a/b/ab621612ecbb5e80bfe4718470962e0ec8065d58.jpeg "الدرس ٢٧-٤ : Generate PWM using Output Compare Example") ](https://www.youtube.com/watch?v=Utag_OxYn9E)

**تحميل ملفات المشروع**  
[L27.4\_stm32\_examples.zip](https://almohandes.org/uploads/default/original/3X/4/a/4a58efabe566fe689d8742bf4b8a3094fcb24871.zip) (203.9% u)

---

<div class="post-metadata">

**Author:** ![Wafik\_Rkab](https://almohandes.org/user_avatar/almohandes.org/wafik_rkab/32/22621_2.png) [@Wafik\_Rkab](https://almohandes.org/u/Wafik_Rkab)\
**Post date:** [2 نوفمبر 2020، 11:10م UTC](https://almohandes.org/t/%D8%A7%D9%84%D8%AF%D8%B1%D8%B3-%D9%A2%D9%A7-%D9%A4-generate-pwm-using-output-compare-example/190386/2 "2020-11-02T23:10:23Z")

</div>

الله يعطيك العافية استاذ  
لكن عندي سؤال بخصوص pwm في متحكمات stm32 هل نستطيع اخذ قيمة التردد المطلوب بدقة دون خطأ .في المثال كانا القيمة المطلوبة 2000 هرتز اعطاك 1061 هرتز هل يوجد طريقة لضبط القيمة

---

<div class="post-metadata">

**Author:** ![ahmedeldeep](https://almohandes.org/user_avatar/almohandes.org/ahmedeldeep/32/6086_2.png) [@ahmedeldeep](https://almohandes.org/u/ahmedeldeep)\
**Post date:** [8 نوفمبر 2020، 11:28ص UTC](https://almohandes.org/t/%D8%A7%D9%84%D8%AF%D8%B1%D8%B3-%D9%A2%D9%A7-%D9%A4-generate-pwm-using-output-compare-example/190386/3 "2020-11-08T11:28:46Z")

</div>

في المثال عندما اعطينا قيمة التردد ٢٠٠٠ هرتز كانت القيمة المقاسة ١٩٦١ وهى تقريبا مماثلة للقيمة المعطاه بعض الخطأ وهو صغير جدا وربما نتيجة دقة القياس

---

<div class="post-metadata">

**Author:** ![Khalid\_Saleh](https://almohandes.org/user_avatar/almohandes.org/khalid_saleh/32/23948_2.png) [@Khalid\_Saleh](https://almohandes.org/u/Khalid_Saleh)\
**Post date:** [22 مايو 2021، 5:34ص UTC](https://almohandes.org/t/%D8%A7%D9%84%D8%AF%D8%B1%D8%B3-%D9%A2%D9%A7-%D9%A4-generate-pwm-using-output-compare-example/190386/4 "2021-05-22T05:34:32Z")

</div>

مجهود رائع بالتوفيق …جعله الله فى ميزان حسناتك..
