Skip to main content
Knowledgebase
Home
Renesas Electronics America - Knowledgebase

What is the way to check the completion to count the elapsed time?

Latest Updated:02/28/2012

Question:

In the one-shot timer mode of the Timer A, I would like to control only the specified elapsed time without using interrupts and port output. What is the way to check the completion of counting?

Answer:

Even when interrupts are disabled (I="0"or IPL>ILVL), if the Timer underflows or overflows, the IR bit of the TA0IC Register becomes ”1” so you can check the completion of counting by this flag. You should set the IRE bit to "0" by program before starting counting of the Timer, and check the flag until the IR bit becomes "1". The IR bit does not become "0" automatically so please set it to "0" by program after becoming "1".
Suitable Products
M32C/8A
M32C/88
M32C/87
M32C/85
M32C/84
M32C/83
M32C/80
M16C/62A
M16C/62A(M16C/62T)
M16C/62M
M16C/62N
M16C/62N(M3062GF8NFP, M3062GF8NGP)
M16C/62P
M16C/63
M16C/64A
M16C/64C
M16C/65
M16C/65C
M16C/6C
M16C/5L
M16C/56
M16C/5LD
M16C/56D
M16C/5M
M16C/57
M16C/30P
M16C/29
M16C/28
M16C/26A