Re: ISR Function
"Rajesh" <[email protected]>
| Newsgroups | gmane.comp.hardware.motorola.microcontrollers |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I think I was unable to put my question. Sorry for that, here it is:
My code is like this:
main()
{
function1(); // this will execute and output of this function is x,y
//which are global variables.
}
Now my DAC(x,y) function will take this x,y as input.I am trying to
execute this DAC(x,y) function at every 100 milisec, nomatter where I
am in the main loop at that time.
I am using COdeWarrior Compiler 8.1.
-regards
Rajesh
--- In [email protected], "Dobbin Allan-r11834"
<Allan.Dobbin@...> wrote:
>
> Rajesh, perhaps I don't understand your question - do you have PIT
> working and interrupting, but you just don't know how to call a C
> function from assembler?
>
> Most compilers allow you to specify a function is an interrupt
function,
> i.e. with Diab compiler you can do the following:
>
> INTERRUPT void external_interrupt (void)
> {
> "
> "
> PitIsr (); /* handle PIT interrupt */
> }
>
> so in your vector area, you have
> .org base_add + 0x500 ;External Interrupt Exception
> b external_interrupt
>
> So now calling your DAC function within PitIsr is just like any
other C
> code i.e. DAC(x,y);
>
> The question of where do x,y come from within an ISR - perhaps
these are
> global variables?
>
> I'm not sure if this is what you were asking.
>
> - Allan
>
>
>
>
> -----Original Message-----
> From: [email protected] [mailto:[email protected]]
On
> Behalf Of Rajesh
> Sent: Thursday, June 29, 2006 4:21 AM
> To: [email protected]
> Subject: [MPC500] ISR Function
>
>
>
>
> Hi everyone,
> I am working with MPC566 and I have a function DAC(x,y),
> i.e. a D/A converter function, which I want to execute on
> Interrupt
> at every 100 ms.
> I am using a PIT and can set time between 64 msecs to 4.19
secs.
> Can anyone please tell me how to call this function in an ISR?
>
> -regards
> Rajesh
>
>
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
------------------------ Yahoo! Groups Sponsor --------------------~-->
Something is new at Yahoo! Groups. Check out the enhanced email design.
http://us.click.yahoo.com/SISQkA/gOaOAA/yQLSAA/dN_tlB/TM
--------------------------------------------------------------------~->
-----------------------------------------------------------
To learn more about Freescale Microcontrollers, please visit
http://www.freescale.com/mcu
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/MPC500/
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/