Is the clock speed critical?

USB AVR Programmer and SPI interface. Adafruit's USBtinyISP.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
nsayer
 
Posts: 59
Joined: Thu Aug 08, 2013 10:45 am

Is the clock speed critical?

Post by nsayer »

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?

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Is the clock speed critical?

Post by adafruit_support_rick »

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.

User avatar
nsayer
 
Posts: 59
Joined: Thu Aug 08, 2013 10:45 am

Re: Is the clock speed critical?

Post by nsayer »

Found this in the firmware README:
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.
So... that sounds an awful lot like a "no." :)

User avatar
adafruit_support_bill
 
Posts: 88088
Joined: Sat Feb 07, 2009 10:11 am

Re: Is the clock speed critical?

Post by adafruit_support_bill »

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.

User avatar
nsayer
 
Posts: 59
Joined: Thu Aug 08, 2013 10:45 am

Re: Is the clock speed critical?

Post by nsayer »

Yeah. Personally, I draw the line at (or above) re-doing hand-optimized assembly code. :D

Locked
Please be positive and constructive with your questions and comments.

Return to “USBtinyISP”