Shop OBEX P1 Docs P2 Docs Learn Events
What you reckon, the average learning curve and $$ for prop level productivity? — Parallax Forums

What you reckon, the average learning curve and $$ for prop level productivity?

StampmysterStampmyster Posts: 27
edited 2011-02-19 18:50 in Propeller 1
When I bought my first computer, a Commodore 64, a colleague asked me if it was expandable? I said, “Ah! Yes! 1K of extra memory”. He then asked, “Is it upgradeable“? I said, “Oh! Yes“! (There was a some sort of upgrade, but I forget what it was. Little did I know, the computer probably held the world’s land-speed record for planned obsolescence!)

He nodded in approval, and I then walked around all day, with my chest out.

I feel, perhaps it is time again, to put down the beloved "old-reliable", and move into more productive, and powerful territory. I crave multi-tasking.

Don’t get me wrong! I absolutely love the basic stamps! I can easily create and navigate in a truly productive ways. However, I find linear processing to be, well frankly “limited.” I'm forced to use multiple-stamps in my newest project.

I just have to look at the propeller and all it can do, and my mind begins to wonder. What if?

But, after one look at the Spin-Syntax, I have anxiety attacks! I don’t think I have the extra time and energy to learn a new language? How long is this going to take? Sure looked different to me? Should I toss out everything I know? Start again? Or is it similar enough to be productive in a short time?

Price wise, I see a far superior product for about the same price?


What say Ye…?

Comments

  • potatoheadpotatohead Posts: 10,261
    edited 2011-02-19 00:03
    I think you can get going on one of these in a month or two, mapping over skills.

    IMHO, one of the biggest obstacles is the design of the chip. How the COGs work with the HUB is intriguing and requires some thought.

    Also IMHO, the temptation to go right for the max at first can bog a person down. I did that for a while and struggled.

    Stepping back some, just keeping it simple helped build Spin skill. PASM isn't too hard for me, only because I've done assembly language before. But, a lot can be done with Spin and various objects, so you can put that one off for a bit.

    If I were you, I would get the PEK, and maybe that PPDB (pro prop dev board), and do the education labs. They take you though a lot of stuff!

    The other barrier is the various sensors and stuff don't always have nice code packages written up for them, but then again, a lot of people have written stuff to help with that.

    Ask a lot of questions and have some fun. IMHO, you can know in a month or two whether or not you can cross that bridge.
  • StampmysterStampmyster Posts: 27
    edited 2011-02-19 00:38
    Great thank you!

    I think I may go with the Propeller Education Kit - 40 pin DIP Version as I have most of the stuff on the pro-board laying around anyway, including power supplies. I think, I will save the money and buy the Prop manual with it

    This should be enough to get a taste?

    Sorry, I never heard of PASM… P-Assembly? Or objects…Macro libraries?

    Thanks!



    P.S. I would like to hear from others also.
  • Cluso99Cluso99 Posts: 18,069
    edited 2011-02-19 01:24
    Welcome to this fantastic forum :-)

    The simpler instructions of spin are fairly easy and in many ways similar to other languages. You do have to get used to indenting your code, but this is good practice anyway.

    There are lots of objects to do lots of things. There are lots of other boards available too. Nick is carrying lots of pcbs (Gadget Gangster) and we all have different boards available too. So I suggest you say what you have and what you want to do.

    PASM is propeller assembler. It is quite simple compared to most assemblers. But for now, dont worry, as there are lots of assembler objects written to do lots of things from SD cards to serial ports to real time clocks to flash memory, etc, etc. One of the guys (Ahle IIRC) has done a SidCog emulation for sound.
  • ColeyColey Posts: 1,112
    edited 2011-02-19 01:27
    When I first encountered the Propeller I didn't even think about Spin as I was so excited about it's capabilities. Coming from a picbasic background I found Spin quite easy to pick up, the biggest challenge came in understanding that I could do things in paralell. Once I got over that things became much simpler for me.

    I bought a demo board and never looked at those pics again.......

    Regards,

    Coley
  • Graham StablerGraham Stabler Posts: 2,510
    edited 2011-02-19 03:51
    Yoda once said, "do or do not, there is no try, hmm"

    He had that right except you should forget the do not part :) Really I would say don't worry about it at all, you will never look back.

    Any new language whether computer or foreign looks like jibberish at first glance. This is not your fault, in fact it completely reasonable, until you know what each part means why should it make any sense.

    Give yourself a break, avoid worrying when you can't understand code written by grand masters who insist in using all the clever hieroglyphics. Flash an LED, then two, then one for each cog. Before you know it, you know enough.

    I'd say the education kit is a good start, another nice one is the propeller platform, that has a sort of aduino feel and you can still follow the labs and make slightly more permanent projects with it and it can become something you use for development throughout your propeller programming career. The protoboards are similar but less reusable, better when they end up embedded in a project permanently.

    Graham
  • Cluso99Cluso99 Posts: 18,069
    edited 2011-02-19 04:17
    Just to add to Grahams advice. I was a seasoned user when I found the prop. I did the exercises in the soft manual. It was notime and I had the leds flashing from multiple cogs. Then I added the VGA and loaded some of the demos. WOW, 8 resistors and a connector. Then you can write code for the VGA. If you dont have VGA, what about TV (Composite video) - 3 resistors and a connector - the connector is 2 wires, so you can cut an only TV or stereo cable with an RCA connector and wire directly to the pcb.

    I bought a Prop ProtoBoard and built my own propplug (because I had the bits). The USB version wasnt out then and this is a better buy. I f you go this way, buy the VGA/PS2 connector kit as they are not so easy to buy (IIRC Digikey also has them). But as I said before, lots of great pcbs out there - workout what you want to do. No need to spend a fortune.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-02-19 04:51
    I like your C64 story, that gave me a chuckle.
    But, after one look at the Spin-Syntax, I have anxiety attacks!

    If you are a basic programmer, this is a little subroutine I translated tonight from Spin to Basic to do a fibonacci series.

    Basic code
    Function fibo(n as long)
      if (n < 2) then
        function=n
      else
        function=fibo(n - 1) + fibo(n - 2)
      end if
    End Function
    

    and the Spin code
    pub fibo(n)
    
      if (n < 2)
        return n
      else
        return fibo(n - 1) + fibo(n - 2)
    

    Let's take that one line at a time.

    1) Subroutines and Functions in Basic are called PUB and PRI in Spin
    2) If you pass a variable using Basic, you need to declare what sort of variable. (the Basic code above declares as a 'long' which is a 32 bit number). In spin numbers are 32 bit by default so you don't need to explicitly declare them as such.
    3) The If statement. In basic, you put in "then", but in Spin you don't put in "then"
    4) Indents. In Basic, you put in indents to make the code more readable. In Spin, the indents also tell the program what to do. So there is no "end if" - rather, the end of the if group is determined by the column the next line is in.
    5) When you return a value from a function, Spin uses "return". The variant of Basic above uses "function", though there are variants of Basic that use "return" the same as spin.
    6) There is no "end function" in Spin. The end of the function is usually determined by the next line being another PUB and starting in the first column.

    So, Spin is not quite the same as Basic, but it is rather similar. a=5 becomes a:=5 for instance.

    Of course, complex code can get a lot harder than this, but there is complex code in all languages. Start with a few simple commands and get to know those.

    Plus -there is this forum where you can often get an answer within a few minutes, 24h a day.
  • RavenkallenRavenkallen Posts: 1,057
    edited 2011-02-19 09:50
    I also came from a Stamp/ Picaxe background and i managed to pick up the basics of the Propeller pretty fast. I am still no master at PASM and there are still a few bitwise/ logical symbols that i haven't learned yet, but i can write SPIN programs efficiently (When i put my mind to it:)). The Propeller and it's language, is only a little harder to understand, but once you finally do get it, you will have a much more powerful device. I also would start with the 40 Pin DIP version. That is the one that i tried first and never regretted it since... If you can afford to invest a little money and a few weeks of your time, than you can pick it up no problem.
    Plus, you have the forum and its very knowledgeable members at your disposal...
    Happy Proping!
  • WBA ConsultingWBA Consulting Posts: 2,935
    edited 2011-02-19 10:11
    If you are a learn by doing type of person like me, a few months is all it takes to get rolling. I picked up a propeller demo board at the 2009 UPEW and started playing with it. After an average of only 8 hours a month, I was able to complete my Reverse Geo-Cache project which uses a GPS, uOLED screen, and a servo. SPIN isn't really difficult once you start putting it into action. Reading code doesn't help me much, but tweaking code and downloading it to the prop to see the changes made it easy. With the demo board I was able to learn/understand quite a bit without having to do anything but plug in a USB cable and a TV. Even though the demoboard is what got me into the propeller so fast, I would recommend the PE Kit as a starting point. I have the Propstick USB version, but would be tempted to recommend the DIP40 version instead.
  • johnetjohnet Posts: 11
    edited 2011-02-19 10:32
    potatohead everytime I see your avatar gives me a chuckle
  • $WMc%$WMc% Posts: 1,884
    edited 2011-02-19 10:33
    Take a look at PropBaisc
  • johnetjohnet Posts: 11
    edited 2011-02-19 10:44
    Very interesting thread. Having similar problems with the learning curve. Purchased an S2 before Christmas, trying to learn spin. Would like to have s2 print kids names, get them interested in robots.
    So far, have been trying to figure out what needs to be at the beginning of every program for s2. Having the proper propeller tool, (not the one included with s2) has made some things less murky.
    I too remember the Commodore 64 days. Had a Radio Shack TRS (90?) with a cassette drive for loading programs. First time I saw a disk drive, thought it was witch craft.
  • potatoheadpotatohead Posts: 10,261
    edited 2011-02-19 12:24
    Re: Avatar. Yeah, it's great! And it's only 30K. Love little, goofy animations. Glad you enjoy it.

    re: Dip 40. If you've got a good stock of stuff to play with, deffo recommended. A coupla DIP 40 chips will set you up for a lot of great, simple projects, and the learning is pretty easy that way too. Props are fairly friendly to people poking around on a breadboard. (I'm deffo one of those "poking around" people, and I've had no trouble really)

    IMHO, it's great to have one reference board. The Demoboard is good because nearly everything targets it. Nice to have a sanity check for the code, so that circuit issues can be factored out.

    Building up one circuit that's left more or less alone works too.
  • StampmysterStampmyster Posts: 27
    edited 2011-02-19 14:26
    Awesome advice! Give me a bit of time to investigate and understand it better.


    Application FYI: (Reply to Cluso99)

    Well, tough to tell what the future will bring, but the current project requires constant sampling, calculating parameters, then moving high-torque stepping-motors. I’m monitoring temperature, humidity, and writing this-and-that data into EEPROM in real time. When sampling input is weak, or non-existent, data is analyzed to find the last-best condition, and uses past history as a guide.

    This has proven to be prohibitive to even the fastest stamp.

    It was quickly apparent, keeping up was impossible. I decided to use a BS2 for some data-acquisition, storage, and to handle temperature, heating and cooling requirements along with a 40-pin BSP for everything else.

    It is just adequate enough to do the job, cumbersome, and confusing. Still, I must interrupt each stamp when using shared items. For instance, when writing to EEPROM the other stamp is halted to prevented reading and writing at the same time. Sharing variables between stamps is also cumbersome, as it requires lots of read/writes to do so. Slowing down the whole process.

    In my mind, true multitasking capabilities would be far superior, along with the ability to share variables and data between COGS.

    Hope I’m looking in the right direction?


    OK, Be Back... keep it coming! Great stuff!
  • Graham StablerGraham Stabler Posts: 2,510
    edited 2011-02-19 14:36
    That sounds like a perfect propeller application.

    Graham
  • Cluso99Cluso99 Posts: 18,069
    edited 2011-02-19 18:50
    Yes, a perfect app :)
    You might want to use an SD card, at least later anyway. There is wear issues with all devices and if the eeprom is soldered it can be a nightmare for some to replace it. SD card - just replace it. But it really depends on how often the same locations are rewritten (they are in blocks, so if you update by writing 4 bytes at a time, then you will be writing the same block many times over before you move to the next. Don't worry too much, it's just a heads up warning that they have limited write life.
Sign In or Register to comment.