Shop OBEX P1 Docs P2 Docs Learn Events
Running at 1 Million Instructions Per Second? — Parallax Forums

Running at 1 Million Instructions Per Second?

HumanoidoHumanoido Posts: 5,770
edited 2009-07-03 19:46 in BASIC Stamp
The BS1 PIC chip is rated at one million instructions per second (machine language).
According to specs, PBASIC runs at 2000 Instructions Per Second.

Is there a way to access BS1 machine language, bypass PBASIC loading,
and run a few machine language instructions at 1 million IPS?

humanoido

Comments

  • LeonLeon Posts: 7,620
    edited 2009-07-03 08:57
    Only if you replace the BS1 chip with a compatible PIC. You'll lose the BASIC interpreter, of course.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle
  • HumanoidoHumanoido Posts: 5,770
    edited 2009-07-03 15:46
    The BS1 is a pic chip. So there must be some way to access
    the machine language side of it before downloading pbasic,
    without actually replacing the chip. I only need to access an
    instruction or two to make an example. Thanks sincerely.

    humanoido
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-07-03 16:23
    No, what you are proposing is simply not possible. The PBASIC byte code interpreter is burned into non-voltile memory (EEPROM or OTP EPROM). Machine code has to reside in that memory (not RAM) to execute, so any machine code you execute would have to replace portions of the PBASIC interpreter, rendering the chip unusable as a BASIC Stamp. In the case of OTP EPROM, your only option, as Leon explained, is to replace the chip.

    -Phil
  • ForrestForrest Posts: 1,341
    edited 2009-07-03 16:24
    It's not possible to program a BS1 with machine language. The PIC chip on the BS1 has been programmed with the PBASIC interpreter by Parallax.
  • LeonLeon Posts: 7,620
    edited 2009-07-03 19:46
    Just use a PIC on its own if you need a lot of performance. The 16-bit PICs can do 40 MIPS.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle
Sign In or Register to comment.