Here is a question. When I simulate an INT0 interrupt (using a PIND toggle low-high-low etc) in Studio setup as rising edge only (11), it acts as though it is set up as any level change (01). Toggling a high to low state on PIND causes an interrupt. Wrong. A mouse-over bit 6 shows it as "Interrupt Request 1"? Bit 7 shows as "General Interrupt Request Mask Register" Bit 5 shows correctly. So I don't think it is a font issue. So where's "Interrupt Request 0"? Can someone tell me what is wrong with the following code? Studio 4.18 SP3.
include "tn2313def.inc" .def Temp = R16 .cseg .org 0x0000 rjmp Start ; To initialization routine .org 0x0001 ; External Interrupt 0 rjmp Scan ; To scan routine ;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Start: cli ; Clear interrupt clr Temp ; out DDRD, Temp ; Use PORTD as input ; ldi Temp, $7F ; out PORTD, Temp ; All PORTD pullups ser Temp ; out DDRB, Temp ; Set PORTB as output ldi Temp, (1<<ISC01) + (1<<ISC00) ; $03 setup for interrupt INT0 on rising edge only out MCUCR, Temp ; Out to MCU control register ldi Temp, (1<<INT0) ; $40 setup for interrupt INT0 out GIMSK, Temp ; Out to interrupt mask register ldi Temp, $55 sei ; ;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Go: rjmp Go ; Endless loop, wait for interrupt on PD2, INT0 ;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Scan: ; cli ror Temp ; just something to do out PORTB, Temp ; reti