Shop OBEX P1 Docs P2 Docs Learn Events
C Code for Propeller — Parallax Forums

C Code for Propeller

helideveloperhelideveloper Posts: 10
edited 2010-03-12 21:43 in Propeller 1
I was wondering how to program the microcontroller PROPELLER using C code. I found "ICCV7 for Propeller (Non-Commercial) with FREE Propeller Demo Board (limited time only)" in the products page, but I don't understand why it says "time limited", what does that mean?, will it be restricted after 45 days even if I buy it for 99$?.

I really need to program it using C code because I already have few programs for helicopter control, and rewrite them in assembler does not make sense for me.

I will really appreciatte any advise in the subjetc, any way of programing the propeller using C, as well as example on how to program the diferent cores concurrently. I need a robust software for it, beacuse it is a professional project.

Thank you in advance.

Comments

  • hover1hover1 Posts: 1,929
    edited 2010-03-10 18:29
    helideveloper,

    welcome to the forums! Youll'e find a lot of helpful and friendly people here.

    The free Demo Board is a great deal! After 45 days, the Non Commercial version will limite code size to 10K. It will also have no Floating Point Support.
    There is more information at this site:

    http://www.imagecraft.com/devtools_Propeller.html

    You might also want to take a look at the free Catalina compiler available right here on the forums:

    http://forums.parallax.com/forums/default.aspx?f=25&m=388930

    As you say this will be a professional project, in my opinion you would want to go with the ImageCraft Standard version or Catalina, since the Non-Commercial version is just that, Non-Commercial.

    Jim
  • Mike GreenMike Green Posts: 23,101
    edited 2010-03-10 18:30
    The ICC website has a good description of what you get with the Demo version as well as the Non-Commercial vs. Standard versions. You only get floating point with the Standard version. The Demo version works like the Non-Commercial version for 45 days, then will only compile programs up to 1/2 of the size of the Propeller's memory.

    You have to refer to ICCs documentation on any C programming questions including multi-cog programming.

    There is a good free C compiler called Catalina. It's not a commercial product and its still under development, but is a reasonable option for C programming.
  • hover1hover1 Posts: 1,929
    edited 2010-03-10 18:31
    Also check out the Object Exchange (OBEX):

    ·http://obex.parallax.com/

    There are objects that are written in Spin, PASM, and C.

    Jim
  • jazzedjazzed Posts: 11,803
    edited 2010-03-10 19:01
    helideveloper said...
    I was wondering how to program the microcontroller PROPELLER using C code. I found "ICCV7 for Propeller (Non-Commercial) with FREE Propeller Demo Board (limited time only)" in the products page, but I don't understand why it says "time limited", what does that mean?, will it be restricted after 45 days even if I buy it for 99$?.

    Welcome to the forum. This is a good question. Why would anyone pay $20 extra for the package when one can buy the demo board and download the same limited version software for free. Seems like there is an error in the description. Is the book and CD worth $20?

    Parallax and ImageCraft should clarify this.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Short answers? Not available at this time since I think you deserve more information than you requested.
  • heaterheater Posts: 3,370
    edited 2010-03-10 19:10
    Professional project or not I might question the motivation for insisting on C.
    If you need the speed PASM is the way to go on the Prop.
    If you need to squeeze a lot of code in Spin is he way to go.
    ICC and Catalina are great. They are a half way house. Faster than Spin but bigger code.

    In the time that it takes to work out the licensing issues any competent C programmer could be up to speed in Spin and PASM. Its that hard[noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
  • RsadeikaRsadeika Posts: 3,837
    edited 2010-03-10 19:11
    The "limited time only" refers to the inclusion of the demo board, in other words, this is a special. In one of my other threads, I hinted at Parallax making it a permanent "deal".

    Ray
  • W9GFOW9GFO Posts: 4,010
    edited 2010-03-10 19:37
    jazzed said...
    Why would anyone pay $20 extra for the package when one can buy the demo board and download the same limited version software for free. Seems like there is an error in the description. Is the book and CD worth $20?

    Parallax and ImageCraft should clarify this.

    The non commercial version sells for $99 and has the limitations described above but it will not expire. For the first 45 days however you get the full functionality of the standard version.

    The free demo version however works for just 45 days - then you're done.

    Rich H

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    The Simple Servo Tester, a kit from Gadget Gangster.
  • hover1hover1 Posts: 1,929
    edited 2010-03-10 19:40
    Confusing, Yes!
    ·
    I bought the $99.00 package. After the 45 day expiration date, the demo is rendered useless. So if you bought the $79.00 Demo Board, and downloaded the trial, after 45 days you would have to put out another $99.00 for the software.
    ·
    There is no book or CD involved with the special unless you are talking about getting the standard Demo Board and book/CD for $99.00.
    Jim
    jazzed said...


    Welcome to the forum. This is a good question. Why would anyone pay $20 extra for the package when one can buy the demo board and download the same limited version software for free. Seems like there is an error in the description. Is the book and CD worth $20?

    Parallax and ImageCraft should clarify this.

  • hover1hover1 Posts: 1,929
    edited 2010-03-10 19:41
    Yea, what Rich said. [noparse]:)[/noparse]
  • W9GFOW9GFO Posts: 4,010
    edited 2010-03-10 19:59
    hover1 said...
    Confusing, Yes!

    Indeed! Look at this:

    attachment.php?attachmentid=68530

    So what does that mean?

    Rich H

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    The Simple Servo Tester, a kit from Gadget Gangster.
    430 x 169 - 35K
  • jazzedjazzed Posts: 11,803
    edited 2010-03-11 00:52
    I assume since the graphic is talking about a demo that you get full functionality for 45 days for evaluation. If you are still excited about it after 45 days and your project won't build anymore, you can spend $$ for a license key to continue using it [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Short answers? Not available at this time since I think you deserve more information than you requested.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2010-03-11 01:30
    There are free options for C programming.

    The simplest as already mentioned is Catalina http://forums.parallax.com/showthread.php?p=844004

    Alternatively, if you wish you can install CP/M on a board and then write and compile C on the board itself, eg BDS C http://forums.parallax.com/showthread.php?p=860453

    There are various hardware platforms. Eg Cluso has shrunk a propeller plus ram board down so it fits in a matchbox, and that can run C. Generally, any board that can run CP/M can run either C within CP/M, or it can run Catalina which is compiled off board and downloaded.

    I'd probably start with Catalina first as you don't need any new hardware.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.smarthome.viviti.com/propeller
  • helideveloperhelideveloper Posts: 10
    edited 2010-03-11 01:54
    First of all, thank you all for replying my post.

    I have understood the following about ICC:

    DEMO Version = Non-Commercial Version for 45 days. After that time, it will be limited to 10K and no Floating Point Support.

    NON-COMMERCIAL Version (99$ + demo board for free (offer by limited time)) = STANDAR Version for 45 days. After that time, no Floating Point Support is available.
    Question: Is there any limitation in memory? I suppose there is the answer is no, because in that case, it would be the same deal as the DEMO version, after 45 days.
    Question: the non-commercial version can be used only in one computer?.

    STANDAR VERSION. No limitations in memory, floating point available, no time expirations, dongle available.

    On the other hand, about CATALINA, it is free!, what about its performance? Do you recommend it? Should I know about any bug or known problems before starting?
    What I meant with “professional” is a high level engineering project, however, it is non-commercial. I am a researcher in a University and we are developing a teleoperated helicopter.

    I insist in using C, because (1) I already have C programs, (2) me and my students are familiar with C, (3) we can test our C programs in other environments such as MatLab.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2010-03-11 02:06
    Catalina took me a little time getting everything installed and set up in the right directories, and then thinking about batch files. But once set up, compiling was/is a one click affair. No problems that I have found. And there is active support from the author, so if you did have any problems you could get them fixed. (Support is *extremely* good, to the point of "here is a brand new board design, can you get catalina running on it" and that was done in only a few days).

    Is the hardware flying or on the ground? Just thinking about board size/weight etc.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.smarthome.viviti.com/propeller
  • RossHRossH Posts: 5,519
    edited 2010-03-11 02:46
    Hi helideveloper,

    I developed and support Catalina, and there are no known bugs. There are a few minor issues mentioned at the top of the Catalina thread - but I have already fixed those and will include the fixes in the next release (which will also include support for the new BlackCat source level debugger).

    As others have mentioned, Catalina is still under active development, and tends to be a little more difficult to get up and running - but it's performance is comparable to ICC (somewhat faster on some benchmarks, somewhat slower on others). Catalina also allows support for program sizes up to 16Mb (if you have external SRAM attached), most standard devices supported "out of the box" and an easy path for adapting new PASM drivers if you need them.

    If I were you, this is what I would do ...

    By all means use ICC until your trial period expires. If you decide you like it, then buy it. But in the meantime use the "wrapper" macros provided as part of Catalina (I have attached a copy to this post) for accessing the various Propeller-specific hardware features - that way you can compile your programs using either ICC or Catalina - and you can change your mind at any time.

    Good luck with your project!

    Ross.

    EDIT: Attached a newer version of catalina_icc.h (will be included in the next release)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Catalina - a FREE C compiler for the Propeller - see Catalina

    Post Edited (RossH) : 3/11/2010 9:53:33 AM GMT
  • BeanBean Posts: 8,129
    edited 2010-03-11 02:58
    Have you considered PropBASIC ?
    It is FREE.
    Runs on Windows, Linux and Mac.
    Generates assembly code or LMM code.

    I have create several project for my work with it. The biggest is an oscillator microjump test system that uses all eight cogs.

    Cog 1 = Measure oscillator frequency to 1/8 ppB every 10mSec
    Cog 2 = Measure oscillator EFC voltage using MCP3204
    Cog 3 = Measure temperature using DS18B20
    Cog 4 = Convert measurements into ASCII
    Cog 5 = Send ASCII data to PC at 230Kbaud
    Cog 6 = VGA video driver (320x240 4 colors)
    Cog 7 = Draw VGA screen
    Cog 8 = Update a 4x20 character LCD

    I know this looks like each doesn't do much, but the measurements must be in realtime with no lost data.
    This project is a cutting edge test system.
    Bean

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Use BASIC on the Propeller with the speed of assembly language.

    PropBASIC thread http://forums.parallax.com/showthread.php?p=867134

    March 2010 Nuts and Volts article·http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/prop/col/nvp5.pdf


    Post Edited (Bean) : 3/11/2010 3:10:31 AM GMT
  • ImageCraftImageCraft Posts: 348
    edited 2010-03-11 03:08
    Just to clarify - the non-commercial version has the same memory support as the STD version, just that you cannot use it for commercial development. We have a horde of trained corgi who sniff out illegal users and bite them on the ankles when such misuse happens, but otherwise, they just have themselves, their parents, and our starving daughters to answer to.

    // richard
  • W9GFOW9GFO Posts: 4,010
    edited 2010-03-11 04:10
    ImageCraft said...
    Just to clarify - the non-commercial version has the same memory support as the STD version, just that you cannot use it for commercial development. We have a horde of trained corgi who sniff out illegal users and bite them on the ankles when such misuse happens, but otherwise, they just have themselves, their parents, and our starving daughters to answer to.

    // richard
    Could you clarify what the difference is between the non-commercial version ($99) and the demo version (free) once the 45 days are up?

    Rich H

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    The Simple Servo Tester, a kit from Gadget Gangster.
  • ImageCraftImageCraft Posts: 348
    edited 2010-03-11 05:33
    W9GFO said...
    ImageCraft said...
    Just to clarify - the non-commercial version has the same memory support as the STD version, just that you cannot use it for commercial development. We have a horde of trained corgi who sniff out illegal users and bite them on the ankles when such misuse happens, but otherwise, they just have themselves, their parents, and our starving daughters to answer to.

    // richard
    Could you clarify what the difference is between the non-commercial version ($99) and the demo version (free) once the 45 days are up?

    Rich H

    The demo becomes code size limited after 45 days. This is just a general policy we have. On the Propeller, code size limited substantially limit its usefulness. On other micros that we support, the code size limited demo is still useful for doing some small demo. We did that mainly to support the FAE on other micros, where they may demo the micro, and even if the compiler is code size limited, it would be still be good enough to make a LED blink etc.
  • W9GFOW9GFO Posts: 4,010
    edited 2010-03-11 05:44
    On the Parallax product page for the ICCV7 for Propeller (Non-Commercial) with FREE Propeller Demo Board (limited time only) it states (three times) that after 45 days the code size will be limited to 10k. Is that an error in the description? The 10k limit is only for the freely downloadable demo, not the non-commercial version, right?

    Rich H

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    The Simple Servo Tester, a kit from Gadget Gangster.

    Post Edited (W9GFO) : 3/11/2010 5:54:33 AM GMT
  • heaterheater Posts: 3,370
    edited 2010-03-11 06:53
    Just for completeness don't forget you can program for the Propeller in C using the GNU C compiler GCC and the ZPU byte code interpreter Zog. http://forums.parallax.com/showthread.php?p=878273

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
  • Cluso99Cluso99 Posts: 18,069
    edited 2010-03-11 12:14
    Welcome helideveloper smile.gif

    I think you will find that using the prop will end up using some pasm for some tasks in your helicopter project. This is because pasm is so much faster and since it operates in it's own processor it makes sense.

    I am making some presumptions here as I have been thinking of building a quadcopter or hexcopter. One cog will look at the accelerometers and make calculations and pass them via a hub memory location. Another cog maybe looking at altitude (pressure) and another the GPS position and yet another the gyros. Some of these modules may already be written in pasm and posted in the OBEX (object exchange). Pasm is actually really easy since it is a 32bit RISC processor (= reduced instruction set).

    Your main program can still be C or even spin. It is just that the pasm are just like drivers in the older DOS based computers that did not have enough memory and performance for bloated C driver code.

    You will however, find many poeple here willing to help you get your project working.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Links to other interesting threads:

    · Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
    · Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
    My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
  • ImageCraftImageCraft Posts: 348
    edited 2010-03-11 20:40
    W9GFO said...
    On the Parallax product page for the ICCV7 for Propeller (Non-Commercial) with FREE Propeller Demo Board (limited time only) it states (three times) that after 45 days the code size will be limited to 10k. Is that an error in the description? The 10k limit is only for the freely downloadable demo, not the non-commercial version, right?

    Rich H

    The "limited to 10K" refers only to the demo, non-licensed version. When you purchase a non-commercial license, you will receive a license.

    I will ask Parallax to fix the webpage. Sorry for the confusion.

    Thanks.
    // richard
  • W9GFOW9GFO Posts: 4,010
    edited 2010-03-12 21:43
    ImageCraft said...
    The "limited to 10K" refers only to the demo, non-licensed version. When you purchase a non-commercial license, you will receive a license.

    I will ask Parallax to fix the webpage...

    That makes sense. The webpage still needs to be fixed...

    Rich H

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    The Simple Servo Tester, a kit from Gadget Gangster.
Sign In or Register to comment.