I am using a PIC to try to implement this.
I understand what Nigel is saying about 10-90% 20-80% and 30-70%.. with that i can represent 5 functions. its a start..
I also understand duty cycle. the output will be high for a certain % of a period..
What i am thinking i need to do is... write code that updates a counter register each time the output is high on my IR LED. for example, i press button "1" and it turns my IR LED on with a duty cycle of 10%, or button "2" with a 20% duty cycle.
Then i need to have another snippet of code that will detect (with my IR detector) the pulse.
For remote controls the frequency of the signal is 36.7kHz, 38kHz, 40kHz, and 56.9kHz.
i have two questions:
1) does the frequency in which i transmit matter? (i am just trying to make a basic remote.)
2) how do the signals emitted from the IR LED get decoded? If i were to have a button transmit at 38kHz and 10% duty cycle, do i just set a register to count how many times the output was high over one period and from that divide by the clock frequency to get duty cycle % at the receiving end..
then would i have another snippet of code to say if "this duty %" then "this task"
I understand this may be vague, but i am relatively confused and need some guidance.
Again, Thanks in advance