moving over from Stamp programming to the Propeller world
Steve2381
Posts: 94
Hello.
I am moving over from Stamp programming to the Propeller world. Any pointers as to its abilities and skills would be greatly received!
I understand it has audio and video capabilities. What does it actually allow you to do?
Finally... is the programming a far leap from Stamps?
Many thanks!.... looking forward to hours of programming
Steve
Post Edited By Moderator (Bean (Hitt Consulting)) : 12/12/2009 10:55:00 PM GMT
I am moving over from Stamp programming to the Propeller world. Any pointers as to its abilities and skills would be greatly received!
I understand it has audio and video capabilities. What does it actually allow you to do?
Finally... is the programming a far leap from Stamps?
Many thanks!.... looking forward to hours of programming
Steve
Post Edited By Moderator (Bean (Hitt Consulting)) : 12/12/2009 10:55:00 PM GMT
Comments
so the main difference between PBasic and spin is that pbasic has more sophisticated commands
than you have in SPIN.
PBasic example
in PBASIC the serin-command is hardcoded and you can't change its behaviour.
The only variance is to call the command with different values for the parameters.
In SPIN the "high-sophisticated" commands are realized through the combination of
basic commands
example receive a serial byte is done by the code
"PUB" indicates a subroutine (similar to a label in PBasic
"Rx" is the name of the subroutine
repeat while are elementary SPIN-commands
the command "rxcheck" inside the subroutine "Rx" is another subroutine
defined or "build" with elementary SPIN-commands
now the command "if" used in "RxCheck" is a REAL elementary SPIN-command
all the rest are variables that are nescessary to make it work but the variables are not important for the user
This means: in SPIN more complex commands are not "hardwired" like in PBasic
they are build out of elementary commands by defining sub-routines
Objects in SPIN are simply SPIN-files containing a collection of subroutines all build with the elementary set of SPIN-commands
which provide complex commands. In the code-example above a command to receive a byte over a serial connection
Now you may ask where are the parameters like IO-pins and baudrate ?
the parameters IO-pins and baudrate have to be configured ONE time.
The propeller-chip has 8 processor cores. These cores are called "COGs"
All the bitbanging for send and receive serial data is done by a second COG which works as a "driver" in the background
This cog has to be started before you can do serial communication.
This means a part of the code inside the file FullDuplexSerialPlus.spin is executed in the second COG running ALL THE TIME
waiting for serial data to be received and transmitted. This part of the code runs parallel to the first COG.
You can imagine this driver as if you would have a butler listening for the doorbell and as soon as he hears the doorbell
going to the door open it and take in the presents that are delivered. And listening for orders to bring some documents
to Mister A, oder Mister B
There is an object for serial communication, for creating a TV-signal, VGA-Signal etc., etc., etc.
If you want to use these complex commands you define a "connection" between the filename and an object-name
after defining this name "Debug" you can access the omplex SPIN-commands wich are defined in the file FullDuplexSerialPlus.spin
by writing ObjectName.Methodname
in the example above to receive a byte
best regards
Stefan
I will have a look for a decent starter kit and loose my evenings for the rest of winter!
Thanks
Steve
1. The Propeller Education Kit Manual
2. Propeller Help…. Which is the old tutorial that was in the Propeller Manual 1.0. (The new version 1.1 doesn't have it)
As a beginner I have found them to be a great help and introduction to programming the Propeller chip.