Design of BCD to 7 Segment Driver for Common Anode Display using Conditional Operator (Data Flow Modeling Style)-
Output Waveform : BCD to 7 Segment Driver for Common Anode |
Verilog CODE-
//-----------------------------------------------------------------------------
//
// Title : bcd_to_7segment_CA
// Design : verilog upload
// Author : Naresh Singh Dobal
// Company : nsd
//
//-----------------------------------------------------------------------------
//
// File : 7 Segment Driver for Common Anode using Conditional Operator.v
module bcd_to_7segment_CA ( bcd ,seg7 );
output [6:0] seg7 ;
input [2:0] bcd ;
assign seg7 = (bcd==0) ? 7'b0000001 :
(bcd==1) ? 7'b1001111 :
(bcd==2) ? 7'b0010010 :
(bcd==3) ? 7'b0000110 :
(bcd==4) ? 7'b1001100 :
(bcd==5) ? 7'b0100100 :
(bcd==6) ? 7'b1100000 :
(bcd==7) ? 7'b0001111 :
(bcd==8) ? 7'b0000000 :
(bcd==9) ? 7'b0001100 :
7'b1111111 ;
endmodule
0 comments :
Post a Comment