modified code to use BF for rx. tx is fixed and uses 9 bit wide buffer