Home \ Help \ Search \ Login RSS

Welcome, Guest. Please Login

This forum is now READ-ONLY! Please visit http://forum.wiring.co/ for the new forum.

Wiring ForumProgramming Questions & HelpIntegration › I2C communication with wiring

Page Index Toggle Pages: 1
I2C communication with wiring (Read 6714 times)
03/15/10 at 17:11:08

ijmbarr   Offline
YaBB Newbies

Posts: 3
*
 
Hi

I'm currently trying to use wiring and a JX-Mega128 board to communicate with a AD5667 DAC( http://www.analog.com/static/imported-files/data_sheets/AD5627R_5647R_5667R_5627_5667.pdf).

To do this I was planning to use the two wire library. I don't currently have the DAC, and am viewing the output of the SCL (pin 0) and SDA(pin 1) on an oscilloscope. It looks like the clock pulse from the board are at around 20MHz, much higher than the 100kHz or 400kHz supported by the DAC.

My questions are: Is this how fast the clock pulse should be? If so can I reduce the rate? And how exactly does the command Wire.send(x) work in terms of sending data to the I2C device?

I've had a look at the examples, but they seem to deal with how to use the Wire commands rather that what these commands are doing in terms of communicating with the device.

Any help would be appreciated.
Thanks
Iain
 
IP Logged
 
Reply #1 - 03/16/10 at 05:29:20

barragan   Offline
YaBB Administrator

Posts: 939
*****
 
in general this is controlled using appropriate delays in critical points, or wait until a reading is done etc. Check out this example: http://wiring.org.co/learning/libraries/hmc6352sparkfun.html
or this one: http://wiring.org.co/learning/libraries/ultrasonicsfr.html
 
IP Logged
 
Reply #2 - 03/16/10 at 10:25:47

ijmbarr   Offline
YaBB Newbies

Posts: 3
*
 
It was a problem at my end and is fixed now.

Thanks
Iain
 
IP Logged
 
Reply #3 - 03/16/10 at 15:32:13

barragan   Offline
YaBB Administrator

Posts: 939
*****
 
Could you make an example with your sensor for the examples section? I will help with the diagrams.
 
IP Logged
 
Page Index Toggle Pages: 1