EmbeddedRelated.com
Forums

Timer B capture mode with overflow count

Started by Gustavo Lima October 18, 2009
Hi,

I need to measure the time between two external signals. These signals have
big periods like 1 or 2 seconds. This way I'm trying to use the Timer B in
Capture mode with counting of its overflows. Please look at my code:
#include "in430.h"
#include

int overflow_count = 0;

void main(void)
{

WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer

//LED CONFIGURATION
P1DIR |= BIT0+BIT1;

//SIGNAL PORT
P4DIR = 0xE7; //P4.3 | P4.4 -> Input
P4SEL = 0x18; //SelectTimer_B capture inputs: CCI0B | CCI1B

TBCTL = TBSSEL_2 + MC_1 + TBIE;

TBCCTL0 = CM_1 + SCS + CCIS_1 + CAP + CCIE; //Capture mode

__bis_SR_register(GIE + LPM0_bits); // Wait interrupt

while(1){}

}

// Timer B0 interrupt service routine
#pragma vector=TIMERB0_VECTOR
__interrupt void Timer_B (void)
{

switch (TBIV)
{

case 2:
P1OUT ^= BIT0;
TBCCTL0 &= ~CCIFG;
TBCCTL0 &= ~CCIE; //Desactive the Interruption
TBCCTL0 = CM_1 + SCS + CCIS_1 + CAP + CCIE;
break; // TBCCR1 not used
//Overflow in Timer B detected
case 14:
overflow_count++;
P1OUT ^= BIT1; // Led
TBCCTL0 &= ~CCIFG;
break;
}
}
void MRFI_RxCompleteISR()//Quando recebe pacote (Nunca recebe)
{
}


Beginning Microcontrollers with the MSP430

Continuing the message... How can I measure big external signal intervals?
The count limit of Timer B is 65535, so I need to count its overflows, in
capture mode...

Can someone help-me?

Regards
Gustavo

2009/10/18 Gustavo Lima

> Hi,
>
> I need to measure the time between two external signals. These signals have
> big periods like 1 or 2 seconds. This way I'm trying to use the Timer B in
> Capture mode with counting of its overflows. Please look at my code:
> #include "in430.h"
> #include int overflow_count = 0;
>
> void main(void)
> {
>
> WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer
>
> //LED CONFIGURATION
> P1DIR |= BIT0+BIT1;
>
> //SIGNAL PORT
> P4DIR = 0xE7; //P4.3 | P4.4 -> Input
> P4SEL = 0x18; //SelectTimer_B capture inputs: CCI0B | CCI1B
>
> TBCTL = TBSSEL_2 + MC_1 + TBIE;
>
> TBCCTL0 = CM_1 + SCS + CCIS_1 + CAP + CCIE; //Capture mode
>
> __bis_SR_register(GIE + LPM0_bits); // Wait interrupt
>
> while(1){}
>
> }
>
> // Timer B0 interrupt service routine
> #pragma vector=TIMERB0_VECTOR
> __interrupt void Timer_B (void)
> {
>
> switch (TBIV)
> {
>
> case 2:
> P1OUT ^= BIT0;
> TBCCTL0 &= ~CCIFG;
> TBCCTL0 &= ~CCIE; //Desactive the Interruption
> TBCCTL0 = CM_1 + SCS + CCIS_1 + CAP + CCIE;
> break; // TBCCR1 not used
> //Overflow in Timer B detected
> case 14:
> overflow_count++;
> P1OUT ^= BIT1; // Led
> TBCCTL0 &= ~CCIFG;
> break;
> }
> }
> void MRFI_RxCompleteISR()//Quando recebe pacote (Nunca recebe)
> {
> }


I forgot to say that I'm using MSP4302274 (Ez430RF2500)

2009/10/18 Gustavo Lima

> Continuing the message... How can I measure big external signal intervals?
> The count limit of Timer B is 65535, so I need to count its overflows, in
> capture mode...
>
> Can someone help-me?
>
> Regards
> Gustavo
>
> 2009/10/18 Gustavo Lima Hi,
>>
>> I need to measure the time between two external signals. These signals
>> have big periods like 1 or 2 seconds. This way I'm trying to use the Timer B
>> in Capture mode with counting of its overflows. Please look at my code:
>> #include "in430.h"
>> #include
>>
>> int overflow_count = 0;
>>
>> void main(void)
>> {
>>
>> WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer
>>
>> //LED CONFIGURATION
>> P1DIR |= BIT0+BIT1;
>>
>> //SIGNAL PORT
>> P4DIR = 0xE7; //P4.3 | P4.4 -> Input
>> P4SEL = 0x18; //SelectTimer_B capture inputs: CCI0B | CCI1B
>>
>> TBCTL = TBSSEL_2 + MC_1 + TBIE;
>>
>> TBCCTL0 = CM_1 + SCS + CCIS_1 + CAP + CCIE; //Capture mode
>>
>> __bis_SR_register(GIE + LPM0_bits); // Wait interrupt
>>
>> while(1){}
>>
>> }
>>
>> // Timer B0 interrupt service routine
>> #pragma vector=TIMERB0_VECTOR
>> __interrupt void Timer_B (void)
>> {
>>
>> switch (TBIV)
>> {
>>
>> case 2:
>> P1OUT ^= BIT0;
>> TBCCTL0 &= ~CCIFG;
>> TBCCTL0 &= ~CCIE; //Desactive the Interruption
>> TBCCTL0 = CM_1 + SCS + CCIS_1 + CAP + CCIE;
>> break; // TBCCR1 not used
>> //Overflow in Timer B detected
>> case 14:
>> overflow_count++;
>> P1OUT ^= BIT1; // Led
>> TBCCTL0 &= ~CCIFG;
>> break;
>> }
>> }
>> void MRFI_RxCompleteISR()//Quando recebe pacote (Nunca recebe)
>> {
>> }
>>
>



What is the resolution you need?
If it is around or above 10us you can just use a fast timer
interrupt to increment a 32bit value while checking the state of
these two signals.
If you need better resolution or they happen very fast (just pulses
of few nanoseconds width) you can use an edge triggered inputs to
produce interrupts when the pulses happen then record the timer
value. An interrupt in the timer overflow would increment another 16
bit variable (to have a 32 bit counter).
Making it right you can know how many clock cycles were gone during
interrupt services and take it in account.
-Augusto
On Dom 18/10/09 18:58 , Gustavo Lima g...@gmail.com sent:
I forgot to say that I'm using MSP4302274 (Ez430RF2500)
2009/10/18 Gustavo Lima
> Continuing the message... How can I measure big external signal
intervals?
> The count limit of Timer B is 65535, so I need to count its
overflows, in
> capture mode...
>
> Can someone help-me?
>
> Regards
> Gustavo
>
> 2009/10/18 Gustavo Lima
>
> Hi,
>>
>> I need to measure the time between two external signals. These
signals
>> have big periods like 1 or 2 seconds. This way I'm trying to use
the Timer B
>> in Capture mode with counting of its overflows. Please look at my
code:
>>
>>
>> #include "in430.h"
>> #include
>>
>> int overflow_count = 0;
>>
>> void main(void)
>> {
>>
>> WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer
>>
>> //LED CONFIGURATION
>> P1DIR |= BIT0+BIT1;
>>
>> //SIGNAL PORT
>> P4DIR = 0xE7; //P4.3 | P4.4 -> Input
>> P4SEL = 0x18; //SelectTimer_B capture inputs: CCI0B | CCI1B
>>
>> TBCTL = TBSSEL_2 + MC_1 + TBIE;
>>
>> TBCCTL0 = CM_1 + SCS + CCIS_1 + CAP + CCIE; //Capture mode
>>
>> __bis_SR_register(GIE + LPM0_bits); // Wait interrupt
>>
>> while(1){}
>>
>> }
>>
>> // Timer B0 interrupt service routine
>> #pragma vector=TIMERB0_VECTOR
>> __interrupt void Timer_B (void)
>> {
>>
>> switch (TBIV)
>> {
>>
>> case 2:
>> P1OUT ^= BIT0;
>> TBCCTL0 &= ~CCIFG;
>> TBCCTL0 &= ~CCIE; //Desactive the Interruption
>> TBCCTL0 = CM_1 + SCS + CCIS_1 + CAP + CCIE;
>> break; // TBCCR1 not used
>>
>>
>> //Overflow in Timer B detected
>> case 14:
>> overflow_count++;
>> P1OUT ^= BIT1; // Led
>> TBCCTL0 &= ~CCIFG;
>> break;
>> }
>>
>>
>> }
>>
>>
>> void MRFI_RxCompleteISR()//Quando recebe pacote (Nunca recebe)
>> {
>>
>>
>> }
>>
>>
>




I need the better resolution possible and the pulses happen very fast.

so I need to use a edge triggered inputs (capture mode) and record the timer
value incrementing another 16
bit variable in the timer overflow interrupt (to get a long record time ).

Ok... But how can I define in my code in the same time a capture interrupt
and a overflow interrupt? I tried this:

===================================int overflow_count = 0;
in "Main()"

void main(void)
{
WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer

P4DIR = 0xE7; //P4.3 | P4.4 -> Input
P4SEL = 0x18; //SelectTimer_B capture inputs: CCI0B | CCI1B

TBCTL = TBSSEL_2 + MC_1 + TBIE; // TBIE configures the overflow interrupt
TBCCTL0 = CM_1 + SCS + CCIS_1 + CAP + CCIE; //CAP defines the Capture mode

__bis_SR_register(GIE + LPM0_bits); // Wait interrupt
while(1){}
}

===================================In "TimerB0 ISR"

#pragma vector=TIMERB0_VECTOR
__interrupt void Timer_B (void)
{
switch (TBIV)
{
//Capture detected
case 2:
TBCCTL0 &= ~CCIFG;
TBCCTL0 &= ~CCIE; //Desactive the Interruption
TBCCTL0 = CM_1 + SCS + CCIS_1 + CAP + CCIE;
break; // TBCCR1 not used

//Overflow in Timer B detected
case 14:
overflow_count++; //Increment a 16 bit variable to get a 32bit timer
TBCCTL0 &= ~CCIFG;
break;
}
}

But I still couldn't configure these two ISR... Where is the error in my
code?
Regards
Gustavo Lima

What is the resolution you need?
> If it is around or above 10us you can just use a fast timer
> interrupt to increment a 32bit value while checking the state of
> these two signals.
> If you need better resolution or they happen very fast (just pulses
> of few nanoseconds width) you can use an edge triggered inputs to
> produce interrupts when the pulses happen then record the timer
> value. An interrupt in the timer overflow would increment another 16
> bit variable (to have a 32 bit counter).
> Making it right you can know how many clock cycles were gone during
> interrupt services and take it in account.
> -Augusto
> On Dom 18/10/09 18:58 , Gustavo Lima g...@gmail.comsent:
>
> I forgot to say that I'm using MSP4302274 (Ez430RF2500)
> 2009/10/18 Gustavo Lima
> > Continuing the message... How can I measure big external signal
> intervals?
> > The count limit of Timer B is 65535, so I need to count its
> overflows, in
> > capture mode...
> >
> > Can someone help-me?
> >
> > Regards
> > Gustavo
> >
> > 2009/10/18 Gustavo Lima
> >
> > Hi,
> >>
> >> I need to measure the time between two external signals. These
> signals
> >> have big periods like 1 or 2 seconds. This way I'm trying to use
> the Timer B
> >> in Capture mode with counting of its overflows. Please look at my
> code:
> >>
> >>
> >> #include "in430.h"
> >> #include
> >>
> >> int overflow_count = 0;
> >>
> >> void main(void)
> >> {
> >>
> >> WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer
> >>
> >> //LED CONFIGURATION
> >> P1DIR |= BIT0+BIT1;
> >>
> >> //SIGNAL PORT
> >> P4DIR = 0xE7; //P4.3 | P4.4 -> Input
> >> P4SEL = 0x18; //SelectTimer_B capture inputs: CCI0B | CCI1B
> >>
> >> TBCTL = TBSSEL_2 + MC_1 + TBIE;
> >>
> >> TBCCTL0 = CM_1 + SCS + CCIS_1 + CAP + CCIE; //Capture mode
> >>
> >> __bis_SR_register(GIE + LPM0_bits); // Wait interrupt
> >>
> >> while(1){}
> >>
> >> }
> >>
> >> // Timer B0 interrupt service routine
> >> #pragma vector=TIMERB0_VECTOR
> >> __interrupt void Timer_B (void)
> >> {
> >>
> >> switch (TBIV)
> >> {
> >>
> >> case 2:
> >> P1OUT ^= BIT0;
> >> TBCCTL0 &= ~CCIFG;
> >> TBCCTL0 &= ~CCIE; //Desactive the Interruption
> >> TBCCTL0 = CM_1 + SCS + CCIS_1 + CAP + CCIE;
> >> break; // TBCCR1 not used
> >>
> >>
> >> //Overflow in Timer B detected
> >> case 14:
> >> overflow_count++;
> >> P1OUT ^= BIT1; // Led
> >> TBCCTL0 &= ~CCIFG;
> >> break;
> >> }
> >>
> >>
> >> }
> >>
> >>
> >> void MRFI_RxCompleteISR()//Quando recebe pacote (Nunca recebe)
> >> {
> >>
> >>
> >> }
> >>
> >>
> >
>
>
>
>
>


Gustavo,
I do not know C. So, I cannot help on checking your code. Regarding
the system itself, you could use edge triggered input ports to catch
the events and check the value of the 32bit counter you made with
timer.
If the latency of both input interrupts are the same the error
should be in the order of few clock cycles. Since it is constant it
is also easy to cancel in the calculation. Of course, every time the
timer overflow occurs there is a chance to loose few clock cycles in
the counting in case the signal input event happens in the same time.
Maybe the timer can do what you want (capture and overflow). I did
not check the manual on this regard.
Some systems may demand a different processor or hardware. If you
cannot accept some error due to assynchronous interrupt services then
you may need to use a processor with 32bit timer, or even an specific
hardware (such as a CPLD).
Maybe others in this list can help you checking the C code.
-Augusto
On Seg 19/10/09 12:00 , Gustavo Lima g...@gmail.com sent:
I need the better resolution possible and the pulses happen very
fast.
so I need to use a edge triggered inputs (capture mode) and record
the timer
value incrementing another 16
bit variable in the timer overflow interrupt (to get a long record
time ).
Ok... But how can I define in my code in the same time a capture
interrupt
and a overflow interrupt? I tried this:
=================================== int overflow_count = 0;
in "Main()"
void main(void)
{
WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer
P4DIR = 0xE7; //P4.3 | P4.4 -> Input
P4SEL = 0x18; //SelectTimer_B capture inputs: CCI0B | CCI1B
TBCTL = TBSSEL_2 + MC_1 + TBIE; // TBIE configures the overflow
interrupt
TBCCTL0 = CM_1 + SCS + CCIS_1 + CAP + CCIE; //CAP defines the
Capture mode
__bis_SR_register(GIE + LPM0_bits); // Wait interrupt
while(1){}
}
=================================== In "TimerB0 ISR"
#pragma vector=TIMERB0_VECTOR
__interrupt void Timer_B (void)
{
switch (TBIV)
{
//Capture detected
case 2:
TBCCTL0 &= ~CCIFG;
TBCCTL0 &= ~CCIE; //Desactive the Interruption
TBCCTL0 = CM_1 + SCS + CCIS_1 + CAP + CCIE;
break; // TBCCR1 not used
//Overflow in Timer B detected
case 14:
overflow_count++; //Increment a 16 bit variable to get a 32bit timer
TBCCTL0 &= ~CCIFG;
break;
}
}
But I still couldn't configure these two ISR... Where is the error
in my
code?
Regards
Gustavo Lima
What is the resolution you need?
> If it is around or above 10us you can just use a fast timer
> interrupt to increment a 32bit value while checking the state of
> these two signals.
> If you need better resolution or they happen very fast (just
pulses
> of few nanoseconds width) you can use an edge triggered inputs to
> produce interrupts when the pulses happen then record the timer
> value. An interrupt in the timer overflow would increment another
16
> bit variable (to have a 32 bit counter).
> Making it right you can know how many clock cycles were gone
during
> interrupt services and take it in account.
> -Augusto
> On Dom 18/10/09 18:58 , Gustavo Lima g...@gmail.comsent:
>
> I forgot to say that I'm using MSP4302274 (Ez430RF2500)
> 2009/10/18 Gustavo Lima
> > Continuing the message... How can I measure big external signal
> intervals?
> > The count limit of Timer B is 65535, so I need to count its
> overflows, in
> > capture mode...
> >
> > Can someone help-me?
> >
> > Regards
> > Gustavo
> >
> > 2009/10/18 Gustavo Lima
> >
> > Hi,
> >>
> >> I need to measure the time between two external signals. These
> signals
> >> have big periods like 1 or 2 seconds. This way I'm trying to
use
> the Timer B
> >> in Capture mode with counting of its overflows. Please look at
my
> code:
> >>
> >>
> >> #include "in430.h"
> >> #include
> >>
> >> int overflow_count = 0;
> >>
> >> void main(void)
> >> {
> >>
> >> WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer
> >>
> >> //LED CONFIGURATION
> >> P1DIR |= BIT0+BIT1;
> >>
> >> //SIGNAL PORT
> >> P4DIR = 0xE7; //P4.3 | P4.4 -> Input
> >> P4SEL = 0x18; //SelectTimer_B capture inputs: CCI0B | CCI1B
> >>
> >> TBCTL = TBSSEL_2 + MC_1 + TBIE;
> >>
> >> TBCCTL0 = CM_1 + SCS + CCIS_1 + CAP + CCIE; //Capture mode
> >>
> >> __bis_SR_register(GIE + LPM0_bits); // Wait interrupt
> >>
> >> while(1){}
> >>
> >> }
> >>
> >> // Timer B0 interrupt service routine
> >> #pragma vector=TIMERB0_VECTOR
> >> __interrupt void Timer_B (void)
> >> {
> >>
> >> switch (TBIV)
> >> {
> >>
> >> case 2:
> >> P1OUT ^= BIT0;
> >> TBCCTL0 &= ~CCIFG;
> >> TBCCTL0 &= ~CCIE; //Desactive the Interruption
> >> TBCCTL0 = CM_1 + SCS + CCIS_1 + CAP + CCIE;
> >> break; // TBCCR1 not used
> >>
> >>
> >> //Overflow in Timer B detected
> >> case 14:
> >> overflow_count++;
> >> P1OUT ^= BIT1; // Led
> >> TBCCTL0 &= ~CCIFG;
> >> break;
> >> }
> >>
> >>
> >> }
> >>
> >>
> >> void MRFI_RxCompleteISR()//Quando recebe pacote (Nunca recebe)
> >> {
> >>
> >>
> >> }
> >>
> >>
> >
>
>
>
>
>
>
>




Hi,
> I need the better resolution possible (..)
That's not a realistic goal. You have to have a SUFFICIENT, a TARGET and a BEST value for resolution.
> (..)and the pulses happen very fast.
What do you mean by that?

You are completely messing up the timer configuration. Read the entire TimerB chapter before changing anything else.
Timer B has 2 interrupt vectors:
a) TIMERB0 is for TB0 CCIFG only. You don't use TBIV.
b) TIMERB1 is for TBIF and all TBx CCIFG except TB0.

I nottice english is not your primary language (it's not mine either), but please take the time to explain yourself a little better.

But the simpliest solution would be to use a much slower clock. You could even put timerB0 in output mode to automatically toggle it on each overflow and use that as an input to timerA. The input signal can then go to both TACCR1 and TBCCR1 and you will have your capture value. There are some details you would need to work out thought.

But serioulsy, start by reading the entire TimerB chapter, from top to bottom without skipping anything, no matter if you already read it or if you don't immediately understand what it is saying.

Regards,
Michael K.
--- In m..., Gustavo Lima wrote:
>
> I need the better resolution possible and the pulses happen very fast.
>
> so I need to use a edge triggered inputs (capture mode) and record the timer
> value incrementing another 16
> bit variable in the timer overflow interrupt (to get a long record time ).
>
> Ok... But how can I define in my code in the same time a capture interrupt
> and a overflow interrupt? I tried this:
>
> ===================================> int overflow_count = 0;
> in "Main()"
>
> void main(void)
> {
> WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer
>
> P4DIR = 0xE7; //P4.3 | P4.4 -> Input
> P4SEL = 0x18; //SelectTimer_B capture inputs: CCI0B | CCI1B
>
> TBCTL = TBSSEL_2 + MC_1 + TBIE; // TBIE configures the overflow interrupt
> TBCCTL0 = CM_1 + SCS + CCIS_1 + CAP + CCIE; //CAP defines the Capture mode
>
> __bis_SR_register(GIE + LPM0_bits); // Wait interrupt
> while(1){}
> }
>
> ===================================> In "TimerB0 ISR"
>
> #pragma vector=TIMERB0_VECTOR
> __interrupt void Timer_B (void)
> {
> switch (TBIV)
> {
> //Capture detected
> case 2:
> TBCCTL0 &= ~CCIFG;
> TBCCTL0 &= ~CCIE; //Desactive the Interruption
> TBCCTL0 = CM_1 + SCS + CCIS_1 + CAP + CCIE;
> break; // TBCCR1 not used
>
> //Overflow in Timer B detected
> case 14:
> overflow_count++; //Increment a 16 bit variable to get a 32bit timer
> TBCCTL0 &= ~CCIFG;
> break;
> }
> }
>
> But I still couldn't configure these two ISR... Where is the error in my
> code?
> Regards
> Gustavo Lima
>
> What is the resolution you need?
> > If it is around or above 10us you can just use a fast timer
> > interrupt to increment a 32bit value while checking the state of
> > these two signals.
> > If you need better resolution or they happen very fast (just pulses
> > of few nanoseconds width) you can use an edge triggered inputs to
> > produce interrupts when the pulses happen then record the timer
> > value. An interrupt in the timer overflow would increment another 16
> > bit variable (to have a 32 bit counter).
> > Making it right you can know how many clock cycles were gone during
> > interrupt services and take it in account.
> > -Augusto
> > On Dom 18/10/09 18:58 , Gustavo Lima gustavolima.bh@...sent:
> >
> > I forgot to say that I'm using MSP4302274 (Ez430RF2500)
> > 2009/10/18 Gustavo Lima
> > > Continuing the message... How can I measure big external signal
> > intervals?
> > > The count limit of Timer B is 65535, so I need to count its
> > overflows, in
> > > capture mode...
> > >
> > > Can someone help-me?
> > >
> > > Regards
> > > Gustavo
> > >
> > > 2009/10/18 Gustavo Lima
> > >
> > > Hi,
> > >>
> > >> I need to measure the time between two external signals. These
> > signals
> > >> have big periods like 1 or 2 seconds. This way I'm trying to use
> > the Timer B
> > >> in Capture mode with counting of its overflows. Please look at my
> > code:
> > >>
> > >>
> > >> #include "in430.h"
> > >> #include
> > >>
> > >> int overflow_count = 0;
> > >>
> > >> void main(void)
> > >> {
> > >>
> > >> WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer
> > >>
> > >> //LED CONFIGURATION
> > >> P1DIR |= BIT0+BIT1;
> > >>
> > >> //SIGNAL PORT
> > >> P4DIR = 0xE7; //P4.3 | P4.4 -> Input
> > >> P4SEL = 0x18; //SelectTimer_B capture inputs: CCI0B | CCI1B
> > >>
> > >> TBCTL = TBSSEL_2 + MC_1 + TBIE;
> > >>
> > >> TBCCTL0 = CM_1 + SCS + CCIS_1 + CAP + CCIE; //Capture mode
> > >>
> > >> __bis_SR_register(GIE + LPM0_bits); // Wait interrupt
> > >>
> > >> while(1){}
> > >>
> > >> }
> > >>
> > >> // Timer B0 interrupt service routine
> > >> #pragma vector=TIMERB0_VECTOR
> > >> __interrupt void Timer_B (void)
> > >> {
> > >>
> > >> switch (TBIV)
> > >> {
> > >>
> > >> case 2:
> > >> P1OUT ^= BIT0;
> > >> TBCCTL0 &= ~CCIFG;
> > >> TBCCTL0 &= ~CCIE; //Desactive the Interruption
> > >> TBCCTL0 = CM_1 + SCS + CCIS_1 + CAP + CCIE;
> > >> break; // TBCCR1 not used
> > >>
> > >>
> > >> //Overflow in Timer B detected
> > >> case 14:
> > >> overflow_count++;
> > >> P1OUT ^= BIT1; // Led
> > >> TBCCTL0 &= ~CCIFG;
> > >> break;
> > >> }
> > >>
> > >>
> > >> }
> > >>
> > >>
> > >> void MRFI_RxCompleteISR()//Quando recebe pacote (Nunca recebe)
> > >> {
> > >>
> > >>
> > >> }
> > >>
> > >>
> > >
> >
> >
> >
> >
> >
> >
> >
>
>