Search Engine www.edaboard.com

Timer Value Calculation

Add Question

13 Threads found on edaboard.com: Timer Value Calculation
How is he doing the timer2 calculation ? He is using a 16 MHz Clock and 16 KHz PWM signal and his timer2 interrupt value is 62.5 us. TPWM = 62.5 us. Is he using TPWM = 1 / 16000 = 62.5 us for timer2 Interrupt ? If yes, If my PWM frequency is 10 KHz should I use
Hi, Please let me know the basic timer value calculation in any microcontroler. Always i find difficult in timer calculation. For example you take for 1 msec , crystal is 8MHz. prescalar is 1:4
hello There is no direct link between timer and adc ! timer depends of FOSC MCU prescaler value and your software ... at least you can use long integer for calculation and scaleing all your physical measures . your request is not so clear: is the potentiometer used as position measure of Angle DC motor ? if yes , why (...)
urgent help is needed please i am facing the problem that in my software (in assembly language). i am using timer interrupt in 16f72. there is some calculation which is done by w reg. during calculation, when timer interrupt occurs, the value of w reg is disturbed. when w reg goes to work for (...)
I am still learning LPC2148 hence can't give you code. Process is. make trig pin high then a delay of 10 us then make trig pin low clear 16 bit timer wait till echo pin goes high when echo pin goes high start timer wait till echo pin goes low when echo pin goes low stop timer use timer value and do (...)
Did you set your timer prescalar correctly? Did you check your compare flags for errors?
What is the PIC clock frequency? Which timer is used? In what mode is the timer used? What is the re-load value? Please read the PIC manual
You may find the theory here 8051 Tutorial: timers - To calculate required value here 8051 Microcontroller Peripheral Timing Calculator
hiiii i want to calculate the prescaler value for the following 16-bit timers to generate a 1us tick and the controller is running at 50mhz. i am using LM3S811 stellaris uc. in the datasheet it explain like this ... but i dnt understand how the Mx time to be calculated.... All values assume a 50-MHz clock with Tc=20 ns (cloc
Pwm period = x 4 x 20Mhz x Time prescale value You need the period of the oscillator, Should be Pwm period = x 4 x 1/20Mhz x timer prescale value. You wont be able to go down to 50Hz using a 20MHz clock! Even with the prescale at max, you could only go down to ~1K2. 50Hz is quite slow, you could implement your squar
The capture input and timer will allow you to know the time between two rising fronts of the signal, for example. This time will be a multiple of the CPU clock period. All you need to do is invert this value and then multiply it by whatever gain required by your system. You might want to read about fixed point math for this. For example if one pe
The problem is this: The time is calculated using timer 1 in PIC16F877A microcontroller. The measured value is stored in the TMR1H & TMR1L registers. I have this value now in an int variable. I need to convert this value to hours since we need to do our calculation in km/h. It involves using clock_khz() (...)