cancel
Showing results for 
Search instead for 
Did you mean: 

microcontroleur ST72264

cyberguigou1
Associate II
Posted on June 03, 2003 at 08:20

microcontroleur ST72264

6 REPLIES 6
cyberguigou1
Associate II
Posted on May 28, 2003 at 10:48

Hello,

I do not manage to put on the timer A of the ST7.

I would want a temporization of 10 µs or 100 µs. I have an oscillator of 16 Mhz. are that somebody could help me...

The language: C with Cosmic

Thank you in advance.

[ Ce message a ete modifié par : : Guigoun on 28-05-2003 16:58 ]
itsmejatinus
Associate II
Posted on May 28, 2003 at 11:54

For using the timer for 10 usec (@ 8 MHz CPU frequency) you need to do the following register settings:

TACR2 = 0x08; /* timer clock = fcpu/8 */

TACR1 = 0x40; /* output compare interrupt enabled*/

TAOC1HR = 0x00;

TAOC1LR = 0x0a;

In ISR routine , increment the TAOC1xR registers by (0x0a) to get the next interrupt after another 10 usec*/

For more explanation, You can refer an application note AN974 downloadable from the same site.

cyberguigou1
Associate II
Posted on May 28, 2003 at 13:22

Thank you very much for your help.

Be that you know the configurations of vectors and segments which are necessary for the programming?

My ST7 ignores the interruptions and I do not find the error...

Greeting
stephanie
Associate II
Posted on May 30, 2003 at 11:45

There is a special assembly instruction to enable the interrupts: RIM that you can include in your C Cosmic file as follows:

asm RIM;

For the complete structure (vector.c containing the interrupt vector and their mapping), you have examples in the install path of STVD7, the debugger delivered for free by ST downloadable from this site. It can be used with assembly, C Cosmic or C Metrowerks.

shreya
Associate II
Posted on June 03, 2003 at 02:51

I hope you are using the @interrupt qualifier? Eg :

@interrupt void handler(void)

{...

}
cyberguigou1
Associate II
Posted on June 03, 2003 at 08:20

Yes, I use well the interruptions with the programming of the timer. but I found my problem: the vectors of the ST72264 are not the even that for the classic ST7 (because of the bus I2C)

bye