subbta.blogg.se

Pic signal measurement timer pbp3
Pic signal measurement timer pbp3











LCD is used to display value of pulse width measurement in terms of time.

  • How to use capture compare PWM module Circuit diagram of pulse width measurement using pic microcontrollerĪs I have already mentioned, I have used pic16F877A microcontroller in this article.
  • How to use timers of pic microcontroller.
  • So to understand this tutorial you should know how to use timers of pic microcontroller and how to use capture compare module of pic microcontoller:

    pic signal measurement timer pbp3

    Timer measure by timer will be the width of our PWM. So whenever capture pin of pic microcontroller captures a positive edge,we will turn on the timer and as soon as it detect the negative edge, we will turn off the timer. So the idea here is that we will use a built in timer of pic16f877a microcontroller and capture compare mode of pic microcontroller is used to detect a positive edge and a negative edge of pulse. So if we can measure a time between a positive edge detection and next negative edge detection, we can easily measure pulse width with respect to time. So pulse width is basically a on time between a positive edge and a negative edge. Every pulse width must have a positive edge and a negative edge. So I believe now you know what is pulse width. So in this tutorial our objective is to find a method to calculate the pulse width of any pwm without knowing about its time period.

    pic signal measurement timer pbp3

    Figure below shows a PWM of amplitude 5 volt and timer period is 0.3 second and duty cycle is 25% which means pulse width is 25% becuase PWM is high for 25% of total time period and remains off for 75% of total time period. Duty cycle is also known as the width of PWM.

    pic signal measurement timer pbp3

    PWM has two main components one is time period and other one is duty cycle. It has been used in many applications like communications, power electronics project and electrical projects. PWM is used to generate a analog signal with the help of digital signal. Code pulse width measurement using pic microcontroller What is pulse width modulation?.Circuit diagram of pulse width measurement using pic microcontroller.













    Pic signal measurement timer pbp3