Study and development of a Java Virtual Machine for low and mid-range microcontrollers
Correo electrónico del autorsergio.soria.nietogmail.com
Tutor / director / evaluadorJordana Barnils, José
Tipo de documentoProjecte Final de Màster Oficial
Condiciones de accesoAcceso restringido por acuerdo de confidencialidad
Java is a programming language created by Sun Microsystems to support extensive software distribution. In order to run Java applications on any computer, a software-based machine, known as Java Virtual Machine (JVM), should be installed on these computers. Memory requirements used by an standard JVM running on an Operating System (OS) like Windows, Linux or MAC could vary depending on its configuration, but standard Random Access Memory (RAM) requirements range between 2 and 64 megabytes. The main aim of this project is to develop a JVM which could be executed in microcontrollers with some lacking RAM capacity. For this project, this limitation means devices based on RAM capacity around 1 kilobyte. Oracle Corporation already defines an standard collection of methods to write Java applications for desktops and servers. These set of tools are packaged in a Java Application Programming Interface (API). Then, this project starts the definition and development of an API to create general purpose Java applications for microcontroller devices. It should provide access to microcontroller resources like Ports, Timers, Serial Ports, etc. Implementation of a JVM and a Java API able to work on microcontrollers with limited RAM resources allows to implement Java applications which could run on each device executing this JVM, without the obligation to make any change in the original Java application. However, the Virtual Machine should be slightly adapted to each device. During this project, JVM has been adapted only to Microchip PIC18F4520 and PIC18F46K22. The JVM can be analysed in terms of performance, power or memory consumption, etc. This document only shows an study of it in terms of accuracy. This analysis has been done by making a comparison between results obtained from an application to measure resistive sensors, using microcontroller circuit interface, developed in C and Java programming languages. A unique Java application to measure resistive sensors has been tested successfully using PIC18F4520 and PIC18F46K22. Results obtained have been similar in both cases as expected. PIC18F4520 measurements have been compared with C code application also developed to work in this device, showing accurate values in both cases as well.