Krumlink
New Member
Ive been working on some PIC delay timing for a Servo, but It does not budge. I am just wondering if the math I am doing is creating proper 1.5msc pulses?
8mhz/4=2MIPS
1/2M = 1.25*10^-7 (1 second divided by 2 MIPS = seconds per cycle)
1.5/1000 = 0.0015 (1.5msc desired divided by 1000msc = 0.0015)
0.0015/(1.25*10^-7)=3000 cycles
Then to get the 1.5msc pulses I divide by 2, so 1500 clock cycles per wavelength.
Using a similar method, I have tried to create 38khz IR signals but the IR receiver hooked up to receive the signals does not indicate a pulse. Is my math right?
/////////////////////////////////////////////////////////////////
38khz timing
/////////////////////////////////////////////////////////////////
1/2MIPS = 5*10^-7
1/38khz = 2.631578947368^-5
38khzanswer/2MIPSanswer = 52.6316 cycles
divide by 2 = 26.3158 cycles per wavelength
8mhz/4=2MIPS
1/2M = 1.25*10^-7 (1 second divided by 2 MIPS = seconds per cycle)
1.5/1000 = 0.0015 (1.5msc desired divided by 1000msc = 0.0015)
0.0015/(1.25*10^-7)=3000 cycles
Then to get the 1.5msc pulses I divide by 2, so 1500 clock cycles per wavelength.
Using a similar method, I have tried to create 38khz IR signals but the IR receiver hooked up to receive the signals does not indicate a pulse. Is my math right?
/////////////////////////////////////////////////////////////////
38khz timing
/////////////////////////////////////////////////////////////////
1/2MIPS = 5*10^-7
1/38khz = 2.631578947368^-5
38khzanswer/2MIPSanswer = 52.6316 cycles
divide by 2 = 26.3158 cycles per wavelength