On Fri, Oct 29, 2010 at 06:58:23PM -0400, Stephen Wille Padnos wrote: > > > Now an AVR based doohickey that can have internal HAL-like signal > connections between its peripherals - that would be something :)
That's where using an ATxmega AVR comes to the fore. They have up to three quadrature encoders, IIRC, as well as interrupt inputs, analogue comparators, and four times higher ADC resolution than their predecessors. _And_ they have run-time programmable routing of these events. E.g. Choose a pair of pins to feed into a quadrature encoder, then route the output to one of the hardware counters, then use that in your PID computations. With 32 RISC mips, there's grunt to burn. I don't bother with 'C' on the ATtiny devices, since it's easier to get the most out of their limited resources in assembler. Especially if coding in 'C', The ATmega48 is cheap enough to use as a minimal device, and the 88 and 168 are pin-compatible upgrades, if the application grows like topsy. (That's not an xmega, so no hardware quadrature encoders. A couple of edge sensitive interrupts and a few lines of code are needed. It is best to count only full quadrature cycles, to avoid burning up cpu cycles in the event of mechanical oscillation about an encoder edge.) There are component macros for xmega16a4 and xmega128a1 in Eagle 5.10.0 Light, so it's tempting to put an xmega16a4 on a small board with at least one H bridge. (The xmega16a4 is available in 44-pin TQFP, which is dead easy to hand solder, using solder-holding a hollow tip. e.g the Plato C-0551, which fits the Weller soldering iron.) It would be worth half an hour to put together an Eagle macro for one of the 64-pin TQFP devices. (e.g. a D3, instead of the A4) They have 50 I/O, not just 34, and are still not hard to hand solder. They're also still under US$10 from Digikey. If we do get carried away on a communal project, along the way, I can offer to help sort out makefiles and custom linker scripts, and assist with any gnu toolchain issues. Oh, hardware design and layout are old friends too, so if the project is interesting enough, it would be fun to be involved. This is tending ever so slightly OT, so if the thread at some stage is considered to be noise, we could move it to the avr-chat mailing list, where it is 100% on topic. There's little other traffic there, most of the time, so we'd be quite comfortable. Erik -- Give a man a computer program and you give him a headache, but teach him to program computers and you give him the power to create headaches for others for the rest of his life. - R. B. Forest ------------------------------------------------------------------------------ Nokia and AT&T present the 2010 Calling All Innovators-North America contest Create new apps & games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
