Use of clock lines

21 Dec 2010

For one project I need a digital clock at a frequency of around 10KHz but ideally it should be variable. Although this can be easily programmed using a digitalout pin set and reset in a timed loop I wonder if using the clock function on one of the serial ports, for example SPI. If I define an SPI interface but do nothing with the inputs and outputs will the clock just run happily without issues?

Thanks for any advice

 

Allan

21 Dec 2010

Not the SPI port. It's clock will only toggle when you write out data, otherwise it stays high or low depending upon it's mode. The PWM outputs are probably be more suitable.

21 Dec 2010

Thanks that is just the sort of information and advice I was looking for. I dont have good access to a scope over the break so might have missed this.