|
|
View previous topic :: View next topic |
Author |
Message |
ljb
Joined: 19 Nov 2003 Posts: 30
|
Two questions - printf and timer1 |
Posted: Tue Sep 20, 2005 5:54 am |
|
|
printf - can printf format a number so that it is always preceeded by its sign, +12345 or -12345?
timer1 - on overflow interrupt, whilst the interrupt routine is being processed, are all other overflow ints disabled. If so, can it be enabled so that a second overflow can be detected and flagged.
Many thanks to anyone who can help
Les |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Sep 20, 2005 12:23 pm |
|
|
Quote: | can printf format a number so that it is always preceeded by its sign, +12345 or -12345? |
CCS doesn't support the "+" flag for printf. You'll have to write
code to test the sign of the variable and output a "+" character
if it's positive.
Quote: | timer1 - on overflow interrupt, whilst the interrupt routine is being
processed, are all other overflow ints disabled. |
You mean: Are interrupts from other timers disabled ?
Answer: They're not disabled, but there are no nested interrupts
in CCS. The interrupt flag for the other timer will be set, but it wil
have to wait until the Timer1 isr is exited before the new interrupt
can be handled by its own isr.
Quote: | If so, can it be enabled so that a second overflow can be detected and flagged. |
You can check for other interrupts while inside a different isr.
See my post in this thread:
http://www.ccsinfo.com/forum/viewtopic.php?t=21671 |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|