tips

MPC

Something SPECIAL: put variables anywhere

| |

Byte 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.

C6808

When is a branch not a branch?

| |

I recently got an interesting code sequence out of the compiler.

Neat XOR trick

This 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!

Tidbits

| | |

Quick notes about embedded and fuzzy logic.

Low Cost, Low Speed A/D conversion for Embedded Systems



Walter Banks, President

Byte Craft Limited


I 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

| | | |

These sections present helpful tips and notes not included in general documentation.

Syndicate content