Serial I/O Hello Example


This example demonstrates how the System.out stream may be directed to a serial port on an aJile board without changing the Java source program.

Use JemBuilder to open the project (.AJP) file and open the JVM0|Drivers subtree. Click on the COM1 branch to see the checkbox which ensures that System.out is sent to the aJile serial port.


1. JavaDoc

The JavaDoc for the example program can be found in the doc directory

2. Running the example program on the aJile target board

Apply the power to the aJile board, then attach the board to the host PC using the parallel port cable. Start the Charade debugger. Click on the Reset button and then the Halt button. Execute the script file by clicking File|Execute from the main menu and select the load.sod file in the build  directory. This will cause the binary files to be downloaded to the board.

Open a terminal emulation program like Hyperterminal or Tera Term; configure the terminal program to 9600 baud, no parity, 8 data bits, 1 stop bit.  Also make sure that "local echo" is disabled and that the terminal emulator is not using "hardware" flow control. If you are using Hyperterminal you will have to disconnect and reconnect after changing any configuration options.

To execute the program on the aJile hardware, click on the Run or Go button. You should see the message "Hello, World!" appear within the terminal emulator window, followed by several lines of output containing selected CLDC system property values, then "Goodbye, World!"