[PicForth] ANN: libi2c.fs
J.C. Wren
jcwren at jcwren.com
Sat Nov 13 14:58:05 CET 2004
David,
That looks really good. The one thing I noticed is there are no
mechanisms for block reads and write. Trivial block operations can, of
course, be implemented as a loop, however, this results in the I2C
address and 16 bit memory address being sent every byte written. Writes
also have the problem of taking up to 5ms per byte in most parts (worst
case), which means writing a chunk of memory gets really slow.
If you're interested in a block reads and writes that are fairly
efficient, take a look at this: <URL:
http://linux.private.com/embedded/Forth/PICForth/demo_i2c.fs >.
--jc
David McNab wrote:
> Hi,
>
> Just announcing a new module, libi2c.fs.
>
> Features:
> - for accessing medium-to-large I2C serial EEPROMS
> such as 24xx128, 24xx256, 24xx512
> - 16-bit addresses
> - PIC-as-I2C-master
> - uses (requires) on-chip MSSP module, present on
> some PICs (16F87x[A] etc), but not on others (eg 16F84)
> - 3 simple words - i2c.init, i2c@ and i2c!
>
> Refer PicForth wiki - http://wiki.enst.fr/bin/view/Picforth/Libi2cfs
>
More information about the PicForth
mailing list