Utilizing the Generic I2C Interface
Navigates to RoboticsConnection.com Home RoboticsConnection.com HomePage
RoboticsConnection User Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



Utilizing the Generic I2C Interface Expand / Collapse
Author
Message
Posted Saturday, January 19, 2008 7:22 PM


Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Administrators
Last Login: Yesterday @ 7:42 AM
Posts: 285, Visits: 413
For those of you who are attempting to communicate with an I2C device from the Serializer, don't forget we provide the 'Generic I2C Interface'.  

The interface exists in both the Serializer firmware (see User Guide -> i2c), as well as in the Serializer .NET Library (see Example under Namespace.RoboticsConnection.Serializer.Sensors -> I2CDevice class).  So, you can use it from your own custom app, Hyperterm, or from the .NET library.

We added this so that customers wouldn't have to wait on us to add/improve I2C interfaces in the Serializer firmware and/or .NET library.  Also, because it's generic, we keep the size of the firmware down.

Best Regards,



Jason Summerour
President,
Summerour Robotics Corporation
Microsoft MVP
www.roboticsconnection.com
Post #16
Posted Monday, April 14, 2008 4:57 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: Sunday, June 01, 2008 3:42 PM
Posts: 1, Visits: 7
Hi, I'd like to use the generic i2c interface to control a Devantech MD22 motor control.

In the Serializer user guide the sintaxis for de i2c command is:

i2c <r|w> <addr> [data]

where <addr > is de direction of the device.

I am not able to connect, so I have same questions;

1. When I want to read, have I to use the read direction of the device?

2. When I want to write I use the direction of the device, the direction of the register in the device that I want to write, and the data that I want to write in the register. How can I use the generic command to send the 3 parameters that I need (device direction, register direction and data to write in the register)?

Tank you very much

Post #338
Posted Monday, April 14, 2008 7:05 AM


Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Administrators
Last Login: Yesterday @ 7:42 AM
Posts: 285, Visits: 413
<addr> is the I2C address of the device, not direction.

So, for the MD22 (with a default address of 0xB0 (176 decimal)), you send serial commands similar to these to control it.

       i2c w 176 [data bytes]     // To write data

       i2c r 176 [data bytes]      // To read data

Are you sending the bytes yourself over the serial port?  If you use the Serializer .NET Library, you can utilize the Generic I2C object within it, and control your MD22 with code similar to this:

http://www.roboticsconnection.com/userForums/Topic247-6-1.aspx

There are also examples in the Serializer User Guide for sending commands over the serial port (like first example above), instead of using our Libraries.

Best Regards!

Jason Summerour
President,
Summerour Robotics Corporation
Microsoft MVP
www.roboticsconnection.com

Post #339
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: jsummerour, ringo

Permissions Expand / Collapse

All times are GMT -8:00, Time now is 4:16am

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.172. 13 queries. Compression Disabled.