module TouchReg (CLK,DataBus,SHData,FirstByteData,SecondByteData,ThirdByteData,FourthByteData) ;
input CLK ;
input [3:0] DataBus ;
input SHData ;
output [7:0] FirstByteData ;
output [7:0] SecondByteData ;
output [7:0] ThirdByteData ;
output [7:0] FourthByteData ;
reg [31:0] ByteData ;
assign FourthByteData = ByteData[31:24];
assign ThirdByteData = ByteData[23:16];
assign SecondByteData = ByteData[15:8];
assign FirstByteData = ByteData[7:0];
// Shift right as low order nibbles come first
always @(posedge CLK) begin
//Low order is sent first....
if (SHData) ByteData = { DataBus, ByteData[31:4] };
end
endmodule