Sorry, I completely forgot I posted this. There's definitely something in my sketch slowing it down; the fact that it has to shift in (taking 8 clock cycles) then shift back out (taking another
, and that's after it's run the part of the sketch which reads potentiometer input from two pots and uses the values to set two digital pots, though I think I've worked out how I can avoid that part. I ideally want the 4021 and 595 to communicate directly, i.e. have the byte coming from the 4021 to go straight to the 595 instead of via the Arduino, surely that's doable? Also the SSR's I'm using are... Actually I can't remember right now but I used them in a similar project and there was very little latency with them, so they're not the problem. I can't post the sketch as I'm not home right now, but I know the stuff it's doing before it gets to the shifting process isn't helping.
CrossRoads, when you say use SPI, do you mean an SPI I/O expander or something similar? Is there much difference in speed/coding difficulty between I2C and SPI? As I said, I don't think I need the Arduino before, I'm just using it because I don't know how else to do it. I figured having a high-speed clock (faster than the Uno's, at least) wired to the 4021 and 595's clocks, the data out of the 4021 to the 595 and another, slower clock and maybe a NOT gate to set the latches of the two chips... I don't know, I figured that must be doable, but SPI sounds good. I've only just learnt about it with the digital pots (that I no longer need), I like it, it seems quite straightforward. It does require four wires, though, right? I suppose that's better than just 3 with too much latency or 8 with no latency, though!