a couple of questions from Prop Noob
WKUadam
Posts: 6
Hi i've been using the Basic Stamp for a while, now i'm beginning to work on a project that i think would be beyond a stamp, i think I need a propeller. I have a couple of questions before i invest my time and money into a new chip.
1) the props have 8 cores (cogs) can each of these be set to run a different program? (motor control, LCD display, sensors)
2) can i transfer data from one cog to another? i detect something with a sensor and output something to the LCD?
3) does the prop have interrupts?
4) is it possible to set up multiple serial connections? serial sensors and an LCD
is this possible in spin or do i need the assembly language?
Thank you for any help
1) the props have 8 cores (cogs) can each of these be set to run a different program? (motor control, LCD display, sensors)
2) can i transfer data from one cog to another? i detect something with a sensor and output something to the LCD?
3) does the prop have interrupts?
4) is it possible to set up multiple serial connections? serial sensors and an LCD
is this possible in spin or do i need the assembly language?
Thank you for any help
Comments
2) yes
3) what is an interrupt?
... but seriously. Technically the Prop doesn't have interrupts. But in reality, the spin language has very potent analogous functions... you can create softare interrupts very easily.
4) yes
4b) depends on what you want to do ... if you give some examples, it would be better.
Most importantly... there is no conversion remorse. I have yet to see a comment in the forum such as "geez i wasted my time learning about the Prop." Everything happens eventually... but this hasn't happened yet[noparse]:)[/noparse]
Rich
my question about the spin language is can each of these functions be done with spin? set up each core, serial etc.
i saw a website that hacked a wii remote camera to output i2c, i want to build something that can read this and output the locations to a lcd screen. and a robot will be able to track it. I'll probably add other features later so i wanted the prop
When you have 8 processors to play with you are unlikely to miss interrupts. Have an interrupt routine? OK give it to COG to handle. This is one of the great ideas of the Prop design that makes your coding time a lot easier. Makes getting the timing right much easier and makes swapping code modules in and out as required much easier.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
spin uses objects(from the Obex or your own). Many objects contain assembly code... but mostly you only need to know how to call an object's functions.
I2C ... lots of examples in the OBEX. about your specific goal, we have experts here... I'm not one of them[noparse]:)[/noparse]
Rich
have you already had a look into the OBEX? If for your hardware there is already a driver there, you don't need assembler.
If you don't need high speed, you can work with spin, which is an interpreter. If you need high speed -more than a few 1000 instructions per second-, you can use either assembler or a compiler, for example PropBasic. Normally only for hardware drivers you will need such high speed. To give you an example: I tried to do a light dimmer with a resolution of about 1/10000 seconds. Here I was·only partly·successful with spin in combination·with the timer. No problem with assembler.
Instead of interrupts, you·can calculate·one cog per task, that has to be done in parallel. For example a buffered serial connection will need one cog. The counters have a lot of power, so some tasks can be done using them with very little cog assistance, for example DAC.
Good luck!
Christof
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The early bird gets the worm but the second mouse gets the cheese.