- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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;
Link Copied
15 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
you can if you want. But if CLK is 50MHz, you wont see it blink.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
my CLK is less than 50MHz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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)- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- 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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- What is the frequency of clk? --- Quote End --- ~ 1Hz (CMOS timer 555)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- 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)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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)- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- 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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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)- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- 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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- 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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hm-m-m-m. Now i want to know what PLL is? What is it? How does it work?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page