Download PropBASIC here... 00.01.14 LAST VERSION FOR BST

1171820222329

Comments

  • Kevin WoodKevin Wood Posts: 1,266
    edited July 2010 Vote Up0Vote Down
    Hi Bean. I was messing around with PropBasic on a demo board, and the following code doesn't prodice the expected result...

    DEVICE P8X32A, XTAL1, PLL16X
    FREQ 80_000_000
    
    LEDs      PIN     23..16     LOW
    BLINKER   PIN     21         LOW
    
    PROGRAM Start
    
    Start:
      PULSOUT BLINKER, 0
      PAUSE 20
      GOTO Start
    END
    
    



    If I use 0 for the PULSOUT duration, I would expect the LED to be completely off, but it appears to be completely on. If I use 1 or higher, it lights up proportionally.

    Thanks.
  • $WMc%$WMc% Posts: 1,864
    edited August 2010 Vote Up0Vote Down
    Bean

    I have down loaded the latest and greatest PDF for PropBasic, But I get and error that the file is corrupt when I try to open it. I'm having some issues while useing PST, I would like to read up a little more before I ask for help!

    Is the PDF problem on my end or is the file really corrupt?

    Thanks WMc
    __Walt McDonald__

    The Truth is out there
    It's not rocket-surgery
    I see why we don't have any water,All of the pipes are full of wires!
    E=WMc2
    Now with WiFi
    Not in the Spin Bunch
    import RPi.GPIO as GPIO

    ABB M202 certified
    ABB M211 certified
  • Tony B.Tony B. Posts: 356
    edited August 2010 Vote Up0Vote Down
    $WMc%

    There have been corruption issues in the migration to the new forums. I have tried posting my copies. The file sizes look right I hope they work

    Tony
  • $WMc%$WMc% Posts: 1,864
    edited August 2010 Vote Up0Vote Down
    Tony B

    Thanks
    This is a newer version over the one I have.This will help me out a lot.

    Thanks again
    __Walt McDonald__

    The Truth is out there
    It's not rocket-surgery
    I see why we don't have any water,All of the pipes are full of wires!
    E=WMc2
    Now with WiFi
    Not in the Spin Bunch
    import RPi.GPIO as GPIO

    ABB M202 certified
    ABB M211 certified
  • BeanBean Posts: 7,662
    edited August 2010 Vote Up0Vote Down
    I just sent Brad the files for version 00.01.03

    Here is what I fixed:

    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

    Bean

    * Note that with slow clocks PULSIN still returns microseconds, but the resolution is lower. For example with RCSLOW (20KHz), the resolution is 1000 microseconds. So the result will always be a multiple of 1000.
    logo.png?503
    Esterline Research & Design
    thitt@esterlineresearch.com

    We offer consulting on the following areas of expertise:
    Frequency Control - Micro-Controller/Processor Projects
    Test and Automation - General Programming and Coding
    Circuit Design - Board Layouts
  • BeanBean Posts: 7,662
    edited August 2010 Vote Up0Vote Down
    BradC has posted the new version.

    I cannot edit the title of this thread, so I'll just create an additional post when a new version is made.

    Bean
    logo.png?503
    Esterline Research & Design
    thitt@esterlineresearch.com

    We offer consulting on the following areas of expertise:
    Frequency Control - Micro-Controller/Processor Projects
    Test and Automation - General Programming and Coding
    Circuit Design - Board Layouts
  • codemonkeycodemonkey Posts: 38
    edited August 2010 Vote Up0Vote Down
    Looked through the propbasic thread, looks like it will be a great tool. Thanks for all your hard work bean and jonnymac

    Tried downloading propbasic docs from beginning of thread, getting adobe message "There was an error opening this document. The file is damaged and could not be repaired." This happens on both machines (running xp/vista and latest adobe reader, one machine i re-installed adobe). Any suggestions?

    Thanks.
  • BeanBean Posts: 7,662
    edited August 2010 Vote Up0Vote Down
    I fixed the pdf files in the first post.
    They should be okay now.

    I see that I need to update my pdf (it still says 00.00.97). I'll get started on that right away.

    Bean
    logo.png?503
    Esterline Research & Design
    thitt@esterlineresearch.com

    We offer consulting on the following areas of expertise:
    Frequency Control - Micro-Controller/Processor Projects
    Test and Automation - General Programming and Coding
    Circuit Design - Board Layouts
  • codemonkeycodemonkey Posts: 38
    edited August 2010 Vote Up0Vote Down
    Yep, that cured the problem. Thanks for the quick response!
  • Capt. QuirkCapt. Quirk Posts: 737
    edited August 2010 Vote Up0Vote Down
    Bean,

    Will there be a dedicated PropBasic ide similar to the SXB ide in the near future?

    Bill M.
  • BeanBean Posts: 7,662
    edited August 2010 Vote Up0Vote Down
    Bill,

    BST is the official IDE for PropBasic.
    Mainly because it makes PropBasic multi-platform (Mac/Linux/Windows).

    Bean
    logo.png?503
    Esterline Research & Design
    thitt@esterlineresearch.com

    We offer consulting on the following areas of expertise:
    Frequency Control - Micro-Controller/Processor Projects
    Test and Automation - General Programming and Coding
    Circuit Design - Board Layouts
  • HumanoidoHumanoido Posts: 5,770
    edited August 2010 Vote Up0Vote Down
    If you write a program in PropBasic, compile it, send the compiled results to someone, can they easily change it back into the original PropBasic (BASIC) code? Or is it now PASM for good?!

    Humanoido
  • BeanBean Posts: 7,662
    edited August 2010 Vote Up0Vote Down
    The PASM code has the original PropBasic source in it as comments. This is done so users can learn PASM.

    If you want to keep the original source private, you could go through and remove the comments. Or there is a switch that will omit the original source. I'd have to look at the compiler to see what it is. It is NOT supported by BST you would have to run the compiler from the command line.

    Bean
    logo.png?503
    Esterline Research & Design
    thitt@esterlineresearch.com

    We offer consulting on the following areas of expertise:
    Frequency Control - Micro-Controller/Processor Projects
    Test and Automation - General Programming and Coding
    Circuit Design - Board Layouts
  • codemonkeycodemonkey Posts: 38
    edited August 2010 Vote Up0Vote Down
    I'm also getting an error with PASD_062.zip, windows<xp, vista> is reporting the archive is either in unknown format or damaged. Thanks!
  • BeanBean Posts: 7,662
    edited August 2010 Vote Up0Vote Down
    Okay, I think I have all the files fixed now.
    Let me know if it still doesn't work.

    Bean
    logo.png?503
    Esterline Research & Design
    thitt@esterlineresearch.com

    We offer consulting on the following areas of expertise:
    Frequency Control - Micro-Controller/Processor Projects
    Test and Automation - General Programming and Coding
    Circuit Design - Board Layouts
  • codemonkeycodemonkey Posts: 38
    edited August 2010 Vote Up0Vote Down
    Ok, they all seem to be working now. Thanks very much for your quick response.
  • $WMc%$WMc% Posts: 1,864
    edited August 2010 Vote Up0Vote Down
    Hello All:
    '
    I'm looking for a memory map for the Propeller?
    '
    I need to map the memory of a cog or 2 and the HUB RAM so I can see what I'm doing wrong with My code in PropBasic.
    I keep running out of RAM/cog space.
    '
    I think I have used this tool before, But I can't find it anywhere!
    '
    Any help will be greatly appreciated.
    __Walt McDonald__

    The Truth is out there
    It's not rocket-surgery
    I see why we don't have any water,All of the pipes are full of wires!
    E=WMc2
    Now with WiFi
    Not in the Spin Bunch
    import RPi.GPIO as GPIO

    ABB M202 certified
    ABB M211 certified
  • Tony B.Tony B. Posts: 356
    edited August 2010 Vote Up0Vote Down
    $WMc%

    I use the comand under "compile", "compile basic to Spin" in BST. I then open the file in the Spin Tool and use the "Run - compile current - view info..." or you could just use the F8 key to compile and view the memory map . Remember if you have task in you code when compiled to Spin it will generate multiple Spin files that will all need to be in the same directory for the Spin Tool to compile.

    Hope this helps

    Tony
  • $WMc%$WMc% Posts: 1,864
    edited August 2010 Vote Up0Vote Down
    Tony B. wrote: »
    $WMc%

    I use the comand under "compile", "compile basic to Spin" in BST. I then open the file in the Spin Tool and use the "Run - compile current - view info..." or you could just use the F8 key to compile and view the memory map . Remember if you have task in you code when compiled to Spin it will generate multiple Spin files that will all need to be in the same directory for the Spin Tool to compile.

    Hope this helps

    Tony

    Tony

    Thanks for the reply. I was looking for a larger memery map, I know I have used this before, But I can't remeber were I got it from!
    '
    Thanks Again
    __Walt McDonald__

    The Truth is out there
    It's not rocket-surgery
    I see why we don't have any water,All of the pipes are full of wires!
    E=WMc2
    Now with WiFi
    Not in the Spin Bunch
    import RPi.GPIO as GPIO

    ABB M202 certified
    ABB M211 certified
  • BradCBradC Posts: 2,601
    edited August 2010 Vote Up0Vote Down
    $WMc% wrote: »
    Tony

    Thanks for the reply. I was looking for a larger memery map, I know I have used this before, But I can't remeber were I got it from!
    '
    Thanks Again

    Why not use the list file window?
    View->Compiler Listing

    Then recompile your code with F9.
    wtf?
  • $WMc%$WMc% Posts: 1,864
    edited August 2010 Vote Up0Vote Down
    BradC wrote: »
    Why not use the list file window?
    View->Compiler Listing

    Then recompile your code with F9.
    '
    BradC
    '
    This didn't go so well. At first I got a basic compiler error "NO PROGRAM" the second compile returned the same compiler error but also cleared the screen. Now if I try to open "MYcode.pbas" the screen is blank? Luckily I can still see the code in "MYcode.spin",So all hope(code) is not lost.
    '
    I've never tried the list file window before now. Is there a way to undo it?
    '
    I'm using bst0.19.3 and PropBasic-bst-00.01.03-72.exe
    '
    Thanks in advance for any help.
    __Walt McDonald__

    The Truth is out there
    It's not rocket-surgery
    I see why we don't have any water,All of the pipes are full of wires!
    E=WMc2
    Now with WiFi
    Not in the Spin Bunch
    import RPi.GPIO as GPIO

    ABB M202 certified
    ABB M211 certified
  • BradCBradC Posts: 2,601
    edited August 2010 Vote Up0Vote Down
    $WMc% wrote: »
    '
    BradC
    '
    This didn't go so well. At first I got a basic compiler error "NO PROGRAM" the second compile returned the same compiler error but also cleared the screen. Now if I try to open "MYcode.pbas" the screen is blank? Luckily I can still see the code in "MYcode.spin",So all hope(code) is not lost.
    '
    I've never tried the list file window before now. Is there a way to undo it?

    Click the close button at the top of the list file window.

    The list file does nothing with the basic programs themselves. When the compiler compiles the resulting spin code it puts the listing in that window.
    wtf?
  • $WMc%$WMc% Posts: 1,864
    edited August 2010 Vote Up0Vote Down
    Hello All
    '
    Is any one having RAM space problems with PropBasic 00.01.03-72
    '
    Like PC error (943.8) 78 Longs to many, And (981.24) expected spin "etc.,bla,bla,bla"
    '
    P.S. Where can I find a list of what the error messages mean. Like (943.24) and (981.24) ?
    '
    I have tried to work through this with out help,But I'm at a loss.
    '
    Any help would be greatly appreciated.
    __Walt McDonald__

    The Truth is out there
    It's not rocket-surgery
    I see why we don't have any water,All of the pipes are full of wires!
    E=WMc2
    Now with WiFi
    Not in the Spin Bunch
    import RPi.GPIO as GPIO

    ABB M202 certified
    ABB M211 certified
  • BeanBean Posts: 7,662
    edited August 2010 Vote Up0Vote Down
    By default PropBasic uses NATIVE PASM code. So all of the generated pasm must fit within the 496 instruction cog space.

    It sounds like your program is just too big.

    Try to put often-used commands into a subroutine, or use LMM.

    Bean
    logo.png?503
    Esterline Research & Design
    thitt@esterlineresearch.com

    We offer consulting on the following areas of expertise:
    Frequency Control - Micro-Controller/Processor Projects
    Test and Automation - General Programming and Coding
    Circuit Design - Board Layouts
  • BradCBradC Posts: 2,601
    edited August 2010 Vote Up0Vote Down
    $WMc% wrote: »
    Hello All
    '
    Is any one having RAM space problems with PropBasic 00.01.03-72
    '
    Like PC error (943.8) 78 Longs to many, And (981.24) expected spin "etc.,bla,bla,bla"
    '
    P.S. Where can I find a list of what the error messages mean. Like (943.24) and (981.24) ?


    Are you sure that does not mean :
    Program Counter (PC) error at line 943, character 8?

    And likewise,
    At line 981, character 24 I expected to see some "etc..bla.bla.bla"?
    wtf?
  • $WMc%$WMc% Posts: 1,864
    edited August 2010 Vote Up0Vote Down
    Thanks for the feed back guys
    '
    Now I know what the error codes mean, Thanks
    '
    I ran the spin [PASM] version of my code and added line-numbers, WOO! 1039 lines, No wonder it wouldn't compile.
    'Thanks BradC
    'Thanks Bean
    '
    I can see me reducing my code by 15 to 25%, But I still have about 50% to go to complete the full demo for the project I'm working on. A spiffy PST window hogs up a lot of code space, But it makes a new product that much more appealing to purchase.
    '
    I have seen some post on the use of LMM, But I have never tried using it? Any good links on how to learn how to use this method?
    '
    Thanks in advance for any help or advice.
    __Walt McDonald__

    The Truth is out there
    It's not rocket-surgery
    I see why we don't have any water,All of the pipes are full of wires!
    E=WMc2
    Now with WiFi
    Not in the Spin Bunch
    import RPi.GPIO as GPIO

    ABB M202 certified
    ABB M211 certified
  • BaggersBaggers Posts: 2,862
    edited August 2010 Vote Up0Vote Down
    @Bean, is there a way to point to a buffer in a LDATA statement eg

    scrptr LDATA @scrbuf

    scrbuf hub word (512)=0


    Cheers,
    Baggers.

    PS, I've got TV.spin into it's own TV.LIB file I'm just tidying the pointers etc up a bit now.
    will post later today.
  • HumanoidoHumanoido Posts: 5,770
    edited August 2010 Vote Up0Vote Down
    Very nice continued work Bean. Can PropBASIC fit into one cog? I'm looking for prop languages that can run self contained in one cog. Thanks very much.

    Humanoido
  • BeanBean Posts: 7,662
    edited August 2010 Vote Up0Vote Down
    @Baggers,
    Well the problem is that all HUB variables are relative to PAR. But I'll look into how I might be able to do something like that.

    @Humanoido,
    Unless you use TASKs, then yes your PropBasic program will only use one cog.

    Bean
    logo.png?503
    Esterline Research & Design
    thitt@esterlineresearch.com

    We offer consulting on the following areas of expertise:
    Frequency Control - Micro-Controller/Processor Projects
    Test and Automation - General Programming and Coding
    Circuit Design - Board Layouts
  • Beau SchwabeBeau Schwabe Posts: 6,019
    edited August 2010 Vote Up0Vote Down
    Bean,

    In reference to Baggers question, could you do it by reference? ...


    (using a Spin example ... sorry)
    VAR
    byte Buffer2[1000]
    long Buffer1[100]
    long Buffer1Address,Buffer2Address
    
    PUB MainProgram
        Buffer1Addresss := @Buffer1
        Buffer2Addresss := @Buffer2
        cogstart(@Pasmtop,@Buffer1Address
    

    ...this way Buffer1Addresss and Buffer2Addresss are relative to one another,
    but within PAsm you read it and treat the contents that you read with rdlong as the Address, so to get the 'actual' contents, you read with rdlong (<-- or what ever suits the data format) again...
    DAT
    Pasmtop		mov	temp,	par
                    rdlong  _BufferAddress1,	  temp
                    rdlong  _BufferAddress1Contents,  _BufferAddress1   
    
    		add	temp,	#4
                    rdlong  _BufferAddress2,	temp
                    rdbyte  _BufferAddress2Contents,  _BufferAddress2
    

    ...I have used a similar method several times this way to reference variable that are not arranged sequentially at Spin level. This method also helps to bridge the gap between reading variables defined as long,word or byte without having to calculate the offset for the address pointer.


    "Irony hides in the deception of your current view of the situation" - The Parallax Effect

    Without a specific deadline, that "essay" will always be perpetually 95% complete. Time to set some deadlines !!


    Beau Schwabe
    Metallurgical Machine Design and Development Engineer
    ( IOW- I design machines to reverse engineer and take apart IC chips ... 1 micron at a time )



    www.Kit-Start.com
    bschwabe@Kit-Start.com

    www.BScircuitDesigns.com
    icbeau@bscircuitdesigns.com
Sign In or Register to comment.