oscillator for atmega 16u2 usb

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hey, I'm new to pcb design and currently ponder about what oscillator to use for my atmega16u2 usb board. I see that most people use a crystal, and this would be the safe way to go.

Can someone explain to me if a simpler (and cheaper) option, which would be a ceramic oscillator, would suffice?

It only needs to follow usb hid protocoll reliably. I also use pwm, but only for led dimming, no matrix or other more precise stuff.

I havn't found anything on ceramic oscillators with atmega usb and would be grateful if someone here can answer this question.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

For a one off, I'd just go with a crystal. There's not a huge difference in cost. If you were making zillions of boards, then you'd want to look more carefully at the cost. That said, with USB you want the precision. I'm not sure of the USB specs, but a crystal is around 100ppm vs a resonator at 500000ppm (hopefully I got my zeroes correct) nevertheless, there is a substantial difference.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Using your keyword ppm, I was able to find a summary of USB specs here: www.beyondlogic.org/usbnutshell/usb2.shtml

Another area which is often overlooked is the tolerance of the USB clocks. This is specified in the USB specification, section 7.1.11.

  • High speed data is clocked at 480.00Mb/s with a data signalling tolerance of ± 500ppm.
  • Full speed data is clocked at 12.000Mb/s with a data signalling tolerance of ±0.25% or 2,500ppm.
  • Low speed data is clocked at 1.50Mb/s with a data signalling tolerance of ±1.5% or 15,000ppm.

This allows resonators to be used for low cost low speed devices, but rules them out for full or high speed devices.

At the standard 1 kHz polling rate for hid class I think (if i got it right, not perfectly sure) one needs to take high speed, only windows default 125 Hz allows to stick to low speed. So crystal seems inevitable.

Anyway, thanks for your answer, now i know my way.

 

P.S.: I found 5000 ppm ceramic resonator accuracy stated on this site www.ecsxtal.com/quartz-crystals-vs-ceramic-resonator

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There’s a mindshare book on usb that covers just about anything you need to know about USB. Worth a read if you want to know about the nuts and bolts of usb. A bit of googling should yield a pdf of the usb 2.0 edition.

I’m happy my comment prompted you to do some research and to make an informed decision. I definitely got the zeroes wrong for the resonator ppm!