|

The BV4221 is a USB to I2C(see box) translator
or it could be called a terminal. Commands sent to the BV4221 are
translated into I2C. The BV4221 acts as an I2C master. For example "s 3
p" means send a start condition using the default I2C device address,
send a byte with the value of 3 and then send a stop condition. Another
example is "s-20 r g-3 p" This means send a start condition to a device
with the address of 20, send a restart condition using address 21, get 3
bytes from the slave and then send a stop condition.
The key to understanding how this works is by
knowing that the BV4221 behaves as a COM device, in other words when the
driver is installed it will become a COM port and any applications that
use a COM port can use this device, HyperTerminal for example. In fact
to get to grips with the device and any I2C hardware it is connected to
BV Terminal is recommended. The scripts and code presented here assume
that you have already got the device working and connected to some I2C
hardware, the BV4221 comes with a datasheet.
NOTE: VBS does not seem to like COM ports with high numbers, as Windows
simply increases the COM port number for every new device defined it can
get out of hand, this file explains how to change the COM port number of
a particular device.
|