kinda OT: latest fun with Arduino, UI with a single knob/button and screen.

Michael Torrie torriem at gmail.com
Mon Feb 4 08:51:05 MST 2013


On 02/03/2013 10:12 PM, Levi Pearson wrote:
> 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.

Very good points, Levi.  I agree it's cool to strip back the OS
sometimes and do bare metal things.  Ahh PEEK and POKE from the
Commodore 64 days... :)


More information about the PLUG mailing list