tips
Something SPECIAL: put variables anywhere
18037 | MPC | tipsByte Craft Limited's compilers support SPECIAL memory: user-declared memory blocks accessed (read and written) by software. The compiler manages allocation for SPECIAL memory similarly to system RAM and ROM. The result is a seamless integration of off-chip or on-chip memory resources into C language programs.
When is a branch not a branch?
Submitted by Kirk Zurell on Tue, 2007-09-25 19:45. C6808 | RS08 | tipsI recently got an interesting code sequence out of the compiler.
Neat XOR trick
Submitted by Kirk Zurell on Mon, 2007-09-24 13:20. tipsThis is a neat trick using XOR, the most mysterious of the logical operators. Best of all for embedded, it requires no temporary locations.
//swap two values in place
if(x < y)
{
x = x ^ y;
y = y ^ x;
x = x ^ y;
}
Et voila!
Low Cost, Low Speed A/D conversion for Embedded Systems
tipsI have often used the converter circuit shown here in embedded applications, to fill the need for a low-cost variable-resolution A/D converter. The circuit is simple to implement; it requires only two resistors and a capacitor.
Hints and Tips
debug | debugging | heisenbug | hints | tipsThese sections present helpful tips and notes not included in general documentation.

July 2008: