Last active
October 17, 2018 02:20
-
-
Save koyamalmsteen/6dc7974be53bcffb2293552478542923 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module DigitalThermometer(clk,btn2,led,hled0,hled1,hled2,hled3,ncs,sck,sdi,sdo); | |
input clk; | |
input btn2; | |
output [9:0] led; | |
output [7:0] hled0; | |
output [7:0] hled1; | |
output [7:0] hled2; | |
output [7:0] hled3; | |
output ncs,sck,sdi; | |
input sdo; | |
wire iclk; | |
wire cs,shift,ld; | |
wire [9:0] sdat; | |
wire [9:0] pdat; | |
Timer2 #(10) tm(clk,iclk); | |
TimingGenerator tg(iclk,cs,shift,ld); | |
SpiIf spi(iclk,cs,shift,ncs,sck,sdi,sdo,sdat); | |
PLatch pl(iclk,ld,sdat,pdat); | |
DataConv dc(clk,pdat,hled0,hled1,hled2,hled3); | |
assign led=pdat; | |
endmodule |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment