navigation
home
 
simpleRTJ info
 
download
 
about us
 
 6811 version
features
 
showcase
  
download
 
 
6811 showcase
MIT Handy Board
 
Grifo GPC-114
 
RS485 network card
 
 
MIT HandyBoard Robotic Controller

See also Upgrading HB to 64KB

The Java library packages and a demonstration application are now available for download for users of the MIT's HandyBoard robotic controller.

The main purpose of the class files and a demonstration application is to show how to use Java in the HandyBoard environment.

The library class files, native code and a demonstration application are supplied in a source form to allow everyone to customise the code as required.

Two library packages are provided:
handyboard - for Handyboard without expansion card
handyboardExp - for Handyboard with expansion card


What is included

handyboard/handyboardExp packages consisting of Java objects allowing to control all peripheral components present on the main board as well as on the expansion card. The following Java class files are included:

Beeper Generates beeps of specified frequency and duration
Display Provides methods for writing messages onto LCD screen
Digital Allows to read status of the digital lines as well as status of the START/STOP buttons
Analog handyboard - allows to read levels on 7 analog lines and the analog level set by the on-board potentiometer

handyboardExp - reads analog levels on channels 2-6 and 8-23. Channels 0,1 are reserved for reading channels 8-23. Reading channel 7 returns analog level set by the onboard potentiometer. Channels 8-23 are present only on expansion board.

DCMotor Instances of this class can access any of the four DC motor controllers present on the board. DC Motors can be turned on/off, direction set to forward/reverse and the power can be applied from 1 to 100% (in 12 steps)
ServoMotor handyboard - instances of this class can control two servo motors connected to PA5 and PA7 output lines

handyboardExp - instances of this class allow to control one of the six servo motors via drivers present on the expansion board.

IR Allows to receive infra red signals from standard TV/VCR remote controller. Certain modifications of this object are required as each remote has different signal coding. IR is pre-configured for NEC TV controller. Additional configurations are provided for NEC VCR and Panasonic TV/VCR remotes. Infra red transmission has not been implemented at this stage
Comm Communication object allowing to communicate with external devices via SCI port at 9600 baud.

Demonstration application DemoHB (or DemoHBExp) that uses all of the above mentioned Java objects.
 
When loaded into the HandyBoard it will:
  

play short welcome melody
start scrolling text "Java HB" on line 1 from left to right and back
transmit "Welcome to Java HB. Enter command:" via serial line. You will need to run communication software (i.e HyperTerminal or Minicom) configured for appropriate COM port and set to 9600,n,8,1 with flow control turned off
LCD line 2 will show current analog value (0 to 255) on the potentiometer and the amount of available memory.
if a servo motor is connected to PA7 (or servo motor S0 on expansion board) then it will be set to center position
all DC motors will be turned off

After this initial sequence you can:
  

Turn the potentiometer. As the value changes from 100 to 0 DC motor 0 will start rotate forward and the speed will increase as the value goes closer to zero. The same apply if the value of the potentiometer changes from 155 to 255 but now in the opposite direction. Even if the DC motor is not connected it's direction and speed can be observed on the corresponding LEDs.
If a servo motor is connected (to PA7 or S0 on exp. board) then it will turn from one end position to another following the level set by the potentiometer.
Press down START button to explicitly run garbage collector. While holding down START button HB displays time in milliseconds (on end of line 2) indicating duration of garbage collection process. Note that this time varies, depending on when START button is pressed.
You can use communication software on the PC to talk to the HandyBoard. At the moment any characters received from the PC will be echoed by the HB. Hitting Enter will cause HB to transmit "Enter command:".
If you have a NEC TV remote you can try to send some signals towards IR sensor on the HandyBoard. If IR signals are recognised by the HB then corresponding code is displayed on the LCD (line 2). Read the comments in handyboard\IR.java on how to customise IR class to work with your remote. Pre-configured settings are available for some models of NEC VCR and Panasonic TV/VCR remotes.

What is required
 

Java VM for 68HC11 - Beta 2
GNU ASxxxx assembler/linker, executables for Windows platform can be downloaded from here or visit the ASxxxx home page to download tools for other platforms.
JDK1.2 (or JDK1.1.x) to compile Java application and to run ClassLinker
Sun's CommAPI 2.0 if you want to use AppLoad - the Java application for loading binaries via 68HC11 bootstrap mode.

Downloading and using the HB class packages

Software is available in two forms - self extracting zip archive for Windows platform or as a zip file.

Download:

handyboard.exe9K) or
handyboard.zip (160K)
Contains handyboard package and a DemoHB demonstration application. 
handyboardExp.exe0K) or
handyboardExp.zip(160K)
Contains handyboardExp package and a DemoHBExp demonstration application. 
 
Run handyboard.exe (or handyboardExp.exe). Self-extracting archive will prompt you for destination folder. Select folder where you have previously installed Java VM for 68HC11. Then click on Unzip button. When installation finished select Close button. Two folders will be created in the root of the Java VM folder:
source/handyboard - containing library class files
DemoHB - containing Java demo application, native start-up code and the native code for individual library class files.
If you have downloaded software for expansion board source/handyboardExp and DemoHBExp folders are created.
Precompiled library files handyboard.jar/handyboardExp.jar are also placed into lib folder.
 
In the DemoHB (or DemoHBExp) folder you can now run load.bat that will load already pre-compiled binaries into the HandyBoard. You may need to edit load.bat to modify -p parameter to match your serial port number. When prompted, put HB into boot mode (depress STOP button and re-power the HB). Then hit Enter to proceed with loading. When loading has finished re-power the HB and you should hear welcome melody.
If you experience problems loading the HB at 38400 baud then specify HB9600.HEX as a bootloader file (-f option) instead of HB38400.IHX.
 
library packages or Java applications can be recompiled by running the make11.bat or make12.bat. Use make11.bat if you are using JDK1.1.x and make12.bat for JDK1.2. You will need to set the environment variable HOME to point to the root of JDK folder.
For example: set HOME=C:\jdk1.1.6
 
To recompile the native code run make.bat from the DemoHB\asm folder. make.bat assumes that the PATH is set to include folder for GNU ASxxxx executables (as6811 and aslink).
 
To build Java VM image run make.bat in DemoHB\vm folder.
 
load.bat and appload.bat are configured so they load three files: DemoHB.s19, native.s19 and vm.s19 from corresponding folders.
 
To run Java version of application loader AppLoad in window mode use the following command:
appload.bat -w
Note that AppLoad requires Sun's COMMAPI 2.0 to be installed on your computer.
 

HandyBoard's memory map for DemoHBExp application

$FFFF

 

 

$C000

Memory space available to Java application 16KB
$BFFF

$BFD6

Location of interrupt vectors when using 68HC11 in special test mode 42 bytes
$BFD5

 

$AA00

Garbage collected heap memory for runtime objects created by Java application 5.6KB
$A9FF

$8A00

Memory space for
Java VM code & data
8KB
$89FF

$8000

Startup/native code & data space 2.5KB
$103F

$1000

68HC11 control registers 64 bytes
$00FF

$0000

68HC11 internal RAM loaded with LCD driver during init. sequence. 256 bytes

 

NOTE:

All classes in the library packages and corresponding native code is provided only as a reference. It may contain some bugs or the required behaviour hasn't been implemented in full. Especially, IR class and native code for servo control on expansion board (servo.s11) may require some fine tuning.

 
Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc., and all other
trademarks and logos are trademarks or registered trademarks of their respective owners.
 

Copyright 2000-2002, RTJ Computing. All rights reserved.