Added Union to deal with bit manipulation. Almost done with write function, need to add clock pulse.