Shop OBEX P1 Docs P2 Docs Learn Events
basic interperter — Parallax Forums

basic interperter

ArchiverArchiver Posts: 46,084
edited 2004-04-19 00:26 in General Discussion
i think this is ok to ask, is it posible to utilize a bs2 interpeter
chip on a circut with a pic 16f84a , and then program the pic in
basic? if so , can u drive multiple pic's of one interpeter? also
link to info on interpeter's , i checked and got buried in other
stuff
if it doesnt work, can some one point me to what is an interpeter
txt, i want to know what its use is specificaly

i think this is its general use, so i think im on topic here, if not
ekk in the moderated email can u link me to something about
interpeters (srry)

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2004-04-18 18:53
    In the BS2 OEM version, the PIC is programmed
    to BE the PBasic interpreter. It is reading
    its stored PBasic tokens from an attached EEPROM.

    There's really no way to 're-use' the attached
    EEPROM to drive multiple PIC's -- they'd interfere
    with each other.

    If you search Basic +PIC on google, you should get
    a few hits. Since this is a Parallax site, I
    can't really recommend other vendors here.

    The big difference between an 'Interpreter' and a
    'Fully Compiled' solution is the 'Interpreter' has
    a built-in library, which runs based on a set of
    'Tokens' which select the next library call to run.
    In this case, the 'library' is pre-burned into a
    PIC, and an external EEPROM contains the tokens.

    A fully compiled solution compiles your source into
    PIC assembly code, then programs this into the PIC
    itself.


    --- In basicstamps@yahoogroups.com, "jutsuju" <xsavior38@h...> wrote:
    > i think this is ok to ask, is it posible to utilize a bs2
    interpeter
    > chip on a circut with a pic 16f84a , and then program the pic in
    > basic? if so , can u drive multiple pic's of one interpeter? also
    > link to info on interpeter's , i checked and got buried in other
    > stuff
    > if it doesnt work, can some one point me to what is an interpeter
    > txt, i want to know what its use is specificaly
    >
    > i think this is its general use, so i think im on topic here, if
    not
    > ekk in the moderated email can u link me to something about
    > interpeters (srry)
  • ArchiverArchiver Posts: 46,084
    edited 2004-04-18 23:58
    All microprocessors run machine code, the machine code is specific to the
    target processor and its architecture. There are two typical ways to
    produce "code" that runs on target processors. One can program in an
    interpreted language such as PBASIC, Java, or program in a compiled language
    such as C, some versions of BASIC.

    An interpreted language is one that gets tokenized and then "interpreted" by
    software running on the target processor. You can almost consider the
    "interpreter", running on the target system, as a run time environment. If
    you have played with Java, it is like Java scripts and the Java run-time
    environment (JRE).

    A compiled language (C++, BASIC) is something that gets parsed through a
    piece of software (the compiler). The compiler translates it into something
    (most times re-locatable assembler) that then can be "linked" into machine
    code for the target processor.

    In the case of a Basic Stamp, it is preprogrammed with their PBASIC
    interpreter. You tokenize the PBASIC code on your PC and then downloaded it
    into the Basic Stamp. On reset the PIC executes the interpreter and runs
    through the tokens that you downloaded to it. So the Basic Stamp never has
    your code in a form (machine code) that can be directly executed by the
    PIC... so you really need to have all PICs to be running the interpreter in
    order to execute the PBASIC tokens.

    Original Message
    From: "jutsuju" <xsavior38@h...>
    To: <basicstamps@yahoogroups.com>
    Sent: Sunday, April 18, 2004 1:45 AM
    Subject: [noparse][[/noparse]basicstamps] basic interperter


    > i think this is ok to ask, is it posible to utilize a bs2 interpeter
    > chip on a circut with a pic 16f84a , and then program the pic in
    > basic? if so , can u drive multiple pic's of one interpeter? also
    > link to info on interpeter's , i checked and got buried in other
    > stuff
    > if it doesnt work, can some one point me to what is an interpeter
    > txt, i want to know what its use is specificaly
    >
    > i think this is its general use, so i think im on topic here, if not
    > ekk in the moderated email can u link me to something about
    > interpeters (srry)
    >
    >
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.
    >
    > Yahoo! Groups Links
    >
    >
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2004-04-19 00:26
    Nice Explanation!

    ===================================
    All microprocessors run machine code, the machine code is specific to the
    target processor and its architecture. There are two typical ways to
    produce "code" that runs on target processors. One can program in an
    interpreted language such as PBASIC, Java, or program in a compiled language
    such as C, some versions of BASIC.

    An interpreted language is one that gets tokenized and then "interpreted" by
    software running on the target processor. You can almost consider the
    "interpreter", running on the target system, as a run time environment. If
    you have played with Java, it is like Java scripts and the Java run-time
    environment (JRE).

    A compiled language (C++, BASIC) is something that gets parsed through a
    piece of software (the compiler). The compiler translates it into something
    (most times re-locatable assembler) that then can be "linked" into machine
    code for the target processor.

    In the case of a Basic Stamp, it is preprogrammed with their PBASIC
    interpreter. You tokenize the PBASIC code on your PC and then downloaded it
    into the Basic Stamp. On reset the PIC executes the interpreter and runs
    through the tokens that you downloaded to it. So the Basic Stamp never has
    your code in a form (machine code) that can be directly executed by the
    PIC... so you really need to have all PICs to be running the interpreter in
    order to execute the PBASIC tokens.


    [noparse][[/noparse]Non-text portions of this message have been removed]
Sign In or Register to comment.