I am using your Propeller Demo Rev F board
Pete Sr
Posts: 11
I am using your Propeller· Demo Rev F board.·
{{output.spin·············· propeller manual pg 104··· Toggles two pins, one after the other.}}·
Pub Main
· Toggle(16, 3_000_000, 20)· ··· 'Toggle P16 ten times,1/4s each····················· no matter what the red number·is the output pulses at 1/2 of that
· Toggle(17, 2_000_000, 20)· ··· 'Toggle P17 twenty times, 1/16 s each··········· contrary to what the manual says. 20 should pulse 20 is the manual wrong?·
Pub Toggle(Pin, Delay, Count)··· {{Toggle Pin, Count times with Delay clock cycles in between.}}
· dira[noparse][[/noparse]pin]~~·················· ··· ··· ··· 'set I/O pin to output direction·
· repeat Count·····························'repeat for Count iterations
··· !outa[noparse][[/noparse]pin]································'toggle I/O Pin
··· waitcnt(delay + cnt)······· ··· ··· 'Wait for Delay cycle
·Pete
Post Edited By Moderator (Joshua Donelson (Parallax)) : 10/23/2009 4:48:16 AM GMT
{{output.spin·············· propeller manual pg 104··· Toggles two pins, one after the other.}}·
Pub Main
· Toggle(16, 3_000_000, 20)· ··· 'Toggle P16 ten times,1/4s each····················· no matter what the red number·is the output pulses at 1/2 of that
· Toggle(17, 2_000_000, 20)· ··· 'Toggle P17 twenty times, 1/16 s each··········· contrary to what the manual says. 20 should pulse 20 is the manual wrong?·
Pub Toggle(Pin, Delay, Count)··· {{Toggle Pin, Count times with Delay clock cycles in between.}}
· dira[noparse][[/noparse]pin]~~·················· ··· ··· ··· 'set I/O pin to output direction·
· repeat Count·····························'repeat for Count iterations
··· !outa[noparse][[/noparse]pin]································'toggle I/O Pin
··· waitcnt(delay + cnt)······· ··· ··· 'Wait for Delay cycle
·Pete
Post Edited By Moderator (Joshua Donelson (Parallax)) : 10/23/2009 4:48:16 AM GMT
Comments
Was that a good explanation? I'm pretty new at this
UPDATE: Damn need more coffee obviously, got my # backwards - multiply by 2 of course, not divide, so 40 toggles = 20 pulses.
Post Edited (dfletch) : 2/20/2008 6:21:44 PM GMT
There are some misprints and typos in the manual but p. 104 looks o.k.
Your posting makes no sense at all.
Not true. "Toggle" means switch to low if the output is high, and switch to high if the output is low. One "pulse" = two "toggles".
-Phil
Update: Well, I guess I was last in line for this one!
Thanks
www.youtube.com/watch?v=HMlEiTigsiI jump to the 5:00 minute mark, near the end. Where they talk about toggles.... then read the above posts again..... quite similar!
sorry guys I couldn't resist. I think mystery men is one of the most under rated movie of all time.
"I don't think he's going to pull through!"
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"A complex design is the sign of an inferior designer." - Jamie Hyneman, Myth Buster
DGSwaner
Interestingly Webster's categorizes this usage as "jargon"
Do you get it? 68 is 33 plus one additional Toggle...
Coincidence?
Never heard of that movie before I don't think they played that one in Berlin. - What a shame.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheers,
Simon
www.norfolkhelicopterclub.co.uk
You'll always have as many take-offs as landings, the trick is to be sure you can take-off again ;-)
BTW: I type as I'm thinking, so please don't take any offense at my writing style