Wow... lots of help... I'm attempting to get the read to work, using $20 for the control byte. I'll see what I can do... eventually I want to be able to read and write registers using the LCD screen as sort of a 'menu' guide, and using my last to ports as button inputs.
EDIT:
Can anyone give me an idea as to why the clock is so far off? The book says 400KHz devices are accessible if the clock is above 8MHz (I'm using 20), but my clock is at 122Khz. The manufacturer of the board said this wasn't a problem so long as the PIC supported 'clock stretching'.
If anyone is interested, what I'm trying to connect to is an 'Open Servo' board.
Last edited by Dispersion123; - 3rd April 2008 at 06:20.
See Post #2...
400Khz is the MAXIMUM for most fast I2C devices. It's not neccessarily the speed that the PIC is communicating to said I2C device. I2CRead/I2CWrite are software, 'bit-banged' commands, not hardware.
If you ran your PIC clock at 40Mhz vs. 20Mhz, the I2C clock may very well jump up to 244Khz.
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Here's the $24 million dollar question:
Does the documents for the slave IC say send address $10 or does it say that its address is $10.
So far as the clocking speed, there can be pulses that come close to 400k being send out, but that's just for a short period of time. The clocking speed will most likely vary in speed depending on what's being done. BTW, how are you reading the clocking speed? O-scope or frequency counter?
Last edited by JD123; - 3rd April 2008 at 16:28.
No, I'm not Superman, but I did stay at a Holiday Inn Express last night!
Mr.E., cute program you got there.
See in the program where you enter "1010000" for the address? That's $50 for the address.
Any who, I think everyone's got the idea, in agreement or not. I just took the O/P literally for the words he used and opened a can of do-do. Sorry.
No, I'm not Superman, but I did stay at a Holiday Inn Express last night!
OKi see what you mean... $A0 is the ControlByte (Controlword or slave address depending of the document you have on hand... says datasheet) but yeah $50 for the address... this said, i don't remember to have any issue with any datasheet using what they said, whatever how they call it
maybe why i didn't understood your point
We still don't see the O/P datasheet or part#... weird eh?
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Dispersion123, how's it coming, reading the 2 bytes?
No, I'm not Superman, but I did stay at a Holiday Inn Express last night!
Bookmarks