> Single source-code for multiple CPU architectures is unlikely to be > worthwhile for any but the simplest applications, due to differences > in peripherals. Thanks - you're helping me think. This is "obvious", but I wasn't thinking along the right direction. I guess what I'm really looking for is any techniques that people have found useful for "abstracting" microcontroller peripherals so that the main body of code can be made more readable while hiding the details in mcu-dependent definition files. As an obvious but useful example, we make extensive use of a value defined as "ONESEC" which is the number of 'ticks' (incremented by a timer interrupt) that occur in one second. On most platforms, this was a constant, and usually 1000 (the "clock" was kept in milliseconds), but I think I recall one platform where the clock was an RC circuit of dubious accuracy and ONESEC was redefined to a variable that was MEASURED (by crystal controlled CPU) at startup time. BillW -- http://www.piclist.com hint: PICList Posts must start with ONE topic: "[PIC]:" PIC only "[EE]:" engineering "[OT]:" off topic "[AD]:" ad's