Propeller Assembly
microcontrolleruser
Posts: 1,194
I looked at some kind of FAQ for Propellor Assembler.
http://www.parallax.com/propeller/qna/Content/QnaTopics/QnaAssembly.htm
Well. It does have MOV opcodes like assembler.
Okay. I will take a look at it.
Might as well do something with our stockpile of Propellor hardware.
Everybody stay away from those Quickstart Human Interface boards on sale until we get one.
http://www.parallax.com/propeller/qna/Content/QnaTopics/QnaAssembly.htm
Well. It does have MOV opcodes like assembler.
Okay. I will take a look at it.
Might as well do something with our stockpile of Propellor hardware.
Everybody stay away from those Quickstart Human Interface boards on sale until we get one.
Comments
Already have a question.
Can you have ALL the processors working on one task?
That is one thing that's been bothering me about this. How do you 'pour on the power?'.
I don't want a bunch of 10F200's.Then be limited to that kind of power.
Most often Propeller applications have one top level Spin object running the users program in one COG. That object then makes use of all kind of drivers and things running in other COGS to get the interface work done that it needs. UART, SPI, SD card file system, etc, etc. Or whatever sub-functionality you like.
On the other hand if you have a computation that can be split over many COGs to gain performance that is also possible. For example I have a Fast Fourier Transform that can run on 1 COG or make use of 2 or 4 COGS if you need more speed. It's written in C mind you.
It's just a matter or programming
If you're a gamer, you might recognize Annie and Tibbers from the Riot game, "League of Legends." There are several hundred 2W LEDs running to create flames (Tibbers' seams) and burning embers (trees) lighting effects. At the heart of this is a single Propeller in the form of an EFX-TEK HC-8+ controller (yes, I designed it, with the PCB layout done by John Barrowman, another former Parallax employee). The HC-8+ is acting as a DMX master controller sending lighting data to a bunch of off-the-shelf DMX bricks; those are what drive the LEDs.
Cog assignments:
-- main cog launches everything and controls Tibbers' eyes
-- one cog controls a flame in Annie' hand (lights her face)
-- flames cog for Tibber's seams
-- four cogs for embers (one per tree; overkill, but I had the cogs)
-- DMX output driver
My DMX driver exposes the address of the DMX transmit buffer. This allows the embers and flames cogs to write into that buffer, directly to the channels they affect (using bytemove to do it quickly). By using this strategy, I could enable/disable any particular aspect of the animation; this is critical when working for Steve Wang who is a Hollywood effects legend. He mostly expresses what he wants from me in hand-gestures and sound effects from his mouth. After eight years of working with him, I know what he means. This is just one of the many displays we've created for Riot. We've also done displays for Blizzard. The power and flexibility of the Propeller allows me to craft animated lighting that matches the scope and grandeur of the displays -- and often with very little time to do it.
You can see a bunch of my other artist implementations on this page: https://www.pinterest.com/jonmcphalen/techno-art/
This is a ridiculous comment.
Check this thread for a great offer on Harprit's PASM book.
forums.parallax.com/discussion/comment/1418441/#Comment_1418441
Ps. I've edited your thread titles for you with a spelling update. It's Propeller, not Propellor. Using the correct spelling helps search.
'have a computation that can be split over many COGs to gain performance '
Gain or get performance. Yes.
'make use of 2 or 4 COGS if you need more speed.'
How about 'locking down' all eight?
But.This is a hobby so. Off we got to light an LED with Professional Board.
Nice to talk 'what if' though.
Found Blink LED tutorial probably Spin.
http://learn.parallax.com/tutorials/language/spin/get-started-propeller-board-education/2-led-light-control/led-light-control
Look at the last words in lesson.
'Check for blinking light'
Nice to be back with Parallax.
That is what I was thinking. If PASM is Propeller assembly.
I did a quick search and no Assembly Manual jumped out at me.
Let me do a little Spin coding first.
Found the Assembler Manual.
https://www.parallax.com/sites/default/files/downloads/P8X32A-Web-PropellerManual-v1.2.pdf
Half the manual is Spin. Page 238 to end is Assembler.
I like the part 'Where does an instruction get it's data?'
Well yes. That might come in handy.
Good ol' Parallax.
Von Szarvas
'https://www.amazon.com/Programming-Propeller-Spin-Processing-Electronics/dp/0071716661'
I get it.
The guy that wrote this also wrote a self published guide to Assembler.
Are you telling me 'no parallax assembler lessons'?
The Propeller Manual has a whole chapter on Spin and a whole chapter on Assembly. It's a great reference. A PDF of it comes with Prop Tool, but can also be found at the link below:
https://www.parallax.com/sites/default/files/downloads/P8X32A-Web-PropellerManual-v1.2.pdf
You can also buy the printed edition, which I would highly recommend.
You should get Phil's Tricks and Traps, too: http://forums.parallax.com/discussion/download/49618/Propeller_Tricks_n_Traps.pdf
Jon
Thanks for those two tutorials.
Propellor Tricks and Traps looks good too.
Bob
Doing C Learn now.
http://learn.parallax.com/tutorials/language/propeller-c/propeller-c-start-simple
It's all the same. Just have to remember which one you are using.
Tidbit from Propellor Manual.
Looks like Propellor IDE was written outside of Parallax.
Propellor Tool written by Parallax.
Probably bounce between the two.
PropellerIDE was written outside, with direction from Parallax (and suggestions from vocal users like me!). It is actually a fork of SimpleIDE, but tailored for Spin. I prefer the editing features of Propeller Tool, in particular, smart tabs, blocks selections, and the way search/replace is handled. But... the compiler built into Propeller Tool doesn't do unused code removal an I have some big projects that it cannot compile. I use PropellerIDE to compile those projects that are too big for Propeller Tool.
I do like that PropellerIDE supports multiple templates while Propeller Tool only allows one. Due to the number of platforms that I write code for, having templates saves a lot of time. I often create a project in PropellerIDE, do the editing/debugging in Propeller Tool, then -- if required -- do the final compilation in PropellerIDE. It just goes to show that there is no on tool that is perfect for everything.
FWIW, I find it best to write obvious code. It's a very rare case when anyone refers to the SPR array, especially when all of the elements have names known to the compiler.
Jon
Coming around to using Spin at the get go.
Should have some code samples soon.
'Propeller Tool doesn't do unused code removal '
No big. If anything is removed from my code there would not be anything left.