I’m trying to generate a 20kHz clock signal without using PWM since I’m already using those as PWMs at 1 Mhz, and until recently I didn’t realize that different pwms can’t run at different frequencies.
Bit banging won’t work for me since other code needs to run at the same time as this signal is generated, so i can’t have the processor stuck in a loop all the time. I tried setting up an interrupt using RLP to flip the bit but it’s too slow, the highest speed i could get to is about 12kHz.
I’ve been trying to figure out if i can use any other features on the board to generate a clock signal. From what I can tell, SPI, I2C, and MCI require me to constantly feed data into them in order for them to output their clock signal. If I could get around this, it seems like I can set any of their clock speeds to match what I need. I can’t have the processor feeding data into those peripherals constantly (unless theres a very efficient way of doing this that I don’t know of) or else the processor will be unavailable for other things. If theres a way to set up a UART to constantly send the same byte then I could use that, but as far as I can tell if need to keep providing the byte.
Any suggestions on how I can do this? I’m using a Fez Mini. Thanks,