Hola Nigel,
Today I've tried for the first time to decode SIRC packets following your tutorials. The emiter works like a charm
but the decoder failed because I tried to get rid of the lines that I believed were not needed in my application.
Could you please explain what's the reason for the "*" marked lines so I can make a correct change to the soft?
I just need to decode simple commands sent by a PIC to another with no keyboard involved.
Since I can not appreciate if those lines are involved in the timing and how, I need your help even more. I will appreciate that :!:
Today I've tried for the first time to decode SIRC packets following your tutorials. The emiter works like a charm
Could you please explain what's the reason for the "*" marked lines so I can make a correct change to the soft?
I just need to decode simple commands sent by a PIC to another with no keyboard involved.
Since I can not appreciate if those lines are involved in the timing and how, I need your help even more. I will appreciate that :!:
Code:
Read_Pulse
clrf LoX
btfss IR_PORT, IR_In ;wait until high
goto $-1
(*) clrf tmp1
(*) movlw 0xC0 ;delay to decide new keypress
(*) movwf tmp2 ;for keys that need to toggle
Still_High
btfss IR_PORT, IR_In ;and wait until goes low
goto Next
(*)incfsz tmp1,f
(?)goto Still_High
(*)incfsz tmp2,f
(?)goto Still_High
(*)bsf Flags2, New ;set New flag if no button pressed
(?)goto Still_High
Next
nop
nop
nop
nop