Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
公告
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

LED to clock in Register

Altera_Forum
名誉分销商 II
3,655 次查看

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 项奖励
15 回复数
Altera_Forum
名誉分销商 II
2,095 次查看

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

0 项奖励
Altera_Forum
名誉分销商 II
2,095 次查看

my CLK is less than 50MHz

0 项奖励
Altera_Forum
名誉分销商 II
2,095 次查看

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)
0 项奖励
Altera_Forum
名誉分销商 II
2,095 次查看

 

--- 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.
0 项奖励
Altera_Forum
名誉分销商 II
2,095 次查看

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?
0 项奖励
Altera_Forum
名誉分销商 II
2,095 次查看

 

--- Quote Start ---  

 

What is the frequency of clk? 

 

--- Quote End ---  

 

~ 1Hz (CMOS timer 555)
0 项奖励
Altera_Forum
名誉分销商 II
2,095 次查看

 

--- 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)
0 项奖励
Altera_Forum
名誉分销商 II
2,095 次查看

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)
0 项奖励
Altera_Forum
名誉分销商 II
2,095 次查看

 

--- 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?
0 项奖励
Altera_Forum
名誉分销商 II
2,095 次查看

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)
0 项奖励
Altera_Forum
名誉分销商 II
2,095 次查看

 

--- 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
0 项奖励
Altera_Forum
名誉分销商 II
2,095 次查看

 

--- 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.
0 项奖励
Altera_Forum
名誉分销商 II
2,095 次查看

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?
0 项奖励
Altera_Forum
名誉分销商 II
2,095 次查看

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

0 项奖励
Altera_Forum
名誉分销商 II
2,095 次查看

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

0 项奖励
回复