How-to articles about the C programming language.

How Endianness Works: Big-Endian vs. Little Endian

Some human languages are read and written from left to right; others from right to left. A similar issue arises in the field of computers, involving the representation of numbers.

How to Use C's volatile Keyword

The proper use of C's volatile keyword is poorly understood by many programmers. This article will teach you the proper way to do it.

 

How to Preserve Non-Volatile Data Across Software Versions

 Printable PDF

The format of non-volatile data may change with a new version of software. Carefully planning data layouts and using data version numbers can make these upgrades easier.

How to Define Your Own assert() Macro for Embedded Systems

 Printable PDF

Embedded systems programmers often value the assert() macro. This article explores the underlying definition of this handy macro, to show you how to roll your own.

How and When to Use C's assert() Macro

The assert() macro is one of those simple tools that would not seem to merit an entire article, but I have come across an alarming number of engineers who have not heard of it or do not use it.

How to Use Strings to Internationalize C Programs

 Printable PDF

Products destined for use in multiple countries often require user interfaces that support several human languages. Sloppy string management in your programs could result in unintelligible babble.

How to Implement Internet Protocol (IP) in C

The Internet Protocol (IP) is the glue that holds an internet together. Here's a compact implementation of the IP layer for embedded C programmers.

Fast Accurate Memory Test Code in C

If ever there was a piece of embedded software ripe for reuse it's the memory test. This article shows how to test for the most common memory problems with a set of three efficient, portable, public-domain memory test functions.

How to Calibrate Mechanical Inputs in Software

 Printable PDF

Embedded software developers operate in a perfect digital environment but must interact with the imperfect analog real world. To do this it's essential to know how to perform calibration of inputs and sensors.

How to Implement TCP/IP and UDP/IP for Embedded Systems

If your embedded system is on a network, the key question is not will you include TCP/IP but which subset of the Internet Protocol suite will be supported in your product.

Pages