hello,
ok sorry for my bad English.
then here is the main code
[code:1:4121a15433]
Do
Select Case Flag_interrupt
'Print "lecture prox"
Case 1:
Disable Interrupts
Disable Pcint0
'sreaming mode on
Num_reg = &HEA
Val_ = &H04
Gosub Config_iqs2
Do
I2cstart
I2cwbyte &H88
Loop Until Err = 0
I2cwbyte &H31
I2creceive &H88 , Valeur_prox
Print "prox= " ; Valeur_prox
If Valeur_prox > 0 Then
Print " prox= " ; Valeur_prox
Goto Interpretation
Else
'sreaming mode on
Num_reg = &HEA
Val_ = &H00
Gosub Config_iqs2
Enable Interrupts
enable PCINT0
Print "powerdown1"
Powerdown
End If
Case 0:
Num_reg = &HEA
Val_ = &H00
Gosub Config_iqs2
Enable Interrupts
enable PCINT0
Print "powerdown2"
Powerdown
End Select
[/code:1:4121a15433]
and here the ISR routine
[code:1:4121a15433]
Prox_isr0:
'
'Disable Interrupts
'Disable Pcint0
Print " interrupt"
Flag_interrupt = 1
Return
[/code:1:4121a15433]
but the "disable interrupt" seems not working....
thanks
regards
↧