Shop OBEX P1 Docs P2 Docs Learn Events
BS2 - How does it work? — Parallax Forums

BS2 - How does it work?

Ted TuranskiTed Turanski Posts: 4
edited 2007-12-13 01:51 in BASIC Stamp
Can anyone direct me to an explanation of how the BS2 works.· I have the schematic of the BS2.· When the program is downloaded from the computer to the BS2, where does that program go to reside?· Does it go through the PIC and then on to the separate memory chip and then read back into the PIC whenever the program is run?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-12-11 23:39
    There are a variety of BS2 models with the BS2 using a PIC and the others using an SX as the actual microcontroller.· They vary in terms of the speed, memory, and programming features.· All of them work essentially the same way.· There's some supporting circuitry on the module including a small voltage regulator and some circuitry for the programming interface.· Your program is stored in an EEPROM that the PIC or SX reads as needed.· The interpreter for the Parallax Basic is stored in the flash memory of the PIC or SX.· The Stamp Editor compiles your program into interpretive code and communicates with the PIC or SX to download the program into the EEPROM.
  • allanlane5allanlane5 Posts: 3,815
    edited 2007-12-12 14:55
    Basically yes, Ted, that is exactly how the BS2 works. One minor detail is as Mike has stated -- the PBasic 'run-time engine' is one-time programmed into the PIC16C57 in the BS2 'plain', and that run-time engine fetches 'tokens' from the "separate memory chip" and uses those tokens to select run-time behavior on the PIC. Your program is "tokenized" by the Parallax IDE when you "compile" it.
  • Ted TuranskiTed Turanski Posts: 4
    edited 2007-12-13 01:51
    Thank you for your answers to my question.
    Ted Turanski
Sign In or Register to comment.