Skip to main content
lseletron
Associate III
March 15, 2007
Question

Compiler behaviour

  • March 15, 2007
  • 2 replies
  • 598 views
Posted on March 15, 2007 at 05:15

Compiler behaviour

This topic has been closed for replies.

2 replies

lseletron
lseletronAuthor
Associate III
March 14, 2007
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 II
March 15, 2007
Posted on March 15, 2007 at 05:15

you need to do it manually.

Regards,

Luca (Cosmic)