hi cncmachineguy
dividing two variables by tmr0 and obtaining two periods from tmr0, it seems to work, but i think there can be some problems. for example, should we reload tmr0 with respect to which signal? for the first pulses ok but then when next period start?
program below is what you said, isn't it? thank you for advices
Code:OPTION_REG=%00000000 TMR0=0 INTCON=%10100000 main: while tmr0>=250 tmr0= 0 wend freq1= per1 / timer0 freq2= per2 / timer0 if freq1<1 then toggle a0 per1=100 else endif if freq2<1 then toggle a0 per2=200 else endif goto main




Bookmarks