We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hallo!
H/w I use is 24LC512 5V I2C EEPROM. The chip is connected to the C167. The only I2C data line pulled-up via 5 kOhm resistor (clock line is not). Vcc connected to ground via 0.1 uF. Clock rate is about 125 kHz. I have no trouble neither with byte write, page write, random read operations driven via pin-bang routines. However I stucked on sequential read access when migrated to it from singe byte mode.
I use uVision Keil debugger and even in static go-through step-by-step manner still experience problem with reading 2nd, 3d, etc. bytes (the 1st byte is OK) - all I read is just FFh, i.e. data line being held high. My f/w does issue data, ACK/NOACK and clocks according to I2C specs (see below).
WHEN I connect scope probe to the data and clock lines to watch the waveforms, everything becomes OK, i.e. instead of FFh I get what should be! It remains to be OK if I hold scope's probe only at data line pin (i.e. seems this is OK to have no pull up at clock line at least in this particular case). As soon as I disconnect probe, I return back to trouble. With probes attached I see waveform timing is perfect and data are what I expect (I see them also in debugger).
So, I touch data pin with probe - good, disconnect the scope - have trouble.
Any idea what can cause the problem (might it be a purely electrical issue)?
Thanks, Nikolay.
Priceless war story!
I can imagine the argument:
Electrical Engineer: "- check your code!"
Firmware Engineer: "- check your resistor calculations!"
Bottom line, writing firmware is not an easy job, that's why I love it : )
Steph-