Прерывания INT0 и INT1 работают, режимы "по фронту, по изменению" - работают.
Код:
$regfile = "STC_8H.DAT" ' STC registers list $crystal = 11059200 ' CPU clock frequence $ramsize = &H400 ' 1024 $romstart = &H0 ' code starting address $large Dim Temp As Byte P1ie = &B_0000_0100 ' 1: Enable digital signal input P1m1 = &B_0000_0000 : P1m0 = &B_0011_0000 ' Push-pull output mode P1pu = &B_0000_0100 ' 1: pull-up resistor Test_out Alias P1.4 My_led Alias P1.5 P3ie = &B_0000_1100 ' 1: Enable digital signal input P3.3=INT1 P3.2=INT0 P3m1 = &B_0000_0000 : P3m0 = &B_0000_0000 ' P3pu = &B_0000_1100 ' 1: pull-up resistor On Int0 Int0_int 'Initialise the INT0 Interrupt 'Priority Set Int0 'set INT0 to the highest priority level (INT1 has by default the highest prio) 'It0 = 0 ' Enable INT0 rising and falling interrupt It0 = 1 ' Enable INT0 falling edge interrupt Enable Int0 'enable the interrupt Enable Interrupts Test_out = 1 For Temp = 0 To 9 My_led = 1 Waitms 50 My_led = 0 Waitms 50 Next Test_out = 0 Do Test_out = 1 Waitms 90 Test_out = 0 Waitms 90 Loop '------------------------------------ Int0_int: Incr Temp If Temp > 5 Then My_led = 1 Waitms 50 My_led = 0 Temp = 0 End If Return