Practical
Embedded Java

Using UARTs


A practical engineering approach to using embedded Java in real-world applications.


...



This is the start of a page detailing how to use Universal Asynchronous Receiver Transmitter (UART) hardware.

Useful Serial I/O Files
Get the SystronixUtils package for a ready-to-use javaxcomm serial wrapper.

Setups up all the hardware and gives you input and output streams. Works on the PC and all true Java embedded systems with javaxcomm support.


Serial Echo UART example
SystronixExanpleSerialEcho JAR file

Simple program which sets up JStik or JStamp COM1 to receive serial data and then echo it back out on COM1 and also display its ASCII and Hex values in the Charade console window. This example uses packages.

vm.0 charadeIO active
vm.0 heap monitor active
vm.0 heap monitor active
[TEXTIO.0]->Serial Port Example bab 1.0
[TEXTIO.0]->0x61 a
[TEXTIO.0]->0x73 s
[TEXTIO.0]->0x64 d
[TEXTIO.0]->0x66 f
Here's the Charade output when I typed in "asdf" on a terminal emulator at 115200 baud

 
Systronix® 939 Edison St, Salt Lake City, Utah, USA 84111
Tel +1-801-534-1017, Fax +1-801-534-1019
contact us     Time Zone: MDT (UTC-6)
 

Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries.
Systronix is independent of Sun Microsystems, Inc.
TStik, JStik, JCX, JStamp, JSimm, JDroid, and JRealTime are trademarks of Systronix, Inc.
1-Wire, iButton and TINI are trademarks of Dallas Semiconductor
Simmstick is a trademark of Dontronics
LEGO® is a trademark of Lego A/S, Denmark