Java Reference
In-Depth Information
Figure 24.4 The Javelin Stamp IDE from Parallax provides a programming interface
to the processor. It offers numerous features including a source editor and a java
compiler. It can test the connection to the module and download programs to the
module. Programs running on the Javelin Stamp send the output of print ()
methods to a window on the IDE. You can also run programs with a debugger.
[16, 17]
and size of objects that you can create without filling up the available memory.
However, the absence of a GC means that the system can respond without the
uncertainty as to when and for how long a GC might run.
Other limitations of the Javelin include a 16-bit maximum data width, even for
the int type (there is no long type). The standard packages only allow integer
math. However, an optional 16-bit FP package is now available [17]. You can
create 1D arrays but not 2D. A number of core Java packages are either missing
(no java.net for example) or truncated.
The IDE for the Javelin uses a serial port on the module to load a program
and to start it. This port differs from the one used with the UART VP and the
I/O pins. Figure 24.4 shows the IDE interface. You can edit programs, compile
them, link (gather up all the classes needed by the processor), and then download
them (via the Program command). While the serial line is connected, the
System.out.println() methods send output to a window in the IDE. There
is also a debugger for testing programs while they run on the processor.
Once the program is loaded into EEPROM, the serial port can be disconnected
and the module runs independently. A reset pin restarts a program when brought
to ground and then released. Sixteen of the 24 pins on the module are accessible
from the Java program for input or output. For example, you can set a pin to
5V, send out a pulse train, or read an analog value. You can use a set of pins to
transmit and receive signals for a serial UART communications port.
Search WWH ::




Custom Search