>
> Oh i'm sorry. Here's the link for the data sheet.
> The address is 42 with 7 bit addressing mode so they left shift and
> use the last bit for writing or reading to the module
> so it's 84 for writing and 85 to read
>
> http://sonmicro.com/1356/downloads/ds_SM130_a7.pdf
>
First of all, the address is 0x42 (hexadecimal) so, in decimal, it is
66. There is nothing in that manual that states whether this is a 7
bit address or an 8 bit address. MOST peripherals specify the address
as 8 bits and acknowledge that they really have two addresses, an even
address for writing and an odd address for reading.
So, I would start by using an OOPic node address of 66 / 2 or 33 just
in case this manufacturer is doing what everyone else does by
specifying an 8 bit address.
Failing that, I would use a node address of 66 in case the
manufacturer really did specify a 7 bit address.
One thing I did notice: the device is rated for I2C at 50 kHz, 100 kHz
or 400 kHz. There is no reason why it won't work at other frequencies
but you should know that the OOPic is about 16kHz. If the device
expects EXACT frequencies, you won't get them with an OOPic.
I2C is terribly difficult to troubleshoot without a logic analyzer.
It is hard to sync a scope at the start condition and look for the
acknowledge bits at the end of each byte. I suppose a storage scope
can make this easy but I don't have one.
And then there is the complication of calculating the checksum for
every packet.
You didn't say which OOPic flavor you were using. The easiest way to
interface to the module is with the hardware serial port. This works
well on the S module because it doesn't have a level shifter and you
probably don't need one for the module. Lacking any pin-out
information it is hard to tell what is expected but looking at the
development kit, there appears to be a level shifter on the motherboard.
The problem is that the R board (and the C module) both have level
shifters on the serial port. It's not a matter of the voltage going
to REAL RS232 levels but the shifter logically inverts the signals so
you can't communicate with a device that expects non-inverted signals.
You can TRY using oSerialL but to receive at any speed you probably
have to implement flow control and there is nothing in the manual that
says this will work. I don't think you will have success with this
approach.
You probably need to decide WHY you are using the OOPic and struggling
with the I2C interface without a logic analyzer rather than using a
chip for which software is available.
Richard
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/oopic/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/oopic/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:oopic-digest@yahoogroups.com
mailto:oopic-fullfeatured@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
oopic-unsubscribe@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
No comments:
Post a Comment