Page 1 of 1
VUSB working at 8MHz?
Posted: Thu Sep 13, 2012 1:43 pm
by AKSpi
Does the VUSB code and AVRDoper work at 8MHz source? What code changes do I need to make for that? I am not able to get Atmega8-16PU, I am getting only the -8PU versions of the chip from my country's electronics store.
Thanks!
[moderator team] Deleted your duplicate post [moderator team]
Re: VUSB working at 8MHz?
Posted: Thu Sep 13, 2012 2:41 pm
by ulao
I can not say for sure if 8mhz will work, have to check the docs on that but the setting for speed is in your make file. If you don't have a make file it depends on the IDE you have.
Re: VUSB working at 8MHz?
Posted: Thu Sep 13, 2012 10:34 pm
by AKSpi
I tried changing the numbers in the makefile, but I get errors saying accepted values are 12, 16 and 16.5 MHz. Here is the line in usbconfig.h:
#define USB_CFG_CLOCK_KHZ (F_CPU/1000)
I tried changing the divider to 500 to get the numbers right, but USB device is not recognized. I guess I need to change some of the calculations??
Re: VUSB working at 8MHz?
Posted: Fri Sep 14, 2012 2:21 pm
by Coda
I think you will be out of luck there, there are ASM source files that are included into the project depending on the speed that you have defined. If I remember correctly reading that 12Mhz is quite tight to get the timing right. Even if you do manage to get 8mhz working, how many cycles will be free to do what you need? That's the question.
However, there is another possibility. Why not just put a 12mhz resonator/crystal on the 8mhz part anyway, and see if it's ok with the overclock? I can't imagine that the silicon won't handle 12mhz as all parts that are not low power versions (or extremely old versions) can handle 20mhz officially on 5V (and those can be overclocked too).
What country are you in?