cancel
Showing results for 
Search instead for 
Did you mean: 

Compiler behaviour

lseletron
Associate II
Posted on March 15, 2007 at 05:15

Compiler behaviour

2 REPLIES 2
lseletron
Associate II
Posted on March 14, 2007 at 21:00

Hi,

The datasheet for 72325 states that:

// Quote

The following procedure is recommended to pre-

vent the OCFi bit from being set between the time

iR register:

it is read and the write to the OC

– Write to the OCiHR register (further compares

are inhibited).

– Read the SR register (first step of the clearance

of the OCFi bit, which may be already set).

– Write to the OCiLR register (enables the output

compare function and clears the OCFi bit).

// End quote

In that case do I need to write in my code like this:

void Foo1()

{

TAOC1HR=(some_value)>>8;

TACSR;

TAOC1LR=(1700)&0xFF;

}

or I just can write this:

void Foo2()

{

TAOC1R=some_value

}

and the compiler will translate it to something like Foo1()

Thank you

luca239955_st
Associate III
Posted on March 15, 2007 at 05:15

you need to do it manually.

Regards,

Luca (Cosmic)