Nigel's tutorial 5.2 (IR control)

Status
Not open for further replies.

atferrari

Well-Known Member
Most Helpful Member
Hi Nigel,

I've checked your code (yes, I shortened the transcribed snipet on purpose) and I can not find a reason for repeating the clearing of the output bit (since you are doing it already when starting the loop).

Code:
NO_pulse			 	
		MOVWF	count		;  Doesn't pulse the IR led

irloop2
		BCF	IR_PORT,	IR_Out 
		NOP			;
		NOP			;
                                ......
		NOP			;
		NOP			;
		BCF	IR_PORT,	IR_Out
		NOP			;
		NOP			;

Could you please elaborate? Gracias
 
It was included solely to match the other routine which outputs a pulse, I could have simply replaced it by another NOP - it makes no difference.
 
OK

Duly noted. I was affraid to miss something.

Thanks for replying, Nigel.
 
What is the best duty cycle?

Hi Nigel,

I started to experiment, just started, with all this.

My questions:

1) As long as I maintain the frequency, is it any reccomended duty cycle?

I believe that if I can go away with 20%, to say something, in the emitted signal, it is better than 80% because my "on" time, being smaller, drains less power from the battery.

2) If for any reason, frequency changes, how forgiving are these IR receivers?

This last is more of curiosity. I plan to work with a 38 KHz receiver module. Last check, 1,4 USD + VAT, here in Argentina. Used to be quite expensive in the past!!

3) The fact of zeros and ones taking different times, translates in actual variations of the "instantaneous" frequency. Am I right here? Would you call it "jitter"?

Thanks for your time
 
Re: What is the best duty cycle?


Reducing the duty cycle will decrease current consumption, but it will also decrease range - you don't get anything for nothing :lol:

The receivers are fairly tolerant of slight frequency errors, but the further you get away from it's centre frequency the more the range falls. But changing duty cycle won't affect the frequency, as you decrease the 'ones', increase the 'zeros' to match.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…