Propeller for dummies...
FORD
Posts: 221
I can't say enough how much I am looking forward to getting into SPIN, as long as I can get a grip on it.
I will probably never be able to program a Prop' using assembly, so I won't waste valuable learning time·trying.
For me, to use·a prop', it all depends on SPIN·being simple enough to learn, or I'm staying with a bs2p, which I mostly use for serial and 1wire stuff.
Having just had a quick look at the serial documents put here by Chip, it is just making it confusing because I haven't seen the SPIN editor, and have nothing which says in basic terms what the heck it all means. Is this forum just for those who have had some pre-training with Parallax ?
It seems that the documents being pre-released, require that you have already seen the editor, which nearly all of you on this forum have. If I had my choice in early documentation, it would be some basics of the SPIN editor and a few "hello world" samples. A sample object is nice, but I don't know where it goes, how it relates to anything in the editor etc etc.
I think its great that this early documentation is released, but it all seems to be for the 'bit bangers' who really know there stuff, or is the Prop going to be a bit tough for people like me ( I dont mind, I just dont want to chase this thing that hard,·and end up staying with a bs2p anyway.)
Don't get me wrong, I am not criticising, just confused, I am as keen as hell to get into it, but I just want to start at the first step.
So I guess I have these 3 questions...
1- Will the SPIN language be simple for·people like me to learn, or will I need·to learn·to 'bit bang' a lot better than I can now, to be able to use it ?
2- Is the SPIN editor and documentation done in a simple approach like the newer stamp manuals, with circuit diagrams and very detailed breakdowns / examples·of each command etc ?
3- ...Or should I have just listened at school ?, (my Mum says I only went there to eat my play lunch).
I also have one suggestion...
Forum users indicate that they are talking in SPIN or assembly, so that some·users can·disregard assembly or spin·stuff. Or evan an option button in the forum to select SPIN / Assembly to separate the 2. Not necessary now, but I'd like to see the number of posts in this forum in 3 months time...
Cheers,
Chris,· West Oz.
I will probably never be able to program a Prop' using assembly, so I won't waste valuable learning time·trying.
For me, to use·a prop', it all depends on SPIN·being simple enough to learn, or I'm staying with a bs2p, which I mostly use for serial and 1wire stuff.
Having just had a quick look at the serial documents put here by Chip, it is just making it confusing because I haven't seen the SPIN editor, and have nothing which says in basic terms what the heck it all means. Is this forum just for those who have had some pre-training with Parallax ?
It seems that the documents being pre-released, require that you have already seen the editor, which nearly all of you on this forum have. If I had my choice in early documentation, it would be some basics of the SPIN editor and a few "hello world" samples. A sample object is nice, but I don't know where it goes, how it relates to anything in the editor etc etc.
I think its great that this early documentation is released, but it all seems to be for the 'bit bangers' who really know there stuff, or is the Prop going to be a bit tough for people like me ( I dont mind, I just dont want to chase this thing that hard,·and end up staying with a bs2p anyway.)
Don't get me wrong, I am not criticising, just confused, I am as keen as hell to get into it, but I just want to start at the first step.
So I guess I have these 3 questions...
1- Will the SPIN language be simple for·people like me to learn, or will I need·to learn·to 'bit bang' a lot better than I can now, to be able to use it ?
2- Is the SPIN editor and documentation done in a simple approach like the newer stamp manuals, with circuit diagrams and very detailed breakdowns / examples·of each command etc ?
3- ...Or should I have just listened at school ?, (my Mum says I only went there to eat my play lunch).
I also have one suggestion...
Forum users indicate that they are talking in SPIN or assembly, so that some·users can·disregard assembly or spin·stuff. Or evan an option button in the forum to select SPIN / Assembly to separate the 2. Not necessary now, but I'd like to see the number of posts in this forum in 3 months time...
Cheers,
Chris,· West Oz.
Comments
Chuck
We started that list 4-5 day's ago ( LOPO list see the topic)
Not many people have added as yet...
Ron
That is perhaps the best answer I could have received.
If I·had permission to only ask one question, it would be...
Approximately how long after the prop release would we start seeing some type of sbasic, and then when·in a stamp format. (Sorry, thats 2 questions.)
With regards to some of the commands we would like to see, I guess that needs more thought / understanding of what is different about using sbasic with the memory structure of the prop.
Perhaps some of the pbasic commands would now·be necessary in sbasic,·then we may not need things like the ** modifier etc.
If the features I have seen in the stuff released so far were possible in sbasic, I could·use it in our products so much faster, and at a much lower time / $ cost.
Regards,
Chris,
West Oz.
·
Perhaps some of the pbasic commands would now·NOT be necessary in sbasic,·then we may not need things like the ** modifier
It's like having a calculator object called calc.
x:=calc.add(2,5) to add 2 and 5 and store in x
or
x:=calc.mult(2,5) to multiple 2 and 5 and store in x.
Ok, silly example, but you get the idea.
-Martin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Martin Hebel
Disclaimer: ANY Propeller statements made by me are subject to my inaccurate understanding of my limited time with it!
Southern Illinois University Carbondale -Electronic Systems Technologies
Personal Links with plenty of BASIC Stamp info
and SelmaWare Solutions - StampPlot - Graphical Data Acquisition and Control
Not so silly, and appreciated,
Thats the learning curve I want to start with, and I can understand that·if its put before me in the right order.
I have no doubt that the official documentation will be like that.
The sbasix stuff sounds good to me though, especially if it ends up·in a similar editor environment where you can view memory maps in each cog etc,·and be basically just adding more commands to what we are already used to using. Because we already have a lot of equipment out there, running well on bs2p's (which have the whole 8 slots full), it will be nice if I can sort of step across into the propeller, not have to step back a bit, and then catch up to where we already are. (knowing that the prop is going to be far superior).
This begs the question...
If you could do all of the same things with an sbasic type editor. Why would anyone bother doing it in assembly ?
There must be some system performance loss somewhere, or we would just do sbasic instead of bitbanging.
By the way, I made the mistake of·browsing the info in the 'Guts' document about 'Log Tables'... Well, maybe in another life.
Cheers,
Chris
OBJ
Com : "FullDuplexSerial"
PUB Go
Com.start(31, 30, %0000, 115_200)
(snip)
OBJ and PUB are block headers that the Propeller Tool uses to define certain areas of code the location is not critical.
The line that reads...
Com : "FullDuplexSerial"
...is a way of assigning an alias to "Com". It represents a file with the name "FullDuplexSerial.spin". Sort of like an INCLUDE statement.
PUB is sort of like defining or setting up a subroutine (i.e. GOSUB/GOTO)
The line that reads...
Com.start(31, 30, %0000, 115_200)
...Is actually calling a subroutine within "FullDuplexSerial.spin" named start, and passing arguments to it.
Note:
A call can either be other objects, or other aliased objects.
An initial object is necessary to launch an assembly object.
An assembly object must have it's own cog.
Arguments can be passed by reference to and from an assembly object and Spin object to any other object.
One of the great things about the Propeller environment, is that you have the flexibility to create your own
unique special function objects. Say for instance you create a "function" or "command" that does exactly
what no other command is capable of. If you want to you can call it "Fred.spin". To use that function in
ANY Propeller program, you reference it like this....
OBJ
MySpecialCode : "Fred"
....Now suppose you have one PUB routine inside of "Fred.spin" that is calls "FeedTheCats", and another that
says "WaterThePlants". From any other program with an OBJ reference such as above, you could call it like this...
PUB MainLoop
MySpecialCode.FeedTheCats
MySpecialCode.WaterThePlants
...Obviously you don't want to water the plants every time you feed the cats, but hopefully you get the idea. If not
it will make sense. After all there is no support in this forum or from Parallax (<- Just kidding)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Daniel
BS2.PULSOUT(1,100)
or
BS2.PULSIN(5,1)
or
BS2.FREQOUT(8,100,500)
This would be used in Spin such as (not really code testing, so grain of salt please):
VAR
· LONG X
OBJ
· BS2: "PBASIC_LIB"······ ' Post updated and corrected
PUB Main
· REPEAT ' Repeat all forever - DO
···· REPEAT X FROM 500 TO 4000·············· ' like for x = 500 to 4000
······ BS2.FREQOUT(5,100,X)
······ BS2.PAUSE(100)
Note: Indents define code blocks instead of using NEXT's, LOOPs and such.
Just remember, each cog could be running a different program, allowing you to continually PULSOUT on 1, while sounding tones or checking sensors on others.
-Martin
Post Edited (Martin Hebel) : 2/26/2006 6:54:11 PM GMT
I was going to mention something similar as I was reading this post, but you did a much better job at describing it.
So here is my question regarding:
OBJ
BS2: "PBASIC_LIB"
I equate that to an "Include" statement.
Is that a pre-compiler directive. In other words, if I include PBASIC_LIB does the entire PBASIC_LIB get placed on the PChip or just the routines that the compiler finds within the source code?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - PLJack - - -
Perfection in design is not achieved when there is nothing left to add.
It is achieved when there is nothing left to take away.
My guess is it uses the full file, and not just the referenced routines (methods/functions) code. I'm away from my workstation right now, or I would try it and check the memory allocation. Maybe someone else has an answer?
-Martin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Martin Hebel
Disclaimer: ANY Propeller statements made by me are subject to my inaccurate understanding of my limited time with it!
Southern Illinois University Carbondale -Electronic Systems Technologies
Personal Links with plenty of BASIC Stamp info
and SelmaWare Solutions - StampPlot - Graphical Data Acquisition and Control