I can see you have opted for a 12 MHz ceramic resonator instead of a crystal.
What type of resonator have you used and is it accurate enough according software timing requirements?
This is from bootloaderconfig.h
Code:
#define USB_CFG_CLOCK_KHZ (F_CPU/1000)
/* Clock rate of the AVR in MHz. Legal values are 12000, 12800, 15000, 16000,
* 16500 and 20000. The 12.8 MHz and 16.5 MHz versions of the code require no
* crystal, they tolerate +/- 1% deviation from the nominal frequency. All
* other rates require a precision of 2000 ppm and thus a crystal!
* Default if not specified: 12 MHz
*/
So it requires a precision of 2000 ppm which is the same as 0.2%. Many ceramic resonators doesn't offer this kind of accurancy (often they are 0.5%) and as a result you could run into timing issues while operating or bootloading the device.
I think you should also consider using an LDO instead of diodes since you use the ADC and an unstable power supply could give wrong ADC readings. Fortunately the input doesn't have to be read with very high resolution since there's not that many steps on the resitor ladder for the switches. But each time you press a switch the current consumption increases which will result in a small voltage drop.
But of course a misreading of the input switches could just result in a volume up instead of volume down command. Not a major error, unless the music is turned up really loud.
http://avrusb.wikidot.com/hardware
The missing regulation may be problematic for analog circuitry or if you use the ADC. It depends on the power consumption of the device and the PC side voltage supply stability.
Bookmarks