I am about to implement my own IR receiver / decoder based on a PIC.
Could you please explain the reason of this section of your code?
Code:
goto Still_High
Next nop
nop
nop
nop
nop ;waste time to scale pulse
nop ;width to 8 bits
nop
nop
nop
nop
nop
nop
incf LoX,f
btfss IR_PORT, IR_In
goto Next ;loop until input high again
; test if Zero, One, or Start (or error)
I can not understand :cry: "waste time to scale pulse width to 8 bits "
It's the routine which actually measures the width of the pulses, the NOP's are to slow the routine down, so that the measured value will fit in a single 8 bit register. As the routine finishes, LoX contains a value based on the width of the pulse, the next part of the program tests this value, to determine what the pulse was, either too short, too long (both errors), or a zero, a one, or a start pulse.
Just another question for Nigel:
Many of the questions regarding your PICs must be repeats.
How many of them are repeated how often? (many || few)
Do you mind or what is your approach to this? (if at all negatively || no)
This is just to help me understand why a guy like you is so involved at a site like this...
Just another question for Nigel:
Many of the questions regarding your PICs must be repeats.
How many of them are repeated how often? (many || few)
Do you mind or what is your approach to this? (if at all negatively || no)
This is just to help me understand why a guy like you is so involved at a site like this...