 |
|  |
 |
| Implementation of the Dallas 1-Wire Connection |
Click below to learn more about Dallas 1-Wire and the working group behind this page
Working group 1 |
 |
 |
 |
 |
 |
 |
 |
| Introduction |
| This page describes how to setup JemBuilder for 1-Wire communication on a SaJe. |
 |
 |
 |
 |
 |
 |
 |
| Jem Builder |
We have had great help from the tutorial at Systronix: http://jstampu.systronix.com/appnotes/listow/cldc_1wire.htm. This homepage, however, deals with both the JStamp board as well as the SaJe board. In the following we will only deal with the SaJe board.
Files needed: You need the 1-Wire API from Dallas Semiconductor/Maxim in order to use the 1-Wire. This API can be downloaded here: ftp://ftp.dalsemi.com/pub/auto_id/public/owapi_1_00B_J2ME.tgz. In this zipped file there is both source code and the compiled classes in a JAR file, as well as some examples of how to use the API.
Add library to classpath: In order to add the 1-Wire library to your JemBuilder project, you need to create the library in JemBuilder first: Choose Tools -> Libraries... -> New -> Then select a name and the API JAR file.

Next, add the library to your classpath.

Properties: You need to set some system properties.

forName options: You need to add the class USerialAdapter to the forName options. Furthermore, you need the OneWireContainer and specific subclasses for the 1-Wire devices you are going to communicate with. Here, the OneWireContainer10 class is used with a temperature sensor (DS1820) and the OneWireContainer20 with a A/D converter (DS2450). If you are using another device, the correct OneWireContainer class should be listed here instead. Documentation about the different OneWireContainer classes can be found in the Javadoc for the generic 1-Wire API: ftp://ftp.dalsemi.com/pub/auto_id/public/owapi_1_00B.tgz

com 2 driver: We communicate with the 1-Wire devices via the com 2 port. Add the com 2 driver to the project by choosing Project -> Drivers... -> Add com2. NOTICE: It's important to use com2 on the SaJe since the serial adapter only communicates through this com port. This is specific to the SaJe board. Another thing to remember is to set the two jumpers JP2 and JP4 correctly according to the SaJe manual. 1-Wire through the serial B port and the RJ11 connector will only work if the jumpers are set correctly.
 |
 |
 |
 |
 |
 |
 |
 |
| Charade |
| When the project has been built in JemBuilder, it can be transferred to SaJe via Charade. |
 |
 |
 |
 |
 |
 |
 |
|
 |
|
|  |
|
|
|
|
 |
|
|
 |
|
|
 |
|
|
 |
|
|
 |
|
|
 |
|
|
 |
|
|
 |
|
|
 |
|
|
 |
|
|
 |
|
|
 |
 |
Implementation of the Dallas 1-Wire Connection |
|
 |
|
|
 |
|
|
 |
|
|
 |
|
|
 |
|
|
 |
|
|