Re: [Flashforth-devel] Problems with I2C
Brought to you by:
oh2aun
From: Mikael N. <mik...@pp...> - 2014-03-27 19:30:38
|
Did you consider this ? \ i2c wakeslave \ NOTE: the 7 bit address is in bits 7-1. \ Bit 0 is the R/W bit. I dont know if it makes any difference, but are you using this latest version of sspbuf! ? : sspbuf! ( c -- ) \ sspbuf! takes 90 us @ 100 KHz sspbuf c! [ pir1 sspif a, bcf, ] [ begin, ] [ pir1 sspif a, btfss, ] [ again, ] ; On 03/27/2014 02:05 PM, Peter Jacobs wrote: > To me, this sounds like the slave is not acknowledging, the PIC is > waiting and the watch-dog timer expires. Hence, the reboot. Can you > put an oscilloscope or logic analyser on the I2C lines to see if the > slave is actually acknowledging the address byte on the 9th clock? > Peter J. > > > On 27/03/14 17:14, Thomas Buschhardt wrote: >> Hallo, >> >> I've problems to get my I2C-Master running. Here is my config: >> >> PIC18F2620 >> Clock 8MHz >> OSC = INTIO67 >> TemperaturSensor: DS1621 >> >> Here is what I do: >> I connect the sensor SDA with PIC.Pin 15 and the SCL with PIC.PIN 14. >> I tested different pullup-resistors on both lines (10K - 3.3K - 1.8K). >> I tested different sensor-addresses: 1001 000 (all AddressPINs GND) >> and 1001 100 (A2 with 10K resisitor to 5V, A1-A0 GND) >> >> I import i2c_base.txt (\flashforth\PIC18\forth) and use the example >> from ff-tutorial-guide.pdf. >> >> When I run the "init_(tempsensor)" the PIC reboot. I find out that >> ":i2cinit" come back with "OK", but when I run ":i2cws" (+ slaveaddr) >> the PIC reboot. >> >> I know the Sensors are ok, because I tested them in a selfmade >> heating control (since 2010 - written in Ruby - sorry :-)) and I have >> ca. 10 of these IC's there. >> >> If I can send any more informations please drop a mail :-) >> >> Thank you >> Thomas >> |