View previous topic :: View next topic |
Author |
Message |
JoaoSantos
Joined: 19 Jun 2007 Posts: 20 Location: Castelo Branco, Portugal
|
Problem with printf and timers |
Posted: Wed Oct 29, 2008 4:28 pm |
|
|
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) ? |
|
![](templates/subSilver/images/spacer.gif) |
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Wed Oct 29, 2008 4:30 pm |
|
|
This should never happen. |
|
![](templates/subSilver/images/spacer.gif) |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed Oct 29, 2008 4:40 pm |
|
|
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:
|
|
![](templates/subSilver/images/spacer.gif) |
Guest
|
|
Posted: Wed Oct 29, 2008 5:03 pm |
|
|
Thank you very much PCM, this is the option I need.
Regards. |
|
![](templates/subSilver/images/spacer.gif) |
|