I am planning to program a PID controller on the Basys3. For this purpose,
I first tried to get a signal from a function generator into the ADC (pmodAD1) and output it through the DAC (pmodDA2). This works fine.
I wanna take the digital output of the ADC, multiply or divide it by a real factor and output the result through the DAC. There might be better ways of doing this but in order to specify the re number, I have created two integer numbers and apply a division between them. This would allow me to get any "real" number that I want.
constant mul_number : integer := 5;
constant div_number : integer := 4;
signal mul_number_unsigned : unsigned(11 downto 0);
signal div_number_unsigned : unsigned(11 downto 0);
Question
iratidance
Dear All,
I am planning to program a PID controller on the Basys3. For this purpose,
I do not know how to solve the problem since the compiling does not give me any warning or error...Any help or suggestion would be really appreciated.
Thanks a lot!
PS: sorry for the code file format but the system did not allow me to upload a .vhd file.
acd_func_dac.txt
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.