The NanoVM is a java virtual machine for the Atmel AVR ATmega8 CPU, the member of the AVR CPU family used e.g. in the DLR Asuro robot, manufactured by AREXX engineering. With the NanoVM, the Asuro can be programmed in the popular Java language using the standard Sun JDK. The NanoVM and its tools are distributed under the GPL and can be used on other AVR based systems as well. Some AVRs like e.g. the ATmega8 that comes with the Asuro are delivered preprogrammed to the user. The pre-installed bootloader allows the user to upload further code onto the CPU. The Asuro e.g. comes with a bootloader that allows to upload code via the IR transmitter delivered with the Asuro. The NanoVM cannot be installed using this mechanism, since the bootloader itself has to be replaced as well. Instead the complete contents of the AVR CPU including the bootloader have to be replaced. This requires the CPU to be placed in some programming board like e.g. the STK-500. Alternally, a simple interface (photo of installed interface) allows you to reprogram the entire chip while its still placed in the Asuro. In both cases the connection to the PC is done via a special AVR ISP programming cable (see e.g. these DIY instructions if you want to build one yourself) connected to a PCs printerport. The NanoVM itself is then being uploaded onto the chip using a software like Ponyprog or UISP.
Since there's currently no way of making a backup of or to restore the original bootloader in the ATmega8 shipped with the Asuro it is strongly recommended to use a seperate ATmega8 CPU for the NanoVM. New unprogrammed AVR ATmega8 CPUs are cheap!
The NanoVM itself contains its own bootloader. Once it is installed in the target system like e.g. the Asuro it can use the IR interface to install Java client programs. A special NanoVM tool (formerly Convert tool) is available for the NanoVM to uplaod Java programs to the Asuro.
The NanoVM for Asuro replaces the original firmware of the Asuro with a Java virtual machine capable of running a subset of the virtual machine command set. This enables e.g. the Asuro to interpret java bytecode and to run simple java programs like e.g. this one.
Click here to download the full size of the above Circuit.
The NanoVM is a very resource aware implementation of the java vm. The Asuro version including a boot loader and several native classes fit into the 8kBytes flash rom of the Asuros AVR ATmega8 CPU. The complete 512 Byte EEPROM space of the CPU are available as Java program space and 75% of the 1 kByte RAM space are available to the running Java program.
The current version of the NanoVM for Asuro includes:
Support for standard java bytecode
Tested on AVR Mega8 and Mega32
Configurable 15/31 bit integer arithmetic
Optional float support
Bootloader for simple application upload
Tested with Suns JDK and IBMs jikes
Unified stack and heap architecture
Requires less than 8kBytes of code memory
at least 512 Bytes code storage for java byte code (e.g. the complete 512 eeprom bytes available on the AVR ATmega8 CPU)
at least 768 Bytes application RAM available (of 1k total RAM available on the AVR ATmega8 CPU)
About 20k Java opcodes per second on 8 Mhz AVR
Native classes include:
java/lang/Object (object handling)
java/lang/System (IO handling)
java/io/PrintStream (console output)
java/lang/StringBuffer (string processing)
asuro (asuro control)
Native support for LCDs, AVR io etc
What the NanoVM is and what it isn't
There seems to be some confusion about what the NanoVM is and can do and what it can't and isn't.
It is not a full featured Java VM and it will never be. It...
This project fits more for custom made battery casing that can have more space to hide things inside. This switch with few alterations can be used for any other project as well but is designed based on e-bike needs! This project use a clever functionality of....
The circuit described here uses ultrasonic oscillations and operates based on the propagation velocity of these oscillations in the air. Thus, we can easily determine the distance of two points if the time within which the wave travels this distance is....
Sometimes the precious metals are hidden too deep and are not detected except with complicated devices. In many cases, however, small pieces of precious metal buried near the surface can be detected by relatively simple means. Everyone is very attractive to....
Many times for various reasons we forget or can not water the plants that we have in our homes. And many humidity sensors units just notify us with a beeping sound or with a flashing light, that the pot needs watering. But what if we are away from home? This....
The principle behind a metal detector is really very simple. Proof of this is the circuit that follows, in which it proves that the construction of a metal detector can be done in the minute, with few components that we find very easily everywhere. With the....
The sub-harmonic bass generator is a sound producing unit for guitars. The sound it produces looks very much like that of the bass guitar. The octave generator is sometimes quite unusual since it does not produce any of the usual ways of coloring the sound,....
In the past the sounding (sea bottom measurement) was done with the "bullet", that is, with a heavy lead object that the seamen plucked into the sea hung from a calibrated rope. As soon as the "bullet" reached the bottom, the depth appeared directly from the....
This Amplifier was designed to have the following specifications: Distortion less than 0.1% at full power of 100W even at 20KHz. Power has to be attributed to an extended bandwidth. The output transistors must be protected against short circuits. The power....
A series of LEDs serve to alert the gardener when plants need water. Using two conventional digital integrated LEDs and a series of LEDs, we make a very useful device for gardening. The device detects the amount of water in the pot and alerts the grower.....