Problem typu jak wykonać np zmianę stanu na porcie w momencie kiedy otrzymujemy na INT0 lub INT1 zbocze narastające i zmiana trwa do momentu kiedy pojawi się zbocze opadające.
$regfile = "m8def.dat"
$crystal = 8000000
Config Pinb.0 = 1 : Portb.0 = 0
Config Pinb.1 = 1 : Portb.1 = 0
Config Pinb.2 = 1 : Portb.2 = 0
Config Pinb.3 = 1 : Portb.3 = 0
Dim Licznik As Byte
Enable Interrupts
Enable Int1
Config Int1 = Rising
On Int1 Przerywanie
Do
Portb = &B00000000
Loop
End
Przerywanie:
Portb = &B00001111
Licznik = Licznik + 1
'>>>PORT MA STAN &B00001111 DOPÓKI NIE NADEJDZIE ZBOCZE OPADAJACE, JAK TO NAPISAC?<<<
Return