Documente Academic
Documente Profesional
Documente Cultură
Séance 07
But:
C’est quoi une interruption ?
Se familiariser avec la notion
d’interruption Mécanisme d’interruption
3 types d’interruptions:
Interruptions d’erreurs
Interruptions matérielles
Interruptions logicielles
Le registre INTCON
void interrupt()
{
cnt++; // Increment value of cnt on every interrupt
TMR0 = 96;
INTCON = 0b00100000; // Set T0IE , clear T0IF
}
Simulation sur ISIS
Exemple 2 :
void interrupt()
{
PORTB.B4 = 1;
delay_ms(1000);
PORTB.B4 = 0;
INTCON.B1 = 0;
}
void main() {
INTCON = 0b10010000;
while(1);
}
Simulation sur ISIS
Merci Pour Votre Attention