Filter löschen
Filter löschen

Two bit DAC code?

3 Ansichten (letzte 30 Tage)
Darsana P M
Darsana P M am 30 Jul. 2017
Kommentiert: Walter Roberson am 30 Jul. 2017
Can you give me the matlab code for a two bit DAC?? For eg, if the digital input is 1101110010.

Antworten (1)

Walter Roberson
Walter Roberson am 30 Jul. 2017
Sorry, no. As best I can tell at the moment, none of the devices supported by MATLAB are 2-bit DAC, so there is no MATLAB code.
It is possible that you might be able to find a 2-bit DAC attached to I2C or SPI on Arduino, I suppose. Or Raspberry Pi. We would need more information about your set-up for that possibility.
  2 Kommentare
Darsana P M
Darsana P M am 30 Jul. 2017
Thanks you sir. Can I assign values 00=0v ,01=1v ,10=2v, and 11=3v by taking bi2de (binary to decimal) conversion. Can it make a continuous wave? actually I want to convert digital input to analog form for applying it as an input to analog beamforming
Walter Roberson
Walter Roberson am 30 Jul. 2017
desired_output_voltage = DigitalSignal(1:2:end)*2 + DigitalSignal(2:2:end);
However, at that point you are stuck. Nothing you can do inside a pure program can convert the numbers in desired_output_voltage into actual voltages. To convert to actual voltages you need to talk to hardware, such as a Digital To Analog convertor device, or an Audio Output device.
What kind of hardware are you using for analog beamforming? By definition, analog beamforming must be done in hardware (analog).
What I suspect that you want to do is generate a digital signal that models a waveform, perhaps as rectangular pulses or perhaps as sine waves, and that you then want to use digital techniques to modify that digital signal. No hardware would be required for that.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Analog Input and Output finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by