如何解决如何在 SPI 中将并行数据输出为测试台 VHDL 中的串行数据?
我正在模拟 SPI 接口以从另一侧测试我的 ADC 接口。 所以,我不知道如何发送相同或不同的数据:
process(r_sclk,r_reset)
begin
if r_reset = '0' then
count <= (others => '0');
shift_reg <= x"0914";
elsif falling_edge(r_sclk) then
if r_cs = '0' and count <= "01111" then
shift_reg <= shift_reg(14 downto 0) & '0';
count <= count + "00001";
end if;
if count = "10000" then
count <= "00000";
end if;
--if count = "00000" then
--shift_reg <= x"0914"+x"0000";
--end if;
end if;
end process;
r_miso <= shift_reg(15);
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。