Data Storage Tool Display Human Input Protocol Math Motor Control Sensor Signal Generation & Processing Speech & Sound Fun View all Objects


Quick Links
Contact Us
Forums
Support

Register
Login

This object is provided under license. By downloading this object, you are agreeing to the terms of the MIT License.

i2cObjectv2

This is the i2cObject version 2.1. MUCH better - based on Mike Green's excellent basic_i2c_driver. This code demo's i2c EEPROM's, DS1621, DS1307 and www.robot-electronics.com 's - SRF08, MD22, MD23, SD21, SRF08 devices! Have fun!

Version:
  2.1

Type:
  Object

Attributes:


Author:
  James Burrows

Categories:
  Data Storage
  Protocol
  Motor Control
  Sensor

Downloads:
  3,562

Last Updated:
  2008-01-31



User Reviews:



Comments on this Object:


[2011-03-06 05:35:42] Anonymous said:
In regards to using the SRF08 Demo If your ranging results are gibberish and or 65536 all the time then replace waitcnt(5_200_000 + cnt) with waitcnt(6_000_000 + cnt) in the SRF08_Demo private function in the file i2cDemoApp.spin Thats the amount of time the program waits for the sensor to get a range value before trying to read it. By default it is too short and it tries to read the range before it has received the echo back thus giving a value of FFFFFFFF or 65536, and occasionally slighty smaller but still really high numbers like 10,000cm when the sensor has only partially written the sensor reading to the register. the comment in the program states that 5200000 clocks is 65 ms, this is correct but thats only the sensors timeout, not the settling time and timeout and processing/writing time, which adds to 6000000 Reply

Post a comment:




Please contact obex.support@parallax.com with comments or questions.

Copyright 2011 by Parallax, Inc.