Shop OBEX P1 Docs P2 Docs Learn Events
Newbie question: Should I get into using the Propeller Chip? — Parallax Forums

Newbie question: Should I get into using the Propeller Chip?

AirbrushaAirbrusha Posts: 5
edited 2009-07-01 07:04 in Propeller 1
I'm very new to programing chips. So new that I'm not sure what is sutible for my needs. I have a basic stamp 2 that I used for a class on microcontrollers in school. What I want to do is make·hand held games that would simply hold a trivia type of game in it for a learning environment. It would have to be low cost and would only need to sense 3 buttons and interface with a simple LCD. I am only leaning toward the propeller because of it's lower cost than the stamp. Someone please put me on the right path.

Comments

  • potatoheadpotatohead Posts: 10,261
    edited 2009-06-29 04:47
    Well, Do you have goals beyond the simple trivia game?

    If so, the trivia game would be an excellent project for the prop. That kind of thing is well within the scope of what a Propeller can do. And you can do it with SPIN, which is nice in that it's a high level language like the Stamp Basic is, but it runs considerably faster.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki: Share the coolness!
    Chat in real time with other Propellerheads on IRC #propeller @ freenode.net
    Safety Tip: Life is as good as YOU think it is!
  • AirbrushaAirbrusha Posts: 5
    edited 2009-06-29 04:58
    Wow, that was a fast response! Thank you so much. I didn't want to take the time to throw everything in and learn it if it was not the chip for me. I may want to link later units up with a wireless "server" to track scores and give feed back, but that is way into the future. I should probably put a usb connection on them for upgrades and new questions too. I still have much to learn and I know this is going to take a while to get up to speed with. Thanks for the info and I'm sure I'll be asking many many questions on this forum.
  • jazzedjazzed Posts: 11,803
    edited 2009-06-29 05:35
    I have a similar idea brewing, but it's not a trivia game [noparse]:)[/noparse] I'm thinking about getting and maybe setting data on an internet hosted server (a custom PC application can handle data repackaging for the device). I might use a USB for periodic connectivity, but my application would benefit more from just using a 2GB uSD card. I'm also considering using Chip' voice synthesizer because of the device's intended use. I just hope I don't run out of memory again [noparse]:)[/noparse]

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


    Propalyzer: Propeller PC Logic Analyzer
    http://forums.parallax.com/showthread.php?p=788230
  • PhilldapillPhilldapill Posts: 1,283
    edited 2009-06-29 06:20
    Airbrusha, the Propeller is a fantastic chip, capable of very powerful things. However, the downside to it is that it is sooo easy to use... It's a wonderful place to start, but it may not teach you all the stuff a conventional microcontroller would. That can be taken as a good or bad thing - take your pick. [noparse]:)[/noparse]
  • AirbrushaAirbrusha Posts: 5
    edited 2009-06-29 07:04
    Thanks Jazzed and Philldapill, this reinforced my opinion on the propeller. I like Jazzed idea of a uSD card. That might be a better way to go if I want to charge for upgrades later on. I would also want this to be rechargable. I don't want the people in charge of handing them out to have to mess with batteries. Plus, I think a simple signal to the chip in the event of a charge taking place could reset the game. Are there different sizes for the memory modules that the propeller uses? Potato head said that the game could be writen totaly in SPIN. Is there a way for me to down load the SPIN program and debug it without the chip? I hope that makes sense.
  • mctriviamctrivia Posts: 3,772
    edited 2009-06-29 07:39
    The prop has 32KB of Hub RAM and 512 longx8 COG RAM. This is fixed and can not changed. Many of the systems and modules available do use larger EEPROM then is required allowing for extra code and information to be stored in the extra space.

    My propmod-us_ps_sd would be a nice option for you. Has built in uSD card reader, and built in buck/boost power supply that is over 90% efficient which is a good thing if running off batteries.

    Spin Studio from ucontroler.com is another very good platform to learn on. They have modules for just about anything you would want.

    Hope you enjoy the prop.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    propmod_us and propmod_1x1 are in stock. Only $30. PCB available for $5

    Want to make projects and have Gadget Gangster sell them for you? propmod-us_ps_sd and propmod-1x1 are now available for use in your Gadget Gangster Projects.

    Need to upload large images or movies for use in the forum. you can do so at uploader.propmodule.com for free.
  • RaymanRayman Posts: 14,844
    edited 2009-06-29 11:47
    It may be above you're price point, but I think my little PSM module would work for you!

    http://www.rayslogic.com/Propeller/Products/Products.htm

    I just sold my entire inventory at the Expo!· (Ok, so my "inventory" was only 13 units [noparse]:)[/noparse]· But, I should have more in a week or two...

    It has a "TV_Text" mode that is very simple to use....

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
  • jazzedjazzed Posts: 11,803
    edited 2009-06-29 15:05
    @Airbrusha,

    There are various memory expansion options for devices in development. No external SRAM solution will give you the access speed available with on-chip memory. Different solutions require different approaches and board sizes. The fastest solutions available today (20MB/s?) in mostly "developer" prototype or some pre-production form will require 2 Propellers because of the number of pins required (28 pins or more?). I'm developing a small 1 Propeller solution SRAM 512KB module (0.9x2.1" about DIP40 size) 1MB with 2 modules that needs 16 Propeller pins, but will only allow 5.3MB/s maximum access rates for long bursts (16 longs at 4 bytes/long). Adding external hardware will increase cost.

    Learning the Propeller Spin language may be a challenge for someone who doesn't know any programming language at all. But it will be no harder than learning BASIC from a program step by step perspective. There is more to learn in Spin than with BASIC because Spin allows much, much more ability. Propeller can cost less than BASIC stamp modules, but it will likely be a longer learning path for a totally new programmer. The wonderful people in this forum can help a lot, but even the most helpful have limits.

    Best of luck with whatever you do!

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


    Propalyzer: Propeller PC Logic Analyzer
    http://forums.parallax.com/showthread.php?p=788230
  • AirbrushaAirbrusha Posts: 5
    edited 2009-06-29 19:49
    Thanks everyone for all the responses. I'm not going to ask on here, but rather post another topic about what are good LCD displays that are cheap and work with the propeller.

    Also, I checked out ucontroler.com and looked at the spin studio. I see that it is free for only 30 days. I guess I should rephase my question: How do you edit spin if you don't buy the program, and is there a free one out there? Can you use any of these without the chip in hand on a board? I only ask this since my brother-in-law will probably do the programing on this first, but has no hardware know-how. He is on the other side of the country and might be a bit hard if I have to put it together and then he has to program it.
  • Mike GreenMike Green Posts: 23,101
    edited 2009-06-29 19:56
    The Propeller Tool and the 3rd party multiplatform Spin compiler BST both include editors. Both are free. BST runs under the MacOS, Windows, and Linux. The Propeller Tool is Windows-only. There's a new free 3rd party C compiler (Catalina) and a cheap, 3rd party excellent C compiler (ImageCraft's) both available.
  • mctriviamctrivia Posts: 3,772
    edited 2009-06-29 19:57
    Parallax has a free ide that you can use.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    propmod_us and propmod_1x1 are in stock. Only $30. PCB available for $5

    Want to make projects and have Gadget Gangster sell them for you? propmod-us_ps_sd and propmod-1x1 are now available for use in your Gadget Gangster Projects.

    Need to upload large images or movies for use in the forum. you can do so at uploader.propmodule.com for free.
  • Steph LindsaySteph Lindsay Posts: 767
    edited 2009-06-29 20:20
    For learning the Spin language, there is a quick-start tutorial built into the Parallax's free Propeller Tool IDE's Help file. Also bundled with that is the tagged PDF for the Propeller Manual, as well as the tagged PDF for the book "Propeller Education Kit Labs - Fundamentals" and all the example programs. The Labs book was written for the PE Kit, a breadboard-based kit for the DIP chip, but you can use the concepts with any platform.
  • localrogerlocalroger Posts: 3,452
    edited 2009-06-29 23:11
    Airbrusha, I would take issue with Philldapil's worry that the prop might not encourage you to learn fundamental stuff. The prop is a very cleverly limited environment that manages to be very powerful but only if you learn certain concepts, like 2's complement integer math and code optimization, which will serve you well when you graduate to platforms with a seemingly infinite amount of RAM and free floating point math libraries. You will also become quite comfortable with the crappy string handling which is standard in the world's most popular so-called high level language, C. And even if you don't go on to program in assembly language or C, you'll find tha the prop has required you to learn quite a few fundamental things about how computers work that people who learn their craft on mainframes in java can too easily avoid.
  • potatoheadpotatohead Posts: 10,261
    edited 2009-06-29 23:16
    Seconded.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki: Share the coolness!
    Chat in real time with other Propellerheads on IRC #propeller @ freenode.net
    Safety Tip: Life is as good as YOU think it is!
  • CounterRotatingPropsCounterRotatingProps Posts: 1,132
    edited 2009-06-29 23:24
    Airbrusha - in some ways it doesn't matter a lot what MC you use - what's more important is your enthusiasm for the learning. You're in one of the best places on the planet to get assistance too [noparse]:)[/noparse]

    Even though spin's pretty easy (and C's not as scary as localroger makes it sound ;-P) it still has some quirks that aren't in other languages. But it's still a very good place to start.

    The interface to 3 buttons will be very simple no matter what MC you pick ... just make sure you 'debounce' the buttons. [noparse]:)[/noparse]

    Welcome to the forums, BTW !

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • localrogerlocalroger Posts: 3,452
    edited 2009-06-29 23:39
    Oh, what CRP said about debounce. It's one of those things that will drive you crazy if you don't know what's going on.

    And I'm not going to start the C thing again. Really. I promise. Not. Going. To MUST LOG OFF SEE YOU LATER
  • CounterRotatingPropsCounterRotatingProps Posts: 1,132
    edited 2009-06-29 23:47
    > And I'm not going to start the C thing again. Really. I promise. Not. Going

    LOLOL

    Chicken !

    Just kidding ;-P

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • KyeKye Posts: 2,200
    edited 2009-06-30 00:06
    Why are C strings crappy? I kinda like being able to know what's going on.

    I remember programing in perl and feeling every uncomfortable using any low level technique since I wouldn't know what the result would be.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nyamekye,
  • jazzedjazzed Posts: 11,803
    edited 2009-06-30 00:34
    Once you learn enough programming languages, they're all about the same except Forth maybe (with their own limits and extensions). High level languages come with good abstractions that hide pointer manipulations (hash table types as in PERL, etc...) and provide decent object encapsulation. I don't understand why C strings are such a problem. Spin is actually a very close cousin of C and other languages except for lacking strong data types. Spin is a fair mix of power and simplicity.

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


    Propalyzer: Propeller PC Logic Analyzer
    http://forums.parallax.com/showthread.php?p=788230
  • localrogerlocalroger Posts: 3,452
    edited 2009-06-30 01:03
    OK, OK, OK.

    C string handling is crappy because C doesn't handle strings at all; they're not part of the language. They're part of a "library" of bolt-on functions. And while there are some pretty good string libraries C can use, the default library everyone is taught on is a piece of Smile. This is because...

    1. Strings are null-terminated, which means they can't contain the ASCII value zero and you have to scan them to figure out their length. Spin shares this weakness.
    2. String copies and appends are not length checked against the buffers into which you are stuffing them, so that it is trivially easy to overwrite important areas of memory because you tried to copy a 32 byte string into a 16 byte buffer. This flaw is the cause of at least half of the hacker exploits that make it possible for hostile software to take over your computer and turn it into someone else's robot. It doesn't help that the string buffer is usually on the stack because of the way C handles local variables, making it possible for an attacker to predictably insert code into a place he knows it will get run.

    The good C string libraries are rare enough that you really can't count on having access to any of them on any particular platform or project, so everyone uses the crappy ones by default.

    It's also true that even the good C string libraries generally treat strings as an array of bytes and use weird syntax to bridge the gap between byte arrays and character strigns. While Spin shares some annoying characteristics of this (if strcomp(@buffer,string("WHATSTHIS") vs. if buffer="WHATSTHIS") Spin at least absolves itself somewhat by letting you use quoted strings as numerical constants.

    DAMN I WENT THERE WHERE THE HELL IS THE LISTERINE
  • jazzedjazzed Posts: 11,803
    edited 2009-06-30 02:42
    1. I guess someone needs to show me some light. As a matter of convention, it is fine until you get into dealing with packet data. I do appreciate Java's String object length variable, but only consider the need for strlen(str) a slight nuisance. String manipulations with strstr, and strtok_r, etc ... can be a little wierd considering the better alternatives as in using Java's split for example.

    2. The functions snprintf, strncmp, strncat, etc... are available to ensure buffers don't overflow ... but you have to use them [noparse]:)[/noparse] It is somewhat awkward to pass the maximum length to fgets or other buffer based functions.

    As an analogy, I smoked for 20 years (quit January 2000). When you're used to the bad taste or smelly clothes it doesn't matter except to other people. So perhaps I just need to learn a totally different way to program to really appreciate the differences.

    Of course none of this tangent is helping the initial thread poster [noparse]:)[/noparse]

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


    Propalyzer: Propeller PC Logic Analyzer
    http://forums.parallax.com/showthread.php?p=788230

    Post Edited (jazzed) : 6/30/2009 3:56:41 AM GMT
  • Nick MuellerNick Mueller Posts: 815
    edited 2009-06-30 04:51
    > C string handling is crappy because C doesn't handle strings at all; they're not part of the language. They're part of a "library" of bolt-on functions. And while there are some pretty good string libraries C can use, the default library everyone is taught on is a piece of Smile. This is because...

    So SPIN is even more crappier, because the string-libs are less complete than the ones from C?
    And if someone teaches you the wrong libs, or you are too lazy to have a own look at libs, the language is crappy?
    And accessing outside of any array is impossible in SPIN? It's even easier, because SPIN lacks elements that make it easy to write robust code (assert, defines, ...).


    That all doesn't make any sense!

    Nick

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Never use force, just go for a bigger hammer!

    The DIY Digital-Readout for mills, lathes etc.:
    YADRO
  • mctriviamctrivia Posts: 3,772
    edited 2009-06-30 04:55
    coding for a MCU should be thought of differently then for a PC. you need to take great care of what you are doing no mater the language because space and speed are always issues.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    propmod_us and propmod_1x1 are in stock. Only $30. PCB available for $5

    Want to make projects and have Gadget Gangster sell them for you? propmod-us_ps_sd and propmod-1x1 are now available for use in your Gadget Gangster Projects.

    Need to upload large images or movies for use in the forum. you can do so at uploader.propmodule.com for free.
  • localrogerlocalroger Posts: 3,452
    edited 2009-06-30 21:58
    Spin has an excuse -- and oddly, it's the same excuse C has; it was developed for a limited platform. Spin would be just as catastrophic (a word I don't use lightly) as C if anyone were crazy enough to write half the world's application software in it. So why are we using a language developed for the DEC PDP-11, a beast considerably stupider than a single Prop COG, to write applications and high level functions again?

    Back in the day, Intel thoughtfully provided hardware bound checking support in the 8088, so you could set up a couple of registers and bound-check your memory range accesses with almost no speed penalty. IBM helpfully used the interrupt for the PRINT SCREEN key so that nobody ever used the CPU feature, because your interrupt hook had to figure out whether it was being called for a boundary overrun or a print screen request.
  • Nick MuellerNick Mueller Posts: 815
    edited 2009-06-30 22:35
    > Spin has an excuse -- and oddly, it's the same excuse C has; it was developed for a limited platform.

    With the difference, that C has evolved over decades (unfair, I know). C99 is quite different to the K&R C you seem to remember. You still can easily make nonsense. But decent compilers set to the highest warning level, save and modern libs (not the one you named above) and save coding techniques, it is a solid language. Get LINT and learn from it.
    It's all a question of discipline, and C makes that quite easy (contrary to SPIN).

    Nick

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Never use force, just go for a bigger hammer!

    The DIY Digital-Readout for mills, lathes etc.:
    YADRO
  • AirbrushaAirbrusha Posts: 5
    edited 2009-07-01 07:04
    All I can say is WOW. Way over my head but I'm paying close attention to it all as best as I can. I kinda played with C# when I had the crazy thought that I would like to learn how to program games for XBOX. Now that 'that thought is dead and burried, I'm hell bent on learning how to make this work. I bet that most of my ideas are not that new, but I hope that it will guide me to where I want to be. Thanks again to all of you for taking the time to show me the light.
Sign In or Register to comment.