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?
Did you want this frequency working with the Timer module?
Please look at the next community post. USING INTERRUPT TIMER IN EXAMPLE JN-AN-1218-Zigbee-Light-Bulb - 2
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?
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 secondsPre-escaler= 8Clock by 2^8 = 256 hence multiplying the time period by 256Timer clock will be 0.0625us * 256 = 16us
Time High =(10ms/16us)=625
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?
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 secondsPre-escaler= 4Clock by 2^ 4= 16 hence multiplying the time period by 16Timer clock will be 0.0625us * 16= 1us
Time High =((1/38k)/1us)= 26
vAHI_TimerStartRepeat(E_AHI_TIMER_0, 13, 26);
Thank you very much for your answer, I know now.
Retrieving data ...