The current time is 07/13/2012 Thu 00:51:22
(0) Display date and time
(1) Set time
(2) Set date
(3) Set Control
(4) Dump all
(5) Set NV RAM
#define USE_SOFT_I2C 1
Add read: D0
Add write: D0
fat16lib wrote:I suspect you have an option other than "No line ending" enabled in the serial monitor.
This is at the bottom of the serial monitor near the baud rate selector.
The input function needs to be fixed to treat any combination of CR and LF as end-of-line.
I keep meaning to post a new version of the I2C stuff but have not found time to finish the new version. Sorry!
#define SDA_PIN 16
#define SCL_PIN 17
The DigitalPin.h file contains the fastest pin I/O class and functions. These functions require a constant pin number.
These function execute in two cycle with constant arguments. On an Uno, two cycles is 0.125 usec. This is about 25 times faster than the standard Arduino digitalWrite().
The PinIO class has run time pin numbers and is four to five times faster than the standard digitalRead() and digitalWrite() functions. For pin 13 on an Uno, write() executes in about 0.8 usec and toggle() is faster. The standard Arduino digitalWrite() function takes about 4 usec.
This class saves overhead by not disabling PWM mode on each read/write call and by storing the port register addresses and pin bit mask in private variables.
The template class SoftSPI uses fast pin I/O to implement a software SPI bus at about 2 MHz.
The two classes FastI2cMaster and SoftI2cMaster implement software master mode I2C.
FastI2cMaster is a template class and runs at about 400 kHz.
SoftI2cMaster uses run time pin numbers and runs at about 100 kHz.
StanZ wrote:i2cScanAddress, and I actually get a response from the slave. ID is 2x actual ID, but this makes sense when you look at itcScanAddress code. So it seems this shows master must be wired properly and proper pins are in use.
Users browsing this forum: No registered users and 10 guests