CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Two questions - printf and timer1

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
ljb



Joined: 19 Nov 2003
Posts: 30

View user's profile Send private message

Two questions - printf and timer1
PostPosted: Tue Sep 20, 2005 5:54 am     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Sep 20, 2005 12:23 pm     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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