Electronic – use a button in place of a clock crystal

buttonclockclock-speed

So basically, I'm wanting to finally get into electronics. A little while ago I bought a few MCP3008 chips and analog pressure sensors. I've been wanting to build an compressed air system with it.

However… I want to avoid using a microcontroller.

I've done a lot of programming in the past, and I tend to like being able to debug things. So I was wondering; Is it possible to replace a clock signal with a simple button? The reason being… I want to slow down the clock so I can manually figure out how to work with the SPI. Possibly using some LED's, buttons, etc and recording the results.

I understand that buttons may need debouncing, etc… but would it work?

For the past hour or so, I've been googling around for an answer, and nothing definitive came up.

After looking at the datasheet for the MCP3008 here:
https://www.adafruit.com/datasheets/MCP3008.pdf

It seems that the minimum clock low/high time is 125 nanoseconds; there's no max listed. Does this mean if I hooked up a debounced button as a clock signal, it would work fine?

Thank you in advance for any help. I apologize if I'm missing something obvious.

Best Answer

Page 4 of the datasheet you posted a link to. Note (3):

Because the sample cap will eventually lose charge, effective clock rates below 10 kHz can affect linearity.

It then says "Refer to Section 6.2" which is on page 22.

From that section it says that the clock rate doesn't need to be constant for conversion, but at effective clock rates lower than 10kHz the charge on the sample capacitor leaks away and the result is inaccurate.

Basically this could work, but you won't get a sensible conversion result.


I'm tempted to just say, if it is just for debugging, "Try it and see". But don't do it for anything sensible.

Related Topic