yes you may :
I think I'm nearly there with this method (DCD)Code:Main: serin portc.7,6,lowbyte 'sit and wait for an input serin portc.7,6,highbyte 'sit and wait for an input outdata.lowbyte = lowbyte outdata.highbyte = highbyte if outdata = 0 then ' pause time according to turning on or off Tptime = 0 else Tptime = ptime 'from eprom endif FOR LoopCount = 1 to 16 bitmask = (outdata & ((DCD loopcount) - 1)) 'find the dec number corresponding to the first pin to switch on If (outdata & (DCD loopcount) - 1) <> (outdata & (DCD (loopcount - 1)) - 1) Then ' If we sent it just now don't bother again GOSUB SyncSend ; send the data pause TPtime 'pause for a bit endif NEXT LoopCount GOTO Main ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ;----[Send synchronous data]------------------------------------------------ SyncSend: SHIFTOUT SDout, SClk, 1,[bitmask\16] HIGH Strobe ; strobe the shift registers latches @ NOP ; hold Strobe for 1uS LOW Strobe ; Strobe idles LOW RETURN
I would love to know if there is a more efficient way of doing it.
Jerson, could you expand on what your method does?




Bookmarks