Again, some sample waveforms. First, a sine wave at 10kHz. Because of how I implemented it, using delay_microseconds, the fastest sine wave I could get with a non-zero delay was 32kHz. Removing the delay statement altogether got it to 153kHz.
For the next step, I want to use the 32 bit port, but more especially to use the real power of the XMOS chip, but setting precise times for setting the values on the ports.