I don't quite understand. > I have 8 outputs. I read them with timer17 at 1ms intervals.
Do you want to read back the output values ? The schematics is too small to decipher any IC types, This outputs seem to be connected said 8-bit shift register. But as said, I can see if as inputs or outputs.
> I have 14 inputs. I read the inputs with timer2 at 1ms intervals to see if there are any inputs. > I have 8 outputs. I read them with timer17 at 1ms intervals.
Why not read all at once, in the same routine ? I would use a SysTick interrupt for that, configured to 1ms.
And if you need to care about timing and consistency, add latches to the input. Otherwise inputs might change in the middle of the read-out process.
> I need a 500ms time delay in such a system, but unfortunately I cannot create this delay and my whole system is blocked. When I set and use a 500ms time interrupt with timer15, the system is blocked.
Sounds like you want to wait inside a (500ms) timer interrupt handler routine for that timeout. This is a bad idea, as it blocks other interrupts.
This can be done by counter values (variables) from within the SysTick interrupt as well. Define a global (volatile) variable, and decrement it by 1 in the SysTick handler when not zero. When the variable is back to zero, the timeout has expired.
Well, that was totally missing from your initial post & schematic!
So, for each 3-bit pattern that you clock into the right-hand shift register on 'x', you have to clock an 8-bit pattern into the left-hand shift register on 'DATA' ?
What, exactly, are you trying to achieve by that?
It seems excessively complicated!
Again, I think you need to take just getting the LEDs to work as a project on its own before doing anything else!