PDA

View Full Version : PIC18F2220 I2C resetting



cpayne
- 18th October 2010, 16:52
I have been using the 18F2220 for I2C for dozens of projects and have never had an issue. Either I have been getting away with something for long time or something has changed with the latest lot of chips I received. I am using it to go along with a SD21 servo controller as I have done before many times. The chip keeps resetting everytime I try writing. If I remark out the 48594860DEFINE I2C_HOLD 1 line it does not reset, but I can not command the SD21. I have always used the DEFINE I2C_HOLD 1 statement. I am using 4.7k pulldowns as I usual. I have tried stronger values, I have tried with and without the SD21, I have tried different PCBs, I have tried different chips. I have dummed down the program all the way to have just the I2C commands. I am not sure what I am missing. Any help would be appreciated. Thanks

I have attached code in PDF

mackrackit
- 18th October 2010, 17:48
The chip keeps resetting everytime I try writing.
Sounds more like a hardware problem.
What programmer are you using?
Do you have a current schematic?

cpayne
- 18th October 2010, 18:26
well, good thing I just wasted too many hours staring at the software and wasted everyone's time on the post. Went and checked the hardware for shorts and continuity. Helps if you solder the clk line to the PCB...

Thanks for telling me its the hardware. I guess I should use my glasses when putting the boards together.

mackrackit
- 18th October 2010, 19:00
I guess I should use my glasses when putting the boards together.
That sorta thing happens to me more often than I care to admit :o
Sometimes I just watch for smoke... :D

aratti
- 18th October 2010, 23:09
I am using 4.7k pulldowns as I usual.

Surely a typo, you meant PULLUP!

Cheers

Al.