C Code for Propeller
helideveloper
Posts: 10
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.
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
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
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.
·http://obex.parallax.com/
There are objects that are written in Spin, PASM, and C.
Jim
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.
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.
Ray
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.
·
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
Indeed! Look at this:
So what does that mean?
Rich H
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Simple Servo Tester, a kit from Gadget Gangster.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Short answers? Not available at this time since I think you deserve more information than you requested.
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
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.
Is the hardware flying or on the ground? Just thinking about board size/weight etc.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.smarthome.viviti.com/propeller
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
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
// richard
Rich H
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Simple Servo Tester, a kit from Gadget Gangster.
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.
Rich H
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Simple Servo Tester, a kit from Gadget Gangster.
Post Edited (W9GFO) : 3/11/2010 5:54:33 AM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
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
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
That makes sense. The webpage still needs to be fixed...
Rich H
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Simple Servo Tester, a kit from Gadget Gangster.