I spend time with this "killer" code. Now I discover another strange phenomenon : anything I do, can't generate "train" of pulse.
Instead generating for 4 times this sequence : high 2650 ,pause 2500, high 660, pause 100
I have just ONE sequence for about 42.25 mS !!!
WHY ?!?Thanks again for attention !Code:main: zecime CON 106 '// = ( 106 * 25uS) = 2650 uS burst unu CON 24 '// = (24 * 25uS) = 0.60 mS burst delay CON 104 i var byte cycles var byte acycles var byte ;============================ Main: IF but1=0 then ; VOLUME UP goto ir_send endif Goto Main '========================================= ir_send: cycles=zecime acycles=unu for i=1 to 4 call Pulse pauseus delay call Pulser next i Pauseus 100 Goto main ' or Return, have no result ! Pulse: ' Generate "Cycles" number of 40kHz pulses ASM bsf gpio, 2 ; 1uS, LED=on goto $+1 ; + 2uS = 3uS goto $+1 ; + 2uS = 5uS goto $+1 ; + 2uS = 7uS goto $+1 ; + 2uS = 9uS goto $+1 ; + 2uS = 11uS goto $+1 ; + 2uS = 13uS bcf gpio, 2 ; 1uS, LED=off goto $+1 ; + 2uS = 3uS goto $+1 ; + 2uS = 5uS goto $+1 ; + 2uS = 7uS goto $+1 ; + 2uS = 9uS decfsz _Cycles,f ; + 1uS = 10S goto _Pulse ; + 2uS = 12uS return ; Add 2uS for return to caller ENDASM Pulser: ' Generate "Cycles" number of 40kHz pulses ASM bsf gpio, 2 ; 1uS, LED=on goto $+1 ; + 2uS = 3uS goto $+1 ; + 2uS = 5uS goto $+1 ; + 2uS = 7uS goto $+1 ; + 2uS = 9uS goto $+1 ; + 2uS = 11uS goto $+1 ; + 2uS = 13uS bcf gpio, 2 ; 1uS, LED=off goto $+1 ; + 2uS = 3uS goto $+1 ; + 2uS = 5uS goto $+1 ; + 2uS = 7uS goto $+1 ; + 2uS = 9uS decfsz _Acycles,f ; + 1uS = 10S goto _Pulser ; + 2uS = 12uS return ; Add 2uS for return to caller ENDASM
Bookmarks