never trigger interrupt code normaly porta.0 is blink but porta.1 not led on
my code ;
Code: Select all
Device = 18F252
Clock =20
Const
ipLow = 1,
ipHigh = 2
Include "usart.bas"
//Include "ISRTimer.bas"
Include "Convert.bas"
Include "Utils.bas"
Dim i2cready,i2cadresrx,i2cadrestx,buf_rx_index,buf_tx_index,index As Byte
dim cnt as byte
Dim rx_buffer(64) As Byte
Dim tx_buffer(64) As Byte
Interrupt i2c(ipHigh) 'interrupt
cnt=1
porta.1=1
PIR1.3=0
End Interrupt
SetAllDigital()
USART.SetBaudrate(br19200)
trisa.0=0
trisc.3=1
trisc.4=1
Clear(tx_buffer)
Clear(rx_buffer)
buf_rx_index=0
buf_tx_index=0
SSPCON1=%00101110
SSPCON2=0
SSPADD=54
SSPSTAT.7=1
SSPSTAT.6=0
i2cready=0
PIR1.3=0
PIe1.3=1
SSPCON1.4=1
rcon.7=1
intcon=%11000000
enable(i2c)
cnt=0
usart.write("All ok ",13,10)
While 1=1
if cnt <> 0 then
usart.write(" ",dectostr(cnt),13,10)
end if
delayms (100)
toggle (porta.0)
Wend
thanks
Ahmet