HI guys , can i have some input on how to allow this code to send a shorter pulse than 7us , which mean some ASM changes , to allow multi i/o ports which is whats need i think to get a small pulse time
chips running at 32Mhz and best min time i get is about 7us
Cheers
Code:
For T = 0 to 9 ' Select IR LED for Pulses
LOOKUP T, [1,2,4,5,16,17,18,19,20,21],PortOffset ' Offsets from Port A to point to port a and port c I/o ports ( number of offset relates to bits offset in mem map of chip)
Cycles = 0 ' Set to 0
for Cycles = 1 to Pulse_cnt ' Each IR led increments the amount of pulses by 2 for IR LED ID use
PORTA.0[PortOffset] = 1 ' Set IR LED High
pauseus 2 ' Remain on for 2uS
PORTA.0[PortOffset] = 0 ' Set IR LED Low
pauseus 9 ' remain off for 9uS
next Cycles
Pulse_cnt = Pulse_cnt +2 ' increment pulse count by offset of 2 for each IR LED
pauseus 320 ' Wait 350us between pulse bursts and selecting next IR LED
Next T
Bookmarks