pic & interrupt

Come faccio a gestire gli interrupt? Uso MPLAB e programmo in C.

Ho scritto questo, ma come faccio ad assegnare una routine di interrupt a uno specifico interrupt (Ad esempio quando la seriale riceve un dato):

#pragma interrupt ricezione_isr save = PRODL,PRODH // Locate ISR handler code at interrupt vector #pragma code isrcode=0x0008 void isrhandler(void) // This function directs execution to the { // actual interrupt code _asm goto ricezione_isr _endasm } #pragma code

Grazie,

Igor.

Reply to
Igor
Loading thread data ...

Il Sat, 27 Sep 2003 07:16:54 GMT, "Igor" ha scritto:

semplicemente dopo che sei entrato nella interrupt service routine controlli i bit di flag degli interrupt, ed in funzione di quale e' settato salti ad una specifica funzione che ti gestisce quell'interrupt... ciao

-- Saluti Paolo Squaratti "Speak softly and carry a big stick: you will go far..." - Theodore Roosevelt

Reply to
PaoloS

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.