In my clock display scanning in the ISR. Every 4mS it’s going to ISR.
In the main routine every 1S I’m calling I2C.Note that I’m using software I2C as in nigels page.
Everything works fine.
But there is a doubt will this process hangs while accessing I2C if an interrupt occurs?
In the main routine every 1S I’m calling I2C.Note that I’m using software I2C as in nigels page.
Everything works fine.
But there is a doubt will this process hangs while accessing I2C if an interrupt occurs?
Code:
;=================================================================================
;Read_EEPROM ; reads data from DS1307
;=================================================================================
I2C_Byte_Read call I2C_Start
movlw b'11010000' ; slave address/write bit 0
call I2C_Out
call I2C_NAK
movf E2_Add_Low,W
call I2C_Out
call I2C_NAK
call I2C_Start ; repeated start condition
movlw b'11010001' ; slave address/Read bit 0
call I2C_Out
call I2C_NAK
call I2C_Read ; fetch the byte
call I2C_Send_NAK ; send no acknowledgement
call I2C_Stop
movf InputByte,W ; return the byte in W
return