Shop OBEX P1 Docs P2 Docs Learn Events
Any updates on PropBasic? — Parallax Forums

Any updates on PropBasic?


Last I thought I read, this was going to be coming back as a Parallax-supported language.

«1

Comments

  • The effort is connected to the PropellerIDE development which continues to move forwards quietly in the background.

    Last time I checked github, Brett had made a lot of changes in the codebase to support multi languages.

    Hopefully now summer is out the way, and school is back (so other priority tasks are complete), we might see an autumn update.

    Personally I cannot wait for PropBasic support. I feel that will open many exciting new doors!

  • PropBasic is the main reason that I check the forum every day. For performance and readability, it blows away ALL the other Prop languages so I don't understand why it's not more widely accepted.
  • Mickster wrote: »
    PropBasic is the main reason that I check the forum every day. For performance and readability, it blows away ALL the other Prop languages so I don't understand why it's not more widely accepted.

    Doesn't PropBasic compile LMM code? So it's limited by the speed of hub fetch and execute etc.

    How does PropBasic compared to Tachyon for code size and speed? My minimum instruction cycle time is 400ns and I can do an SPI op in about 2.4us etc. Most opcodes are only one to two bytes long.
  • jmgjmg Posts: 15,173
    edited 2015-09-08 10:06
    Doesn't PropBasic compile LMM code? So it's limited by the speed of hub fetch and execute etc.

    I think it does both COG-Native (aka PASM) and LMM.

    Here is an example thread, with Source and Compiled Listings
    http://forums.parallax.com/discussion/123170/propbasic-reciprocal-frequency-counter-0-5hz-to-40mhz-40mhz-now

    How does PropBasic compared to Tachyon for code size and speed? My minimum instruction cycle time is 400ns and I can do an SPI op in about 2.4us etc. Most opcodes are only one to two bytes long.
    In COG native, PropBASIC will be 50ns cycle times.

  • Well PASM is 50ns cycle time but the "instruction" is compiled into PASM which normally requires more than one instruction, usually several in fact, and there are only 496 longs to play with, so that really limits program size. As for LMM, how does that fare then after a statement is compiled?
  • PropBasic compiles to some really tight PASM code in most cases, but can always be user-tweaked afterwards. And yes, once compiled it runs at PASM speed, so faster even than SPIN. For longer cog code, you can add the LMM directive, which will (as I recall) slow the execution by about 5x

    I tend to have 1 or 2 cogs running LMM (main program logic / SD read/write), and the rest without (like serial / IO handling). You can mix and match as required.
  • VonSzarvas wrote: »
    PropBasic compiles to some really tight PASM code in most cases, but can always be user-tweaked afterwards. And yes, once compiled it runs at PASM speed, so faster even than SPIN. For longer cog code, you can add the LMM directive, which will (as I recall) slow the execution by about 5x

    I tend to have 1 or 2 cogs running LMM (main program logic / SD read/write), and the rest without (like serial / IO handling). You can mix and match as required.

    You just beat me to it...LOL
  • I know PASM runs at PASM speed as even Spin ends up running PASM at some point but how much PASM does it have to run for something simple but practical, say talking to WS2812B neopixels for instance? I just haven't seen much being done with it and I'm interested to know a bit more.
  • For the simple time critical stuff that I have done, PropBasic literally is a translater, no overhead at all. I can read the generated PASM listing and directly relate it to my PropBasic source. This is why it also makes for a great PASM learning tool.

  • That is excellent news.
    Having a fast BASIC should be a major interest piquer for all those Arduino users.
  • Heater.Heater. Posts: 21,230
    How so? The Arduino is programmed in C++. Surely most Arduino users have never used BASIC.

    I think there are some problems with getting most Arduino users interested in the Propeller:

    1) Cost. Arduino clones are amazingly cheap.

    2) The IDE. I thought prop-gcc and SimpleIDE would be as simple as the Arduino IDE but that is not how it turned out. Not that I don't love them both.

    3) All the hundreds of shields. That's a lot of cheap, instant functionality they would have to give up.

    4) Support. This forum and other support for the Prop is great but I don't think it matches up to the huge ocean of code projects, blogs etc that have grown up around the Arduino.
  • How so? The Arduino is programmed in C++. Surely most Arduino users have never used BASIC.

    One example... Users that struggle with understanding Arduino and the code- they might see Prop + BASIC a more comfortable alternative.
  • VonSzarvas wrote: »
    How so? The Arduino is programmed in C++. Surely most Arduino users have never used BASIC.

    One example... Users that struggle with understanding Arduino and the code- they might see Prop + BASIC a more comfortable alternative.

    Exactly what I was trying to say.

    Many, many Arduino folks are still very ignorant of the basics and something truely basic like BASIC is quite likely to appeal to them. They may be too scared to drop down to straight C/C++ without the hand-holding of Arduino-land, or they may be interesting in something that gives them much more bang for their buck?

    Not saying it will suddenly make the Prop the cool kid on the block, however having something that runs BASIC at speed approaching or faster than Arduino-C might convince a small percentage to try it. And I expect that small percentage would look pretty good to Parallax's bottom line.

    Will Parallax commit to this, and release an ASC-Prop board that is more reasonably priced?
    I doubt it.
    But its at least a good start to try and siphon off some of the Arduino folks who just may need a bit more power. Chicken and Egg situation though.




  • PropBASIC is useful for programmers that are familiar with PBasic on the Basic Stamp and/or SX/B that was used on the SX chip. PropBASIC provides a basic-like language that is compiled into either cog PASM or LMM PASM. The generated PASM code is quite efficient, and is pretty much a one-to-one translation of operators in PropBASIC to PASM instructions.

    I think PropBASIC would be more widely used if it had an IDE that supported all its features. Maybe the PropellerIDE will do that in the future.
  • jmgjmg Posts: 15,173
    Dave Hein wrote: »
    PropBASIC is useful for programmers that are familiar with PBasic on the Basic Stamp and/or SX/B that was used on the SX chip. PropBASIC provides a basic-like language that is compiled into either cog PASM or LMM PASM. The generated PASM code is quite efficient, and is pretty much a one-to-one translation of operators in PropBASIC to PASM instructions.

    I think PropBASIC would be more widely used if it had an IDE that supported all its features. Maybe the PropellerIDE will do that in the future.

    Agreed.
    It would also help if a pass was made to make PropBASIC (embedded) more compatible with FreeBASIC (PC)
    - that is one significant problem with Spin, it is an alone-language.


  • jmgjmg Posts: 15,173
    koehler wrote: »
    Will Parallax commit to this, and release an ASC-Prop board that is more reasonably priced?
    Why not ?
    The lack of 5V compatible is a drawback, but Parallax could do a better SpinStamp type design, and I see Winbond/Adesto/Spansion have SPI Flash at 8Mb for sub 30c in moderate volumes.
  • Dave Hein wrote: »
    PropBASIC is useful for programmers that are familiar with PBasic on the Basic Stamp and/or SX/B that was used on the SX chip. PropBASIC provides a basic-like language that is compiled into either cog PASM or LMM PASM. The generated PASM code is quite efficient, and is pretty much a one-to-one translation of operators in PropBASIC to PASM instructions.

    I think PropBASIC would be more widely used if it had an IDE that supported all its features. Maybe the PropellerIDE will do that in the future.

    Hanno supports PropBasic in ViewPort, but it's not free.

    http://onerobot.org/products/viewport/


  • koehlerkoehler Posts: 598
    edited 2015-09-09 01:12
    "jmg:
    Why not ?"

    Thats the million dollar question there.

    Aside from the somewhat hypothetical cost to R&D such a thing, maybe Parallax could get someone interested in this from the Community to whip up a simple, low BOM version?

    The old 2014 thread thats being sunk had Ken positing n hours x $125/hour for $50-100K per design. I am pretty sure one of the brighter bulbs here would be willing and capable of pulling something like this off pretty quick, and maybe for a small $xK contracting fee?

    Shame Gadget Gangster is no longer involved here much.

    Lets see, being a complete novice:

    1x Prop/Prop2 $8 (Parallax can probably negotiate a better price...)
    Xtal ($0.20) and some caps ($0.30) $0.50
    64KB EEPROM $0.20
    misc discretes $1.00
    DC-DC Regulator $1.00
    misc USB and connectors $2.00
    PCB costs $1.5 ?
    Pick and Place and board manf. (or is that included in China?)

    3. Profit !?

    I would think Parallax could get a good design done by someone here for $5-10K easily, and then have someone in-house review it.

    A $15-20 board that included the Prop1 and USB/serial connection seem possible, if there is a desire on someone's part to make it.
    The problem is, does Parallax look at this from a gross margins POV, which is not overly attractive. Or, do they look at this as low margin avenue to help get the Prop/2 better reception and uptake ?

    I think there are still a number of teachers around who are more familiar with BASIC than C/Python.
    BASIC is far less threatening to a non-CS teacher, and since no one else seems to want to offer such a thing, could be a very, very low cost to Parallax way to get even more educator interest alone.

  • jmgjmg Posts: 15,173
    edited 2015-09-09 04:23
    koehler wrote: »
    "jmg:
    Why not ?"

    Thats the million dollar question there.

    Aside from the somewhat hypothetical cost to R&D such a thing, maybe Parallax could get someone interested in this from the Community to whip up a simple, low BOM version?

    I've seen a couple of candidates go past in the last year or two...

    koehler wrote: »
    1x Prop/Prop2 $8 (Parallax can probably negotiate a better price...)
    Xtal ($0.20) and some caps ($0.30) $0.50
    64KB EEPROM $0.20
    misc discretes $1.00
    DC-DC Regulator $1.00
    misc USB and connectors $2.00
    PCB costs $1.5 ?
    Pick and Place and board manf. (or is that included in China?)
    Some of those are high..
    * USB connectors are falling in price, Digikey have a 151-1206-2-ND for 18c/750
    * CAPs and passives are essentially placement cost only, at 3-9c a part. (P&P in USA)

    * I would add a SPI FLASH memory to push the Code Size up significantly

    * A device like CP210x or EFM8UB1 includes a regulator, so it can power the Prop
    (ie the Regulator and USB can merge) EFM8UB1 gives an ADC for free.

    * PCB price is all about area, and a small PCB will be << $1
    More of a challenge is the 0.1" pin-handling, and I like the idea of a DIP socket as a carrier, and using SMD/Edge PCB design for lowest handling cost.
    Ideally this needs a DIP socket in reflow temperatures, which has proven elusive ?

    * Crystals are a pain at ~5MHz....
    Ceramic Resonators are tempting - smaller and include caps but the tolerance is worse than crystals. Still, at this level of product, does that matter ?
    Possibly, a dual PCB footprint can allow CerRes and Oscillator (eg ASTX-H11-5.000 or ASTX-H12-5.000[2.5 x 2.0m 2.5ppm] for good specs, or maybe SG-210STF 5.0000ML [2.5x2.0mm 50ppm] for relaxed spec ...)
    - that means 99% can use the cheap CerRes, and an upgrade exists to better precision.
  • Publison wrote: »

    Hanno supports PropBasic in ViewPort, but it's not free.

    http://onerobot.org/products/viewport/


    I have the full version and find it to be well worth the investment. Haven't see Hanno around for a while, thinking about it.
  • Will Parallax commit to this, and release an ASC-Prop board that is more reasonably priced?
    Not sure what you are getting at. If you are, in fact, referring to the Propeller ASC+ board, Parallax is a reseller of that board, which is made by MGH Designs, as far as I can tell. There is a certain profit margin that has to be maintained, Parallax is located in California after all.

    I guess it could be an interesting strategy for Parallax, clone the board, sell it for a very low price, and sort of put MGH Designs on the side lines, if not out of business.

    As for Arduino boards, I am wondering if they are being subsidized by Atmel and/or other entities, it would be to Atmel's best interest to do this.

    Now back to the original topic of this thread.

    Ray
  • Heater.Heater. Posts: 21,230
    I would be very surprised if Atmel subsidized any thing to do with Arduino. I don't think Arduino boards are particularly cheap. Despite the popularity of Arduino I suspect it's a drop in the ocean compared to total ATMEL sales, hardly worth them worrying about.

    The really cheap Arduino's are the Chinese clones. They are a whole other economic story.



  • Mickster wrote: »
    Haven't see Hanno around for a while, thinking about it.

    Hanno had a really serious cycle accident about a year ago, and has been pretty much out of action since. In better news, more recently I heard he was trying to pick up some pieces. I can't say (don't know) any more; just to mention why Hanno suddenly vanished, and hopefully he is able to make a full recovery and get back to what he clearly loved doing with electronics.



  • BeanBean Posts: 8,129
    edited 2015-09-09 13:03
    I've had some people ask about getting started with PropBasic.
    I recommend using SimpleIDE, it's not perfect, but it works.
    Here is the thread that explains how:

    http://forums.parallax.com/discussion/149659/propbasic-how-to-use-propbasic-in-simpleide/p1

    Bean
  • Bean wrote: »
    Here is the thread that explains how:

    ...um, that thread is chock 'o block full of changes making it hard to follow and end up with a PropBASIC/SimpleIDE install that operates.

    Could you provide a more up-to-date set of information/instructions/procedures?

    Greatly appreciated.
  • jmgjmg Posts: 15,173
    edited 2015-09-09 22:09
    davejames wrote: »
    Bean wrote: »
    Here is the thread that explains how:

    ...um, that thread is chock 'o block full of changes making it hard to follow and end up with a PropBASIC/SimpleIDE install that operates.

    Could you provide a more up-to-date set of information/instructions/procedures?

    Greatly appreciated.

    Sounds to me like an ideal candidate for a sticky thread in a sub-forum.

    (negative discussion removed)

  • jmg,

    Your post has been moderated for blatantly insulting Parallax.

    From the Guidelines:
    Do not ridicule other members of the Parallax Discussion Forums or otherwise attempt to make them feel uncomfortable. Bickering, mockery, bullying, and all other imaginable forms of negative social interactions will not be tolerated as it detracts from the intended purpose of these forums. This includes negative discussions or comments made about Parallax as a company, and any/all of its employees, past or present; please be respectful to your host! Parallax and its forum moderators have full authority to decide if a post or thread is considered to be “negative discussion”, and to take appropriate action through moderation of the thread, post, or involved forum users.

  • jmgjmg Posts: 15,173
    jmg,
    Your post has been moderated for blatantly insulting Parallax.
    Wow...

  • Hi
    davejames wrote: »
    Bean wrote: »
    Here is the thread that explains how:

    ...um, that thread is chock 'o block full of changes making it hard to follow and end up with a PropBASIC/SimpleIDE install that operates.

    Could you provide a more up-to-date set of information/instructions/procedures?

    Greatly appreciated.

    I think all you need is in the first post which got updated as things improved. The other posts can be distracting if you didn't follow at the time.

    PropBasic is almost all I use, but with Genie IDE, however I have SimpleIDE all set up and if I copy and paste code from Genie to SimpleIDE, it works just as well.

    Dave
  • Is there any desire to make such a language self-hosted on the prop? Keyboard + VGA being one option, but perhaps even better would be something like a prop + ESP8266 acting as a web server for a browser-based IDE.
Sign In or Register to comment.