iratidance

Members
  • Content Count

    5
  • Joined

  • Last visited

About iratidance

  • Rank
    Newbie

Recent Profile Visitors

969 profile views
  1. Hey Guys! Thanks a lot for your kind interest. Unfortunately I do not think it is a matter of the cycles because the code works for a single input. Please, find it attached. On the other hand, I am new with Vivado (used to use ISE) and when running the simulation it gives me a compile error, suggesting to check on the tcl, but I dont even find where that is. What does actually the testbench show? Thanks! Ira adc_dac_single_channel.txt
  2. Hey JColvin, Thank you very much for noticing that mistake! Unfortunately, that didn't solve the problem :/ Any other suggestions? Thanks a lot! ira
  3. Dear All, I am trying to get two signals in the pmodAD1 simultaneously and send the data through the two channels in the pmodDA2 simultaneously. I got the code working for a single channel and I tried to modify it for two of them. However, even though the compilation does not give me any error, I do not see any signal out of the pmod in the oscilloscope. Please, find attached the piece of code. Any help or suggestion will be really appreciate it! Thanks a lot! 2channel main.txt 2channel pins.txt
  4. Thank you very much Hamster! I have changed the parenthesis position and it works fine. The problem is that the accuracy of the output signal is not quite great.... Input 700mV, multiplied by 1/3 gives 300mV signal... I thought about using real numbers in order to avoid the division part but I did not find a nice solution to typecast real numbers into unsigned ones...I'll look into the fixed point solution
  5. Dear All, 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); mul_number_unsigned <= to_unsigned(mul_number,12); div_number_unsigned <= to_unsigned(div_number,12); when mul_number_unsigned/div_number_unsigned = integer : the voltage height increases according to the set value. when mul_number_unsigned/div_number_unsigned > 1 and real : nothing happens to the signal and the same input signal is output again. when mul_number_unsigned/div_number_unsigned < 1 , positive and real : the is no output signal. 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