Merhaba arkadaşlar,
18F8722'de düşen kenar interrup çalıştırdım. Ardından RB0'ı pull down yapıp yükselen kenar interrup çalıştırmak istedim. Çalışmadı. Hangi registerları değiştirmek gerekiyor.
INCONT2.INTEDG0=1 durumunda çalışması gerekir diye düşünüyorum. Ama çalışmadı.
Yükselen kenar external INT0 interrupt nasıl yaparız.
OPTION_REG.6=0 olur ise RB0 da düşen kenarda kesme oluşur.
OPTION_REG.6=1 olur ise RB0 da yükselen kenarda kesme oluşur.
Alıntı YapOPTION_REG.6=0 olur ise RB0 da düşen kenarda kesme oluşur.
OPTION_REG.6=1 olur ise RB0 da yükselen kenarda kesme oluşur.
Teşekkürler dostum ama maalesef 18f8722'de OPTION_REG registeri yok. INCONT2.INTEDG0=1 olması lazım. Devrede hata olabileceğini tahmin ediyorum.
Şimdi datasheetinin inceledim.Bu işi 18f8722 de intcon2 registeri yapıyor..
(Option registerinde olduğu gibi)
Alıntı Yap
INTCON2 REGISTER
bit 7 RBPU: PORTB Pull-up Enable bit
1 = All PORTB pull-ups are disabled
0 = PORTB pull-ups are enabled by individual port latch values
bit 6 INTEDG0: External Interrupt 0 Edge Select bit
1 = Interrupt on rising edge
0 = Interrupt on falling edge
bit 5 INTEDG1: External Interrupt 1 Edge Select bit
1 = Interrupt on rising edge
0 = Interrupt on falling edge
bit 4 INTEDG2: External Interrupt 2 Edge Select bit
1 = Interrupt on rising edge
0 = Interrupt on falling edge
bit 3 INTEDG3: External Interrupt 3 Edge Select bit
1 = Interrupt on rising edge
0 = Interrupt on falling edge
bit 2 TMR0IP: TMR0 Overflow Interrupt Priority bit
1 = High priority
0 = Low priority
bit 1 INT3IP: INT3 External Interrupt Priority bit
1 = High priority
0 = Low priority
bit 0 RBIP: RB Port Change Interrupt Priority bit
1 = High priority
0 = Low priority