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

Problem with printf and timers

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



Joined: 19 Jun 2007
Posts: 20
Location: Castelo Branco, Portugal

View user's profile Send private message Visit poster's website

Problem with printf and timers
PostPosted: Wed Oct 29, 2008 4:28 pm     Reply with quote

My system has a communication protocol between two PICs
I think I have a problem with a printf and a timer, I suspect that the interrupt of the timer cut my printed string and the timeout getc of the RX PIC forget the string, that origin a loss of information.

There are some way to disable a timer, automatic (not manually with disable_interrupt(timer3) ) to create some priority to make not possible the timer make a interrupt in a middle of a printf (transmit to rs232) ?
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Wed Oct 29, 2008 4:30 pm     Reply with quote

This should never happen.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Oct 29, 2008 4:40 pm     Reply with quote

Quote:

There are some way to disable a timer, automatic (not manually with
disable_interrupt(timer3) ) to create some priority to make not possible
the timer make a interrupt in a middle of a printf (transmit to rs232) ?

Download the CCS manual:
http://www.ccsinfo.com/downloads/ccs_c_manual.pdf
Look in the section on #use rs232. Read about this parameter:
Code:
DISABLE_INTS
Guest








PostPosted: Wed Oct 29, 2008 5:03 pm     Reply with quote

Thank you very much PCM, this is the option I need.

Regards.
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