just a beginner!
You'll probably get a varied assortment of correct responses to your
question. I look at it as three phases/layers of executable "code":
1. The Editor/Loader
A lot of the usual "interpreter" functions are done at this level in
your PC/MAC. A _lot_ of the utility and pure genius that makes the
Stamp so successful resides in the software resident in this layer.
The PBasic code is parsed, checked for syntax errors, and so on.
However, things stop short of actually executing your program in your
PC/MAC. When prompted to do so, the Editor/Loader will permanently
save your PBasic code, or generate a transient set of "tokens" for
download to your Stamp.
2. The Tokens
The Stamp itself never sees your PBasic code. It sees tokens which
represent an intermediate "language"/instruction set--a jumble of
bits to anyone or any program which doesn't speak token-ese. The
tokens are highly condensed for storage in your Stamp's EEPROM and
bear no cosmetic resemblance to their precursor PBasic statements or
anything else people normally look at.
3. The Stamp
Your Stamp has a microprocessor (Microchip PIC16C56/7, Scenix SX28)
chip with a highly sophisticated program burned into it. That
program--like the Editor/Loader, you don't get to see it or modify it
either--communicates with the Editor/Loader to transfer the tokens
from the PC/MAC into the EEPROM. To run your program, the
microprocessor's program reads the tokens back out of the on-board
EEPROM and interprets them. Note that the Stamp's microprocessor
executes only the code resident in itself--the tokens amount to an
external data file which prompts the microprocessor program to
execute one or more of its internal routines.
The source code and programming language(s) used to create the
Editor/Loader in your PC/MAC and the controller program in your
Stamp's microprocessor are unknown and unavailable to us mere
mortals. In theory, any language could be used to generate tokens
for download to your Stamp. That would require fluency in token-ese
and the token download protocol. In fact, you could program your
Stamp by sending it hand-assembled tokens directly rather than from
any Editor/Loader, if you enjoy pain. Even then, you couldn't
create new tokens unless you installed your own microprocessor-based
control program to interpret them.
Here's hoping some of this explanation is intelligible.
Steve
On 20 Jul 00 at 19:15, Par_Ham@e... wrote:
> i am just beginning with the concept of robotics and have a few
> remedial questions. 1) does the basic stamp actually interpret the
> code or is the code interpreted and downloaded in binary to the
> stamp? 2) how is basic physically mounted onto the chip itself?
> say if i wanted to put lisp or another language onto a robot how
> would you go about that?
question. I look at it as three phases/layers of executable "code":
1. The Editor/Loader
A lot of the usual "interpreter" functions are done at this level in
your PC/MAC. A _lot_ of the utility and pure genius that makes the
Stamp so successful resides in the software resident in this layer.
The PBasic code is parsed, checked for syntax errors, and so on.
However, things stop short of actually executing your program in your
PC/MAC. When prompted to do so, the Editor/Loader will permanently
save your PBasic code, or generate a transient set of "tokens" for
download to your Stamp.
2. The Tokens
The Stamp itself never sees your PBasic code. It sees tokens which
represent an intermediate "language"/instruction set--a jumble of
bits to anyone or any program which doesn't speak token-ese. The
tokens are highly condensed for storage in your Stamp's EEPROM and
bear no cosmetic resemblance to their precursor PBasic statements or
anything else people normally look at.
3. The Stamp
Your Stamp has a microprocessor (Microchip PIC16C56/7, Scenix SX28)
chip with a highly sophisticated program burned into it. That
program--like the Editor/Loader, you don't get to see it or modify it
either--communicates with the Editor/Loader to transfer the tokens
from the PC/MAC into the EEPROM. To run your program, the
microprocessor's program reads the tokens back out of the on-board
EEPROM and interprets them. Note that the Stamp's microprocessor
executes only the code resident in itself--the tokens amount to an
external data file which prompts the microprocessor program to
execute one or more of its internal routines.
The source code and programming language(s) used to create the
Editor/Loader in your PC/MAC and the controller program in your
Stamp's microprocessor are unknown and unavailable to us mere
mortals. In theory, any language could be used to generate tokens
for download to your Stamp. That would require fluency in token-ese
and the token download protocol. In fact, you could program your
Stamp by sending it hand-assembled tokens directly rather than from
any Editor/Loader, if you enjoy pain. Even then, you couldn't
create new tokens unless you installed your own microprocessor-based
control program to interpret them.
Here's hoping some of this explanation is intelligible.
Steve
On 20 Jul 00 at 19:15, Par_Ham@e... wrote:
> i am just beginning with the concept of robotics and have a few
> remedial questions. 1) does the basic stamp actually interpret the
> code or is the code interpreted and downloaded in binary to the
> stamp? 2) how is basic physically mounted onto the chip itself?
> say if i wanted to put lisp or another language onto a robot how
> would you go about that?
Comments
remedial questions. 1) does the basic stamp actually interpret the
code or is the code interpreted and downloaded in binary to the stamp?
2) how is basic physically mounted onto the chip itself? say if i
wanted to put lisp or another language onto a robot how would you go
about that? thank you for your patience with a beginner.
>i am just beginning with the concept of robotics and have a few
>remedial questions. 1) does the basic stamp actually interpret the
>code or is the code interpreted and downloaded in binary to the stamp?
The source code is converted to p-Code, and the p-Code it interpreted by
the program embedded in the Stamp chip. Least that's how I understand it.
>2) how is basic physically mounted onto the chip itself? say if i
>wanted to put lisp or another language onto a robot how would you go
>about that?
It isn't. The Basic processer exists only in the source language
editor/coder, the de-coder and interpreter exist onboard the chip. The
Basic processor converts the source tet into p_Code, and the p-Code is
downloaded as interpreter source. The interpreter is presented (after
download) with up to 2K of tokens. Each p-Code token represents one of more
instructions or routines, directly parsed from the source code (txt file),
as processed prior to downloading.
Brian Forbes has an excellent book on the inner workings of the PBASIC
Stamp and how it operates:
[noparse][[/noparse] http://members.aol.com/stamp2book ]
> thank you for your patience with a beginner.
Sure
Regards,
Bruce Bates