Home : Course Map : Chapter 24 :
Chapter 24: Embedded Java: Introduction
JavaTech
Course Map
Chapter 24

IntroEmbeddedJava
In Eng. & Sci
J2ME Overview
Real Time Java
Java Hardware
  Chips
  Cores
  Boards
Javelin Stamp
Javelin Programs
  
   Demo 1
   Listing
   Demo 2  
   Demo 3  

SNAP
   Demo 2
 
Performance
Embed Apps
Exercises

     About JavaTech
     Codes List
     Exercises
     Feedback
     References
     Resources
     Tips
     Topic Index
     Course Guide
     What's New

Although Java first gained fame for applets and then became a popular tool for creating large enterprise services, the developers of Java originally intended it for embedded applications in consumer devices such as TV remote controls and Personal Data Assistants. (See Chapter 1: Java History.)  The term “embedded” generally refers to building a processor into a device, along with its programs in non-volatile memory, to provide specific services needed by that device to operate properly. This differs from a microprocessor in a general purpose computer where a user selects programs to run.

Microcontroller is the most common term for an embedded processor. As processing power has grown and the costs fallen, the difference between a microcontroller and a standard PC type microprocessor is not as clear cut as it once was. In general, though, a microcontroller provides sufficient computing power, along with some specific features such as I/O ports and timers, to operate a device properly while requiring minimal amounts of RAM, electrical power, and other resources.

By embedded Java we refer to a device that holds either a conventional processor that runs a JVM or holds a special type of processor that directly executes Java bytecodes or assists a conventional processor by accelerating the execution of bytecodes. The reasons that device designers would embed Java depend on the particular device but in general Java provides flexibility, interactivity, networking, portability, and fast development of the software for embedded projects.

Today several types of commercial devices do in fact come with Java built into them. For example, over 600 million Java Cards have been sold around the world as of 2004. Several hundred cell phone and wireless devices run Java programs.

Embedded applications typically must deal with very limited resources. A full-blown J2SE application on a desktop with a Swing graphical interface might require at least several megabytes of RAM to run at all and many more if image files and other memory hogging resources are involved.

An embedded environment consisting of a basic processor and a minimal amount of memory presents a challenge to programmers who must fit codes within the limitations of the system while still providing the solid reliability required for a consumer device. A cell phone should never need rebooting!

In this chapter, we give a brief introduction to J2ME (Java 2 Micro Edition), which provides a systematic approach to selecting subsets of packages and classes that fit into small systems with memory resources ranging from a few hundred kilobytes on a basic cell phone to a few megabytes in a PDA or a high-end cell phone. We also look at the topic of real-time Java since embedded systems frequently involve hard real-time requirements.

We then review a selection of Java hardware processors, most of which execute bytecode instructions directly rather than interpret them with a JVM. Some Java processors can run standalone while others act as co-processors to assist primary processors with Java programs.

We look at a selection of Java board systems that include a Java microprocessor and various supporting hardware such as memory and power regulation. One type of Java board is designed like a memory module that plugs into the expansion slot of a carrier board. The carrier boards in turn provide the physical hardware for serial I/O ports, Ethernet connectors, ADCs (Analog to Digital Converters) for measuring analog inputs, etc.

We give an example program that illustrates how to program a Java card to communicate over a serial line to the Java program discussed in Chapter 23. Some of the Java boards can provide for embedded servers that connect a system to the network and allow for control and monitoring of that system by remote clients. We discussed custom servers in Chapters 14 and 15 and so in a second example program we adapt such a server to a Java processor intended for embedded applications.

References & Web Resources

Latest update: Dec. 14, 2004

  
  Part I Part II Part III
Java Core 1  2  3  4  5  6  7  8  9  10  11  12 13 14 15 16 17
18 19 20
21
22 23 24
Supplements

1  2  3  4  5  6  7  8  9  10  11  12

Tech 1  2  3  4  5  6  7  8  9  10  11  12
Physics 1  2  3  4  5  6  7  8  9  10  11  12

Java is a trademark of Sun Microsystems, Inc.