EmbDev.net

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


von Nirav Bhatt (Guest)


Rate this post
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)

von Lothar M. (Company: Titel) (lkmiller) (Moderator)


Rate this post
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:
1
  FPGA Pins
2
                    -
3
     CTRL -------->| | 10k
4
                   | | P
5
                    -
6
                    |
7
                    -
8
                   | | 100R
9
                   | | R
10
                    - 
11
                    |
12
     ADIN ----------o
13
                    |
14
                    |  C
15
                   === 1u
16
                    |
17
                    |
18
      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...

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.