Hi,
Apologies for the length of the post... I've tried to include all the relevant information...
I'm having an issue with my project. I have several I2C devices on the bus as follows:
The bus is driven by the PIC16F1509 hardware MSSP interface, using the API library functions in XC8, and using 6.2k pull-up resistors.
On project board:
- DS1307 RTC
Near project board
- TC74A0 temp sensor (tied to heat sink, on 8inches of 4-core cable, to I2C bus connections via screw terminals)
Remotely on the end of a 1.5m network CAT5 cable, socketed both ends*.
- two 8-bit I/O expanders (one reading buttons, one driving an LCD)
*I tested the connections etc. by running a network signal along the system before putting the chips on - it happily maintained a 1Gbps network between my laptop and NAS with no packet loss - on that basis, I believe my soldering and connections etc. are fine. I then populated the board with the components.
Everything runs fine if the DS1307 chip is left off the board. It will run for hours, no problem, using PWM to fade RGB lights up and down, displaying things on the LCD such as the temp read by the TC74 and keypress information.
If I plug the DS1307 in, the system locks up, holding SDA low and SCL high. This can happen anywhere from a few minutes to a few seconds after power-up, and the only way to recover is power down and up again.
Sometimes the system will unlock and then resume, but this is rare, and can take anything from 5 minutes to 15 minutes for this to happen. I only discovered this by accident when I left it on and looked for information online and it suddenly resumed.
The DS1307 also sometimes also returns nonsense when data is read.
The lockup will happen if the DS1307 is plugged into the board, even if the code to read it is removed. I have tried replacing the DS1307 with another - the issue is identical, so I think the chip is ok.
The only thing I can think of is noise on the I2C lines that run to the DS1307, maybe picking up interference from the IRL520 that are providing the PWM for the LEDs (driven by the PIC). Based on this, I disabled the PWM on the chip, and it seems to be running ok... no "nonsense reads" and no locking after running for 10 minutes - I'm trying running for longer to see if that is the issue.
I don't possess an oscilloscope... is there any way I can diagnose and verify my suspicions without buying one?
If I need to buy one, are these any good? I'm keen to use the computer, because my eyesight isn't the best, and being able to see the display on my 32inch TV while I poke the board with the probes and a magnifying glass REALLY appeals to me, rather than squinting at a 5-inch display.
http://www.ebay.co.uk/itm/Hantek-60..._Measurement_Equipment_ET&hash=item1c3de69f18
If the problem is due to noise from the IRL520 chips, is there anything I can do short of re-designing the board so that the components are in different places, putting the DS1307 as far away from them as possible?
Many thanks for any help!
Apologies for the length of the post... I've tried to include all the relevant information...
I'm having an issue with my project. I have several I2C devices on the bus as follows:
The bus is driven by the PIC16F1509 hardware MSSP interface, using the API library functions in XC8, and using 6.2k pull-up resistors.
On project board:
- DS1307 RTC
Near project board
- TC74A0 temp sensor (tied to heat sink, on 8inches of 4-core cable, to I2C bus connections via screw terminals)
Remotely on the end of a 1.5m network CAT5 cable, socketed both ends*.
- two 8-bit I/O expanders (one reading buttons, one driving an LCD)
*I tested the connections etc. by running a network signal along the system before putting the chips on - it happily maintained a 1Gbps network between my laptop and NAS with no packet loss - on that basis, I believe my soldering and connections etc. are fine. I then populated the board with the components.
Everything runs fine if the DS1307 chip is left off the board. It will run for hours, no problem, using PWM to fade RGB lights up and down, displaying things on the LCD such as the temp read by the TC74 and keypress information.
If I plug the DS1307 in, the system locks up, holding SDA low and SCL high. This can happen anywhere from a few minutes to a few seconds after power-up, and the only way to recover is power down and up again.
Sometimes the system will unlock and then resume, but this is rare, and can take anything from 5 minutes to 15 minutes for this to happen. I only discovered this by accident when I left it on and looked for information online and it suddenly resumed.
The DS1307 also sometimes also returns nonsense when data is read.
The lockup will happen if the DS1307 is plugged into the board, even if the code to read it is removed. I have tried replacing the DS1307 with another - the issue is identical, so I think the chip is ok.
The only thing I can think of is noise on the I2C lines that run to the DS1307, maybe picking up interference from the IRL520 that are providing the PWM for the LEDs (driven by the PIC). Based on this, I disabled the PWM on the chip, and it seems to be running ok... no "nonsense reads" and no locking after running for 10 minutes - I'm trying running for longer to see if that is the issue.
I don't possess an oscilloscope... is there any way I can diagnose and verify my suspicions without buying one?
If I need to buy one, are these any good? I'm keen to use the computer, because my eyesight isn't the best, and being able to see the display on my 32inch TV while I poke the board with the probes and a magnifying glass REALLY appeals to me, rather than squinting at a 5-inch display.
http://www.ebay.co.uk/itm/Hantek-60..._Measurement_Equipment_ET&hash=item1c3de69f18
If the problem is due to noise from the IRL520 chips, is there anything I can do short of re-designing the board so that the components are in different places, putting the DS1307 as far away from them as possible?
Many thanks for any help!