|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
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:
beeps of specified frequency and duration
methods for writing messages onto LCD screen
read status of the digital lines as well as status of the START/STOP
- 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
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
- 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.
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
object allowing to communicate with external devices via SCI port at
application DemoHB (or DemoHBExp)
that uses all of the above mentioned Java objects.
When loaded into the HandyBoard it will:
short welcome melody
scrolling text "Java HB" on line 1 from left to right and back
"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
line 2 will show current analog value (0 to 255) on the potentiometer
and the amount of available memory.
a servo motor is connected to PA7 (or servo motor S0 on expansion board)
then it will be set to center position
DC motors will be turned off
After this initial
sequence you can:
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
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
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.
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:".
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.
and using the HB class packages
available in two forms - self extracting zip archive for Windows
platform or as a zip file.
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.
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.
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:
Note that AppLoad requires Sun's COMMAPI 2.0 to be
installed on your computer.
HandyBoard's memory map for DemoHBExp
space available to Java application
of interrupt vectors when using 68HC11 in special test mode
collected heap memory for runtime objects created by Java application
Java VM code & data
code & data space
internal RAM loaded with
LCD driver during init. sequence.
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.