Parallax Javelin Stamp User manual

Chipsmall Limited consists of a professional team with an average of over 10 year of expertise in the distribution
of electronic components. Based in Hongkong, we have already established firm and mutual-benefit business
relationships with customers from,Europe,America and south Asia,supplying obsolete and hard-to-find components
to meet their specific needs.
With the principle of “Quality Parts,Customers Priority,Honest Operation,and Considerate Service”,our business
mainly focus on the distribution of electronic components. Line cards we deal with include
Microchip,ALPS,ROHM,Xilinx,Pulse,ON,Everlight and Freescale. Main products comprise
IC,Modules,Potentiometer,IC Socket,Relay,Connector.Our parts cover such applications as commercial,industrial,
and automotives areas.
We are looking forward to setting up business relationship with you and hope to provide you with the best service
and solution. Let us make a better world for our industry!
Contact us
Tel: +86-755-8981 8866 Fax: +86-755-8427 6832
Email & Skype: [email protected]om Web: www.chipsmall.com
Address: A1208, Overseas Decoration Building, #122 Zhenhua RD., Futian, Shenzhen, China

Javelin Stamp Manual
Version 1.1

WARRANTY
Parallax Inc. warrants its products against defects in materials and workmanship for a period of 90 days from receipt
of product. If you discover a defect, Parallax Inc. will, at its option, repair or replace the merchandise, or refund the
purchase price. Before returning the product to Parallax, call for a Return Merchandise Authorization (RMA)
number. Write the RMA number on the outside of the box used to return the merchandise to Parallax. Please enclose
the following along with the returned merchandise: your name, telephone number, shipping address, and a description
of the problem. Parallax will return your product or its replacement using the same shipping method used to ship the
product to Parallax.
14-DAY MONEY BACK GUARANTEE
If, within 14 days of having received your product, you find that it does not suit your needs, you may return it for a
full refund. Parallax Inc. will refund the purchase price of the product, excluding shipping/handling costs. This
guarantee is void if the product has been altered or damaged. See the Warranty section above for instructions on
returning a product to Parallax.
COPYRIGHTS AND TRADEMARKS
This documentation is copyright 2005 by Parallax Inc. By downloading or obtaining a printed copy of this
documentation or software you agree that it is to be used exclusively with Parallax products. Any other uses are not
permitted and may represent a violation of Parallax copyrights, legally punishable according to Federal copyright or
intellectual property laws. Any duplication of this documentation for commercial uses is expressly prohibited by
Parallax Inc.
BASIC Stamp, Stamps in Class, Board of Education, Boe-Bot SumoBot, SX-Key and Toddler are registered
trademarks of Parallax, Inc. If you decide to use registered trademarks of Parallax Inc. on your web page or in
printed material, you must state that "(registered trademark) is a registered trademark of Parallax Inc.” upon the first
appearance of the trademark name in each printed document or web page. HomeWork Board, Parallax, and the
Parallax logo, are trademarks of Parallax Inc. If you decide to use trademarks of Parallax Inc. on your web page or
in printed material, you must state that "(trademark) is a trademark of Parallax Inc.”, “upon the first appearance of the
trademark name in each printed document or web page. Other brand and product names are trademarks or registered
trademarks of their respective holders.
ISBN ###############

DISCLAIMER OF LIABILITY
Parallax Inc. is not responsible for special, incidental, or consequential damages resulting from any breach of
warranty, or under any legal theory, including lost profits, downtime, goodwill, damage to or replacement of
equipment or property, or any costs of recovering, reprogramming, or reproducing any data stored in or used with
Parallax products. Parallax Inc. is also not responsible for any personal damage, including that to life and health,
resulting from use of any of our products. You take full responsibility for your BASIC Stamp application, no matter
how life-threatening it may be.
INTERNET DISCUSSION LISTS
We maintain active web-based discussion forums for people interested in Parallax products. These lists are accessible
from www.parallax.com via the Support →Discussion Forums menu. These are the forums that we operate from our
web site:
•BASIC Stamps – This list is widely utilized by engineers, hobbyists and students who share their
BASIC Stamp projects and ask questions.
•Stamps in Class®– Created for educators and students, subscribers discuss the use of the Stamps in
Class educational program in their courses. The list provides an opportunity for both students and
educators to ask questions and get answers.
•Parallax Educators –Exclusively for educators and those who contribute to the development of
Stamps in Class. Parallax created this group to obtain feedback on our curricula and to provide a
forum for educators to develop and obtain Teacher’s Guides.
•Translators – The purpose of this list is to provide a conduit between Parallax and those who
translate our documentation to languages other than English. Parallax provides editable Word
documents to our translating partners and attempts to time the translations to coordinate with our
publications.
•Robotics – Designed exclusively for Parallax robots, this forum is intended to be an open dialogue
for a robotics enthusiasts. Topics include assembly, source code, expansion, and manual updates.
The Boe-Bot®, Toddler®, SumoBot®, HexCrawler and QuadCrawler robots are discussed here.
•SX Microcontrollers and SX-Key – Discussion of programming the SX microcontroller with
Parallax assembly language SX-Key®tools and 3rd party BASIC and C compilers.
!Javelin Stamp – Discussion of application and design using the Javelin Stamp, a Parallax module
that is programmed using a subset of Sun Microsystems’ Java®programming language.
ERRATA
While great effort is made to assure the accuracy of our texts, errors may still exist. If you find an error, please let us
know by sending an email to [email protected]. We continually strive to improve all of our educational materials
and documentation, and frequently revise our texts. Occasionally, an errata sheet with a list of known errors and
corrections for a given text will be posted to our web site, www.parallax.com. Please check the individual product
page’s free downloads for an errata file.


Table of Contents
Javelin Stamp Manual v1.1
•
www.javelinstamp.com
•
Page i
PREFACE............................................................................................................................. VII
MANUAL ORGANIZATION .....................................................................................................VII
JAVA PROGRAMMERS –READ THIS ..................................................................................VIII
BASIC STAMP ENTHUSIASTS –READ THIS ........................................................................IX
MANUAL CONVENTIONS........................................................................................................IX
RESOURCES AND TECHNICAL SUPPORT .................................................................................. X
FREE DOWNLOADS FROM WWW.JAVELINSTAMP.COM............................................................ XI
ACKNOWLEDGEMENTS ..........................................................................................................XI
1: INTRODUCTION ............................................................................................................... 1
THE JAVELIN STAMP AND ITS FEATURES................................................................................ 1
PROGRAMMING LANGUAGE -JAVATM FOR THE JAVELIN STAMP ............................................ 2
JAVELIN STAMP INTEGRATED DEVELOPMENT ENVIRONMENT ............................................... 2
VIRTUAL PERIPHERALS........................................................................................................... 3
Background VPs................................................................................................................. 3
Foreground VPs................................................................................................................. 3
HOW THE JAVELIN STAMP WORKS ......................................................................................... 4
JAVELIN STAMP HARDWARE .................................................................................................. 5
EQUIPMENT AND SYSTEM REQUIREMENTS ............................................................................. 6
USEFUL HARDWARE ............................................................................................................... 7
2: JAVELIN QUICK START ............................................................................................... 11
HARDWARE SETUP................................................................................................................ 11
INSTALLING THE JAVELIN STAMP IDE.................................................................................. 16
RUNNING THE JAVELIN STAMP IDE AND LOADING A TEST PROGRAM ................................. 19
DEBUGGING ENVIRONMENT ................................................................................................. 22
ONLINE HELP........................................................................................................................ 26
I/O EXAMPLE ........................................................................................................................ 27
DID THAT WORK?–TROUBLE SHOOTING ............................................................................ 29
WHERE TO NEXT?................................................................................................................. 32
3: BEGINNERS GUIDE TO EMBEDDED JAVA PROGRAMMING............................ 35
THE CLASS WRAPPER AND MAIN METHOD .......................................................................... 35
DECLARING CONSTANTS,VARIABLES,AND ARRAYS ........................................................... 36
PERFORMING CALCULATIONS............................................................................................... 39
MAKING DECISIONS.............................................................................................................. 40
REPETITIVE OPERATIONS...................................................................................................... 43
DISPLAYING MESSAGES FROM THE JAVELIN......................................................................... 47
SENDING MESSAGES TO THE JAVELIN................................................................................... 49

Table of Contents
Page ii •Javelin Stamp Manual v1.1 •www.javelinstamp.com
CREATING A METHOD ........................................................................................................... 51
CREATING AND USING A LIBRARY CLASS............................................................................. 55
4: APPLICATION EXAMPLES – CIRCUTS AND PROGRAMS........................................ 59
CIRCUITS AND EXAMPLE CODE............................................................................................. 59
ABOUT SOLDERLESS BREADBOARDS .................................................................................... 59
PUSHBUTTON AND LED REVISITED ...................................................................................... 61
DIGITAL TO ANALOG CONVERSION ...................................................................................... 63
ANALOG TO DIGITAL CONVERSION ...................................................................................... 64
MEASURING RESISTIVE AND CAPACITIVE ELEMENTS........................................................... 64
CONTROLLING A SERVO WITH A BACKGROUND PWM OBJECT ............................................ 66
COMMUNICATING WITH PERIPHERAL ICS............................................................................. 69
COMMUNICATING WITH OTHER COMPUTERS........................................................................ 74
COMMUNICATING WITH PERIPHERAL DEVICES..................................................................... 78
5: USING THE JAVELIN STAMP IDE.............................................................................. 81
STARTING THE IDE ............................................................................................................... 81
SETTING GLOBAL OPTIONS ................................................................................................... 81
STARTING A PROJECT............................................................................................................ 82
BUILDING YOUR PROGRAM ................................................................................................... 86
DEALING WITH ERRORS ........................................................................................................ 87
USING THE DEBUGGER TO LOOK INSIDE THE JAVELIN.......................................................... 89
AN EXAMPLE DEBUGGING SESSION...................................................................................... 92
EDITING TEXT ....................................................................................................................... 94
TOOLBARS AND MENUBARS ................................................................................................. 95
CLASS PATH CONSIDERATIONS............................................................................................. 95
WORKING WITH PACKAGES .................................................................................................. 96
WORKING WITH PROJECTS .................................................................................................... 97
6: JAVELIN STAMP PROGRAMMERS REFERENCE.................................................. 99
JAVA DIFFERENCES ............................................................................................................... 99
GETTING STARTED................................................................................................................ 99
VARIABLES,TYPES,AND CONSTANTS ................................................................................ 101
Constants........................................................................................................................ 103
Number Bases................................................................................................................. 104
Expressions..................................................................................................................... 104
Special Operators........................................................................................................... 106
Comments ....................................................................................................................... 108
Control Flow .................................................................................................................. 108
Classes and Objects ....................................................................................................... 111

Table of Contents
Javelin Stamp Manual v1.1
•
www.javelinstamp.com
•
Page iii
Methods and Parameters ............................................................................................... 113
Where are the Pointers? ................................................................................................ 115
Arrays............................................................................................................................. 118
Strings ............................................................................................................................ 119
Extending Classes .......................................................................................................... 120
Basic Type Classes......................................................................................................... 124
Numeric Conversions..................................................................................................... 125
Statics ............................................................................................................................. 125
Abstraction ..................................................................................................................... 126
Exceptions ...................................................................................................................... 126
Packages and CLASSPATH ........................................................................................... 129
ONLINE RESOURCES ........................................................................................................... 131
JAVELIN STAMP KEYWORD REFERENCE ............................................................................. 131
abstract........................................................................................................................... 131
boolean........................................................................................................................... 132
break............................................................................................................................... 132
byte ................................................................................................................................. 132
case................................................................................................................................. 133
catch ............................................................................................................................... 133
char ................................................................................................................................ 133
class................................................................................................................................ 133
continue.......................................................................................................................... 133
default............................................................................................................................. 134
do.................................................................................................................................... 134
else ................................................................................................................................. 134
extends............................................................................................................................ 134
final ................................................................................................................................ 135
finally ............................................................................................................................. 135
for ................................................................................................................................... 135
if ..................................................................................................................................... 137
import ............................................................................................................................. 138
int ................................................................................................................................... 139
new ................................................................................................................................. 140
null ................................................................................................................................. 140
package .......................................................................................................................... 140
private, protected, public ............................................................................................... 141
return.............................................................................................................................. 143
short ............................................................................................................................... 143
static ............................................................................................................................... 143
super............................................................................................................................... 145

Table of Contents
Page iv •Javelin Stamp Manual v1.1 •www.javelinstamp.com
switch.............................................................................................................................. 145
this .................................................................................................................................. 146
throw, throws.................................................................................................................. 147
try ................................................................................................................................... 147
void ................................................................................................................................. 149
while ............................................................................................................................... 149
JAVELIN STAMP OPERATOR REFERENCE............................................................................. 150
[ ].................................................................................................................................... 150
++, --.............................................................................................................................. 150
(type)............................................................................................................................... 150
+, -, *, /, %, ()................................................................................................................. 151
<<, >>, >>> ................................................................................................................. 152
<, >, <=, >=, ==, != .................................................................................................... 153
&, |, ^ .............................................................................................................................. 153
&&, || ............................................................................................................................. 154
~, ! .................................................................................................................................. 154
?:..................................................................................................................................... 154
instanceof ....................................................................................................................... 155
UNUSED KEYWORDS........................................................................................................... 156
Unsupported Reserved Words:....................................................................................... 156
7: WORKING WITH OBJECTS ....................................................................................... 157
WHAT'S AN OBJECT?........................................................................................................... 157
Encapsulation................................................................................................................. 159
Polymorphism................................................................................................................. 160
Class Relationships ........................................................................................................ 161
An Object Oriented Example.......................................................................................... 161
Decoupling the Code...................................................................................................... 164
Virtual Peripherals......................................................................................................... 167
A Timer Example............................................................................................................ 168
Object-Oriented Opportunity ......................................................................................... 170
8: OBJECT REFERENCE .................................................................................................. 173
THE JAVA.LANG PACKAGE.................................................................................................... 173
Boolean........................................................................................................................... 173
Error............................................................................................................................... 174
Exception........................................................................................................................ 174
IndexOutOfBoundsException ......................................................................................... 175
Math ............................................................................................................................... 175
NullPointerException ..................................................................................................... 175

Table of Contents
Javelin Stamp Manual v1.1
•
www.javelinstamp.com
•
Page v
Object ............................................................................................................................. 176
OutOfMemoryError ....................................................................................................... 177
RuntimeException .......................................................................................................... 177
String.............................................................................................................................. 177
StringBuffer.................................................................................................................... 180
System............................................................................................................................. 181
Throwable ...................................................................................................................... 181
THE JAVA.IO PACKAGE ........................................................................................................ 181
THE JAVA.UTIL PACKAGE..................................................................................................... 182
Random .......................................................................................................................... 182
THE STAMP.UTIL PACKAGE .................................................................................................. 182
Expect............................................................................................................................. 183
List.................................................................................................................................. 183
LinkedList....................................................................................................................... 183
LINKEDLISTITEM ................................................................................................................ 184
9: JAVELIN STAMP HARDWARE REFERENCE ........................................................ 185
ADC ................................................................................................................................... 185
BUTTON .............................................................................................................................. 186
CPU.................................................................................................................................... 190
carry ............................................................................................................................... 191
count............................................................................................................................... 191
delay ............................................................................................................................... 192
installVP......................................................................................................................... 192
message .......................................................................................................................... 193
nap.................................................................................................................................. 193
pulseIn............................................................................................................................ 194
pulseOut ......................................................................................................................... 196
rcTime ............................................................................................................................ 196
readPin........................................................................................................................... 199
readPort ......................................................................................................................... 200
removeVP ....................................................................................................................... 201
setInput........................................................................................................................... 202
shiftIn ............................................................................................................................. 202
shiftOut........................................................................................................................... 206
writePin.......................................................................................................................... 210
writePort ........................................................................................................................ 210
DAC ................................................................................................................................... 211
EEPROM ........................................................................................................................... 212
MEMORY............................................................................................................................. 215

Table of Contents
Page vi •Javelin Stamp Manual v1.1 •www.javelinstamp.com
PWM .................................................................................................................................. 215
TERMINAL ........................................................................................................................... 216
TIMER ................................................................................................................................. 219
UART................................................................................................................................... 220
10: TECHNICAL DETAILS................................................................................................. 225
SUMMARY OF JAVA DIFFERENCES ...................................................................................... 225
Single Thread ................................................................................................................. 225
No Garbage Collection .................................................................................................. 225
Subset of Primitive Data Types ...................................................................................... 226
Subset of Java Libraries................................................................................................. 227
Strings are ASCII ........................................................................................................... 229
No Interfaces .................................................................................................................. 229
One Dimensional Arrays................................................................................................ 229
UNDERSTANDING THE JAVELIN STAMP’S MEMORY MANAGEMENT ................................... 230
MEMORY AND VARIABLE TYPES ........................................................................................ 232
INDEX ................................................................................................................................... 233

Preface
Javelin Stamp Manual v1.1
•
www.javelinstamp.com
•
Page vii
Manual Organization
This manual was written under the assumption that the reader’s level of experience could be
anywhere between beginner and advanced embedded JavaTM aficionado. We recommend that
you start from the beginning and work your way through this manual sequentially, especially
if you are new to both circuits and Java. Make sure to try all the examples and understand
how they work before moving on to the next. For those of you who do not fall at either end of
the spectrum, below is a condensed table of contents with comments regarding the intended
audience and uses of each chapter.
Preface
General information - discusses Javelin Stamp’s features, this manual’s format and
conventions, resources and acknowledgements.
1: Introduction
General information - about the Javelin, its uses, equipment it can be used with,
specifications, software, etc.
2: Javelin Quick Start
Recommended for all – includes step by step instructions for software installation,
hardware setup, trouble shooting, a couple of example programs, an example circuit,
and a software tour.
3: Beginners Guide to Embedded JavaTM Programming
Recommended for Java newcomers and BASIC Stamp users - if you’ve never
programmed in Java before, read this, and try the examples!
4: Application Examples – Circuits and Programs
Recommended for embedded newcomers and BASIC Stamp users – provides good
examples for BASIC Stamp users to make the transition to Java based hardware
design, and helps those new to circuit based programming projects get their feet wet.
5: Using the Javelin Stamp IDE
Recommended for all – the Javelin Stamp IDE is a powerful tool with many useful
features.

Preface
Page viii •Javelin Stamp Manual v1.1 •www.javelinstamp.com
6: Javelin Stamp Programmers Reference
If you are a Java programmer, pay close attention to the differences between Java for
the Javelin and Java on your PC. For beginners, this is a good way to learn
programming in Java.
7: Working with Objects
Recommended if you are still learning Java – by this point, if you were new to Java
at the beginning of this manual, you are now well into the learning curve.
8: Object Reference
Recommended for all – whether you are an experienced Java programmer or you just
finished Chapter 7, this chapter explains the Java library classes available for use
with the Javelin.
9: Javelin Stamp Hardware Reference
Recommended for all – explains all the hardware related library classes and methods.
If it has to do with a VP, a peripheral or an external circuit, the information is here.
10: Technical Details
Appendix material.
Java Programmers – READ THIS
The Javelin Stamp is a small yet powerful controller that makes use of a subset of Java 1.2.
The Javelin Stamp has firmware enhancements (called Virtual Peripherals or VPs) that
emulate, or virtualize, hardware devices such as UARTs, timers, A/D converters, D/A
converters, and more. These VP’s have been painstakingly optimized, and they take the form
of native methods that make it easy to interface with just about any circuit or peripheral
device. Many of these firmware features are similar to those that lead the BASIC Stamp’s
popularity, and others have long been on BASIC Stamp users’ wish lists.
The flip side of the Virtual Peripheral firmware features is that they have been incorporated
into the Javelin Stamp at the expense of Java purity. You will find the experience of
developing applications with the Javelin Stamp uniquiely different from developing
applications on a PC. To get to the rewards of a rapid prototype of your product design or
project with minimal stumbling, we recommend above all that you try the many programming
and circuit examples in this text. Before getting started on the examples, take a few minutes
sdill
Comment [1]: 10: Internet Programming Advanced
example – connecting to UDP servers. This section needs
to be added back.

Preface
Javelin Stamp Manual v1.1
•
www.javelinstamp.com
•
Page ix
to review the reading list below. It will acquaint you with the scope of Javelin Stamp projects
and help you avoid some of the programming pitfalls you might otherwise encounter.
Suggested reading for Java Programmers:
Section
Page
The Javelin Stamp and Its Features
1
Programming Language - JavaTM for the Javelin Stamp
2
Summary of Java Differences
225
Javelin Stamp Integrated Development Environment
2
Virtual Peripherals
3
Background VPs
3
Foreground VPs
3
How the Javelin Stamp Works
4
BASIC Stamp Enthusiasts – READ THIS
As with the Java Programmers who were addressed in the previous section, programming the
Javalin Stamp is also likely to be very different from what you, the BASIC Stamp Enthusiast,
are expecting. This manual has LOTS of example programs and circuits to help you
transition from PBASIC to the Java subset used to program the Javelin Stamp. Especially if
you are unfamiliar with Java, we strongly recommend that you work through the examples in
this text sequentially. The majority of this manual’s organization was established with you in
mind, so, if you have not already done so, please take a look at the Manual Orginazation
section at the beginning of this preface. If you are like the rest of us at Parallax, you probably
can’t wait to get started, so have fun with Chapter 2: Javelin Quick Start.
Manual Conventions
Below is a list of typographical conventions used in this manual:
Monospaced is used for:
•Words that are part of the language syntax when they are part of a sentence.
•Fragments of programs. The code snippet below is an excerpt from a
program, but it cannot be run on its own. It has to appear in either a
complete program or a complete class file, both of which are discussed
next:

Preface
Page x •Javelin Stamp Manual v1.1 •www.javelinstamp.com
System.out.println(“Not a complete
program.”);
A gray box is used for:
•Complete programs that can be entered into the Javelin Stamp IDE and
executed on a Javelin Stamp, for example:
import examples.manual_v1_0.*;
public class CompleteProgram{
public static void main() {
CompleteClassFile example = new CompleteClassFile();
System.out.println("Now, it's in a complete
program.");
example.displaySameMessageAgain();
}
}
•Complete class files that can be instantiated by other programs. Here is
an example:
package examples.manual_v1_0;
public class CompleteClassFile {
public static void displaySameMessageAgain() {
System.out.println("Now, it's in a complete class
file");
}
}
Resources and Technical Support
The inside cover of this manual has three sections pertaining to resources:
•Internet Access
•Internet Javelin Stamp Discussion List
•Contacting Parallax
Follow the Tech Support link at www.javelinstamp.com
for the latest in tech support contact info, discussion
group links, manual errata, answers to frequently asked
questions, and more!

Preface
Javelin Stamp Manual v1.1
•
www.javelinstamp.com
•
Page xi
Free Downloads from www.javelinstamp.com
You can always get the latest revisions and updates of the following from
www.javelinstamp.com:
•Javelin Stamp Manual
•Javelin Stamp IDE
•Application Notes
•Library Files
Acknowledgements
Chris Waters and Celsius Research provided the Javelin Stamp firmware and reference
design. This manual was developed using information and research provided by Al Williams
Consulting. Each and every employee at Parallax has made some contribution to the Javelin
Stamp project, so as always, thanks to the entire Parallax staff.


1: Introduction
Javelin Stamp Manual v1.1
•
www.javelinstamp.com
•
Page 1
The Javelin Stamp and Its Features
The Javelin Stamp is a single board computer that’s designed to
function as an easy-to-use programmable brain for electronic products
and projects. As shown in Figure 1.1, it’s about the size and shape of a
commemorative postage stamp. It is programmed using software on a
PC and a subset of Sun Microsystems Java® programming language.
After the program is downloaded to the Javelin, it can run the program
without any further help from the PC. The Javelin can be programmed
and re-programmed up to one million times.
We hope you enjoy working with your new Javelin Stamp as much as
we have while preparing this manual. The Javelin Stamp is somewhat
of a departure from Parallax’s BASIC Stamps. Most notably, the
Javelin is programmed using a subset of the Java programming
language. Some of the other features that set the Javelin apart from
BASIC Stamps are:
•The instruction codes for the Javelin are fetched and executed from a
parallel SRAM instead of a serial EEPROM.
•The Javelin has 32k of RAM/program memory with a flat architecture.
No more program banks, and no more tight squeezes with variable
space.
•The Javelin has built in Virtual Peripherals (VPs) that take care of
serial communication, pulse width modulation and tracking time in the
background.
•Serial communication is buffered as a background process. When
writing programs, all you have to do is periodically check the buffer.
•The Javelin Stamp Integrated Development Environment (Javelin
Stamp IDE) software is a significant departure from a simple Editor
and messages window combination. When used with the Javelin
connected to a PC by a serial cable, this software can be used as a
highly integrated in-circuit debugging system that allows you to run
code, set breakpoints and view variable values, memory usage, I/O pin
states and more. There is also no need for emulators; the Javelin can be
placed directly into the circuit and debugged there.
•Delta-sigma A/D conversion.
•D/A conversion is accomplished in the background as a continuous
pulse train delivered by an I/O pin. The pulse width modulation VP can
Figure 1.1 Javelin
(top view)
Aristides4/28/05 11:35 AM
Formatted Table
sdill
Comment [2]: The Javelin Stamp takes Parallax’s
BASIC stamps into a new direction.
The Javelin Stamp thrusts Parallax’s BASIC stamps
into a new direction.
Parallax’s BASIC Stamps take a new direction with
the Javelin.
The Javelin Stamp is an exciting new
microcontorller.

1: Introduction
Page 2 •Javelin Stamp Manual v1.1 •www.javelinstamp.com
also be used for generating pulse trains, frequencies, and D/A
conversions in the background while your foreground code is free to
perform other tasks
Those of you who appreciate the simplicity and ease of use of the BASIC Stamps need not
worry; the Javelin Stamp has many features that BASIC Stamp users have come to depend on
in their projects and designs. Here is a list of features built into the Javelin with BASIC
Stamp users in mind:
•Synchronous serial communication (shiftIn/shiftOut)
•The ability to both send and measure discrete pulses (pulseIn/pulseOut)
•Frequency counting (count)
•Simple and intuitive methods for reading from and writing to I/O pins
•Measurement of RC charge and discharge times (rcTime)
BASIC Stamps have been used for everything from lessons in basic computer programming
and electronics, all the way up to aerospace subsystem designs. We expect to see the Javelin
used in a similar manner. However, by making use of the Javelin’s new features, it can be
used to tackle some more demanding designs that used to require larger processors.
Programming Language - JavaTM for the Javelin Stamp
The Javelin’s programming language supports many of the Java languages most useful
features:
•Object Orientation - Inheritance, method overloading, polymorphism and static
initializers.
•Exceptions - Try-catch-finally blocks and the ability to catch exceptions with a
super-class.
•Strings – Programmed using many familiar Java commands.
•Custom Library Support - For many popular peripherals such as LCDs, temperature,
AD, communication ICs, and common Internet protocols such as ARP, UDP, and
PPP.
Java
Differences
There are some differences between writing applications for your PC using
Java 1.2 and the subset of Java used by the Javelin. Experienced Java
programmers should consult the Summary of Java Differences section in
Chapter 10.
Javelin Stamp Integrated Development Environment
sdill
Comment [3]: Check with Jim on this

1: Introduction
Javelin Stamp Manual v1.1
•
www.javelinstamp.com
•
Page 3
Javelin Stamp Integrated Development Environment (Javelin Stamp IDE) offers the features
that you would commonly expect from a source-level debugger:
•Multiple breakpoints
•Stack backtrace
•Inspection of all variables and objects, both static and dynamically allocated
•Single-step, run, stop, reset
•Built-in bi-directional serial message terminal for System.out.println() and
Terminal.getChar() type debugging
The Javelin Stamp IDE is introduced in Chapter 2, and then discussed in more detail in
Chapter 5. This IDE makes real-time debugging so easy that a PC emulator is completely
unnecessary. It is just as easy to develop and debug on the Javelin module itself.
Virtual Peripherals
The Javelin Stamp firmware supports a variety of Virtual Peripherals (VPs). The VPs are
separated into two separate categories, foreground and background. The background
processes allow you to create UARTs, pulse trains, and a timer. Once created, background
VP objects run independently from the program. Since time-sensitive tasks are taken care of
by the VPs in the background, designs that used to be difficult become easy. For example,
serial communication does not stop just because the Javelin is measuring the duration of an
incoming pulse. The programmer simply needs to periodically check the serial buffer in the
foreground code. Below is a list of background and foreground VPs.
Background VPs
•UART (Full duplex, HW flow control, buffered)
•PWM
•32-bit Timer
•1-bit DAC
•Delta/Sigma ADC
Foreground VPs
•Pulse count
•Pulse width measurement
•Pulse generation
•RC Timer
•SPI master
This manual suits for next models
1
Table of contents
Other Parallax Microcontroller manuals

Parallax
Parallax 27113 User manual

Parallax
Parallax 28034 User manual

Parallax
Parallax BASIC Stamp II User manual

Parallax
Parallax eb500-SER C User manual

Parallax
Parallax BS2p Plus Pack AppKit User manual

Parallax
Parallax 28016 User manual

Parallax
Parallax 27150 User manual

Parallax
Parallax BASIC Stamp 2e Owner's manual

Parallax
Parallax WIZnet W5200 User manual