Shop OBEX P1 Docs P2 Docs Learn Events
I had an idea! (yes it hurt :-) ) — Parallax Forums

I had an idea! (yes it hurt :-) )

sirmonkeysirmonkey Posts: 10
edited 2011-09-27 18:19 in Propeller 1
SooOoOoo. I snuck in some electronics play time, and was practicing using the counters.

I'm pretty sure you can't do it with prop 1 and prop 2 is too far down the development line
but...

wouldn't it be nice if you could opt to have a counter get its clock from a pin and not the system clock. (or wait can you do this? )

you know have ctra nco @ 40khz to pin 2. then ctrb set to duty w/ clock in pin 2, apin 3 then play with frqb or or play with both counters frqx 8-o

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-09-14 21:39
    You can program a counter to count rising or falling edges on a pin, but it can't output to another pin, if that's what you were hoping for.

    -Phil
  • sirmonkeysirmonkey Posts: 10
    edited 2011-09-27 16:40
    Thank you but i wasn't looking for the edge counters. i was just playing around and found out that Spin is limiited to 40~30khz pwm. and was thinking if i could pipe a counter (set as nco) to the clock input of another counter(set as duty) i could have a pwm(or wait maybe pdm? i haven't looked at duty closly with my scope) generator that could run really really fast. and i imagen that the idea of haveing a counters clock input being assignable might be useful.

    and i figured the smartys could benifit more and do other stuff with that idea. there is no such thing as tooo many tools in your tool box! :-) (just don't have too many dups ;-) ) i have about 9 different 3/8" drive ratchets and have used all but maybe 2 in the past month :-o and thats only fixing my broken cars.
  • Cluso99Cluso99 Posts: 18,069
    edited 2011-09-27 18:19
    Firstly, welcome to the fabulous world of the prop.
    I am not a counter expert, but pas might be your friend here as it is many times faster than spin. And you only need to do small bits together with a spin program. Perhaps others may chime in with help.
Sign In or Register to comment.