Propeller Questions For the Average Idiot
microcontrolleruser
Posts: 1,194
I took a look at Propeller datasheet.
All I wanted to know was this:
How many memory registers does it have? At this point I don't care what they are. Program or data.
How many bits wide are they? 16?, 32 or what?
After a couple paragraphs I gave up on that datasheet.
At this point I am just tire kicking on the Propeller.
Maybe when I get up to C the Propeller will be more comprehensible.
Comments
Funny you started out with cog memory and skipped over main memory.
Hee's something for datasheet.
Here's link to datasheet.
https://www.parallax.com/sites/default/files/downloads/P8X32A-Propeller-Datasheet-v1.4.0_0.pdf
That's fascinating but not helpful. Thanks anyhow.
Datasheet looks a little better now.
Using Propeller Tool version 1.3.2
Looking in Help/Useful Tables
Where is the instruction set in Help?
They cleverly hid operators etc. in something called Useful Tables.
Looked 10 minutes. Could not find instruction set.
Let me go back to the datasheet for instruction set. It may be more common sense.
This Help looks like it relies on the Tutorial and the rest is an afterthought.
Edit. Found them in datasheet. I think.
LONGFILL (StartAddress, Value, Count) Fill longs of main memory with a value.
Is this equivalent to MOV or LOAD or LD?
Thank you Cluso99
"There is a summary sheet of 2 pages for instruction set, and two pages for spin. I think they are contained in the PropTool download. Check PropTool Help menu for some docs downloaded with it."
Right where you said it would be. It's called Quick Reference.
"There was a short set of tutorial examples that used to be downloaded with PropTool - not sure if it's still there."
There is a Tuturiol there. Then the only example source code is for it, the tutorial. No general sample code like Stamp or SX.
Don't know what they were thinking there.
" If you have experience with other micros then these examples will get you running quickly. "
Great. To be honest. I won't be running very far with Propeller.
Just taking a break from learning assembler with a 'different micro' as you say.
Got burned out on it. Messed up a header file I was working on the other day. Will have to totally redo it later.
Yes.Will just run a Propeller sample program now and then. Then dig into a line of code a little.
The Propeller datasheet lists all of the PASM instructions but it's the Propeller Manual that goes into detail on not only every register but every PASM and Spin instruction.
If you really want to know about the LONGFILL instruction then look in the Propeller Manual.
But first, do you know what a LONG is?
The name itself should be a clue.
https://www.parallax.com/downloads/propeller-manual
Genetix
"The Propeller datasheet lists all of the PASM instructions"
Couldn't find them.
"But first, do you know what a LONG is?"
I don't know what Parallax means when they say that.
They call instructions 'Elements' so who knows what they mean by LONG.
Would have to look at their explanation.
I was asking if that instruction is as close to MOV as you are go to get with Spin.
Anyhow. Will just run one sample program tonight or run the Propeller code for keypad and just look at it.
There is useful sample code on the OBEX (object exchange). Link is on the Parallax website.
The Propeller (P1) does not have, and nor do you need, Interrupts. All the peripherals are done by software, and there is a host of them in OBEX.
Try a demo program using spin and FullDuplexSerial (FDX) and you will see how easy it is to use a soft peripheral. Don't bother with the PASM part of FDX - it's one of the more complicated ones. Just use it with spin to write out a string, etc, to the serial port. There is a Windows terminal program called Propeller Serial Termjnal (PST).
Or if you want to see what a prop can do, see my thread "Prop OS" or "Propeller OS" or similar. It's a whole DOS like OS for the prop using a microSD card. If you cannot find it see my P8XBlade2 thread for a link.
Or there is CPM running using a Z80 emulator called ZiCog.
Is this what you were looking for?
Section 6.4. - Propeller Assembly Instruction Table (Page 22)
That LONGFILL instruction that you referenced earlier is in the Spin section that comes first (page 19).
And just so you know a LONG refers to 32-bits or 4 Bytes which is the largest unit the Propeller can use at a time.
It is a 32-bit Processor after all.
The answer to your memory questions is here:
Section 5.0 - MEMORY ORGANIZATION (Page 15)
Cog RAM is on the bottom of page 16.
Then skim the Spin reference in the manual so you will get an idea to look for explanations for the commands.
To see examples, look in the library subfolder and the example subfolder (not sure if that is the name).
Thank you for all the responses!
All of them very good!
I'm keeping quiet and just thinking about the new info.
All very astute comments. To the point.
Not digging in and learning PASM and at least one of the other languages available for the Propeller is a mistake. It is different from every other micro on the market, but once you wrap your mind around the new concepts you will see the elegance and simplicity of it. I have worked with a lot of the popular chips on the market over the years and the P1 is by far my first choice for any application it can handle.
-Phil
My associate has a lifetime of experience in programming and he uses Propeller and is quite satisfied with it.
I will 'come up through the ranks'. It just works for me.
Being sociable and doing some experiments with Propeller.
The Propeller Help does not have Language Reference with code snippets like Stamp Editor.
Now the good part is Propeller Tool has a Terminal program.
Just making some observations.
Still looking for code samples that are to my liking.
Come over and join the idiots like me, using BlocklyProp. I think it's a great way to learn the Propeller concept from the outside in. I don't think much about registers and variable sizes using this tool. Everything just sorta takes care of itself and variables are always big (LONG). You can jump right into multicore programming with LEDs, motors and buttons using the "new processor" block. We're having a really good time with this programming environment.
The most recent project I made with BlocklyProp is this "Visual Metronome" http://learn.parallax.com/tutorials/language/blocklyprop/visual-metronome-project.
But I'm really stepping it up this winter, and expect to send this autonomous robotic boat across Lake Tahoe using GPS for navigation. This project will show what's possible with the Propeller and BlocklyProp.
The guy talking in the video tells the story behind the project.
I don't have much time to write text code, but I can do that too if needed.
Ken Gracey
You really have gone where no man has gone before.
I think I can cross you off the my list of consulting fee prospects for good now.
When I lived in the Bay area it had Stanford, Berkeley and aerospace and other than that it was middle of the road.
I think we are about the same age. Maybe it is time to move Parallax to another state.
I say Texas. Send me my consulting fee after you have been there a while and feel better.
New Braunfels, TX. I give it 5 stars.
Call your buddies at Iconstrutix in Texas. They are always wide awake and sharp on the phone. They like it.
You can get you and your brother matching Ford F450 pickups with Parallax logo's on them.
Fill up for $2.50 a gallon. How can you resist that?
And what micro(s) have you come from? There is a lot of diverse experience here. It may be familiar to "translate" a few ideas.
A bunch of us saw that Datasheet, or even just the discussion here, pre datasheet. That was true for me. We had the diagram, but not the datasheet you looked at recently. No matter, the response was generally the same:
What the heck is this thing? Yeah, looks crazy. It's not. But, things are done a bit differently. This is most generally a good thing. Every so often, it's not. YMMV, just like all of us.
At the time I jumped in, I had been gone from this stuff for about 20 years. Just did different stuff, but have always loved embedded and my career path was headed back this direction. Honestly didn't take much to get going and doing useful things. Those programs in the OBEX are gold. I got more done using this chip than I ever expected, and it was generally fun, more than work. That's not easy to say with these things.
Other than that, welcome!
" Honestly didn't take much to get going and doing useful things."
That is how my relative is with it.
Just started using it without any complaints or anything.
It may if you have to be experienced to pickup on it.
I just have to do the 33 instruction assembler thing. It's simple step by step.Works for me.
Will keep my foot in the door with Propeller though.
Propeller documentation and Help is not as refined as the BASIC Stamp is but hopefully that will change when the P2 is finally released.
The Stamp had been out for over a decade before the Propeller arrived.
If there is a particular code example that you don't see or can't find, THEN ASK!
Thank you Genetix
Found some tidbits in Wikipedia Propeller article.
https://en.wikipedia.org/wiki/Parallax_Propeller
" multi-core processor parallel computer architecture microcontroller"
What's 'computer architecture' mean?
"After booting the propeller, a bytecode interpreter is copied from the built in ROM into the 2 KB RAM of the primary COG. This COG will then start interpreting the bytecodes in the main 32 KB RAM. More than one copy of the bytecode interpreter can run in other COGs, so several Spin code threads can run simultaneously."
Now I understand it. ROM>COG>Main Ram.
Yes. The program is in main memory. No. It doesn' run there; Yes.Cog runs it.
Perfectly clear.
"This interpreter decodes strings of instructions, one instruction per byte,"
It's an 8 bit microcontroller.The 32 bit instructions mentioned in doc's must be 4 of these.
They say Spin is "Fortran and BASIC" mixed togther.
"This refers to the whitespace formatting of FORTRAN and the keyword-based operation of BASIC"
So.It's a big multi-processor Stamp with a strain of Basic programming it.
Interesting.
I don't know who "they" are but Spin is about as far from Fortran as you can get. And Fortran does not use whitespace for formatting. Spin is more like Python in that regard.
-Phil