Shop OBEX P1 Docs P2 Docs Learn Events
Timer interrupt question — Parallax Forums

Timer interrupt question

SeairthSeairth Posts: 2,474
edited 2015-10-12 12:22 in Propeller 2
My current understanding is:

GETCNT will get the system counter into D, as well as initialize the internal timer register.
ADDCNT will update D, as well as update the internal timer register.

Does this mean that you cannot use the timer interrupt at the same time that the main code is using GETCNT (for a different purpose)?

Comments

  • Actually, I think I got that wrong, now that I think about it. There's no need for GETCNT to set the timer register. Only ADDCNT does that. If you really want to set the timer to CNT, you could do ADDCNT reg, #0.
  • cgraceycgracey Posts: 14,134
    ADDCNT adds S into D and sets the CNT target to the result. It doesn't read CNT for any purpose.

    Today, I intend to document the event and interrupt system.
Sign In or Register to comment.