Avoid dealing with real hardware…if you can
Posted by benoit on 15 Feb 2007 at 05:54 am | Tagged as: embedded, ramblings
Since I’m an embedded engineer, I deal with hardware devices…Serial based devices, ethernet devices, wireless devices, if just never ends…
Did I mention I also have to write the PC drivers that talk to those devices? Here is a dirty little secret: Dealing with real hardware is a royal pain!
- You have to find one
Early prototypes can be difficult to come by. It might be an expensive piece of equipment that belongs to a different department or partner. It might be something from long ago which got put in “storage”. There goes an hour or two…
- You have to hook it up
Sometimes, it’s easy…Plug in the ethernet cable, and you’re done. Other times, it is a nightmare… Solder a couple of wires from the board to the RJ-11 jack, hook that up to the data converter, which is connected on an RS-485 daisy chain which hooks to the RS-485 to RS-232 converter, hooked to the PC. For some strange reason, we can’t seem to communicate. See more hours fly by…
- You have to configure it
Sometimes you are lucky, and the equipment does not require configuration, but more often than not, you need to configure it. This might mean finding the configuration software, reading the manual, figuring things out. Where did my day go?
Since I have personally experienced all of these things (occasionally all at the same time), I have come to the conclusion that if I don’t have to deal with real hardware, I should avoid it.
Of course, I still need to work on those PC drivers. What is my secret you ask? I write a hardware device simulator! I will invest one or two days to do a quick and dirty simulator. Just a console application with a text configuration file and no UI. Then it’s done and I know I will save time down the road.
Don’t get me wrong, sometimes you just plain need the real hardware, especially when you want to test that your system works correctly. But often, if you have a simulator that behaves 80% like the real hardware, it will be good enough for your purpose.
Case in point: We have to reproduce a customer’s setup, which has 20 devices in it. It would be a huge time sink for us to set up the real hardware, not to mention the cost involved. Using a device simulator on the other hand, makes it quick and easy.
Leave a Reply
You must be logged in to post a comment.