Hi everyone,
So im using a PIC18F45k20 as a I2C master control and it makes the controller of a laser tag gun. Now I have clips that load into the gun which contain an I2C EEPROM that inform the PIC of the ammo contents.
Here is the problem:
Sometimes if I either put the clip in or take the clip out it causes the PIC to crash and stop entirely leaving SDA and SCL (RC3 and RC4) permanently high. I dont have the code for the PIC on this computer but this happens regardless of any I2C operation. The program looks at an EEPROM located at address 001 but the clip is 000. So even if an operation is occurring with 001 attaching and detaching 000 should make no problem.
Is the removal/addition of the device causing a problem with the bus? Does the PIC I2C Module hate removals and why would it stop?
Any help would be great!
All the best,
Robin
So im using a PIC18F45k20 as a I2C master control and it makes the controller of a laser tag gun. Now I have clips that load into the gun which contain an I2C EEPROM that inform the PIC of the ammo contents.
Here is the problem:
Sometimes if I either put the clip in or take the clip out it causes the PIC to crash and stop entirely leaving SDA and SCL (RC3 and RC4) permanently high. I dont have the code for the PIC on this computer but this happens regardless of any I2C operation. The program looks at an EEPROM located at address 001 but the clip is 000. So even if an operation is occurring with 001 attaching and detaching 000 should make no problem.
Is the removal/addition of the device causing a problem with the bus? Does the PIC I2C Module hate removals and why would it stop?
Any help would be great!
All the best,
Robin