-->
Page 1 of 1

Bit banging an arbitrary clock?

PostPosted: Thu Jan 05, 2017 9:43 pm
by ElementCarbon12
I'm trying to generate a clock a little over 11MHz. It doesn't look like I can pull it anywhere from the ESP-12E module so I want to see if it's possible to bit bang something and still have enough processing for other things.

Here is the backstory. I'm looking into using an SGTL5000 for an audio project because it looks like it supports both stereo line in and line out. But the chip wants an extra master clock that is much higher than the bit clock already generated on the I2S interface. I'm trying to see what I can do in software before looking for other options or scrapping this design altogether.

Re: Bit banging an arbitrary clock?

PostPosted: Fri Jan 06, 2017 8:43 am
by martinayotte
I doubt you can bit banging 11Mhz with enough precision and keep some CPU bandwidth for other tasks.
You are better using a external oscillator or crystal.

Re: Bit banging an arbitrary clock?

PostPosted: Fri Jan 06, 2017 10:16 am
by ElementCarbon12
The main issue is that this fast clock needs to be a multiple of the I2S BCLK signal so I can use is as a master clock required by the codec I'm trying to use.
Looking back at the documents, I'm wondering about the PWM capabilities. The documents are not very clear on what range of frequencies it can generate and I've been reading conflicting info online.