process(clk100p)
begin
if(clk100p 'event and clk100p = '1') then
startsr(0) <= start;
startsr(1) <= startsr(0);
if (startsr(0) = '1' and startsr(1)= '0') then
dataout <= '0';
count <= "0000";
schiebereg <= sendedaten;
enable <= '1';
else
if enable <= '1' then
if zaehl <= 9 then
zaehl <= 0;
else
zaehl<= zaehl+1;
if zaehl <= 0 then
if count < "1001" then
dataout <= schiebereg(0);
schiebereg(8 downto 0)<= schiebereg(9 downto 1);
count <= count + '1';
else
if count = "1001" then
dataout <= '1';
count <= count + '1';
end if;
end if;
end if;
end if;
end if;
end if;
end if;
end process;
end Behavioral;