I am switching over from an Atom Pro due to the lack of speed. I'm trying to get my hands around how this thing works. I'm a newbie and an amatuer when it comes to ucontrollers, but my timing and Parallax' timing are pretty good. I have never used assembly, so that is going to be quite a task to learn. Anyway, my point of post.......
Another common resource is the system clock; this actually drives all cogs and allows them to be
synchronized, even though they run independently of each other. The system clock also drives a global
register called the System Counter. This 32-bit, read-only counter increments every clock cycle, and can
be read by any cog via the cnt register.
That said, Chip has estimated that with a 5 MHz crystal and using the 16x PLL tap
(system clock of 80 MHz), we can run about 80K Spin instructions per second.
I'm curious if you could elaborate upon this a bit. If one were simply using one cog, how fast would code be processing? If I were using an object that required one cog to run, such as:
Example of blinking LED from Article said...
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000
Led = 16
dira[noparse][[/noparse]Led] := 1
outa[noparse][[/noparse]Led] := !outa[noparse][[/noparse]Led]
delayTime := cnt + 8_000_000
Could you let me know how fast this will run (less the delay time of 0.1sec) line by line? It is my understanding that it takes two cycles to execute "one line of code". I'm curious what "one line of code" is, and how I can determine how fast the Propeller will effectively run. If it is running at 80MHz, is that 80Mhz per cog, or exactly the 5Mhz (80Mhz/8cogs/2cycles.per.line.of.code), so it is effectively running at 5Mhz, or 5 million lines of code per second?
Now, the same question goes if we add another cog. This cog must be running at the same speed as the first, or 5Mhz, right? Thusly, a propeller can effectively execute 40 million lines of code per second with all 8 cogs???
The reason I ask is that some of your objects seem to be full of code. I am simply curious how it is executed fast enough to do the things it does.
Also, a pin can only have 2 states, on and off, right? I didn't quite get how the A/D object worked...
Eagerly awaiting a new start to microcontrollers, and a new member to the community,