Is the clock speed critical?
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- nsayer
- Posts: 59
- Joined: Thu Aug 08, 2013 10:45 am
Is the clock speed critical?
I'm thinking of building one on my own and have a *pile* of 16 MHz crystals. Would substituting 16 MHz for 12 be a problem?
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: Is the clock speed critical?
Shouldn't be. But you'd likely have to modify the firmware to account for the timing differences. I don't know what would be involved in that.
- nsayer
- Posts: 59
- Joined: Thu Aug 08, 2013 10:45 am
Re: Is the clock speed critical?
Found this in the firmware README:
So... that sounds an awful lot like a "no." :)The software is written for an AVR clocked at 12 MHz.
At this frequency, each bit on the USB bus takes 8 clock cycles, and
with a lot of trickery, it is possible to decode and encode the USB
waveforms by software.
- adafruit_support_bill
- Posts: 88088
- Joined: Sat Feb 07, 2009 10:11 am
Re: Is the clock speed critical?
So at 16mHz it would be 6 clock cycles. Without looking at the code, it;s hard to say what would be involved in hacking the timing. But for the price of a 12MHz crystal, it's probably not worth the trouble.
- nsayer
- Posts: 59
- Joined: Thu Aug 08, 2013 10:45 am
Re: Is the clock speed critical?
Yeah. Personally, I draw the line at (or above) re-doing hand-optimized assembly code. :D
Please be positive and constructive with your questions and comments.