7 Segment Pin Assignment Quartus


  1. April 1st, 2016, 07:47 AM#1

    7- Segments pin assignment for Cyclone IV EP4CE6E22C8

    Hello:
    I wrote simple program to count on 7 Segments Display in my board Cyclone IV EP4CE6E22C8.

    module seg( input clk, output segA, segB, segC, segD, segE, segF, segG, segDP ); reg [23:0] cnt; always @(posedge clk) cnt <= cnt+24'h1; wire cntovf = &cnt; reg [3:0] BCD_new, BCD_old; always @(posedge clk) if(cntovf) BCD_new <= (BCD_new==4'h9 ? 4'h0 : BCD_new+4'h1); always @(posedge clk) if(cntovf) BCD_old <= BCD_new; reg [4:0] PWM; wire [3:0] PWM_input = cnt[22:19]; always @(posedge clk) PWM <= PWM[3:0]+PWM_input; wire [3:0] BCD = (cnt[23] | PWM[4]) ? BCD_new : BCD_old; reg [7:0] SevenSeg; always @(*) case(BCD) 4'h0: SevenSeg = 8'b11111100; 4'h1: SevenSeg = 8'b01100000; 4'h2: SevenSeg = 8'b11011010; 4'h3: SevenSeg = 8'b11110010; 4'h4: SevenSeg = 8'b01100110; 4'h5: SevenSeg = 8'b10110110; 4'h6: SevenSeg = 8'b10111110; 4'h7: SevenSeg = 8'b11100000; 4'h8: SevenSeg = 8'b11111110; 4'h9: SevenSeg = 8'b11110110; default: SevenSeg = 8'b00000000; endcase assign {segA, segB, segC, segD, segE, segF, segG, segDP} = SevenSeg; endmodule

    then i connect these pin assignment

    clk --> pin 24
    segA --> 143
    segB --> 144
    segC--> 141
    segd --> 142
    segF -->138
    segG -->2
    segDP --> 3

    after i run this code , only the blue small LED works not the 7Seg !!
    now how can i run the 7 Seg ?
    also how can i count the & seg by pressing the push bottom ?

    thank you
  2. April 1st, 2016, 05:39 PM#2
    Join Date
    Feb 2015
    Location
    Portugal
    Posts
    95
    Rep Power
    1

    Re: 7- Segments pin assignment for Cyclone IV EP4CE6E22C8

    Seems like the following part of the code will keep always the variable BCD_new at the same condition:
    always @(posedge clk) if(cntovf) BCD_new <= (BCD_new==4'h9 ? 4'h0 : BCD_new+4'h1)
  3. April 3rd, 2016, 01:19 AM#3
    Join Date
    Jun 2013
    Location
    The Netherlands
    Posts
    498
    Rep Power
    1

    Re: 7- Segments pin assignment for Cyclone IV EP4CE6E22C8

    Which board do you use? For the boards I have used I was able to find a .csv file with the pin assignments, which I could import. That, in combination with a board-specific top layer for the mapping of the ports to the pins, makes it easier to see the connections and know the assignment has been done correctly.

  4. April 3rd, 2016, 05:25 AM#4

    Re: 7- Segments pin assignment for Cyclone IV EP4CE6E22C8

    I dont have the csv file , its a Chinese board. how can i get it ?

    Cyclone IV EP4CE6E22C8
    zr tech v2.00
  5. April 3rd, 2016, 05:32 AM#5
    Join Date
    Jun 2013
    Location
    The Netherlands
    Posts
    498
    Rep Power
    1

    Re: 7- Segments pin assignment for Cyclone IV EP4CE6E22C8

    I got it from the board vendor.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Forum Rules


I'm trying to create a simple circuit, using 4 switches (8-4-2-1) to drive digital logic, in order to light a single 7-segment LED.

I've created the 4 input pins, wired them to inputs A,B,C, and D of a 7447 (BCD to 7-segment decoder), and wired the 7 outputs OA through OG) to output pins. I've tied the other 3 inputs (LTN, RBIN, BIN) to ground. I've assigned switches 0 through 3 to the inputs, and HEX0[*] to the outputs. However, when I compile, I get warnings that:

Warning: Design contains 4 input pin(s) that do not drive logic
Warning (15610): No output dependent on input pin "B"
Warning (15610): No output dependent on input pin "C"
Warning (15610): No output dependent on input pin "D"
Warning (15610): No output dependent on input pin "A"

Warning: Following 7 pins have nothing, GND, or VCC driving datain port -- changes to this connectivity may change fitting results
Info: Pin OA has VCC driving its datain port
Info: Pin OB has VCC driving its datain port
Info: Pin OC has VCC driving its datain port
Info: Pin OD has VCC driving its datain port
Info: Pin OE has VCC driving its datain port
Info: Pin OF has VCC driving its datain port
Info: Pin OG has VCC driving its datain port

Downloading to the DE2 board yields no results. The HEX0 (rightmost) 7 segment display is off, and no change in the input switches produces any change. It seems that the 7447 chip is not being utilized correctly... That the input pins are not connected to inputs on the 7447, and likewise for the outputs.

I don't think I'm doing anything wrong with wiring or pin assignments; when I connect a switch directly to an LED, it works fine. If I put an inverter between them, that works fine. But the 7447 doesn't seem to work correctly. Any suggestions?

0 Thoughts to “7 Segment Pin Assignment Quartus

Leave a comment

L'indirizzo email non verrà pubblicato. I campi obbligatori sono contrassegnati *