Change type of elements in dataBuf and frameBuffer.
Number of iteration can be from 1 to 256 now.
( Note: this code not tested yet. )