Archive for the 'Embedded Software' Category

Frustrating Development Tools

I have a complaint (well, to be honest, I have a lot, but I don’t trot them out all at the same time): Why do hardware and development tools vendors insist on using things like Windows .net? It annoys me to no end to have to resort to reading through KB articles from Microsoft just to get something as straightforward as a compiler up and running. It annoys me even more when I can’t get the software running even after jumping through hoops and hopping up and down on one foot while patting the top of my head. Does it really have to be this way?

Continue reading ‘Frustrating Development Tools’

Creating Time-Consistent Loops for Embedded Systems

In an embedded system there are typically four main ways to architect the code: Simple loop, foreground-background, cyclic executive, and RTOS. In this article I will look at how to create a simple main loop with a time-consistent execution period, similar to what a cyclic executive does.

Continue reading ‘Creating Time-Consistent Loops for Embedded Systems’

Ardunio Programming: C++ and Embedded Systems

Ideally we would use assembly language to wring the last drop of performance from small microcontrollers, and at one time that really was the only way to do it. But assembly language programming is tedious and error-prone, and if I never have to wrestle with another assembly language program that would be fine with me.

With the advent of C, things got a lot easier in the embedded systems world. As its creators stated, C is essentially a close relative of an assembler, rather like a macro assembler (there’s a good Google/Wikipedia topic, if you don’t know what a macro assembler is). A C program can be compiled into very tight and efficient code, with an almost one-to-one correspondence to the underlying assembly language that the compiler generates.

But times change, and things are extended, improved, and expanded, and thus C++ arose from C. Over time C++ has become one of the dominant languages in programming, but there are challenges when attempting to use it with a microcontroller. Continue reading ‘Ardunio Programming: C++ and Embedded Systems’

Fear of the Unknown

Humans are strange creatures. In general we like things to be nice and predictable; the same tomorrow as today, and the same as yesterday. I don’t have any hard data to reference, but I suspect that, overall, the human race is rather conservative. We don’t like new things that challenge our current beliefs and knowledge. This is ironic, considering that we now live in a time where change is about the only reliable constant, and new things are appearing at an astounding pace. Continue reading ‘Fear of the Unknown’

RS-232 In the Modern World

In this post I’d like to talk about one of the communications protocols I often reach for when doing an embedded microcontroller design: RS-232.

I’ve watched people sneer at RS-232 as being “too old”, “obsolete”, or “too slow”. I have to wonder how these attitudes arose. What are these opinions are based on? Whatever it is, I don’t think they are based on facts.

Continue reading ‘RS-232 In the Modern World’

Some Thoughts On Software Testing and Software Test Engineering

Software testing is an artform, and, make no mistake about it, a good software test engineer is an artist.

Software testing often gets a bad rap as being “dull”, “boring” or something that the goofy wonk down the hall does, but that the hotshot developers don’t bother themselves with. I used to view testing as an evil necessity as well, until I discovered how challenging it could be.

Continue reading ‘Some Thoughts On Software Testing and Software Test Engineering’

Building Better Device Interfaces

I recently encountered an interesting example how not to implement a control interface for an external device. The devices in question here are two laser products from the same company that do essentially the same thing. The problem is that the software for each of the controller units seems to have been developed in sealed rooms with little or no cross-communication between them. I’m not going to name any names, mainly because other than the command set silliness these are good products, but I’ve suffered enough at the hands of some unknown yahoo (or group of yahoos) that I felt compelled to write up a quick “lessons learned”. I will refer to these two products as controller A and controller B.

Continue reading ‘Building Better Device Interfaces’


Follow Crankycode on WordPress.com

Little Buddy

An awesome little friend

Jordi the Sheltie passed away in 2008 at the ripe old age of 14. He was the most awesome dog I've ever known.