Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
1,651 Views

LED to clock in Register

How to blink clock (CLK) in register? 

Register code 

module reg8 (CLK, D, Q); input CLK; input D; output Q; reg Q; always @(posedge CLK) Q = D; endmodule  

Can i assign output LED = CLK? 

output LED; ... assign LED = CLK;
0 Kudos
15 Replies
Altera_Forum
Honored Contributor I
91 Views

you can if you want. But if CLK is 50MHz, you wont see it blink.

Altera_Forum
Honored Contributor I
91 Views

my CLK is less than 50MHz

Altera_Forum
Honored Contributor I
91 Views

Hi, 

 

What is the frequency of clk? 

Try simple switch and led program. 

 

Best Regards, 

Anand Raj Shankar 

(This message was posted on behalf of Intel Corporation)
Altera_Forum
Honored Contributor I
91 Views

 

--- Quote Start ---  

my CLK is less than 50MHz 

--- Quote End ---  

 

 

Unless your CLK is less than about 25Hz or so you aren't going to see it blink, it will just be dimly lit.
Altera_Forum
Honored Contributor I
91 Views

Blinking with the clock is difficult since you than need a double datarate register (clocks on both edges) but if you're ok with cycle 1 on and cycle 2 off, 3 on, 4 off, etc you can make a one-input one-output truth table: 

Qn-1|Qn ------- 0 | 1 1 | 0  

How would you implement this?
Altera_Forum
Honored Contributor I
91 Views

 

--- Quote Start ---  

 

What is the frequency of clk? 

 

--- Quote End ---  

 

~ 1Hz (CMOS timer 555)
Altera_Forum
Honored Contributor I
91 Views

 

--- Quote Start ---  

Blinking with the clock is difficult since you than need a double datarate register  

--- Quote End ---  

 

i don't need 

always @(posedge CLK)
Altera_Forum
Honored Contributor I
91 Views

Hi, 

 

1.Have you implemented a logic on fpga for 555 IC? 

Use simple PLL and counter, The MSB bit of counter can be given to the led.  

2.Probe and check if clock is generated? 

or try simple program for example 

Control led by switch. 

 

Best Regards, 

Anand Raj Shankar 

(This message was posted on behalf of Intel Corporation)
Altera_Forum
Honored Contributor I
91 Views

 

--- Quote Start ---  

 

 

1.Have you implemented a logic on fpga for 555 IC? 

 

--- Quote End ---  

 

i use external timer 555 (CMOS) 

 

--- Quote Start ---  

 

2.Probe and check if clock is generated? 

 

--- Quote End ---  

 

Yes 

 

--- Quote Start ---  

 

Use simple PLL and counter, The MSB bit of counter can be given to the led.  

 

--- Quote End ---  

 

How?
Altera_Forum
Honored Contributor I
91 Views

Hi, 

 

 

--- Quote Start ---  

i use external timer 555 (CMOS) 

--- Quote End ---  

 

Can you just give information how FPGA, 555 & LED's are interfaced? 

 

--- Quote Start ---  

How? 

--- Quote End ---  

 

Refer below link for steps. 

https://www.altera.com/content/dam/altera-www/global/en_us/pdfs/literature/tt/tt_my_first_fpga.pdf 

http://www.armadeus.org/wiki/index.php?title=simple_blinking_led 

 

Let me know if this has helped resolve the issue you are facing or if you need any further assistance. 

 

Best Regards, 

Anand Raj Shankar 

(This message was posted on behalf of Intel Corporation)
Altera_Forum
Honored Contributor I
91 Views

 

--- Quote Start ---  

 

Can you just give information how FPGA, 555 & LED's are interfaced? 

 

--- Quote End ---  

 

i don't know. i just connect 555 to FPGA "clock" input pin. 

for example, https://www.youtube.com/watch?v=jl43vj6ksmo 

 

--- Quote Start ---  

 

Let me know if this has helped resolve the issue you are facing or if you need any further assistance. 

 

--- Quote End ---  

 

OK, thanks
Altera_Forum
Honored Contributor I
91 Views

 

--- Quote Start ---  

i don't know. i just connect 555 to FPGA "clock" input pin. 

for example, https://www.youtube.com/watch?v=jl43vj6ksmo 

 

OK, thanks 

--- Quote End ---  

 

 

An issue then is what is the high/low swing of your 555 circuit output (ie, what Vcc are you running the 555 device at? 5.0V). The clock input of most all modern FPGAs will be limited to (probably) 3.3V or 2.5V at most, so apply 5V to the clock input could cause damage to the FPGA device unless the voltage and/or current is limited appropriately.
Altera_Forum
Honored Contributor I
91 Views

ok, let's go back a bit, what are you trying to do? could you explain what yoh are trying to achieve?  

Why do you want to use the external oscilator?
Altera_Forum
Honored Contributor I
91 Views

Hm-m-m-m. Now i want to know what PLL is? What is it? How does it work?

Altera_Forum
Honored Contributor I
91 Views

In verry simple terms it is a clock frequency modulator. It can take one clock and output another at a higher or lower frequency,

Reply