I am working on FPGAs as a begginner and I want to implement a PID controller for DC motor speed control. Please I need advice and if possible relevant source codes for the Digital PID and PWM
For PID, you may want to look into the theory behind PID controls, I'd recommend "Control Systems Engineering" by Norman S. Nise.As far as PWM goes, you probably need a little bit of basic VHDL/Verilog. I'm a VHDL guy myself. For a beginner, "VHDL programming by example" by Douglas Perry is my personal favorite. If you want more help than that, I'd recommend writing code of your own. When you get stuck with a specific problem (hardware/firmware/software), check back in and you'll probably get some good help.