To use this file copy and paste this:
// #URL-lib "http://pin1.org/forthlib/flb/I2C/bv4508.flb" into BV Terminal 3
or here to download.
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
// BV4508 - I2C ADC** NOTE default address on this is 0x62
// This is a library of words inteded for this device it is an I2C
// device. The user should set the device address
// using the word 4508-default.
// This will load as a stand alone file or can be used as a library
// providing the parent file includes the files in the REQUIRES
// section
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
// REQUIRES:
// #URL-lib "http://pin1.org/forthlib/flb/General/soft1.flb" sid=0
// #URL-lib "http://pin1.org/forthlib/flb/General/pinsel.flb" sid=101
// #URL-Lib "http://pin1.org/forthlib/flb/I2C/i2c.flb" sid=103
// #URL-Lib "http://pin1.org/forthlib/flb/I2C/bvsys.flb"
// CONSTANTS:
// device variable is in bvsys.lib
Full Contents of File
: a1  device  s  1  sb  sb  p  ;   
: a2  device  s  2  sb  p  ;   
: a3  device  s  3  sb  device  1+  rs  rl  p  ;   
: a4  device  s  4  sb  device  1+  rs 
                rn  &100  *
                rl  +
                p  ;         
: a5  device  s  5  sb  sb  p  ;   
: a6  device  s  6  sb  sb  p  ;   
: a7  device  s  7  sb  2  *  sb  device  1+  rs 
                rn  &100  *
                rl  +
                p  ;         
: a8  device  s  8  sb  sb  p  ;   
: a9  device  s  9  sb  2  *  sb  device  1+  rs
               
                rn  &100  *
                rl  +
                dup  &7fff  > 
                if  &ffff0000  +  then 
                p  ;         
: aa  device  s  10  sb  sb  p  ;   
: ab  device  s  11  sb  sb  p  ;   
: ac  device  s  12  sb  sb  p  ;   
 
: 4508-default&62  bv-init  i2cfull  ;