14

As a beginner programmer I've only worked with programming computer based applications, but a question has been coming to my head very often since I started programming and I can't get it answered properly.

Machines don't act on their own, that's the programmer's job, he tells it what to do and when to do it, but my curiosity lies beneath computers. I'll take the examples of an ATM software on this post but keep in mind there are many others such as a washing machine display, or a TV, mobile phone, you name it.

How exactly is the software for these kind of machines built? I imagine it can't be identical to computer-based programming. What language do they use to make such things work and how does one get the job done? Are there programmers specialized on this kind of programming? What is the process of making these machines come to life?

Bugster
  • 4,013
  • 8
  • 37
  • 44
  • 8
    http://en.wikipedia.org/wiki/Embedded_programming – jfrankcarr Mar 09 '12 at 21:27
  • Thank you for the link. I had no clue about this until I found your link. Also why was this downvoted? What's wrong with it? – Bugster Mar 09 '12 at 21:32
  • So now that you have more information, you may want to focus your question. – JeffO Mar 09 '12 at 21:34
  • 3
    @ThePlan People tend to downvote questions that are not of the type "How do I solve this particular problem?" – CFL_Jeff Mar 09 '12 at 21:35
  • 3
    Although people may downvote for several reasons and are _not_ required to explain themselves, the tooltip on the downvote arrow reads: "This question does not show any research effort; it is unclear or not useful" - I think the first sentence is very close to a sufficient explanation for the downvote you received, [please do at least some minor research](http://programmers.stackexchange.com/questions/how-to-ask) before asking on Programmers. – yannis Mar 09 '12 at 21:42
  • 9
    I say cut him a little slack. It's difficult to research embedded programming when you don't know the term. – Karl Bielefeldt Mar 09 '12 at 22:42
  • @KarlBielefeldt Not [too hard](http://en.wikipedia.org/wiki/Automated_teller_machine#Software) though. However I was mostly responding to OP asking clarifications on downvotes, not so much commenting on the question itself. – yannis Mar 09 '12 at 23:00
  • Note that ATMs are a particularly bad example and different from what you mean - see Bruce's answer. – Michael Borgwardt Nov 23 '12 at 10:36

4 Answers4

15

It's known as Embedded Systems or Embedded Software Development. I'd recommend this book if you want to know more about the general process without going too much toward any one architecture. It even gives you a real time operating system to play with.

Embedded Programming is very architecture dependent. You are typically working under serious response, program size, error recovery, and cost constraints. For instance you might have a z80 (8 bit processor, they are everywhere) and perhaps a couple of kilobytes of memory to play with. You might only have a ROM to tell the system what to do and how to set up the program. It might also only be a couple of kilobytes in size. Why so little memory? Well if you manufacture 15 million of the little suckers; every penny becomes $150,000.

I'd suggest fiddling with something like Arduino or Scribbler Robots if you want to learn more by doing. As far as Languages go, C, C++ and Assembly are the typical set though Java can be used (and was in fact originally designed for this domain if you can stomach that thought) Others could definitely be used as well, I've known of Lisp and ML both being deployed.

Learn as much as you can about architecture as well because like I said, memory allocation and bitwise operations start getting really important.

  • Thanks, this answer is my choice of an accepted answer because it explains the embedded systems in a nutshell and also gives me a book option. – Bugster Mar 09 '12 at 21:46
  • 4
    @ThePlan - the nice thing about embedded is that you can test them. If you only have 3 inputs and 3 outputs it's pretty easy to confirm what works. You don't have to test for what happens if they run your code under Hebrew Windows XP on a Turkish keyboard with an Uzbekistan version of Flash. – Martin Beckett Mar 09 '12 at 22:49
  • @MartinBeckett: You have somewhat trivialised the difficulty of embedded systems development. The last one had a realtime response requirement meansured in nano seconds. It was untestable - the only way to know it was correct was to prove the code was correct by design and review. Unlike the cowboys who code user applications thesedays, whose defects are fixed by an online update. – mattnz Mar 10 '12 at 03:40
  • In addition these systems may be required to operate for years or even decades without human or other access. –  Mar 10 '12 at 03:44
  • @mattnz - it's not always easy but it is at least do-able. In cowboy desktop code, on top of an OS you can't fully test, written with a toolkit you can't fully test with 1000s of other apps potentially interacting with it, plus random actions of users - it's pretty much hopeless. – Martin Beckett Mar 10 '12 at 04:46
5

There is definitely an embedded angle here. But these days you are seeing more and more advanced platforms on what would traditionally be called embedded devices. For example, LG and Samsung TVs both now have APIs and app stores. Sony TVs will be running Android.

Wyatt Barnett
  • 20,685
  • 50
  • 69
  • 3
    ...and some ATMs run Windows. When they blue-screen, the pictures usually end up on http://www.thedailywtf.com . And in my city, the local public transit sells monthly passes from kiosks. I once saw one that got stuck booting - it was running Windows 2000 (this was about 6 months ago)! – FrustratedWithFormsDesigner Mar 09 '12 at 21:34
  • @FrustratedWithFormsDesigner -- thanks, don't do ATMs here so I'm not aware what they are doing . . . – Wyatt Barnett Mar 09 '12 at 21:37
  • ATM = Automatic Teller Machine. AKA Bank Machine. AKA The machine that lets you take money out of your account instead of having to go to a teller. – FrustratedWithFormsDesigner Mar 09 '12 at 21:40
  • I know that, just don't work with them as anything but a customer . . . – Wyatt Barnett Mar 09 '12 at 22:23
4

I've seen two ATMs opened up in Denver, Colorado. Both were (then) Compass Bank ATMs, and both were Windows XP under the hardened case. I did get to ask the tech what, specifically, one of them ran, and he said something like "XP Embedded".

So, I bet ATM programming is less like embedded programming these days, and more like standard Windows development.

Bruce Ediger
  • 3,535
  • 16
  • 16
  • Not just "these days". ATMs used to run Windows NT 3, or OS/2. And the UI you see is most likely to be HTML pages displayed by Internet Explorer. The Programming language can be anything - I've worked on a Java system that replaced one written in VB. ATMs really are just regular PCs with some unusualy peripherals and drivers. – Michael Borgwardt Nov 23 '12 at 10:35
3

These types of devices are programmed using embedded programming. This is a very low-level type of programming that deals heavily with logic and gates.

If you are interested in learning embedded programming hands-on, I would recommend looking into arduino.

CFL_Jeff
  • 3,517
  • 23
  • 33