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

Download PropBASIC here... 00.01.14 LAST VERSION FOR BST

12325272829

Comments

  • ajwardajward Posts: 1,120
    edited 2011-06-07 14:06
    I've tried to get PropBasic running and have no success. I must be missing something. I have BST 0.19.3, the latest I can find. I have the PropBasic-bst.osx file from June 3rd. I'm running Snow Leopard 10.6.7 on an Intel iMac.

    I can open a *.pbas file, but if I try to compile I'm told bst can't find a compiler. I can find the PropBasic file under preferences, but it's "greyed out" and can't be selected.

    Any suggestions will be greatly appre4ciated! (Typing lessons too! :-> )

    Amanda
  • BeanBean Posts: 8,129
    edited 2011-06-07 14:54
    Amanda, I will assume the mac version is the same as the pc version.
    You need to select "Tools->IDE Preferences" then click on the "PropBasic" tab and locate the compiler file.

    Let me know if that doesn't work.

    Bean
  • ajwardajward Posts: 1,120
    edited 2011-06-07 15:30
    Bean wrote: »
    Amanda, I will assume the mac version is the same as the pc version.
    You need to select "Tools->IDE Preferences" then click on the "PropBasic" tab and locate the compiler file.

    Let me know if that doesn't work.

    Bean

    Hey Bean!

    Under "Tools" I have only "Character Map"!?
  • ajwardajward Posts: 1,120
    edited 2011-06-07 15:31
    ajward wrote: »
    Hey Bean!

    Under "Tools" I have only "Character Map"!?

    Arhhh... make that "Character Chart"! Sorry!
  • $WMc%$WMc% Posts: 1,884
    edited 2011-06-07 16:27
    @ Bean
    '
    I herd Al Gore claimed to have invented the Internet, But now I see it was really Honest Ab.
  • andre.nieuwoudtandre.nieuwoudt Posts: 65
    edited 2011-06-08 08:49
    Hi Bean,

    Glad to see there is a new version out. Do you perhaps have a list of what is new / changed / fixed in 1.10?

    Andre
  • BeanBean Posts: 8,129
    edited 2011-06-08 09:18
    Andre,
    Here is the history from version 1.00.00
    Version 00.01.00
      Fixed: Compiler crash on COGSTART if task name has not been defined
      Fixed: Calculated constant using a long constant
        mSec = _Freq / 1000
    
        value1 CON 10_000
        value2 CON value1 / 10
    ----------------------------------------------------------------------------
    Version 00.01.01
      Fixed: COGSTART doesn't add "par" to __temp1
      Fixed: / doesn't error if first parameter is invalid
      Fixed: minWaitCnt in tasks was 128 instead of 80
      Fixed: str = str + longvar
      Fixed: str = "" ' comment
    ----------------------------------------------------------------------------
    Version 00.01.02
      Fixed: test $,#1 WC ' Set Carry (doesn't work in LMM) I2CWrite
      Fixed: COGINIT if taskname doesn't exist crashes
      Fixed: Glitch on PinGroup = PinGroup
      Fixed: IF pinName THEN
      Changed: In LMM use "LONG label * 4" instead of "LONG @label - @__Init"
      Changed: Use relative jumps for LMM
        SUB __PC,#(($-label)*4)+4 ' Jump backward
        ADD __PC,#((label-$)*4)-4 ' Jump forward
    ----------------------------------------------------------------------------
    Version 00.01.03
      Fixed: RDWORD buffer($1C0), temp
      Fixed: name HUB STRING(10) = "Hello"
      Fixed: trailing "," in data causes offset in next data label (counts it as element).
               Now causes a syntax error.
      Fixed: PULSIN hangs with RCSLOW
    ----------------------------------------------------------------------------
    Version 00.01.04
      Fixed: INC, DEC where second parameter is an array with a variable index
      Added: I2CSpeed multiplier. "I2CSpeed 2" is double speed, "I2CSpeed 0.5" is half speed.
    ----------------------------------------------------------------------------
    Version 00.01.05
      Added: Allows embedded escape sequences in strings.
        \r = 13
        \n = 10
        \\ = 92
        \" = 34
        \123 = 123 [must use 3 digits, so 16 would be \016 ]
        \x20 = $20 [must use 2 characters, so $A would be \x0A ]
    ----------------------------------------------------------------------------
    Version 00.01.06
      Added:
        "CLKSET mode,freq" command
      Fixed:
        Allow more nested IF...ELSEIF loops, increased c_iMaxLoops from 127 to 1024
        LET pingroup= doesn't do "shl __temp1,#0" if pingroup starts at 0
        HIGH,LOW,TOGGLE,INPUT,OUTPUT,REVERSE if pin # is a constant < 9 then do shift as literal
        Allow I2C pins to be variables
      Removed:
        Copyright notice
    ----------------------------------------------------------------------------
    Version 00.01.07
      Changed LMM to use @@@ (still need offset for start address)
    ----------------------------------------------------------------------------
    Version 00.01.08
      Fixed data offsets (all messed up) from allowing embedded escape sequences
      Fixed @@@ issues in _LETLong and _LetStr
    ----------------------------------------------------------------------------
    Version 00.01.09
      Fixed: I2CSTART with pins as variables
    ----------------------------------------------------------------------------
    Version 00.01.10
      Fixed: SHIFTIN - REV was using bits instead of (32-bits)
      Fixed: SHIFTIN and SHIFTOUT when using a variable for 2nd parameter
    ----------------------------------------------------------------------------
    

    Bean
  • BeanBean Posts: 8,129
    edited 2011-06-09 05:48
    Brad, I have sent you version 00.01.11.

    Here are the changes:
      Fixed: ON var GOSUB label0, label1, label2
      Fixed: Allow constant with COGSTOP
      Fixed: Embedded escape sequences "\"
    

    Bean
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2011-06-09 08:43
    Thank you bean, the recent fixes may improve my code for some things.

    Are you planning to port PropBASIC to the Propeller II?
  • andre.nieuwoudtandre.nieuwoudt Posts: 65
    edited 2011-06-09 12:09
    Hi Bean,

    Thanks for all the fixes! You are a star!

    Andre
  • ajwardajward Posts: 1,120
    edited 2011-06-09 13:56
    Bean wrote: »
    Amanda, I will assume the mac version is the same as the pc version.
    You need to select "Tools->IDE Preferences" then click on the "PropBasic" tab and locate the compiler file.

    Let me know if that doesn't work.

    Bean

    Got it all sorted out! Thanks for your assistance!

    Amanda
  • BeanBean Posts: 8,129
    edited 2011-06-10 11:14
    Making upgrades to PropBasic again...

    I've decided to change the LMM call method to use a REAL return stack. This will save 1 long per sub/func call, and 1 long per sub/func.

    Now the question...How big to make the stack ??? Since only return addresses will be on the stack I'm thinking that 16 level would be more than enough.

    What say you ???

    Bean

    P.S. I also downsized SERIN by 4 instructions. And I'm still looking for more stuff I can optimize.
  • BeanBean Posts: 8,129
    edited 2011-06-10 19:14
    I just need to get the files together and send them to BradC.

    My PE-Basic interpreter (my largest PropBasic program) was 5596 Longs with version 1.11 and is down to 5388 longs with version 1.12.
    That's pretty good considering that size include data too.

    I originally had the stack in the HUB, but I ran into a problem if I had a TASK that used LMM (need seperate stacks), so I moved the stack to the COG ram which is usually under-used in LMM program. And it works fine.

    Bean
  • BeanBean Posts: 8,129
    edited 2011-06-17 05:55
    BradC has now posted version 00.01.12.
    Note that the way LMM does CALLs has changed greatly.

    Let me know if you find any issues.

    Bean
  • SapiehaSapieha Posts: 2,964
    edited 2011-06-17 06:04
    Hi Bean.

    Can You update first post to show current version for download?


    Bean wrote: »
    BradC has now posted version 00.01.12.
    Note that the way LMM does CALLs has changed greatly.

    Let me know if you find any issues.

    Bean
  • kevin@cachia.comkevin@cachia.com Posts: 23
    edited 2011-07-13 10:10
    Hi Bean,

    Hope you are well. My LED Cube project has been running great for a few months. I have some free time and have been learning and implementing Counters to the faking loops I was using instead. I also am trying to clean up my PropBASIC code now that I have something working and my feet on the ground.

    I'm rewriting my PWM code to control my serial array of LEDs using the DUTY mode from the counters as a model, now that I understand how I can use a carry bit. I looked through your manual and demos, but couldn't find an example how to do one part. I'm try to figure out how I would use a variable to control a pin, and am getting a unexpected result. This code runs as a task on a dedicated cog using all local variables. Here is rough snip of kind of what I want to do.
    Pin  DIN  3 Low
    .
    .
    .
    tmp = 64 'just set this for the example here
    .
    tmp = tmp & %01000000
    din = tmp
    .
    .
    
    I can see the value in the serial terminal outputting a stream of 0 or 64. I know the rest of my code is working correctly. Am I missing a command to pass the pin high from variable like that?
    I also tried a few other interations including a right shift to push the result (7th bit) down to the 1st bit. So I get 0 or 1s instead. the pin still stays low, even thought the variable looks good.

    If I do this it works perfectly.
    .
    .
    temp = 64 ' just for example here
    .
    temp = temp & %01000000
    IF temp THEN
     high din
    else 
     low din
    endif
    .
    .
    
    Also unrelated this also doesn't "add" for me:
    pos2 = pos + 1
    array(pos) = array(pos) + array(pos2)
    
    I know you probably would like the code section. So I will attach it when I get home from work. Does anything jump out at you what I'm missing or not seeing that you can suggest in general?

    Thanks,

    Kevin

    P.S. Is there any chance you would be adding support for any of the following; float, embedded math functions, call for log or sin tables in the future? I image that would be a major project or even a 'library' to accomplish.
  • BeanBean Posts: 8,129
    edited 2011-07-13 10:22
    Kevin,
    Thank for reporting these. I've looked at the code generated and these are both confirmed bugs.
    I will fix these and post a new version ASAP.

    Thanks again, Bean
  • BeanBean Posts: 8,129
    edited 2011-07-13 13:16
    Kevin,
    I have send the bug fixes to BradC. So an update will be available as soon as he posts it.
    The LOG and SIN tables can be read using RDLONG.
    Floats would be a library.
    Can you give an example of what you are looking for a "embedded math function" ?

    Bean
  • kevin@cachia.comkevin@cachia.com Posts: 23
    edited 2011-07-14 10:17
    Thanks Bean, your the best!

    I'm surprised they're actually bugs, I was convinced it was me being a noob and missing something. I was looking at the assembly output and it looked odd, but assembly is mostly over my head.

    I get the RDLONG idea your talking about for those tables, I'll try and find some documentations on how to read and use them.

    For the math functions, it sounded like the Prop has some stuff built into the "hardware?" So, I was thinking some simple stuff like square root or exponents like squared, etc? I can probably just write a little function to fake them.

    I'm trying to figure out a way to interpolate points and control the brightness on my LEDs to draw lines between 2 points, or create kind of a decay effect. So I was considering Pythagoras' formula in one part.
    I'm also faking a round function, since I don't see it like in Spin.

    Thanks,

    -Kevin
  • GerryKeelyGerryKeely Posts: 12
    edited 2011-07-26 02:11
    Bean

    The following program compiles ok but does not load in the value for the CONstant "RED".Don't know whether this is a bug or not.
    DEVICE          P8X32A, XTAL1, PLL16X
    XIN             5_000_000
    
     RED CON $5100
     
     ColMask LDATA RED
    
     Temp1 VAR LONG
     Temp2 VAR LONG
    
    ' ======================================================================
      PROGRAM Start 
    ' ======================================================================
    
    Start:
     rdlong ColMask,Temp1
     Temp2 =Temp1 shr 8
     serout 30,T115200,Temp2 'Should print "Q"
     pause 1000
     goto start
      END
    
  • VonSzarvasVonSzarvas Posts: 3,273
    edited 2011-07-26 06:29
    I am not sure you can use the CONstants like that.... would this work for you ?

    It might be the case that in the manual where it says Const0, Const1, etc.. for the LDATA definition, it means an actual constant value and not a reference to a constant (CON) value.

    DEVICE          P8X32A, XTAL1, PLL16X
    XIN             5_000_000
    
     'RED CON $5100
    
     ColMask LDATA $5100 ' RED
    
     Temp1 VAR LONG
     Temp2 VAR LONG
    
    ' ======================================================================
      PROGRAM Start
    ' ======================================================================
    
    Start:
     rdlong ColMask,Temp1
     Temp2 =Temp1 shr 8
     serout 30,T115200,Temp2 'Should print "Q"
     pause 1000
     goto start
      END
    
  • GerryKeelyGerryKeely Posts: 12
    edited 2011-07-26 06:58
    Hi Maxwin

    Thank you for your reply. I had already tried the change you suggested and it worked ok.

    If CON is a DATA type the program works fine but not if it is LDATA or WDATA, hence my query if it was a bug or not.

    regards

    Gerry
  • BeanBean Posts: 8,129
    edited 2011-07-26 07:55
    Gerry,
    What happens is that if a CON is > 511, then it is defined as variable with a pre-loaded value. When you use the name as a DATA element, it actually returns the ADDRESS of the variable.
    I'll see if I can fix that for the next release.

    Thanks for posting it.

    Bean
  • BeanBean Posts: 8,129
    edited 2011-07-26 10:46
    Okay, I have the compiler fixed. If a constant is > 511, I changed it to just output the value instead of the name.

    When I get home I will send the files to BradC so he can post them.

    Bean
  • BeanBean Posts: 8,129
    edited 2011-07-27 04:08
    BradC has posted the latest version (see first post).
    Here are the changes:
    Version 00.01.13
      Optimized: WRLONG, WRWORD, WRBYTE (don't reload short constants)
      Added: "STACK value" to change stack size (defaults to 16) (4 to 255 allowed)
        NOTE: STACK only affects LMM code
      Fixed: pin = var (didn't set zero flag)
      Fixed: array(pos) = array(pos) + array(pos2)
    ----------------------------------------------------------------------------
    Version 00.01.14
      Fixed: Using long constant in LDATA Jul 26, 2011
    
    

    Bean
  • GerryKeelyGerryKeely Posts: 12
    edited 2011-07-27 05:08
    Bean

    Thank you :smile:

    regards

    Gerry
  • mwalimumwalimu Posts: 44
    edited 2011-07-28 08:41
    I am writing a program to control an iCreate robot. It works on a serial protocol.

    This code starts the Roomba operating system, puts it in full control mode and tells it to clean:

    serout TX, T57600, 128 'accept commands
    serout TX, T57600, 132 'enter "Full" mode
    serout TX, T57600, 134 'clean a spot


    However, if I insert a delay ie: pause 5000, nothing happens. remove the pause and the code works. Insert the pause and it doesn't.

    Does pause interfere with the serial commands?
  • BeanBean Posts: 8,129
    edited 2011-07-28 09:39
    The PAUSE will not be started until the SEROUT command is complete. So no, pause does not interfere with the serial commands.
    I suspect that it is the iCreate robot that doesn't like the long delay between commands (but that is just a guess).

    Bean
  • mwalimumwalimu Posts: 44
    edited 2011-07-28 10:55
    Actually, that is exactly how it works in spin. In order to start the iCreate from a powered down state you toggle a pin on the iCreate's interface from low to high. However, it takes a while for the iCreate's internal processor to boot up and get ready to receive a serial command. So the code should look something like:

    Power_up
    wait for iCreate
    send a command

    The iCreate doesn't have a way to signal the propeller that it is ready, so you have to wait about 3 seconds. Once the iCreate is ready it sits until it gets a command from it's serial port or you press a button.
  • FriedVFriedV Posts: 77
    edited 2011-07-31 12:53
    Hi,
    I'm new here and just want to say hello!
    I live in Germany and have quite some experience with the Atmel AVR hard- and software. The Parallax chip is very interesting, I'm beginning to build my IDE around PropBasic and Edit+. It works, but I would like to have the same behaviour than the BST IDE, the ouput pane should just show the compiler errors and jump to the offending line by double clicking it. What compile switch and/or output pattern do I need to achieve this?
Sign In or Register to comment.