Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

PWM Encoder (in VHDL)

Status
Not open for further replies.

PWM_encoder

Newbie level 1
Joined
Sep 23, 2005
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,287
pwm encoder

Hi! I don't have a background on VHDL/FPGA until last month when i started to self-study because there is a design contest in our school. Part of the contest is designing a PWM Encoder having 8 bits of input from an ADPCM Decoder and the PWM Encoder is fed with a PCM. The output of the PWM Encoder is also 8 bit. I encountered a program in the net for a PWM Encoder and i can't quite comprehend what most of it is about, which parts fit my specs and all that... can someone help me please?

entity PWM is
Port ( clk : in std_logic;
PWM_in : in std_logic_vector (7 downto 0) := "00000000";
PWM_out : out std_logic);
end PWM;

architecture PWM_arch of PWM is
signal PWM_Accumulator : std_logic_vector(8 downto 0);
begin
process(clk, PWM_in)
begin
if rising_edge(clk) then
PWM_Accumulator <= ("0" & PWM_Accumulator(7 downto 0)) + ("0" & PWM_in);
end if;
end process;
PWM_out <= PWM_Accumulator( 8 );
end PWM_arch;
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top