I've implemented frequency hopping recently using just an external 32.7khz crystal on the 328p (which by the way works nicely) and was wondering if I can run my existing nodes on a setup like that.
We've speculated from time to time here whether one can just map the rfm69's rc oscillator to one of the DIOs, hook that up to the 328p async timer 2 input and use that as low power oscillator. Sure enough frequency stability is not an issue - that would work provided you send a packet to sync maybe every 8 minutes.
However battery consumption is bad: 10uA where the XTAL solution hovers around 1uA. A no-go from my perspective. So for a sync'd solution it seems at a minimum you need to throw in the 32.7khz XTAL.
Joe
I've used a 10ppm watch crystal for exactly that purpose (although with xmega parts). The part number I used was Abracon ABS25-32.768KHZ-6-1-T. Accuracy is very good, less than +/-1 second a day, and in a nice surface mount package.
http://www.digikey.co.uk/product-search/en?keywords=ABS25-32.768KHZ-6-1-T
I'm surprised using the clock out of the RFM69 is as low as 10uA! ;-)
Mark.
QuoteThe part number I used was Abracon ABS25-32.768KHZ-6-1-T. Accuracy is very good, less than +/-1 second a day, and in a nice surface mount package.
http://www.digikey.co.uk/product-search/en?keywords=ABS25-32.768KHZ-6-1-T
Yeah - I still had a couple of these (http://www.digikey.com/product-detail/en/ecs-inc/ECS-.327-12.5-34B-C-TR/XC1968CT-ND/3927447) lying around here and they worked great to prototype: Once you remove a Moteino's resonator these fit right onto the resonator pads.
Unfortunately - and just as your part - this requires a 12.5pF load capacitance, which means added caps according to 328p spec. And Max ESR also seems potentially out of spec.
Anyway they work well and the 60ppm inaccuracy against my esp8266 gateway crystal provided just enough incentive to get the automatic drift-compensation to work. I now send about one packet per 15 minutes to keep sync once calibrated. I could do longer - but then the potential impact of temp changes at low temperatures mean you need to recalibrate when temperature changes too much between packets, so 15 minutes seems ideal.
I have to say though Timer 2 in async mode is a pain to deal with. That the interrupt flags are transmitted from timer to 328p only some time after TCNT2 for example. Grrr, More gray hair :)
Joe
That's a nice small SMD package!
Getting the capacitance right is essential for good accuracy. The processor will have some capacitance on the XTAL pins internally and should be documented in the spec. I had to add two additional 6pF caps for the xmegaE5, I put the 9pF caps on it by accident and it was out by over 5 seconds a day!
The asynchronous timers are a bit of a pain in the xmegas too due to the clock domain synchronization.
Mark.
I think the AB18x5 RTC purposely eliminates the caps so that the XTAL runs fast. This way they can dither the counters to get overall +/-2ppm solution.
Tom