Download PropBASIC here... 00.01.14 LAST VERSION FOR BST

BeanBean Posts: 7,960
First of all go here http://www.fnarfbargle.com/bst/Latest/
and get the latest version of BST. The .exe version is for windows, Linux for linux and osx for macintosh.

Then go here http://www.fnarfbargle.com/PropBasic/
and make sure you get the latest version of PropBASIC for BST. Version 00.01.14 is the latest version.

Extract both files.

Run the bst file. When it launches, from the menu choose:
Tools->IDE Preferences->PropBASIC click Browse and find the PropBASIC-BST file that you just extracted.

You are now ready to use PropBASIC.

Documentation and demos are available at the bottom of this post.
As well as the PASD debugger (for windows only sorry).

======================================================================

I'm hoping you guys will try it out and let me know about any bugs you find.

I figured most people havea lot of time off work with the holidays, so I wanted to get this out there so you could play around with it.

Make sure you run the PropBASICIDE program. This is the front-end / editor for propbasic.
With in the editor you can select "Compile" this compiles and opens the .spin file in the Propeller Tool.
Select "Run", this uses propellent to compile and run the program from RAM.
Select "EEPROM" to burn the program into the EEPROM so it will run at power-up.

Sorry about the limited documentation, Jon (Jonny Mac) is working on some much better documentation.

P.S. Make sure to check out the demo programs in the demos folder.

If you have any questions please ask.

Thanks,
Bean.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Use BASIC on the Propeller with the speed of assembly language.
PropBASIC thread http://forums.parallax.com/forums/default.aspx?f=25&p=1&m=412552
March 2010 Nuts and Volts articlehttp://www.parallax.com/Portals/0/Downloads/docs/cols/nv/prop/col/nvp5.pdf
NEW PropBasic Blog: http://propbasic.blogspot.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
There are two rules in life:
1) Never divulge all information
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If you choose not to decide, you still have made a choice. [RUSH - Freewill]

Post Edited (Bean) : 7/21/2010 9:37:08 PM GMT
«13456729

Comments

  • 851 Comments sorted by Date Added Votes
  • Toby SeckshundToby Seckshund Posts: 2,024
    edited December 2009 Vote Up0Vote Down
    The name makes it seem that we should be realy nasty to PropBASs



    Now the PropbasICIDE name has gone, this lame joke is meaningless.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Style and grace : Nil point

    Post Edited (Toby Seckshund) : 4/10/2010 7:44:48 AM GMT
  • JonnyMacJonnyMac Posts: 6,102
    edited December 2009 Vote Up0Vote Down
    For those that have their own favorite text editor, you can use that, too. I have been using EditPlus to write, compile, and download my PropBASIC programs (downloading handled by connecting to Propellant).
    Jon McPhalen
    Hollywood, CA
    It's Jon or JonnyMac -- please do not call me Jonny.
  • RsadeikaRsadeika Posts: 3,195
    edited December 2009 Vote Up0Vote Down
    I have a question about the serin/serout commands, does it use a cog to accomplish the deed. I can visualize a program where I might be using two 'task's, and each 'task' would be be using separate sets of pins for the serin/serout commands. So, how many cogs would be involved? A general question would be, are there any commands that use a cog(s), in order to work?

    Hopefully in your future version of the IDE, you might have a tally of how many cogs are being used, along with ram usage. I have not coded a program just yet, but it feels familiar. I am sure I will have more questions. Looks good so far Bean.

    Ray
  • BeanBean Posts: 7,960
    edited December 2009 Vote Up0Vote Down
    Ray,
    None of the commands use another cog. Everything is done in-line.

    Only TASKs that are started with COGSTART or COGINIT run in another cog.

    Bean

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    PropBASIC home page www.propbasic.com
    ·
  • SamMishalSamMishal Posts: 468
    edited December 2009 Vote Up0Vote Down
    Looks GREAT....will definitely be playing with it soon.

    WELL DONE.....this should be a GREAT addition to the Propeller especially for people
    who come from the BS2 side....good stuff.

    I also LOVE the PASM side by side to the BASIC code.....this should make for a GREAT
    PASM educational tool...wonderful.

    Samuel
  • RsadeikaRsadeika Posts: 3,195
    edited December 2009 Vote Up0Vote Down
    Another serin/serout question, can the 'pin', and 'baud' values be variables? So, you have something like 'serin inpin, baudrate, inbyte', in a function or a subroutine. If I have a UART subroutine or function, using the serin/serout commands, will I be able to call the UART from within TASK's, with each TASK using a different set of pins, and only using the one subroutine/function? I am wondering if there will be a collision, if the TASK's try to run the UART subroutine/function at the same time?

    I am getting ready to do some testing of the SD card that I have, what would be the recommended way of setting up a program to accomplish this. Since the existing code is an object, propBASIC is not capable of handling existing objects, or is it?

    Have you considered adding an ADC command? I have another test scenario where I want to check the charge level of a battery. I am thinking of a 'voltage divider' setup, and an ADC command that would use only one pin for the incoming data.

    Ray
  • JonnyMacJonnyMac Posts: 6,102
    edited December 2009 Vote Up0Vote Down
    As Bean mentioned earlier we are working on formal docs -- since the cat is out of the bag I thought I should post a preview. Keep in mind this is just a preview and while it shows the syntax of all commands, it doesn't fully explain them (we're about 15% complete on this). Use the PDF included in Bean's ZIP and demo programs for the time being. And... if you think you have a great idea/demo to submit for the official help document, by all means do.

    The goal is to create a nice document that you can use as a PDF or trot over to a print shop and have spiral-bound (so that it lays flat).

    Happy Holidays!

    [noparse][[/noparse]Edit] Updated 01-18 (note: still a work in progress and compiler is still in beta)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon McPhalen
    Hollywood, CA

    Post Edited (JonnyMac) : 1/18/2010 10:12:43 PM GMT
    Jon McPhalen
    Hollywood, CA
    It's Jon or JonnyMac -- please do not call me Jonny.
  • RossHRossH Posts: 4,057
    edited December 2009 Vote Up0Vote Down
    Hi Bean,

    Very nice manual - congratulations!

    Ross.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Catalina - a FREE C compiler for the Propeller - see Catalina
    Catalina - a FREE ANSI C compiler for the Propeller.
    Download it from http://catalina-c.sourceforge.net/
  • JonnyMacJonnyMac Posts: 6,102
    edited December 2009 Vote Up0Vote Down
    Rsadeika said...
    Another serin/serout question, can the 'pin', and 'baud' values be variables? So, you have something like 'serin inpin, baudrate, inbyte', in a function or a subroutine. If I have a UART subroutine or function, using the serin/serout commands, will I be able to call the UART from within TASK's, with each TASK using a different set of pins, and only using the one subroutine/function? I am wondering if there will be a collision, if the TASK's try to run the UART subroutine/function at the same time?

    I am getting ready to do some testing of the SD card that I have, what would be the recommended way of setting up a program to accomplish this. Since the existing code is an object, propBASIC is not capable of handling existing objects, or is it?

    Have you considered adding an ADC command? I have another test scenario where I want to check the charge level of a battery. I am thinking of a 'voltage divider' setup, and an ADC command that would use only one pin for the incoming data.

    Ray

    You've actually jammed a whole bunch of questions into one -- I can help (a little). With SERIN and SEROUT you can presently use a variable pin but you need to use a constant for the Baud (mode and speed) setting -- for most programs this will be fine. It would take a redesign of the SERIN/SEROUT code to support a variable baud, and I think it would generate more code, perhaps significantly more.

    For the time being, you can do something like this:

    ' Use: TX_BYTE txpin, byteout
    ' -- shell for SEROUT
    ' -- allows selection of TX pin for multiple devices
    ' -- Baud is set as program constant
    
    SUB TX_BYTE
      SEROUT __param1, Baud, __param2
      ENDSUB
    


    This lets you direct your output to any pin -- given a fixed Baud setting. Again, Baud represents bot the mode (T, N, OT, or ON) and the speed (bps).

    You could create tasks to handle serial IO that buffer the data; I would suggest one per device. Still, you could use some cute trickery with hub variables to control where a task sends something (I think it would create more problems than solve, however).

    SD card support requires a significant chunk of code; have a look at the FSRW object for Spin to see for yourself.

    Bean wrote a demo (that's in his ZIP) that demonstrates using one of the counters as an ADC -- have a look at sndmeter.pbas
    Jon McPhalen
    Hollywood, CA
    It's Jon or JonnyMac -- please do not call me Jonny.
  • RsadeikaRsadeika Posts: 3,195
    edited December 2009 Vote Up0Vote Down
    That is what I was referring to, the FSRW object, that could be be a major project in itself, to convert it to propBASIC. The other major project could be, some propBASIC code for the use of the upcoming Memory Expansion Board. Hopefully propBASIC will be able to handle the expanded memory capabilities. Or will it? If we have to start rewriting all the existing object code to propBASIC, isn't that going backwards? And, in that case, will there be a propBASIC section in the object exchange?

    Ray
  • BRBR Posts: 92
    edited December 2009 Vote Up0Vote Down
    Bean, Jon: Wow! VERY nice work! My Prop demo board suddenly looks like a stamp on steroids.

    I downloaded PropBasic and ran through most of the demos in less than 5 minutes. Setup was a breeze (there wasn't any). I glanced through the manual that comes with the package, but it really wasn't necessary because the thing is virtually self-documenting. IDE simple, clean, completely intuitive. And the Pbasic syntax is quite easy to digest anyway. The in-line basic-to-PASM conversion is really neat, a great way to bust down that PASM learning curve barrier. Not to mention this should be handy for whipping up quickie assembly routines for inclusion into other Spin projects.

    And this thing is FREE!?
  • JonnyMacJonnyMac Posts: 6,102
    edited December 2009 Vote Up0Vote Down
    Bean and I are open to Christmas presents! smile.gif
    Jon McPhalen
    Hollywood, CA
    It's Jon or JonnyMac -- please do not call me Jonny.
  • BeanBean Posts: 7,960
    edited December 2009 Vote Up0Vote Down
    PropBASIC cannot run spin code. So the existing objects cannot be used as is.
    If you look at the Mouse_to_PC demo, I took the existing mouse object and modified it slightly to work with PropBASIC.

    PASM code will need slight modifications, spin code will need to be completely re-written.

    The best present I could get right now is some cool PropBASIC programs. Or believe it or not some bugs discovered (I know there are some in there).

    Jon needs to be commended on his dedication to the documentation. He is not being paid for all his hard work, and I kept changing/adding features on him.
    I know I should have waited until his documentation was completed, but I really wanted the bugs to be found sooner rather than later.
    And this is the best time of year to check members with lots of free time being off work for a couple days.

    My hope is that the compiler will be useful enough to warrent inclusion in the Propeller tool.
    We shall see, I just need to get Ken and some of the Parallax employees hooked on it.

    Bean.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    PropBASIC home page www.propbasic.com


    Post Edited (Bean (Hitt Consulting)) : 12/24/2009 12:58:50 AM GMT
  • BeanBean Posts: 7,960
    edited December 2009 Vote Up0Vote Down
    If you do want to use a different editor when you call PropBASIC.EXE to compile the code, you need to use

    PropBASIC.EXE "C:\completepath\myfile.pbas" /p

    The /p means to pause on errors.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    PropBASIC home page www.propbasic.com
    ·
  • hover1hover1 Posts: 1,927
    edited December 2009 Vote Up0Vote Down
    Jon and Bean,

    I know this has been a huge undertaking and I want to personally thank both of you for this. From what I have tried, it works great!

    As for presents, I have a few SX28 Dip chips to give you, (since they are out of stock), but I'm sure Ken keeps both of you in SX happy land.

    Merry Christmas,

    Jim
    JonnyMac said...
    Bean and I are open to Christmas presents! smile.gif
    I have three propellers
  • JonnyMacJonnyMac Posts: 6,102
    edited December 2009 Vote Up0Vote Down
    Bean has done the heavy lifting, creating the compiler and putting up with my "suggestions." tongue.gif
    Jon McPhalen
    Hollywood, CA
    It's Jon or JonnyMac -- please do not call me Jonny.
  • Cluso99Cluso99 Posts: 14,117
    edited December 2009 Vote Up0Vote Down
    Congratulations! Great work guys smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Links to other interesting threads:

    · Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)
    · Search the Propeller forums·(uses advanced Google search)
    My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
    My Prop boards: P8XBlade2, RamBlade, CpuBlade, TriBlade
    Prop OS (also see Sphinx, PropDos, PropCmd, Spinix)
    Website: www.clusos.com
    Prop Tools (Index) , Emulators (Index) , ZiCog (Z80)
  • Bob ZeroBob Zero Posts: 1
    edited December 2009 Vote Up0Vote Down
    Thank you very much . I just bought a Chameleon PIC system with PIC24 and Propeller from XGS and this is the cherry on top .
  • RsadeikaRsadeika Posts: 3,195
    edited December 2009 Vote Up0Vote Down
    I have a question about the COUNTERA/COUNTERB command, which mode would I use to check the values of a voltage divider? I set up a little test to check the charge level of a battery (9V), in this case. The battery is at 6.76V, and with my voltage divider the value is 2.83V, I am using 10K resistors to achieve this. There are a lot of 'mode' selections, and I am not sure what they all mean, like 'POS', is that 'point of sale' LOL. I guess I need a mode that would give me the value, that would make sense, in the program, for checking the charge level.

    Thanks
    Merry Xmas to everyone!
  • pmrobertpmrobert Posts: 487
    edited December 2009 Vote Up0Vote Down
    The Prop has no internal ADCs. You can either use a sigma delta technique or a separate ADC chip to convert your divider output to a digital form the Prop can understand.
    Merry Xmas back to you!
  • BeanBean Posts: 7,960
    edited December 2009 Vote Up0Vote Down
    Rsadeika,
    · Use mode 72 (POSFB). You'll need to use two pins.
    · Look at the sndmeter demo program and the demo board schematic.
    · It uses microphone built into the demo board and samples it.

    · The demo board uses P8 for the feedback pin, and P9 for the output pin.

    · You would keep the 100K resitor, and the two 1nF caps. And connect the output of your voltage divider to the point where all three come together (so you'll have 6 leads together).
    · You may need to adjust the values of your voltage divider (keeping the ratio the same) to get a good voltage range when you read it.

    Bean

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    PropBASIC home page www.propbasic.com


    Post Edited (Bean (Hitt Consulting)) : 12/24/2009 5:34:07 PM GMT
  • JonnyMacJonnyMac Posts: 6,102
    edited December 2009 Vote Up0Vote Down
    There's an application note for the counter modules that you can download here:
    -- www.parallax.com/tabid/442/Default.aspx

    See page 17 for ADC circuitry and warnings (some components must be placed very close to the Propeller).
    Jon McPhalen
    Hollywood, CA
    It's Jon or JonnyMac -- please do not call me Jonny.
  • TonyWaiteTonyWaite Posts: 219
    edited December 2009 Vote Up0Vote Down
    I've a question regarding PropBASIC:

    Could there be a workaround - however rough - that would enable one to include the functionality of some of our favorite Obex utilities?

    Perhaps a template written in Spin to behave as the 'wrapper'; calling in a variety of Spin objects from the Obex, including of course the compiled output of the main application written in PropBASIC?

    It may be inelegant, but it would be a very useful kludge.

    T o n y
  • BeanBean Posts: 7,960
    edited December 2009 Vote Up0Vote Down
    Tony,
    There has been some threads about starting a spin cog from PASM.
    That would probably allow some of the object to work, but I haven't explored it yet.

    If anyone has knowledge of how to do this, please try get it working.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    PropBASIC home page www.propbasic.com
    ·
  • JonnyMacJonnyMac Posts: 6,102
    edited December 2009 Vote Up0Vote Down
    Another big challenge is creating an interface between PASM (PropBASIC) and Spin methods in another cog.
    Jon McPhalen
    Hollywood, CA
    It's Jon or JonnyMac -- please do not call me Jonny.
  • EaglemanEagleman Posts: 31
    edited December 2009 Vote Up0Vote Down
    jumpin.gif· hop.gif· jumpin.gif· roll.gif jumpin.gif·hop.gif

    Bean·and JonnyMac,·· YEEEEAAAAAHHHH!!!

    Can't thank you enough for the Propbasic project!!···I just downloaded the zip files and just printed the documentation, but haven't read it yet. I'm looking forward to trying it out over the next week.· I have plenty of Pic Basic Pro code that I didn't want to rewrite.·· I imagine there will be some rewriting to port the PBP to PropBasic, but hoping that it would minimal.· But thanks, just having PropBasic will be a big help in using the Prop, learning Spin and even a big help in learning PASM.
  • Alex41Alex41 Posts: 112
    edited December 2009 Vote Up0Vote Down
    Great work Bean and JonnyMac!!


    Scanning the documentation .pdf it looks a lot like SX/B which I'm glad to see!

    My beginning experience has been on the SX and this makes a great transition to the Propeller that I just received.


    Alex
  • mcstarmcstar Posts: 144
    edited December 2009 Vote Up0Vote Down
    Since others are using editplus as well, I thought I'd post my syntax file for PropBasic.··Just create·a new file type under Tools->Preferences-> files and syta and point it at the syntax file attached. Set the file extension to pbas.

    Since Editplus has the ability to run external programs, you can even set it to to build the pbas file using the Propbasic.exe and deploy the resultant file to a connected propeller using Propellent.exe!·
    To set it up, make sure the user toolbar is showing (View-> Toolbars -> User Toolbars) and add two new custom buttons to the tool bar.· Point the first one at the propbasic.exe with this argument.· "$(FilePath)"
    Point the second button to the Propellent.exe with this argument $(FileDir)\$(FileNameNoExt).spin

    Now build and compile is just two clicks and integrated into an ide with syntax highlighting!
    718 x 472 - 69K
  • HollyMinkowskiHollyMinkowski Posts: 1,398
    edited December 2009 Vote Up0Vote Down
    Bean and Jonny, this is really super! smile.gif

    I hope I get skilled enough with the prop to someday contribute something as nice as this.
    [The Bug Stops Here]
  • Ron SutcliffeRon Sutcliffe Posts: 420
    edited December 2009 Vote Up0Vote Down

    Bean, fantastic. I can see this taking off.·· Jon, ·your work to date on the docs looks great.

    This effort will draw more users to Prop. Those·who may have otherwise been put off by the idea of learning Spin. (fear of the unknown)

    Query

    Can more than 7 tasks be declared at compile time ?·Being able to·take advantages of the various external memory schemes that are floating around (i.e Hydra and the HX512k card in my case) is really appealing.



    Regards

    Ron

Sign In or Register to comment.