
LoadLED:
      mov   dptr,#MemoryAddress
      mov   r2,#LatchesCount
      clr   LatchPin
Loop: 
      movx  a,@dptr      ;2 cycles
      inc   dptr         ;1 cycle
      mov   sbuf,a       ;1 cycle
      nop                ;1 cycle
      nop                ;1 cycle
      nop                ;1 cycle
      nop                ;1 cycle
      djnz  r2,Loop      ;2 cycles = 10 cycles per loop
      setb  LatchPin
