Shop OBEX P1 Docs P2 Docs Learn Events
Setting up hardware counter — Parallax Forums

Setting up hardware counter

Hello,

I am playing around with hardware counters like frqa or ctra.. But I wonder how they know which cog's counter to set if I just type say, frqa:=1? Is it just default that it updates where it's called?

Thank you.

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2016-02-14 21:18
    It sets the counter register belonging to the cog in which the assignment command executes. So if your code is running in cog 3, the counter register in cog 3 is the one that gets set.

    -Phil
Sign In or Register to comment.