SBX2 UART timing
with TINI: |
Earlier releases of
SBX2 (PCB Rev2 for example) had a Xilinx part which was running
faster than specified. This disguised the fact that, with TINI,
SBX2 needs a non-zero stretch cycle value. There are several reasons
for this. The TINI javaxcomm support (the current version is TINI
1.02e) changes the C390 CKCON MD[2,1,0] bits from a default of
one (three machine cycles per movx) to zero (two machine cycles
per movx). This support was written assuming no buffering between
the TINI bus and a C552 UART. SBX2 uses buffering in its CPLD,
and uses a C550 UART. The buffer adds delay to the data and address
bus, and the C550 UART has an address setup time which is twice
as long as the C552 (30 nsec vs 15 nsec). For these reasons TINI
needs a stretch cycle change to work properly with the SBX2 UART.
The native method provided here does that. See the comments in
the native method .a51 file for instructions on use. |
SBX2 UART timing
with SaJe: |
The design of SaJe
provides variable peripheral timing automatically. If you use
the JemBuilder SaJe com3 driver, the timing will be correct for
accessing SBX2. The aJ100 has a completely different I/O bus design
from TINI, so the above TINI notes do not apply to SaJe. |
Mar
2002: Important note about SBX2 rev3 PC boards without an
'A' on the serial number label: We have discovered and fixed a problem in the
CPLD code for SBX2, PCB Rev3 only. The PCB Rev is written in the
board silkscreen next to the keypad connector P1. The new CPLD
code fixes a problem when reading and writing the parallel I/O
(three 8-bit ports) of SBX2. If you have
a Rev3 board and the letter 'A' is not written in on the serial
number sticker, please contact us via email
to arrange to return your boards for a free upgrade. We'll
also pay the shipping both ways. If you have ability to program
Xilinx CPLDs we can also email you the files and you can perform
the upgrade yourself. SBX2 Rev2 or SBX2 Rev3 with 'A' added to
the serial number are not affected. The CPLD code does not change
UART or LCD timing or other portions of SBX2 operation, just the
parallel I/O access. A fringe benefit of the upgrade is that the
CPLD now runs in low power mode, greatly reducing SBX2's power
consumption. |
Note about TINI parallel I/O
access (updated 11 April 2002): |
On TINI with rev B3 80C390 we
see some infrequent I/O errors when writing to bytewide I/O port
INOUT1. The write appears to be correct and the read returns incorrect
data about one out of every 250,000 - 500,000 times. We do not
see this sort of behavior on SaJe, nor on SBX2 running assembly
code with an 80C390 controller (our uCAN2 board). We have isolated
the problem to versions of TINI with rev B3 of the 80C390. Rev
B4 does not have this anomaly. On the B3 devices, if you read
the INOUTX data twice, it will always be correct the second time,
so you could use this if your code will run on B3 80C390s. All
other portions of SBX2 are not affected by this anomaly and work
as expected with TINI. |
|
Simple RS485 send
and receive example, currently only for TINI. SaJe coming soon,
or you can easily modify this code yourself. |
2002 Oct 03
 SerialEchoEvent Example using
SerialEvent with javaxcomm . This example is for TINI, STEP
and SBX2.
30 KByte SerialEchoEvent.jar
|
This example uses
a javaxcomm SerialEvent to receive and echo out serial data
using the SBX2 UART, accessed as TINI's serial2, at 115 kbaud.
Java source and javadocs are included. You also need the setExtUartTiming
native method file. This example also echos the hex and character
values of incoming data to a telnet connection. |
2002 Oct 03
 SerialEcho Example with Blocking
Read for SBX2, uses javaxcomm. This example is for TINI, STEP
and SBX2.
40 KByte SBX2_SEBR.jar
|
This example uses
a jvaxcomm blocking read to echo out what it receives on the
SBX2 UART, accessed as TINI's serial2, at 115 kbaud. Java source
and javadocs are included. You also need the setExtUartTiming
native method file. |
2002 Oct 03
 TINI native method to change
movx timing so that TINI works correctly with the C550 UART
on SBX2. This example is for TINI, STEP and SBX2.
5 KByte setExtUartTiming.zip
|
Native method to
add stretch cycles when using SBX2 with TINI. The SBX2 C550
UART needs stretch cycles increased from TINI's default of 0,
and the included native method does that. All native method source
code is included. See the comments in the native method .a51 file
for instructions on use, (including Java code instructions). |
2002 Oct 03
 Simple utility file used by
some of the examples on this page.
16 KByte systronix_utils.jar
|
Simple Java utility
file used by some of the example programs. Generic, not specific
to any target device. |
SBX2_API
for SaJe aJile 3.16 RAM build Dallas TINI 1.02e
JAR file (500 KB)
you also need the Systronix
Utilities Jar
file (16 KB)
and (only for TINI) this
TINI dependency
file
revised 2002 Dec 18
simple LCD support, parallel I/O
and test program included
works with SBX2 Rev3
|
It's here - one Java
API package for TINI and native execution SaJe. This is a preliminary
version and not complete - it will be finished soon. Your code
contributions are welcome! Uses abstract classes and Class.forName
to access the proper hardware support. When building on TINI you
need the referenced dependency file and the buildep.bat file or
equivalent. There are some not obvious subtleties here, please
start with the included batch files to ensure a successful build.
Javadocs, project configuration files, build scripts, etc are
included. This is a SaJe RAM build (this distinction does not
apply to TINI). |

TicTacToe
for SaJe and SBX2
RAM build JAR file (610 KB)
revised 2002 Dec 18
|
Example program for SaJe, SBX2,
20x4 LCD and keypad. Includes keypad test, TicTacToe and a 20x4
character LCD class. The JAR includes all Java sources, JBuilder
and JemBuilder project files, JavaDocs, and prebuilt class files.
Important: you must configure JemBuilder properly to generate
the slower I/O cycles needed by SBX2. Here is one option we call
CLKOUT/4 which is used in the example
above. (This runs the aJ100 at 103 MHz and uses its CLKOUT/4 to
generate a 25 MHz timing signal used by SaJe's CPLD to generate
the SBX2 strobes.) The JemBuilder .AJP project file included in
the TicTacToe JAR is configured this way. |
TINI
Utils Java Classes (30 KB)
(being replaced by SBX2_API)
|
JAR file
with some simple, helpful support classes such as hex digit display,
threaded wait routines, etc. which are not specific to SBX2. Includes
sources and javadocs. |
8051 Assembly
code drivers
|
Pretty complete assembly
code drivers with sample test code. This is what we use for final
manufacturing test of SBX2. Uses SBX2's, LCD, keypad, and one
RS232 output. Tests RS485 in loopback. Use with uCAN2, 80C390,
etc. (Not for use with TINI Java modules). |