Forum: Mikrocontroller und Digitale Elektronik PIC 18F2620 INT0 immer HIGH Prior obwohl LOW eingestellt?


von Thomas W. (thomas0906)


Lesenswert?

Hallo

Ich habe folgendes eingestellt, damit der INT0 einen LOW LEVEL INT 
auslöst:

    RCONbits.IPEN = 1;      // enable Interrupt Priority
    INTCONbits.GIE = 1;
    INTCONbits.PEIE = 1;
    INTCONbits.INT0IE = 1; //INT0 External Interrupt Enable bit 1 = 
Enables
    INTCONbits.INT0IF = 0; //Löschen des INT0 Flags


    TRISBbits.TRISB0 = 1;
    INTCON2 = 0b00000000;
    INTCON3 = 0b00000000;
    INTCON2bits.RBPU = 1; // PORTB Pullups OFF

Trotzdem löst eine Flanke an INT0 Port RB0 einen HIGH LEVEL INT aus.

Fehlt da noch was?

Danke für Hilfe
Thomas

von holger (Gast)


Lesenswert?

>Fehlt da noch was?

IPR1 IPR2?

von Thomas W. (thomas0906)


Lesenswert?

Nee...

ach shit, habs gefunden, INT0 ist immer HIGH, na toll.

Gruß
Thomas

von heinzhorst (Gast)


Lesenswert?

Thomas W. schrieb:
> INT0 ist immer HIGH, na toll.

Nein.

INTCON2:

bit 6 INTEDG0: External Interrupt 0 Edge Select bit
1 = Interrupt on rising edge
0 = Interrupt on falling edge

von heinzhorst (Gast)


Lesenswert?

Ach, du meinst die priority. Sorry, falsch verstanden.

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.