Embedded applications are hard for a large number of reasons, but one of the main issues is memory. Today I want to talk about how our C variables get initialized and a few assumptions we make as we use C to write embedded software.
Let us take a few simple declarations such as we might make every day.
char *string1 = "string1";
const char *string2 = "string2";
char const *string3 = "string3";
char * const string4 = "string4";
char const * const string5 = "string5";
In C99 th
Exactly how long is a nanosecond?
This Lore blog is all about standing on the shoulders of giants.
Back in February 1944 IBM shipped the Harvard Mark 1 to Harvard University. It looked like this:
The Mark I was a remarkable machine at the time, it could perform addition in 1 cycle (which took roughly 0.3 seconds) and multiplication in 20 cycles or 6 seconds. Calculating sin(x) would run up to 60 seconds (1 minute).
The team that ran this Electromechanical computer had o
Epigrams on Programming
Alan J. Perlis
This text has been published in SIGPLAN Notices Vol. 17, No. 9, September 1982, pages 7 - 13.
The phenomena surrounding computers are diverse and yield a surprisingly rich base for launching metaphors at individual and group activities. Conversely, classical human endeavors provide an inexhaustible source of metaphor for those of us who are in labor within computation. Such relationships between society and device are no
If you are going to be writing any code you can probably use all the help you can get, and in that line you better be aware of the "Ballmer Peak".
Legend has it that drinking alcohol impairs your ability to write code, BUT there is a curious peak somewhere in the vicinity of a 0.14 BAC where programmers attain almost super-human programming skill. The XKCD below tries to explain the finer nuances.
But seriously many studies have shown that there is some truth to this in the sense that
I recently got my hands on a brand new PIC18F47K40 Xpress board (I ordered one after we ran into the Errata bug here a couple of weeks ago).
I wanted to start off with a simple "Hello World" app which would use the built-in CDC serial port, which is great for doing printf debugging with, and interacting with the board in general since it has no LED's and no display to let me know that anything is working, but immediately I got stuck. Combing the user's guide I could not find any mention of