RE: ISR Function

"Dobbin Allan-r11834" <[email protected]>
Newsgroups gmane.comp.hardware.motorola.microcontrollers
Message-ID <4147ED8B92A864498825C07E53594E4AD48840@az33exm20.fsl.freescale.net>
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 --------------------~--> 
Great things are happening at Yahoo! Groups.  See the new email design.
http://us.click.yahoo.com/TISQkA/hOaOAA/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/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.