What to do with two counters?
LoopyByteloose
Posts: 12,537
Obviously the Propeller has two very sophisticated counters on each of the 8 cogs. I have read, searched the web, and pondered. But I just seem to not be grasping the whole concept.
Why two? While I·understand that each has 32 funtional uses [noparse][[/noparse]even though some might be very obscure to me], I am wondering how the two work together.· It seems to me that might really empower me [noparse][[/noparse]and others] to fully·understand their creative uses.· After all, there seems to be a reason that two were provided.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
PLEASE CONSIDER the following:
Do you want a quickly operational black box solution or the knowledge included therein?······
Why two? While I·understand that each has 32 funtional uses [noparse][[/noparse]even though some might be very obscure to me], I am wondering how the two work together.· It seems to me that might really empower me [noparse][[/noparse]and others] to fully·understand their creative uses.· After all, there seems to be a reason that two were provided.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
PLEASE CONSIDER the following:
Do you want a quickly operational black box solution or the knowledge included therein?······
···················· Tropically,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
Comments
What can you do with it? Easier to discuss what you can't do with it.
A simple example: you can watch for a positive going edge on one set of pins... and use that to change the output functions on a different set of pins.
So, for example, you could change a PWM on one set of pins depending upon complex patterns detected on another set of pins.
The counter architecture is probably the most powerful facility built into the Prop... it can be set up in Spin with a couple of lines of code and then operates with no further attention or processor time. And the counter architecture is why it irritates me so much when people try to compare the power of the Prop with other architectures. There is never a discussion of total signal bandwidths or actual machine instruction equivalents. A Prop dedicated solely to counter functions is a beast[noparse]:)[/noparse]
Each counter is actually a very simple processor... taking the "dedicated RISC" concept to the absolute limit. If you look at it that way... the Prop actually has 24 processors built into it... and I'm still counting[noparse]:)[/noparse]
Look at the education labs... they are fabulous.
I just think that it would be helpful to have something in the way of tutorial show some practical uses for using a combination of the two. Forgive me, but merely saying that there are 32 x 2 choices adds to the cloud of complexity rather than leads the way to pragmatic design choices.
There seems to be two conceptual subset - traditional rf modulation and digital modulation [noparse][[/noparse]inculding digital multiplexing] that create a tool kit of what the timer might do. For instance, I'd love to hear from Chip Gracy as to why he selected these 32 and what was left behind.
I seem to feel that there is a main reason for two counters and then trivial secondary reasons. My suspicion is that originally·one counter was developed to generate video vertical and the other to generate video horizontal.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
PLEASE CONSIDER the following:
Do you want a quickly operational black box solution or the knowledge included therein?······
Post Edited (Kramer) : 2/5/2008 7:49:44 AM GMT
The other modes are "common".
The true "gimick" are the differential modes, which are considered "superfluous" in other controllers as they can be accomplished by external logic *)
I should like very much to write a tutorial, as the timers/counters are much underestimated, as often remarked. I once called them the "work horses" of the Propeller. Not using them is like taking the ox rather than the tractor...
*) However it can be tricky to do it glitch free
I really do understand that these are the real powerhouse behind the Propeller's unique abilities. That's why I want to know more about using the two in tandem and - now that you mention it - more about the differential modes that other microprocessors leave out.
Yes, the SX-48 is typical as it has 3 timers and counters, but no differential mode. It manages to somehow do video without them. So I am wondering what goodies the differential mode provides.
Hopefully, any tutorial will have some working applications as concrete examples or maybe just progressive refinements of one application - like the video output.
I really admire how easily you have understood the Propeller.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
PLEASE CONSIDER the following:
Do you want a quickly operational black box solution or the knowledge included therein?······
Graham
http://forums.parallax.com/showthread.php?p=648967
This may sound obvious to you, but implies that hardware counter/timers has a big advantage over software counter/timers. For instance, the SX-48 has the hardware, while the SX-28 creates them in software. It seems to me that the SX-48 is actually somewhat primative parallel processing while the SX- 28 is mutiplexing.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
PLEASE CONSIDER the following:
Do you want a quickly operational black box solution or the knowledge included therein?······
I like that "Propgram it.."
I concur... lets conquer it...
Very true .. Andre's book is pretty comprehensive...
cheers ron mel oz...
Don
I do have Andre's book and a Hydra board, so I should jump back into that. I let things go for a few months and repainted my home. So I am now getting back into things.
Optical encoders are quite interesting, but I have yet to use them as there is an initial investment in motors with encoders. Speeds or power output can be very high. In some cases, you need to have brakes and/or cluthes on the motors as well. Steppers do nicely at reasonable speeds. If I had a factory of some sort, that would be great. But robots generally need 300 rpm or less at the wheel axel.
Sometimes, I wish I had been born a machinist so I could take advantage of all this.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
PLEASE CONSIDER the following:
Do you want a quickly operational black box solution or the knowledge included therein?······
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
PLEASE CONSIDER the following:
Do you want a quickly operational black box solution or the knowledge included therein?······
I know, woohoo!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
E3 = Thought
http://folding.stanford.edu/·- Donating some CPU/GPU downtime just might lead to a cure for cancer! My team stats.