Hallo, bei mir lag es daran, das INT1 Pind.3 ist bei dem AT90USB162 ist
es ebenso der Pind.3.
Also Data = Pind.3
Die 1 Sekunde würde ich perönlich mit einem Timer lösen.
$regfile = "usb162.dat"
$crystal = 16000000
$hwstack = 32
$swstack = 8
$framesize = 24
$baud = 19200
$lib "mcsbyteint.lbx"
'configure PS2 AT pins
Config Atemu = Int1 , Data = Pind.3 , Clock = Pind.7
' ^------------------------ used interrupt
' ^----------- pin connected to DATA
' ^-- pin connected to clock
Config Timer1 = Timer , Prescale = 256
On Timer1 Isr_timer1
Enable Timer1
Const Timer1_reload = 3036 'Wert für 1s bei 16MHz
Enable Interrupts
Do
nop
Loop
End
Isr_timer1:
Sendscankbd Mark
Timer1 = Timer1_reload
Return
Mark:
Data 12 , &H3A , &HF0 , &H3A , &H1C , &HF0 , &H1C , &H2D , &HF0 , &H2D ,
&H42 , &HF0 , &H42