Some how, Atmel has managed to pack 10lbs of goodies in a 5lb bag and sell it for the price of a 2lb bag! Good job! So I'm not complaining a bit here. A while >after< completing the survey I thought of another device that might be handy in hardware. Quadrature decoders can be rather intensive on the processor when spun quickly and/or have super high resolution. I started to imagine how having the quad decoding done in hardware would lighten the workload up on the processor and reduce glitches.
Might fit in a 'motion control' line that would keep a few PWM channels and a CAN interface. Could fit right in to automotive apps where they interface with interior controls to adjust seat position per operator settings... Actuator drivers...
1) Have a couple interrupts for say start/stop, direction change, overflow, could copy a bunch of the logic from PWM parts of counters to make adjustable overflow (TOP) values... (might could just integrate into one the counters, or add another)
2) couple bits for count options, i.e.
QDCRA (Quadrature Decoder Control Register A)
.bit QPOL (quadrature polarity) [default = 0]
.......0 Rising Edge
.......1 Falling Edge
.bits CB0, CB1 (Count Bits 0 & 1) [default = ?]
.......0...0 Rising and Falling both A & B (QPOL ignored)
.......0...1 Rising A only
.......1...0 Rising B only
.......1...1 Rising A and B
*this one could help as a free divider...
3) Asynchronous operation to allow count register to stay current even in sleep mode? Use pulses from A & B phases as (optional) clock source.
4) 32 (or more) bit register bank to expand abs position abilities for lead screw driven tables with encoder on motor for example.
I don't know; maybe there's just not enough room left. Shouldn't require any extra pins on most megas though.
In my research on this before posting I found Atmel gave us a couple nice App Notes about interfacing the AVR to a quad decoder/counter; I only skimmed through them but learned that this has already been done in a sense. The FPSLIC is capable of doing just what I'm thinking of, but you will have to download the example code and program the FPGA component of the chip yourself. I guess I need to expand my horizons to these FPGAs now that they have the AVR core integrated. From what I read about the FPSLIC the cost is high and you have to buy a license to play around with them?? I still think a quadrature decoder would be cool thing to have in a couple models of the megas.
I added the pole cause the feature it there...