EmbDev.net

Forum: FPGA, VHDL & Verilog Give a variable input to Spartan 3E


Author: Nirav Bhatt (Guest)
Posted on:

Rate this post
0 useful
not useful
Hello all,

I am trying to generate gating signals for 4 semiconductor switches.
Alright i have achieved the signals but i am facing some problem when 
changing the input duty cycle.

Problem definition :
Achieve variable input duty cycle.
Presently using 8 input switches for 8 bit duty cycle.

Is there a way where i can use a vary the duty cycle (input) with the 
help of potentiometer or ADC converter ?

Board used :- Spartan 3E starter kit

Knowledge in FPGA :- Beginner (Electrical engineer)

Author: Lothar Miller (lkmiller) (Moderator)
Posted on:

Rate this post
0 useful
not useful
Nirav Bhatt wrote:
> Is there a way where i can use a vary the duty cycle (input) with the
> help of potentiometer or ADC converter ?
Yes.

1. use an external ADC.
1a. use an ADC with parallel output (e.g. TLV571)
1b. use an ADC with serial output (e.g. MAX11639)
Here you must implement some FSM to generate control signals for the 
ADC. And for 1b you must implement a interface engine (SPI or I²C) also. 
Keep an eye on the interface/supply voltage, it should be no more than 
3,3V.

2. use an RC combination and measure the charging time.
This is easily done with two FPGA pins this way:
  FPGA Pins
                    -
     CTRL -------->| | 10k
                   | | P
                    -
                    |
                    -
                   | | 100R
                   | | R
                    - 
                    |
     ADIN ----------o
                    |
                    |  C
                   === 1u
                    |
                    |
      GND ----------'
Set CTRL to low for "enough" time to ensure discharching of C. Then set 
CTRL to high and start a counter. Count until ADIN is high. Do some 
scaling on the counters value to get 8 bit result.
Then from the beginning: set CTRL low to discharge C...

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [vhdl]VHDL code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.