Parallax Forums
  HomeLog InRegisterCommunity CalendarSearch the ForumHelp
   
Parallax Forums > Public Forums > Propeller Chip > Download PropBASIC here... 00.01.02 July 20, 2010  Forum Quick Jump
 
New Topic Post Reply Printable Version
572 posts in this thread.
Viewing Page :
 
[ << Previous Thread | Next Thread >> ] | Show Newest Post First ]

Bean
Forum Moderator



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jul 2004
Total Posts : 6367
 
   Posted 12/23/2009 12:40 PM (GMT -7)    Quote This PostAlert An Admin About This Post.
*** NOTICE ***
The GetAddr command has been changed to a function in version 00.00.97.
Instead of "GetAddr hubvar, longvar" use "longvar = GetAddr hubvar"
 
and get the latest version of BST. The .exe version is for windows, Linux for linux and osx for macintosh.
 
and make sure you get the latest version of PropBASIC for BST.
 
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 have a 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
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



File Attachment :
PropBASIC_Syntax_Guide_0x13.pdf   1.58Mb (application/pdf)
This file has been downloaded 1355 time(s).

File Attachment :
PASD_062.zip   249KB (application/x-zip-compressed)
This file has been downloaded 347 time(s).

File Attachment :
PropBASIC.pdf   293KB (application/pdf)
This file has been downloaded 472 time(s).

File Attachment :
Demos.zip   29KB (application/x-zip-compressed)
This file has been downloaded 31 time(s).
Back to Top
 

Toby Seckshund
confused, probably harmless.

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Mar 2009
Total Posts : 1126
 
   Posted 12/23/2009 12:43 PM (GMT -7)    Quote This PostAlert An Admin About This Post.
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

Back to Top
 

JonnyMac
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jun 2006
Total Posts : 2456
 
   Posted 12/23/2009 12:49 PM (GMT -7)    Quote This PostAlert An Admin About This Post.
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).
Back to Top
 

Rsadeika
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Feb 2005
Total Posts : 801
 
   Posted 12/23/2009 1:46 PM (GMT -7)    Quote This PostAlert An Admin About This Post.
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
Back to Top
 

Bean
Forum Moderator



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jul 2004
Total Posts : 6367
 
   Posted 12/23/2009 1:57 PM (GMT -7)    Quote This PostAlert An Admin About This Post.
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
 

Back to Top
 

SamMishal
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jan 2006
Total Posts : 464
 
   Posted 12/23/2009 2:37 PM (GMT -7)    Quote This PostAlert An Admin About This Post.

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

Back to Top
 

Rsadeika
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Feb 2005
Total Posts : 801
 
   Posted 12/23/2009 3:46 PM (GMT -7)    Quote This PostAlert An Admin About This Post.
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
Back to Top
 

JonnyMac
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jun 2006
Total Posts : 2456
 
   Posted 12/23/2009 3:50 PM (GMT -7)    Quote This PostAlert An Admin About This Post.
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!

[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



File Attachment :
PropBASIC_Syntax_Guide_0x13.pdf   1.58Mb (application/pdf)
This file has been downloaded 246 time(s).
Back to Top
 

RossH
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jun 2008
Total Posts : 1061
 
   Posted 12/23/2009 4:28 PM (GMT -7)    Quote This PostAlert An Admin About This Post.
Hi Bean,

Very nice manual - congratulations!

Ross.


Catalina - a FREE C compiler for the Propeller - see Catalina

Back to Top
 

JonnyMac
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jun 2006
Total Posts : 2456
 
   Posted 12/23/2009 4:38 PM (GMT -7)    Quote This PostAlert An Admin About This Post.
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
Back to Top
 

Rsadeika
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Feb 2005
Total Posts : 801
 
   Posted 12/23/2009 5:07 PM (GMT -7)    Quote This PostAlert An Admin About This Post.
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
Back to Top
 

BR
Omelette du fromage!



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Dec 2008
Total Posts : 42
 
   Posted 12/23/2009 5:13 PM (GMT -7)    Quote This PostAlert An Admin About This Post.
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!?
Back to Top
 

JonnyMac
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jun 2006
Total Posts : 2456
 
   Posted 12/23/2009 5:20 PM (GMT -7)    Quote This PostAlert An Admin About This Post.
Bean and I are open to Christmas presents! :-)
Back to Top
 

Bean
Forum Moderator



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jul 2004
Total Posts : 6367
 
   Posted 12/23/2009 5:50 PM (GMT -7)    Quote This PostAlert An Admin About This Post.
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

Back to Top
 

Bean
Forum Moderator



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jul 2004
Total Posts : 6367
 
   Posted 12/23/2009 6:16 PM (GMT -7)    Quote This PostAlert An Admin About This Post.
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
 

Back to Top
 

hover1
I have 3 Propellers



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Sep 2007
Total Posts : 1448
 
   Posted 12/23/2009 6:56 PM (GMT -7)    Quote This PostAlert An Admin About This Post.

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! :-)
Back to Top
 

JonnyMac
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jun 2006
Total Posts : 2456
 
   Posted 12/23/2009 7:25 PM (GMT -7)    Quote This PostAlert An Admin About This Post.
Bean has done the heavy lifting, creating the compiler and putting up with my "suggestions." :p
Back to Top
 

Cluso99
We live onboard



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Apr 2008
Total Posts : 4114
 
   Posted 12/23/2009 8:20 PM (GMT -7)    Quote This PostAlert An Admin About This Post.
Congratulations! Great work guys :-)


Links to other interesting threads:
Back to Top
 

Bob Zero
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Dec 2009
Total Posts : 1
 
   Posted 12/24/2009 3:29 AM (GMT -7)    Quote This PostAlert An Admin About This Post.
Thank you very much . I just bought a Chameleon PIC system with PIC24 and Propeller from XGS and this is the cherry on top .
Back to Top
 

Rsadeika
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Feb 2005
Total Posts : 801
 
   Posted 12/24/2009 7:57 AM (GMT -7)    Quote This PostAlert An Admin About This Post.
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!
Back to Top
 

pmrobert
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Apr 2008
Total Posts : 72
 
   Posted 12/24/2009 9:31 AM (GMT -7)    Quote This PostAlert An Admin About This Post.
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!
Back to Top
 

Bean
Forum Moderator



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jul 2004
Total Posts : 6367
 
   Posted 12/24/2009 9:35 AM (GMT -7)    Quote This PostAlert An Admin About This Post.
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

Back to Top
 

JonnyMac
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jun 2006
Total Posts : 2456
 
   Posted 12/24/2009 10:52 AM (GMT -7)    Quote This PostAlert An Admin About This Post.
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).
Back to Top
 

TonyWaite
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Sep 2009
Total Posts : 170
 
   Posted 12/24/2009 1:08 PM (GMT -7)    Quote This PostAlert An Admin About This Post.
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
Back to Top
 

Bean
Forum Moderator



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jul 2004
Total Posts : 6367
 
   Posted 12/24/2009 5:09 PM (GMT -7)    Quote This PostAlert An Admin About This Post.
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
 

Back to Top
 
[ << Previous Thread | Next Thread >> ]
New Topic Post Reply Printable Version
572 posts in this thread.
Viewing Page :
 
 
Forum Information
Currently it is Thursday, July 29, 2010 5:16 PM (GMT -7)
There are a total of 462,439 posts in 62,066 threads.
In the last 3 days there were 90 new threads and 802 reply posts. View Active Threads
Who's Online
This forum has 20143 registered members. Please welcome our newest member, ME01.
52 Guest(s), 9 Registered Member(s) are currently online.  Details
John Abshier, Rayman, kf4ixm, BradC, Sapieha, Gene Bonin, laser-vector, localroger, Nick McClick