P
pitarda
I am new at VHDL and would like to get familiar with it
I would like to describe this Pulse Width Modulator and just can't
figure it out.
The description found on the net:
"Basic principle: a register to store the value which is loaded on to
the Up/Down Counter whenever the counter reaches its terminal count.
The terminal counter is used to generate the pulse width modulation
A data register: to store the value for the counter.Value determines
the pulse width. The Up/Down Counter: loaded with a new value from the
data register when the counter reaches its terminal count.Toggle
Flip-flop generates the PWM output.
When data value is first loaded, counter counts down from data value to
0. Terminal count and PWM signals are Low. When counter goes through 0
transition, terminal count is generated.
Triggers Toggle Flip-flop to drive PWM signal High. Data value is
re-loaded and counting proceeds up to maximum value. Terminal count
generated again when counter reaches its maximum value. Drives PWM
signal to toggle from High to Low. Data value is re-loaded and cycle
repeats.
Direction of counter controlled by PWM signal: counter is set to count
down when PWM is Low, and count up when PWM is High. Terminal count
controls data value loaded to counter from data register. Data is
loaded when terminal count is High. Duty cycle of the PWM signal is
controlled by data value loaded to the up/down counter. Higher the data
value, higher the duty cycle."
And the block diagram can be found here:
http://freeweb.siol.net/pitarda/vhdl.jpg
I would really be thankful to anyone who would take some time to write
it.
So far I managed to write my own PWM generator but I have some problems
with it and would just like to describe this one.
Thanks
I would like to describe this Pulse Width Modulator and just can't
figure it out.
The description found on the net:
"Basic principle: a register to store the value which is loaded on to
the Up/Down Counter whenever the counter reaches its terminal count.
The terminal counter is used to generate the pulse width modulation
A data register: to store the value for the counter.Value determines
the pulse width. The Up/Down Counter: loaded with a new value from the
data register when the counter reaches its terminal count.Toggle
Flip-flop generates the PWM output.
When data value is first loaded, counter counts down from data value to
0. Terminal count and PWM signals are Low. When counter goes through 0
transition, terminal count is generated.
Triggers Toggle Flip-flop to drive PWM signal High. Data value is
re-loaded and counting proceeds up to maximum value. Terminal count
generated again when counter reaches its maximum value. Drives PWM
signal to toggle from High to Low. Data value is re-loaded and cycle
repeats.
Direction of counter controlled by PWM signal: counter is set to count
down when PWM is Low, and count up when PWM is High. Terminal count
controls data value loaded to counter from data register. Data is
loaded when terminal count is High. Duty cycle of the PWM signal is
controlled by data value loaded to the up/down counter. Higher the data
value, higher the duty cycle."
And the block diagram can be found here:
http://freeweb.siol.net/pitarda/vhdl.jpg
I would really be thankful to anyone who would take some time to write
it.
So far I managed to write my own PWM generator but I have some problems
with it and would just like to describe this one.
Thanks