Shop OBEX P1 Docs P2 Docs Learn Events
Download PropBASIC here... 00.01.14 LAST VERSION FOR BST - Page 12 — Parallax Forums

Download PropBASIC here... 00.01.14 LAST VERSION FOR BST

191012141529

Comments

  • BeanBean Posts: 8,129
    edited 2010-03-09 13:36
    Tony,
    · Sorry, I wasn't thinking straight.

    · Try this program.

    ··I don't have a stingray (hint, hint), but the outputs look okay on the scope.

    Bean.
    ·

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Use BASIC on the Propeller with the speed of assembly language.

    PropBASIC thread http://forums.parallax.com/showthread.php?p=867134

    March 2010 Nuts and Volts article·http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/prop/col/nvp5.pdf


    Post Edited (Bean) : 3/9/2010 1:41:58 PM GMT
  • Tony B.Tony B. Posts: 356
    edited 2010-03-09 14:23
    Bean,

    Wow! Thanks for taking the time to write the code. I just had time to run it on my robot and it ramped up and down nicely in both directions. Will have time later today to study the code and learn. Now that I have got motor control I can move on to the ping code and make it roam safely around.

    I don't technically have a Stingray either had to build my own and I'm calling it "Banshee". I've put all my plans up on the forum I posted above. Maybe you could build one for your self. More than glad to help if you have any questions.

    Thanks,
    Tony
  • BeanBean Posts: 8,129
    edited 2010-03-09 19:01
    Tony,
    · Here is a version that automatically moves smoothly from one setting to the next.

    · This should work on the stingray too since you are both using the Propeller Robot Controller board.

    Bean.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Use BASIC on the Propeller with the speed of assembly language.

    PropBASIC thread http://forums.parallax.com/showthread.php?p=867134

    March 2010 Nuts and Volts article·http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/prop/col/nvp5.pdf
  • Tony B.Tony B. Posts: 356
    edited 2010-03-10 00:07
    Bean,

    Thanks for the update! Works as smooth as silk. Will be working with the pings using the program in the Demos for a start. I will post the code as I get it developed for running on three pings and ultimately roaming on pings.

    Tony
  • Tony B.Tony B. Posts: 356
    edited 2010-03-13 03:14
    Bean,

    EDIT: Solved it. Changed multiplier in Ping task from 10_000 to 1_000 works good. Updated file for those who may be interested in looking at the code.

    EDIT2: Changed 1_000 to 500 to remove the out bound trip of ping sensor. Updated file for those who may be interested in looking at the code.

    Could you look at this code for me and help me see why when the pings task writes to the distance hub variable it isn't being passed or read in the main loop. In other words wheels spin, ping works but when I move my hand within 12 inches of the ping it does not stop the wheels.

    Thanks,
    Tony

    Post Edited (Tony B.) : 3/13/2010 5:39:25 PM GMT
  • BeanBean Posts: 8,129
    edited 2010-03-14 01:19
    Tony,
    · Here is the code I use for the PING.
       PULSOUT PingPin, 5          ' Trigger PING
       PAUSEUS 5
       PULSIN PingPin, 1, value    ' Measure PING pulse
       value = value * 1_000       ' Remove out time
       value = value / 73_746
     
    


    Bean


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Use BASIC on the Propeller with the speed of assembly language.

    PropBASIC thread http://forums.parallax.com/showthread.php?p=867134

    March 2010 Nuts and Volts article·http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/prop/col/nvp5.pdf
    ·
  • Christof Eb.Christof Eb. Posts: 1,106
    edited 2010-03-14 09:43
    Hi Bean,

    I just wanted to report, that I have worked with PropBasic some more hours and everything was working completely stable. I can now use LMM, for my user interface, totally stable too, only my own bugs....

    One question, constants cannot be used in DATA, is this true?

    And another question. I know, some people will be shocked, that someone is even thinking about it. What do you think about (single) float maths? Together with LMM it should be possible, I think? I do use float sometimes with BASCOM, where it is very easy·and have allways missed·a seamless possibility in spin. Yes, I know, everything can be done with integer maths, but float makes life easier sometimes....

    Christof



    ·
  • Gerry KeelyGerry Keely Posts: 75
    edited 2010-03-15 13:15
     DEVICE          P8X32A, XTAL1, PLL16X
    XIN             6_000_000
     
    
      LED PIN 27 OUTPUT
    
     LEDX TASK
     
    Start:
      COGSTART LEDX
    Main:
      GOTO Main
      END
     
    TASK LEDX
    'LED PIN 27 OUTPUT
    DO
    LED =0
    pause 1000
    LED =1
    pause 1000
    LOOP
    ENDTASK
    

    When I run above program led does not flash, however if I define LED in Task LEDX only it works fine.In the first case LEDX appears to define the pin as an input(according to spin file produced) and in second case it defines it correctly as an output pin.
    I understood PIN could be defined at start of program and that it was not necessary to define in each task ??
    Gerry
  • JonnyMacJonnyMac Posts: 8,929
    edited 2010-03-15 16:29
    Pin masks are in fact global but, for the moment, anyway, each task has its own DIRA setup. What this means is you have to tell the task that the LED pin is an output -- you can do it like this:

    TASK Flasher
    
      OUTPUT #LED
    
      DO
        LED = 1
        PAUSE 500
        LED = 0
        PAUSE 500
      LOOP
    
      ENDTASK
    


    Doing this allows your top level program to define the pin # for an output in the event you are controlling it from two cogs (main and task cog).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon McPhalen
    Hollywood, CA
  • BeanBean Posts: 8,129
    edited 2010-03-15 16:33
    Gerry,
    Yes, what Jon said. The PIN modifier is only for the current TASK (or the main code).

    If you made a pin an output in all tasks you would not be able to control it. If ANY task made it high, it would be stuck high. Also if you wanted to make it an input later in your code you couldn't because other TASKs would still have it as an output.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Use BASIC on the Propeller with the speed of assembly language.

    PropBASIC thread http://forums.parallax.com/showthread.php?p=867134

    March 2010 Nuts and Volts article·http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/prop/col/nvp5.pdf
    ·
  • YendorYendor Posts: 288
    edited 2010-03-15 17:02
    What is the general opinion of the moderators of this thread (Bean,·Jon, et al.) regarding the thread length for support?

    I'm sure our questions will get answered no matter where we post, but in general: should propbasic questions/issues/requests·be directed only to this thread, or should we start (or is it okay) making new threads, maybe with a "Propbasic: Topic"

    It just seems like this thread is awfully long to me, ·but can understand up until a point.· Then again, it may be·simplier for Bean, Jon, (et al).

    I've been inspired once again with Jon's N&V column.

    I shall do "by your command"

    Thanks!
    ·
  • Gerry KeelyGerry Keely Posts: 75
    edited 2010-03-15 18:08
    Jon & Bean

    Thank you for your replies, great service,·I couldnt ask for better and I didn't even have to pay for the software.smile.gif

    Regards

    Gerry
  • Chuck ThomasChuck Thomas Posts: 39
    edited 2010-03-17 20:10
    Bean,

    Two quick items.

    Do I understand that only one file is needed for PropBasic or only one file is being updated? I am confused over your post about propcide not beinig used.

    I think I need the following:

    PropBasic-bst.exe this file doe not get updated.

    and BST.exe which does get updated?

    I can not acess the update from the first page of this thread. This part of the error message.

    http://www.fnarfbargle.com/bst/0191/

    Technical Information (for support personnel)
    • Error Code 10061: Connection refused
    • Background: The server you are attempting to access has refused the connection with the gateway. This usually results from trying to connect to a service that is inactive on the server.
    • Date: 3/17/2010 8:07:43 PM [noparse][[/noparse]GMT]
    • Server: ADISAPRDAPP03.vbschools.com
    • Source: Remote server

    Second item. I think a new forum for PropBasic seperate from the Propeller forum might be in order.

    Thank you,

    Chuck
  • BradCBradC Posts: 2,601
    edited 2010-03-17 23:53
    Chuck Thomas said...
    Bean,

    Two quick items.

    Do I understand that only one file is needed for PropBasic or only one file is being updated? I am confused over your post about propcide not beinig used.

    I think I need the following:

    PropBasic-bst.exe this file doe not get updated.

    This gets updated whenever Bean fixes a bug or makes an update to the compiler. It's not been updated in a while because it appears to be quite stable and well thought out code that does what it says on the tin [noparse]:)[/noparse]
    Chuck Thomas said...

    and BST.exe which does get updated?

    This does get updated more often at the moment as I'm in the throes of some additions/improvements and of course lots of bug fixes.
    It happens in fits and starts. There might be no updates for a month, and then I get some time to work on it and you might get 4 in a day.
    It is not required to update every time there is a pre-release posted, but it is recommended to be running the latest release code (0.19.3 at the moment)
    Chuck Thomas said...

    I can not acess the update from the first page of this thread. This part of the error message.

    That was because my web server process committed suicide some time last night. It's back up now.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    You only ever need two tools in life. If it moves and it shouldn't use Duct Tape. If it does not move and it should use WD40.
  • Tony B.Tony B. Posts: 356
    edited 2010-03-18 01:11
    Hey all,

    Worked up this code to help another individual on another post. The code controls 6 servos (4 standard and 2 continuous rotational) using three Cogs. The code was ran on Propeller Robot Controller Board.

    I know it is way simple so don't laugh to hard, but I thought it my help some other beginners with PropBASIC. That's why I did it in the first place and it was great practice writing code in PropBASIC.

    Tony
  • BeanBean Posts: 8,129
    edited 2010-03-18 01:42
    Tony,
    Thanks for posting that code. One comment... It really doesn't make sense to create a custom Delay subroutine for 2 uses. It's just my opinion, but I think it makes the code alot more complecated than it has to be.
    If you have BIG programs, then yes it pays to create subroutines. But for 2 calls...No...For short programs...No.

    As a teaching tool it DOES show how to use subroutines so that is a benefit.

    Bean

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Use BASIC on the Propeller with the speed of assembly language.

    PropBASIC thread http://forums.parallax.com/showthread.php?p=867134

    March 2010 Nuts and Volts article·http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/prop/col/nvp5.pdf
    ·
  • Tony B.Tony B. Posts: 356
    edited 2010-03-18 02:08
    Bean,

    Thanks for the comments. I didn't think a few PAUSES would take up that much room. It just seemed that a Delay Subroutine was suggested and used often in the code I looked at.

    Believe me I will gladly use Pauses in my small programs, because as you say it does make them a lot simpler.

    Thanks,
    Tony
  • kf4ixmkf4ixm Posts: 529
    edited 2010-03-20 16:40
    ok, where do i download propbasic? the first link at the top of this thread 404's. also what is the bst for? im using xp, so im not sure what i need to install/run it.
  • hover1hover1 Posts: 1,929
    edited 2010-03-20 17:17
    Try the first page of this thread:

    http://forums.parallax.com/forums/default.aspx?f=25&p=001&m=298620

    I know Brad was having some problems with his server.

    bst replaces Beans PropBasicIDE


    Jim
    kf4ixm said...
    ok, where do i download propbasic? the first link at the top of this thread 404's. also what is the bst for? im using xp, so im not sure what i need to install/run it.
  • TonyWaiteTonyWaite Posts: 219
    edited 2010-03-20 17:18
    Hi kf4ixm,

    You may have been unlucky: the links work for me at 1720hrs GMT.

    Regards,

    T o n y
  • kf4ixmkf4ixm Posts: 529
    edited 2010-03-20 17:56
    @hover1, thanks!
    @Tony, it must hate me, i still get 404'd...
    attachment.php?attachmentid=68776
    1024 x 600 - 57K
  • TonyWaiteTonyWaite Posts: 219
    edited 2010-03-20 18:05
    Mystery solved:

    BST's been upissued but not the PropBASIC link!

    If you overtype the link to 0193 instead of 0191 it will work for you ...

    T o n y
  • kf4ixmkf4ixm Posts: 529
    edited 2010-03-20 18:10
    Yep! that was it, got it. Thanks Tony!
  • BradCBradC Posts: 2,601
    edited 2010-03-21 04:35
    Yeah, I could see in the webserver logs people were still constantly downloading old versions with known unpleasant bugs, so I moved them. It had not occurred to me people would link to specific versions.

    The latest version is always available here www.fnarfbargle.com/bst/Latest

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    You only ever need two tools in life. If it moves and it shouldn't use Duct Tape. If it does not move and it should use WD40.
  • ScopeScope Posts: 417
    edited 2010-03-21 15:09
    I couldn't get the first link in the first thread to work . . . could this be used instead:

    www.fnarfbargle.com/
  • Tony B.Tony B. Posts: 356
    edited 2010-03-29 02:13
    Hey All,

    I posted my newest robot "4 Paws" on the robotics forum which is running on a Propeller chip and PropBASIC of course. I plan to use PropBASIC on all my Propeller projects. http://forums.parallax.com/showthread.php?p=894042

    Don't laugh to loud at the code. I'm still learning and it is only testing code. I hope by the time I'm done with 4 Paws I will be at least an intermediate programmer in PropBASIC.

    I haven't given up on the Banshee robot. I’m still trying to come up with the code to read three pings and control motor speed and direction. It’s a little harder than I thought.

    Tony
  • BeanBean Posts: 8,129
    edited 2010-04-01 14:45
    A new release of PropBASIC should be available shortly.

    Version 00.00.88 fixes the following problems:

    FIXED: "DO WHILE|UNTIL pin =|<> value" performed opposite condition
    FIXED: "DO WHILE|UNTIL pin =|<> var" caused error
    FIXED: If pin group starts at 0, omit "shr xxx,#0" instruction
    FIXED: "IF P0 = P1 THEN"
    FIXED: Added INIT and __INIT to INVALID.TXT
    FIXED: subtracting a defined long constant performed an add instead of a subtraction
    FIXED: Allow pin group as right side expression for DO and LOOP
    FIXED: Allow pin group as right side expression for IF...THEN

    New features:
    LMM support - Create Large Memory Model code for PROGRAM and TASKs
    RDSBYTE, RDSWORD - Reads a signed value from hub memory
    name TASK AUTO - Task starts automatically BEFORE main code
    Multiline comments - Curly brackets can be used to create multi-line comments
    __RAM - Virtual array to access COG ram by address
    FOR..NEXT - Uses step -1 if start is greater than limit
    STR - Destination can be HUB or DATA string

    As soon as BradC has time to post it on his website it will be available.

    Bean

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Use BASIC on the Propeller with the speed of assembly language.
    PropBASIC thread http://forums.parallax.com/showthread.php?p=867134

    March 2010 Nuts and Volts article·http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/prop/col/nvp5.pdf
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    There are two rules in life:
    · 1) Never divulge all information
  • BeanBean Posts: 8,129
    edited 2010-04-08 14:38
    The new release of PropBASIC should be available shortly.

    Version 00.00.90 has the following changes:

    Fixes: Var assigned a starting constant > 511
    · value CON 512
    · value1 VAR LONG = value

    Enhancement:
    · SEROUT can now send a string (FINALLY)...

    DEVICE P8X32A,XTAL1,PLL16X
    XIN 5_000_000
     
    TX  PIN 30 HIGH
     
    Baud CON "T115200"
     
    Message DATA "Hello,", 0
     
    ascii   HUB BYTE (10) = 0
    
     
    temp    VAR LONG
     
    Program Start
     
    Start:
      DO
        FOR temp = 0 TO 1000
          STR ascii, temp, 8
          WRBYTE ascii(8), 13
          WRBYTE ascii(9),  0
          SEROUT TX, Baud, Message             ' Send a DATA string
          SEROUT TX, Baud, "this is a test. "  ' Send an in-line string
          SEROUT TX, Baud, ascii               ' Send a HUB array
          PAUSE 100
        NEXT
      LOOP
    END
    
    



    It might take a day or two for Brad to post it.

    Bean

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Use BASIC on the Propeller with the speed of assembly language.
    PropBASIC thread http://forums.parallax.com/showthread.php?p=867134

    March 2010 Nuts and Volts article·http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/prop/col/nvp5.pdf
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    There are two rules in life:
    · 1) Never divulge all information
  • Cluso99Cluso99 Posts: 18,069
    edited 2010-04-08 16:42
    Bean: Congratulations! I see your project is progressing nicely. Sahme I have not had time toplay with it. Keep up the excellent work 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)·
    · Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
    My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
  • simonlsimonl Posts: 866
    edited 2010-04-08 19:35
    Nice one Bean. I'll d/l that a.s.a.p. and run my BeauNET app through it smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheers,
    Simon

    www.norfolkhelicopterclub.com

    Announcement: To cut costs in the current economic climate, we have switched-off the light at the end of the tunnel.
Sign In or Register to comment.