16.0083 MHz crystal with Atmega8

Hi, I am a newbie to arduino and to the microcontrollers too. I am trying to build a cheap Arduino NG clone on a breadboard with atmega8, purely for educational/learning purposes. I seem to get everything right up to this point, using another Atmega8 with V-USB (http://www.obdev.at/products/vusb/index.html) for USB UART bridge, and everything else. The problem I have now is that surprisingly I can't find any 16MHz crystals on any local store.. I have 4MHz, 8MHz, 12MHz and the closest I got is marked 16.0083 MHz. So, can I somehow use the 16.0083 MHz crystal and live with that? Can I do this with default bootloader for NG or would I have to compile one with different F_CPU value? And if I do that, would I be able to upload sketches with the UART bridge or use the UART for communicating with any PC while running the sketch?

Any help will be appreciated.

You can use that, your system will just run a little fast - 0.05% fast. You may notice some affect if you are running high speed RS232 comm's. Everything else is based off the system clock, such as SPI and I2C, so everything else will just sync to that.

Go to www.dipmicro.com & order some 16 MHz crystals, 22 pF caps, 100nF caps, 10K resistors, be ready for your next experiment. Inexpensive shipping too.

Thanks for the reply. So, would I need to recompile the bootloader with new F_CPU or just use the original one?

Also, I cannot order online as I live in a country where most shipping services either never reach or take ridiculously long time. I got all the caps and resistors already, only the crystal got me. But if I wait a I might be able to get correct crystals when the local stores replenish their stocks. But I don't know how long that will take.

Bangladesh? Sorry, I didn't notice that. https://www.cia.gov/library/publications/the-world-factbook/geos/bg.html I would have guessed you'd be able to purchase from India rather quickly. Reality says otherwise I guess.

You could live with the marginally faster speed as is. I really doubt the 0.05% difference will be noticable. If it is, adust the boards.txt entry, will get pulled in when your sketch compiles.

Thanks. Going back to the breadboard now. :)