DAC0832连接FPGA用查表法输出正弦波verilog程序
更新时间:2023-12-03 17:38:01 阅读量: 教育文库 文档下载
DAC0832
连接FPGA用查表法输出正弦波verilog 程序
module DAC0832(clk, data); input clk;
output [7:0]data; reg [7:0]data;
reg [17:0]count_10us; reg [1:0]delay; reg clk_10us; reg [5:0] n;
initial begin count_10us=16'd0; data=8'b00000001; delay=2'b00; n<=8'b0000000; end
always @(posedge clk) begin count_10us<=count_10us+1'b1; if (count_10us>18'd500) begin count_10us<=18'd0; clk_10us<=~clk_10us; end end
always @(posedge clk_10us) begin delay<=delay+1'b1; if (delay==2'b00) begin case (n) 6'b000000: 6'b000001: 6'b000010: 6'b000011: 6'b000100: 6'b000101: 6'b000110: 6'b000111: 6'b001000: 6'b001001: 6'b001010: 6'b001011: 6'b001100: 6'b001101: 6'b001110: 6'b001111: 6'b010000: 6'b010001: 6'b010010:
Page | 1/2 //64 point counter
//10us; The speed of DAC0832 is 1us
data<=8'h80;
data<=8'h8c; data<=8'h98; data<=8'ha5; data<=8'hb0; data<=8'hbc; data<=8'hc7; data<=8'hd1; data<=8'hda; data<=8'he2; data<=8'hea; data<=8'hf0; data<=8'hf6; data<=8'hfa; data<=8'hfd; data<=8'hff; data<=8'hff; data<=8'hff; data<=8'hfd;
end
endmodule
6'b010011: data<=8'hfa; 6'b010100: data<=8'hf6; 6'b010101: data<=8'hf0; 6'b010110: data<=8'hea; 6'b010111: data<=8'he3; 6'b011000: data<=8'hda; 6'b011001: data<=8'hd1; 6'b011010: data<=8'hc7; Page | 2/2 6'b011011: data<=8'hbc; 6'b011100: data<=8'hb1; 6'b011101: data<=8'ha5; 6'b011110: data<=8'h99; 6'b011111: data<=8'h8c; 6'b100000: data<=8'h80; 6'b100001: data<=8'h73; 6'b100010: data<=8'h67; 6'b100011: data<=8'h5b; 6'b100100: data<=8'h4f; 6'b100101: data<=8'h43; 6'b100110: data<=8'h39; 6'b100111: data<=8'h2e; 6'b101000: data<=8'h25; 6'b101001: data<=8'h1d; 6'b101010: data<=8'h15; 6'b101011: data<=8'h0f; 6'b101100: data<=8'h09; 6'b101101: data<=8'h05; 6'b101110: data<=8'h02; 6'b101111: data<=8'h00; 6'b110000: data<=8'h00; 6'b110001: data<=8'h00; 6'b110010: data<=8'h02; 6'b110011: data<=8'h05; 6'b110100: data<=8'h09; 6'b110101: data<=8'h0e; 6'b110110: data<=8'h15; 6'b110111: data<=8'h1c; 6'b111000: data<=8'h25; 6'b111001: data<=8'h2e; 6'b111010: data<=8'h38; 6'b111011: data<=8'h43; 6'b111100: data<=8'h4e; 6'b111101: data<=8'h5a; 6'b111110: data<=8'h66; 6'b111111: data<=8'h73;
endcase
n<=n+1'b1;
end
正在阅读:
DAC0832连接FPGA用查表法输出正弦波verilog程序12-03
同学聚会作文精彩9篇04-02
一颗印建筑装饰艺术分析02-25
房屋漏雨情况说明模板01-23
各地商人的性格和特点09-18
冗渡中学期末成绩05-25
会计制度设计与内部控制制度的关系09-14
中学开学典礼新闻报道(范文)02-15
第八至十章习题答案03-14
- exercise2
- 铅锌矿详查地质设计 - 图文
- 厨余垃圾、餐厨垃圾堆肥系统设计方案
- 陈明珠开题报告
- 化工原理精选例题
- 政府形象宣传册营销案例
- 小学一至三年级语文阅读专项练习题
- 2014.民诉 期末考试 复习题
- 巅峰智业 - 做好顶层设计对建设城市的重要意义
- (三起)冀教版三年级英语上册Unit4 Lesson24练习题及答案
- 2017年实心轮胎现状及发展趋势分析(目录)
- 基于GIS的农用地定级技术研究定稿
- 2017-2022年中国医疗保健市场调查与市场前景预测报告(目录) - 图文
- 作业
- OFDM技术仿真(MATLAB代码) - 图文
- Android工程师笔试题及答案
- 生命密码联合密码
- 空间地上权若干法律问题探究
- 江苏学业水平测试《机械基础》模拟试题
- 选课走班实施方案
- 正弦
- 输出
- 连接
- DAC0832
- verilog
- 程序
- 查表法
- FPGA