Difference between revisions of "Flameman/tinijava-390"
(Created page with "For more interesting projects done by Flameman, be sure to check out his project index = tinijava-390-Flameman = == Note == I'm developing for this ...") |
(→Tips & Tricks) |
||
| Line 116: | Line 116: | ||
=== Tips & Tricks === | === Tips & Tricks === | ||
| + | |||
| + | === draft === | ||
| + | |||
| + | doing a project sing a "TINI Board" which is a 10 year old peice of gadgetry which hosts a web server, and using java applets, one can control the outputs (in this case LEDS) using java. | ||
| + | |||
| + | the following turns on a yellow LED, which i am taking the output to control a relay and do various things... | ||
| + | |||
| + | <pre> | ||
| + | manip.add(LEDManip.Y1); | ||
| + | lcdmanip.clear(); | ||
| + | lcdmanip.out.println("Current Move:"); | ||
| + | lcdmanip.out.print("Elbow Down"); | ||
| + | lcdmanip.out.flush(); | ||
| + | pause(5000); | ||
| + | </pre> | ||
| + | |||
| + | In the following code | ||
| + | ------------------------------------------------------------------------------- | ||
| + | |||
| + | <pre> | ||
| + | import com.dalsemi.system.*; | ||
| + | import java.net.*; | ||
| + | import java.io.*; | ||
| + | import com.taylec.tini.*; | ||
| + | import com.taylec.tini.io.*; | ||
| + | import java.lang.*; | ||
| + | import java.util.*; | ||
| + | import com.dalsemi.system.TINIOS; | ||
| + | import java.util.Enumeration; | ||
| + | |||
| + | public class elbowdown | ||
| + | { | ||
| + | /** | ||
| + | * Pause | ||
| + | */ | ||
| + | private static final void pause(int delay_) | ||
| + | { | ||
| + | try | ||
| + | { | ||
| + | Thread.sleep(delay_); | ||
| + | } | ||
| + | catch (InterruptedException e_) | ||
| + | { | ||
| + | } | ||
| + | } | ||
| + | |||
| + | public static void testLED(Interrupt interrupt_) | ||
| + | { | ||
| + | try | ||
| + | { | ||
| + | LEDManip manip = new LEDManip(); | ||
| + | LCDManipFormat lcdmanip = new LCDManipFormat(); | ||
| + | |||
| + | //setup local variable to use for state manipulation of LEDs | ||
| + | int cur_state = 0; | ||
| + | |||
| + | //turn off the LEDs | ||
| + | manip.clear(); | ||
| + | |||
| + | manip.add(LEDManip.Y1); | ||
| + | lcdmanip.clear(); | ||
| + | lcdmanip.out.println("Current Move:"); | ||
| + | lcdmanip.out.print("Elbow Down"); | ||
| + | lcdmanip.out.flush(); | ||
| + | pause(5000); | ||
| + | |||
| + | |||
| + | |||
| + | manip.subtract(LEDManip.Outer); | ||
| + | while(true) | ||
| + | { manip.subtract(LEDManip.Inner); | ||
| + | if (interrupt_.getNumEvents()>0) | ||
| + | { | ||
| + | return; | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | catch (IllegalAddressException err_) | ||
| + | { | ||
| + | System.out.println(err_.toString()); | ||
| + | } | ||
| + | } | ||
| + | |||
| + | |||
| + | public static void main(String args[]) | ||
| + | { | ||
| + | Interrupt interrupt = new Interrupt(); | ||
| + | |||
| + | System.out.println("Starting Motion"); | ||
| + | testLED(interrupt); | ||
| + | System.out.println("Ending Motion"); | ||
| + | System.exit(0); | ||
| + | |||
| + | } | ||
| + | } | ||
| + | </pre> | ||
| + | |||
| + | When i run that code, the program continues to run and stuffs up the next one from running, so i need it to exit without having to use the interupt (a button on the TINI board) | ||
| + | I thought it would be logical and just have the import part, then the function definition, then the LED control part, then the function stops, however when trying to remove bits, i keep getting errors. | ||
== App == | == App == | ||
Revision as of 08:20, 10 July 2011
For more interesting projects done by Flameman, be sure to check out his project index
Contents |
tinijava-390-Flameman
Note
I'm developing for this board, the wiki page will be improved soon
feel free to contact me (see the contact below)
Introduction
the board firmware runs a tini java virtual machine, which is pretty able to boot to board, to upload java application, and to run it
The Target-goal of this page is
- have appeal with it
- have experience with I/O driver written in java (do you really think it i impossibile ?)
People you could contact if you need help
- flameman, i'm currently use this board for a project, email
- email flamemaniii@gmail.com
- you ... if you want ;-)
About this project
About the board
Overview
The board consists of:
- CPU max80c390 max80c390-user-man.pdf
- RAM onboard __KB
- UART 2xRS232
- POWER 5V
- System PCB xxx cm x xxx cm
Memory Locations
memory map of the board will be added as soon as possible
| addr begin | addr end | area |
|---|---|---|
| ... | ?? | ram, userspace |
Open questions
...
Problems
...
Images of the board
About
what/where
About firmware
About devtools
javac-390translate java to pseudo 51 assembly
- javac-8051 machine layer has been ported to 80c390, but there is no public assembler
- dalsemi has released a java version of java compiler and 51 assembler and linker
modern java environment are not compatible with java-51-assembler
so if you need this old java environment email me i will provide the java binary
doc
tinijava Books
Unofficial Bug List
Common problems and Gotchas
Tips & Tricks
draft
doing a project sing a "TINI Board" which is a 10 year old peice of gadgetry which hosts a web server, and using java applets, one can control the outputs (in this case LEDS) using java.
the following turns on a yellow LED, which i am taking the output to control a relay and do various things...
manip.add(LEDManip.Y1);
lcdmanip.clear();
lcdmanip.out.println("Current Move:");
lcdmanip.out.print("Elbow Down");
lcdmanip.out.flush();
pause(5000);
In the following code
import com.dalsemi.system.*;
import java.net.*;
import java.io.*;
import com.taylec.tini.*;
import com.taylec.tini.io.*;
import java.lang.*;
import java.util.*;
import com.dalsemi.system.TINIOS;
import java.util.Enumeration;
public class elbowdown
{
/**
* Pause
*/
private static final void pause(int delay_)
{
try
{
Thread.sleep(delay_);
}
catch (InterruptedException e_)
{
}
}
public static void testLED(Interrupt interrupt_)
{
try
{
LEDManip manip = new LEDManip();
LCDManipFormat lcdmanip = new LCDManipFormat();
//setup local variable to use for state manipulation of LEDs
int cur_state = 0;
//turn off the LEDs
manip.clear();
manip.add(LEDManip.Y1);
lcdmanip.clear();
lcdmanip.out.println("Current Move:");
lcdmanip.out.print("Elbow Down");
lcdmanip.out.flush();
pause(5000);
manip.subtract(LEDManip.Outer);
while(true)
{ manip.subtract(LEDManip.Inner);
if (interrupt_.getNumEvents()>0)
{
return;
}
}
}
catch (IllegalAddressException err_)
{
System.out.println(err_.toString());
}
}
public static void main(String args[])
{
Interrupt interrupt = new Interrupt();
System.out.println("Starting Motion");
testLED(interrupt);
System.out.println("Ending Motion");
System.exit(0);
}
}
When i run that code, the program continues to run and stuffs up the next one from running, so i need it to exit without having to use the interupt (a button on the TINI board) I thought it would be logical and just have the import part, then the function definition, then the LED control part, then the function stops, however when trying to remove bits, i keep getting errors.

