Shop OBEX P1 Docs P2 Docs Learn Events
I have a question about counters. — Parallax Forums

I have a question about counters.

marzec309marzec309 Posts: 146
edited 2013-04-06 11:54 in Propeller 1
Is it possible to count the pulses output on a pin from CTRA with CTRB? I've Attempted this with no success. I have CTRA configured in NCO (%0_00100) with FRQA set to $0400_0000. The APIN is set to and output and feeding a clock signal. Now I'm attempting to count those pulses with CTRB so I can sync my PASM code up to the pulses. CTRB is Configured as a POSEDGE Detector (%0_01010), and FRQB set to $1 and PHSB will not increment. If this can't be done is it because the counters share the system clock?

Comments

  • marzec309marzec309 Posts: 146
    edited 2013-04-06 11:54
    OK, here i go again posting before trying every possible thing. lol I forgot how sensitive PASM is to the use of the source and destination operands! I'll answer this myself yes you can.

    In my cmp instruction, i had the phsb register in the destination. I didn't realize that was reading the shadow register, switched the two around and everything is golden :)


    A mod probably could delete this thread as it is not needed now.
Sign In or Register to comment.