ok thanks darrel is there another coding method to solve this
Code:
T = 0 ' Ensure 0
For T = 0 to 10 ' Select IR LED for Pulses
LOOKUP2 T, [32,32,33,34,35,36,37,38,39,640,641],PortOffset ' Offsets from Port A to point to PortE(32- 39) & PortsF (640,641) ( value of offset relats to Port bits in mem map of chip)
Cycles = 0 ' Set to 0
if T = 0 then
Pulse_cnt = 38 ' add 1ms(adj) Header pause ( pulse on time ) before start of IR1 only so to show its the its the Start of the scan
else
Pulse_cnt = Pulsetmp ' restore value set from Volts get routin when changed by pulse T = 0
endif ' add 1ms(adj) Header pause ( pulse on time ) before start of IR1 only so to show its the its the Start of the scan
for Cycles = 1 to Pulse_cnt ' Set base pulse count cycles for IR lEDs ( 9 x 26uS) -17us = 217us
PORTA.0[PortOffset] = 1 ' Set IR LED High
pauseus 2 ' Remain on for 9uS (adj)
PORTA.0[PortOffset] = 0 ' Set IR LED Low
pauseus 9 ' remain off for 17uS ( adj)
next Cycles
pauseus Pulse_off ' Wait 300us (Adj 276) between pulse bursts and selecting next IR LED
Next T
Bookmarks