On Feb 3, 2013, at 8:19 PM, Michael Torrie <[email protected]> wrote:

> On 02/03/2013 01:51 PM, Levi Pearson wrote:
>> Arduino is awesome to introduce people to embedded programming, but
>> experienced programmers ought to branch out and see what else is available.
> 
> I may look down that road eventually.  However, Arduino itself is not
> locked to any particular platform or microprocessor.  It's been ported
> to a variety of chips with great success.  On Arm, for example, you can
> do ISRs and interrupt masking as you describe.  There's nothing inherent
> in Arduino that limits this.  You're free to use as much of the
> abstraction framework or as little as you'd like.  I for one am not
> interested in the nitty gritty details of setting registers to get a
> read on a signal on a wire.

Well, those details are usually not all that involved. I whipped up a set of 
macros that make it easy to read and write register fields, and the registers 
are typically mapped into a regular memory region. If you are not concerned 
about portability, you can even convince your compiler to map the device 
registers into a C structure. Many vendor-provided SDKs do just that, though I 
prefer the portability and explicit nature of the macro approach.

Part of the fun of coding on a microcontroller, at least for me, is to strip 
away the typical OS abstractions and program the chip to do exactly what I 
want. It's like a return to the early days of the PC, where there wasn't a 
massive pile of software between you and the CPU, and to get anything 
interesting done you had to PEEK and POKE the magic memory-mapped peripheral 
locations yourself.

        --Levi

/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/

Reply via email to