I2C Library

The I2C library is a collection of Forth files to make interfacing with any I2c device easier. It is mostly designed for the BV511 but could be adapted for other LPC Arm microcontrollers.

To use the files in here you will need nearly always need to to include the following:

// #URL-Lib "http://pin1.org/flb/com/soft1.flb" sid=0
// #URL-Lib "http://pin1.org/flb/com/pinsel.flb" sid=101
// #URL-Lib "http://pin1.org/flb/i2c/i2c.flb" sid=103

Put the above at the head of your file and use BV Terminal v3. This will automatically pick these files up from this site. The library file 'flb' will tell you what the dependencies are.

The devices included in this library so far:

The BV4205 is a 20 pin DIL IC

This IC has an standard 2 wire I2C interface. It is a 10 channel x 10 bit converter with some additional features such as continuous (Autoscan) conversion and differential conversion.

The BV4213 is capable of controlling DC and stepper motors. It has an I2C interface and also an optional stepper motor interface so that a stepper motor can be directly controlled with pulses from the host.
BV4218: This is an LCD display and keypad controller designed to work with 1,2 and 4 line displays that use the standard LCD controller module, i.e. HD44780 or similar type. It has an I2C interface making interfacing to a microcontroller very easy.
BV4219: This is a 128 x 64 graphic display that has built in text capability and drawing commands. BV4219.flb has all of the basic commands that reflect the datasheet.
bv4219-term.fth has some experimental code that makes the display behave similar to a VT100 terminal (without the input)