You can offset from PORTE or PORTF.
For example:
And you need 2 lookup tables, one for PORTE another for PORTF.Code:for Cycles = 1 to Pulse_cnt ' Set base pulse count cycles for IR lEDs ( 9 x 26uS) -17us = 217us IF T<9 THEN PORTE.0[PortOffset] = 1 ' Set IR LED High pauseus 2 ' Remain on for 9uS (adj) PORTE.0[PortOffset] = 0 ' Set IR LED Low pauseus 9 ' remain off for 17uS ( adj) ELSE PORTF.0[PortOffset] = 1 ' Set IR LED High pauseus 2 ' Remain on for 9uS (adj) PORTF.0[PortOffset] = 0 ' Set IR LED Low pauseus 9 ' remain off for 17uS ( adj) ENDIF next Cycles




Bookmarks