Shop OBEX P1 Docs P2 Docs Learn Events
Is it about the hardware, the software or just a crutch? — Parallax Forums

Is it about the hardware, the software or just a crutch?

SteveWoodroughSteveWoodrough Posts: 190
edited 2009-05-03 01:34 in Propeller 1

I'm WAY out of my depth here but I have a question, especially considering what I do not know.

I've it heard it said that real programmers use assembly. That makes sense since the lower the language level the more control the programmer has over the processor. SPIN seems very powerful and learnable ( I should probably be doing a PE lesson rather than this post) and I will continue my endeavor to learn SPIN. The STAMP PBasic on the other hand makes a lot of sense but has limitations.

I read a post earlier tonight about someone having trouble getting an IR sensor to work on their PE board. As many of you know even a gear head like me can get an IR sensor to work on a Stamp. You send a FREQOUT command to a pin at 38000 and watch another pin in the next line of code and your in business. My guess is that the BS editor does a lot of work in the background to make it so simple for the programmer.

Here is my question:

Would it be possible and is it practical for some genius to write an IDE application that allowed lower life forms such as myself the ability to begin programming the Propeller in what would be the functional equivalent of "Propeller Basic"?

Granted whatever SPIN code that the "Propeller Basic" application may produce would not necessarily be the slickest way to code. It would, however, have the distinct advantage of being more simple for the first time user. One advantage to this approach is that it might draw more users (students) directly to the Propeller. A marketing disadvantage might be the loss of the STAMP as the entry point.

So is it about the Propeller, SPIN or a silly idea?

Best Always

Steve

@ MagIO2 Sure I'll fly you over, but you will have to stay a month and I have 4 kids.· At least one of them usually sleeps through the night!turn.gif


▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Recent Project Videos:

http://www.youtube.com/watch?v=jI79Xsm_Kyk&feature=channel_page

Cool Cars:
http://www.youtube.com/watch?v=SLnPhYKZCqo&feature=channel_page
http://www.youtube.com/watch?v=d2xGkYN4v7g&feature=channel_page

Comments

  • jazzedjazzed Posts: 11,803
    edited 2009-05-01 05:04
    There is a "BASIC" for Propeller in the obex. No idea if it will do "FREQOUT" though since I avoid BASIC.
    See ... obex.parallax.com/objects/28/

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve


    Propalyzer: Propeller PC Logic Analyzer
    http://forums.parallax.com/showthread.php?p=788230
  • Mike GreenMike Green Posts: 23,101
    edited 2009-05-01 05:37
    Real programmers use whatever programming language works for the task at hand. The main reason for using assembly is for either raw speed or precise control of timing. Spin is much easier to use and much more powerful than assembly for tasks suitable for its speed.

    As jazzed mentioned, there already is a "Basic" for the Propeller that runs completely on the Propeller. There are actually several versions with custom variations for specific Propeller boards, but FemtoBasic is the name of the original version that is intended to be used with a PS/2 keyboard and either a VGA or TV display. It's an integer-only subset of Basic with extra statements and functions for direct access to Propeller hardware. For example, you can directly access the system clock and the independent counters as well as the I/O pins. You can use the counters to do a FREQOUT, but, unlike with the Stamp, they will continue to run until you stop them. They can also be used to accurately time pulses like from a PING
  • simonlsimonl Posts: 866
    edited 2009-05-01 13:57
    You could also download Martin Hebel's "BS2 Functions" object from the object exchange (obex.parallax.com/objects/30/) This provides "general PBASIC functionality library, written in Spin, that mimics and extends many popular BS2 functions: COUNT, DEBUG, DEBUGIN, FREQOUT, PAUSE, PULSOUT, PULSIN, PWM, RCTIME, SEROUT, SERIN, SHIFTOUT, SHIFTIN." That might bridge the gap between PBasic & Spin smile.gif

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

    www.norfolkhelicopterclub.com

    “Before you criticize someone, you should walk a mile in their shoes. That way when you criticize them, you are a mile away from them and you have their shoes.” - Jack Handey.
  • CassLanCassLan Posts: 586
    edited 2009-05-01 23:30
    Steve,
    I learned how to program in GWBasic, Then Qbasic, Then VisualBasic. Several years ago before the prop came out, I purchased a Basic Stamp and broke it within an hour (I totally hooked it up backwards). I was very annoyed about that because I just lost $35. I instead bought PICs and MELabs PicBasic compiler because....I needed my basic.

    My Point is that I'm a Basic Man. And I LOVE Spin. Give it a shot. You always have the BS2 library to fall back on..but all those functions aren't really BASIC related..they are STAMP related. With the Props being so much more powerfull than the stamps at less that $8 a piece now!!! Cmon!!!

    The syntaxt is a little different and Spin "forces" you IMO to use "good" programing techniques like indentation and no gotos etc.
    You will learn more about the prop writing in spin over time and then when you have a need for asm you can tackle small functions one at a time.

    I have found this forum super for helping people learning spin.

    Hope this was helpful.

    Rick
  • SteveWoodroughSteveWoodrough Posts: 190
    edited 2009-05-02 01:55

    Thank You all for your excellent input.

    I like the Propeller IO count, LOVE the price and the awesome support of folks such as yourselves and Parallax. I am committed to learning SPIN. It's just nice to know that a more BS2 like environment might be available.

    I've got a lot of work ahead of me but I'll be in touch when I get stumped.

    Best Regards

    Steve



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Recent Project Videos:

    http://www.youtube.com/watch?v=jI79Xsm_Kyk&feature=channel_page

    Cool Cars:
    http://www.youtube.com/watch?v=SLnPhYKZCqo&feature=channel_page
    http://www.youtube.com/watch?v=d2xGkYN4v7g&feature=channel_page
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-05-02 02:04
    Steve,

    I've dabbled in many languages, Perl, Pascal, C, but you could also say that I'm primarily a "BASIC" head having used APPLE ][noparse][[/noparse] BASIC, TRS-80 BASIC, C64 BASIC, GWBASIC, and QB2.0-QB45. When I approach a programming problem my brain tends to think in it's native "BASIC" tongue. All that being said, I love SPIN. I found most things to be relatively easy to relate. (With the exception of memory management, which has now been very well covered in the Webniar clips.)

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Visit the: The Propeller Pages @ Warranty Void.

    Post Edited (Oldbitcollector) : 5/2/2009 2:59:00 PM GMT
  • RaymanRayman Posts: 14,827
    edited 2009-05-02 02:49
    Why not have a Windows IDE for Femtobasic? Seems like a good idea for beginners, actually. Maybe with Propellant, you could embed the BASIC program in the upper 32k of the EEPROM, assuming it's at least 64k.
  • SteveWoodroughSteveWoodrough Posts: 190
    edited 2009-05-03 01:34

    When you guys say Basic are you referring to Basic like we used in 1980 or Stamp Basic?

    Perhaps I did not phrase my original question very well. I said BASIC and what I should have said was STAMP Basic. Other than my BS2 I have not done much of any programming in the past 20 years since college (Fortran) so when I said Basic my gear head brain was thinking STAMP Basic. What I was asking was is it possible to program a propeller like a BS2 using similar commands to STAMP Basic. Once I get more in tune with SPIN I intend to check out the http://obex.parallax.com/objects/30/as it sounds like it is in line with my original thought.

    Thanks!



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Recent Project Videos:

    http://www.youtube.com/watch?v=jI79Xsm_Kyk&feature=channel_page

    Cool Cars:
    http://www.youtube.com/watch?v=SLnPhYKZCqo&feature=channel_page
    http://www.youtube.com/watch?v=d2xGkYN4v7g&feature=channel_page
Sign In or Register to comment.