HI, now I want to get the frequency of 38KHZ through the chip JN5169. How can I get this frequency through the frequency division coefficient of the hardware timer?
Hi,
Did you want this frequency working with the Timer module?
Please look at the next community post. https://community.nxp.com/thread/506029
Regards,
Mario
Yes, I want to get a frequency of 38KHZ by dividing the frequency by the hardware timer, or any frequency.But in the hardware timer's enabler function, the divisor is 2u8Prescale does not get 38KHZ, or any frequency.How do I get to 38KHZ?
Hi,
Did you look at the example of 10 ms?
This is the frequency of the 100 Hz
The clock is 16MHz so the time period is 0.0625micro seconds
Pre-escaler= 8
Clock by 2^8 = 256 hence multiplying the time period by 256
Timer clock will be 0.0625us * 256 = 16us
Time High =(10ms/16us)=625
vAHI_TimerStartRepeat(E_AHI_TIMER_0, 312,625);
Regards,
Mario
Yes, I have seen the example of 10ms.Since the parameter 'pre-escaler' can only be an integer, the frequency division coefficients obtained are 2^1=2,2^2=4,2^3=8,2^4=16. I cannot change the frequency division coefficients arbitrarily.So I don't know how to get 38Khz. Can you give me an example of 38Khz?
Hi,
I am toggling a pin in the ISR Timer 0.
You need to calculate based on the frequency of the 38 kHz
The clock is 16MHz so the time period is 0.0625micro seconds
Pre-escaler= 4
Clock by 2^ 4= 16 hence multiplying the time period by 16
Timer clock will be 0.0625us * 16= 1us
Time High =((1/38k)/1us)= 26
vAHI_TimerStartRepeat(E_AHI_TIMER_0, 13, 26);
Regards,
Mario
Thank you very much for your answer, I know now.