Shop OBEX P1 Docs P2 Docs Learn Events
Parallax Basic Stamp 1 and PIC16F54 — Parallax Forums

Parallax Basic Stamp 1 and PIC16F54


Plan is to compare the two.

Hardware wise and software wise.

Something useful should come out of it.
«1

Comments

  • jmgjmg Posts: 15,175
    edited 2017-06-17 01:09
    Plan is to compare the two.

    Hardware wise and software wise.

    Something useful should come out of it.
    Why ? That's rather apples and oranges ?
    Parallax Basic Stamp is a System Design, that uses a PIC16F MCU and a Serial memory, tightly coupled.
    Users buy the Language, they do not care so much what MCU implements it.

    PIC16F54 is just a MCU, and a rather old one at that.
    With a meager 25 bytes of RAM, and 512 opcodes storage, it really is limited.
    For the same sub 50c price, you can buy a MCU with 16-18k FLASH, 768 bytes RAM, ADCs PWM and UART/SPI/i2c

    Something useful does come out of this : No one uses PIC16F54 for new designs in 2017+

  • Going to take it one step at a time.

    Basic Stamp module is self contained.

    User doesn't have to deal with power circuit.

    Then the external EEPROM is pre wired.

    Now we back up to the Stamp 1 DIPP.

    What's left is the serial interface. Very clever.

    There is a lot to the simple on the surface Stamp 1 and Stamp 1 module.

  • The software/firmware is messy at first look.

    It's beyond a simple bootloader.

    That interpreter. Need to deconstruct that.

    Token stuff is a clue.

    I looked at one article of Parallax at that level.

    It got ugly real fast. Very complicated.
  • Mike GreenMike Green Posts: 23,101
    edited 2017-06-17 04:06
    The interpreter and the interpretive code are not meant for people to use except through the interpreter and the compiler/editor provided by Parallax. The interpretive code is optimized for compactness because of the very limited memory available in the EEPROM (256 bytes!) There was once a book (booklet) written about the BS1 interpretive code ... all figured out by examining hex dumps of little compiled program fragments. Parallax still considers the structure of the interpretive code proprietary and has never publically documented it.
  • microcontrollerusermicrocontrolleruser Posts: 1,194
    edited 2017-06-17 05:04
    One thing is very obvious.

    There has been a glaring need for a Stamp 3 and 4 and so on.

    The interpreter kills a lot capacity in the original Stamps.

    With the new improved PIC's the better Stamp could be more PIC like.

    Closing the gap between the two.

    It could have much more capacity and still have the convenience.

    You could say Firewing and some others are PIC 3 and 4 clones.
  • microcontrollerusermicrocontrolleruser Posts: 1,194
    edited 2017-06-17 05:46
    You say Parallax is proprietary. That's quite clear.

    Can the same thing be done. Yes.

    Examples: PICaxe, Proton Basic, Firewing, Maximite and Basic Atom.

    It seems like a lot of programming but the info is available.

    It may just be an adjustment in the compiler.

    Sending out tokens instead of hex. Tokens are a known thing. I think it's used alot in PLC and ladder logic also.

    The interpreter looks formidable but the PIC still fetches and executes instructions in the end


  • Back at the ranch.

    We have a PIC16F59 already.

    It's just a PICF54 with 40 pins and a couple other things.

    I will compare power connections first.

  • Here's link from Stack Exchange about writing a compiler.

    https://softwareengineering.stackexchange.com/questions/165543/how-to-write-a-very-basic-compiler

    Here's link to one book on building an interpreter.

    https://www.google.com/search?q=Compilers+and+Interpreters+in+C++++book&ie=utf-8&oe=utf-8

    It would take a while to get up to speed on something like that.

    Good part is you would have a PIC language 'just the way you like it'.:)
  • Parallax has clearly moved on to using their own intellectual property (the Propeller) rather than remaining dependent on others (like Microchip and the PICs). They moved to Scenix for the BS2sx when the PICs of the time didn't offer enough performance, then they got stuck in an intellectual property battle between Microchip and Scenix that Scenix eventually lost leaving Parallax at a dead end.

    The Propeller 1 has support for C, Spin, Forth, Blockly (a graphical front end for C ... important for STEM education). There are several Basic derivatives (PropBasic and FemtoBasic) while not PBasic are still very useful. You can run CPM with a Z80 emulator which opens up a huge list of languages.

    It's my personal opinion that it would have been useful for Parallax to have early on provided either a PBasic interpreter for the Propeller or a PBasic to Spin compiler, but they were hearing from their educational customers that a C compiler was needed more and they went with that ... and did it well.

    I think the Propeller Mini is the modern day successor to the Stamps with the Propeller Flip module being the successor to that with a full complement of I/O pins, better power management, and built-in USB interface ... plus a few goodies like LEDs.

    Have a look at FemtoBasic (in the Propeller Object Exchange). It's a simple integer Basic interpreter with some additions to support the Propeller's I/O and counters. It's easily expandable to support external devices on the Activity Board and Board of Education.
  • David BetzDavid Betz Posts: 14,516
    edited 2017-06-17 15:02
    Mike Green wrote: »
    You can run CPM with a Z80 emulator which opens up a huge list of languages.
    I keep hearing this mentioned in discussions of languages available on the Propeller but, while it's interesting, I don't think it's particularly useful and should probably be left off of lists of useful languages. Do any of these languages running on an emulated Z80 really have sufficient performance to be used for anything real or are they just a curiosity?
  • microcontrollerusermicrocontrolleruser Posts: 1,194
    edited 2017-06-17 16:27
    Thank you for giving it an effort about Propellor.

    Parallax built there own chip with multi processing. They could have done another improved Stamp at the same time.

    Just ran them off at the same time.

    Mike. What features would you like in a 32 bit PIC language?

    A better Digilent CHIPKit. With Parallax like IDE.

    My problem with Propellor is it is not transferrable to PIC's or AVR's or any other microcontrollers.

    Doing anything with Propellor's gets me nowhere with primary goal of learning PIC assembler and C.

    We have some great Propellor hardware that we don't use because we ran into that wall.

  • Back at he ranch again!

    https://en.wikipedia.org/wiki/Interpreter_(computing)

    Interpreters have been around a long time.

    Coming up with the Basic Stamp is an example of 'synthetic creativity'.

    Recombining existing ideas.

    Anyhow. Bottom line. I'm not all that big on even bootloaders so I can live without an interpreted 'quick turnaround' language.

    That is in exchange for more control. 'Luke! You must have more control!'

    It is hard to kick the habit though!
  • kwinnkwinn Posts: 8,697
    David Betz wrote: »
    Mike Green wrote: »
    You can run CPM with a Z80 emulator which opens up a huge list of languages.
    I keep hearing this mentioned in discussions of languages available on the Propeller but, while it's interesting, I don't think it's particularly useful and should probably be left off of lists of useful languages. Do any of these languages running on an emulated Z80 really have sufficient performance to be used for anything real or are they just a curiosity?

    Depends on your definition of anything real. It was real enough that I could run the Z80 code from the eproms of a 20 detector gamma counter when the original (rather old and large) board went up in smoke. It was also real enough to replace the Z80 controller of a small PBX system, also using the code from the original eproms.

  • David BetzDavid Betz Posts: 14,516
    edited 2017-06-17 21:39
    kwinn wrote: »
    David Betz wrote: »
    Mike Green wrote: »
    You can run CPM with a Z80 emulator which opens up a huge list of languages.
    I keep hearing this mentioned in discussions of languages available on the Propeller but, while it's interesting, I don't think it's particularly useful and should probably be left off of lists of useful languages. Do any of these languages running on an emulated Z80 really have sufficient performance to be used for anything real or are they just a curiosity?

    Depends on your definition of anything real. It was real enough that I could run the Z80 code from the eproms of a 20 detector gamma counter when the original (rather old and large) board went up in smoke. It was also real enough to replace the Z80 controller of a small PBX system, also using the code from the original eproms.
    Ah, I didn't know it had been used like that. That's impressive. However, I still don't think it is useful to list CP/M languages among those supported on the Propeller since they are not native.

  • But, but, David,

    besides running historical the first C program on a P1, you even could run MS-Basic and (hearsay) even COBOL.

    Sadly I never got it running on any of my Propeller Boards, needs somehow external ram, I really would like to try it.

    And not being native, isn't a Z80 emulator nothing else as a Spin byte code interpreter is, a emulator/interpreter?

    By this definition Spin is not native to the P1 because it is not PASM?

    Confused!

    Mike

  • I doubt anyone would use it for new development.
  • kwinnkwinn Posts: 8,697
    David Betz wrote: »
    I doubt anyone would use it for new development.

    Certainly not for commercial projects, but for there is a lot of old equipment around where the original electronics can no longer be repaired but the rest of the system still works well. In many such cases the Propeller can be used to replace the electronics at low cost and may even result in a more capable system. It may require new code, or it may be possible to run the existing code by using an emulator.
  • David,
    Strictly speaking, unless C code is compiled in cog mode (native instructions) or you have PASM, you don't really have native Propeller code. Everything else is at least partially interpreted. That's a very reasonable way to implement many many applications, particularly given the Propeller's raw speed.

    I remember the Z80's speed. It got a lot done and was often limited by floppy disk throughput. On the Propeller, the emulator had similar responsiveness. I wouldn't do much floating point using it, but it would be reasonable to do byte or word processing. There are a lot of development tools for the Z-80 that are in public archives and would work.

    All that said, I would need to have a very unique application to choose to have a Propeller running a Z-80 emulator running CP-M as the basis of the implementation.

    Likewise, there's not enough unique about Microchip's PIC devices that would cause me to choose one of them over something like the Propeller for a Stamp replacement or substitute. I might use something like the ESP8266 module because of the built-in WiFi and other features.
  • Well, good luck finding anyone who thinks that just because Pascal runs on the Z80 it is usable as a development language for the Propeller. Did the Z80 emulator have access to pins and the ability to launch PASM code into COGs? Was there any way for a program running on the Z80 to access the Propeller hardware in any direct way?

    Since all micro controllers are Turing complete I guess it would be possible to run CP/M on any of them and hence they all have the same capability as the Propeller. Well, that may not be true for the absolute cheapest MCUs but it is probably true for any MCU that costs about the same as the Propeller.

  • I would be happy with a Parallax single processor that could be programmed

    in C and Assembler.

    Here's the hard part.

    With different levels of 'sugar coating'.

    Beginner level up to no sugar coating.
  • jmgjmg Posts: 15,175
    I would be happy with a Parallax single processor that could be programmed

    in C and Assembler.

    Here's the hard part.

    With different levels of 'sugar coating'.

    Beginner level up to no sugar coating.

    Have you looked at the Parallax FLiP ??

    That can program in C, Assembler, PropBASIC and Spin.
    If you are coming off BASIC Stamp, then PropBASIC is well worth a look, and you can even play with the PropBASIC source code !!

  • 'Have you looked at the Parallax FLiP ?? '

    Here's the same thing for PICBasic.

    http://store.melabs.com/cat/DSTICK.html

    With that your using a superset of PBasic and can access PIC Assembler.

    MELabs and Parallax are buddies. At least they were at some point.



  • Hmmm ... I happen to use a PIC16F54 all the time and sell about 50 pre-programmed PIC's a month, so there is some life there.

    There are several other micro's that I use as well depending on the project ... 10F202, 16F54, 16F84, 16F627, 18F8722, 18F4620 ... and a few others.

    "MELabs and Parallax are buddies. At least they were at some point." <--- You might want to double check that. They might have an "agreement", but I don't think they are exactly buddies.

    If you are trying to roll your own BASIC or PBASIC like programming into a PIC for any profit, I just wouldn't. For personal use, sure fine, do whatever you want. Personally I prefer to code in Assembly and kinda like building my own macros in a way I can use them in code later down the road... which essentially all of the PBASIC commands are... just MACRO's that are called upon in sequence with tokenized values in EEPROM


  • Hmmm! Exactly. I knew there were others out there on the same wave length as me.

    'If you are trying to roll your own BASIC or PBASIC like programming into a PIC for any profit,'

    Kind of sounds like it at times. Doesn't it. Roll my own C and Assembler compiler perhaps as a hobby.

    Have different versions. Beginner, Intermediate and Advanced.

    You are preaching to the choir about those PIC's you use.

    Assembler? Great. Yoda! Okay to PM you with some questions please?

    Meantime. Here and now. Have to live with Stamps 2sx and above and then the full SX.

    Parallax does a decent job with documentation. I'll give them that.


  • Mr Schwabe

    Make that tomorrow morning about the PM.

    'which essentially all of the PBASIC commands are'

    You could make a command and call it 'Flower'. It doesn't matter. It's calling Assembler code.

    Got it!

  • microcontrollerusermicrocontrolleruser Posts: 1,194
    edited 2017-06-20 07:56
    For one thing the current Stamp 1 is not a 16F54.

    I think I got that from like Al Williams article or somewhere.

    Current Stamp 1 is a 16C56-XT/P

    Will keep working on this.
  • Honestly, @microcontrolleruser, if your goal is to learn PIC C and assembly it seems like Microchip is the place you would want to go -- the BASIC Stamp will not help you beyond circuit verification.

    BTW... I'm quite certain that Parallax and MEL are not "buddies."
  • microcontrollerusermicrocontrolleruser Posts: 1,194
    edited 2017-06-21 00:34
    Johnny Mac

    'Microchip is the place you would want to go'

    Been working with PIC's for @ one year.

    PICBasic is Basic and Assembler. CCS C compiler is sugar coated C and straight Assembler for PIC's.

    Seems like PICBasic and Parallax are buddies or were.

    PICBasic uses PBasic commands.

  • I say to Parallax.

    Make your own C compiler for PIC.

    Offer it for education and hobbyist.

    They know how to do it.

    'Busy hands are happy hands'.
  • jmgjmg Posts: 15,175
    I say to Parallax.

    Make your own C compiler for PIC.

    Offer it for education and hobbyist.

    They know how to do it.

    'Busy hands are happy hands'.
    This makes no logical sense.
    Why on earth would Parallax offer a compiler for a part they do not sell ?!

    Even ignoring the commercial silliness of this idea, the bottom end PICs are essentially brain-dead, and struggle to support even a half-baked C.
    They are not on anyone's first choice for new designs list.
    There are 8 bit MCUs that are cheaper, with more resource, and that already have good C compilers.

    Smarter to learn how to use one of those.
Sign In or Register to comment.