Add input clock for PWM

95 views
Skip to first unread message

Stanley Seow

unread,
Nov 6, 2021, 2:55:08 AM11/6/21
to FPGAwars: explorando el lado libre
Hi, I have a IceSugar 1.5 board and would like to do a simple PWM on the LEDs

I copied the sample PWM codes here into the code blocks but I can't find a way to send in the clocks except the build-in Prescaler22 or PrescalerN

I copied this code with INPUT as CLK and OUTPUT as LED only

How do I set the INPUT CLK as system clock ??

Thanks

Stanley




Juan Gonzalez Gomez

unread,
Nov 6, 2021, 3:59:32 AM11/6/21
to FPGA-WARS: explorando el lado libre
Hi Stanley!

The input clock is automatically connected to system clock if the Edit/preferences/Board rules is enabled (it is enabled by default)



screenshot-1.png

In this circuit you can see the pwm unit. It works ok on my iCESugar:



screenshot-2.png

You will that little yellow box connected to the clk input (it is the system clock). It is placed automatically by icestudio

I am attaching this example for you to try

Best regards, Juan






--
Has recibido este mensaje porque estás suscrito al grupo "FPGAwars: explorando el lado libre" de Grupos de Google.
Para cancelar la suscripción a este grupo y dejar de recibir sus mensajes, envía un correo electrónico a fpga-wars-explorando-el...@googlegroups.com.
Para ver esta conversación en el sitio web, visita https://groups.google.com/d/msgid/fpga-wars-explorando-el-lado-libre/613bcc33-5efa-45f1-8765-b66cfa1a2fdfn%40googlegroups.com.
pwm-test.ice
Reply all
Reply to author
Forward
0 new messages