Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
I understood that you want to do 6-bit DAC. right? If it is true.
Here is my explanation.
data = [1 1 1 0 0 0];
function analog=myDAC(digital)
% digital input must be 6 bit width in this case(MSB first).
% and suppose your analog output's maximum voltage is 5V it would be like that
%...
It is very simple.
Example:
if you have 50MHz master clock then 50,000,000 cycles of your master clock is 1 sec.
Here is tutorial.
f = 50MHz = 50,000,000.
T = 1/50,000,000 = 20 nanosec.
number_of_cycles = 1sec / 20 nanosec = 50,000,000 cycles.
same to 1ms
number_of_cycles = 1msec / 20 nanosec...
Actual length is 8, so you try to change Xk0 : OUT signed (7 downto 0));
Then there will be no error.
:D
---------- Post added at 13:33 ---------- Previous post was at 13:25 ----------
Actual length is 8, so you try to change Xk0 : OUT signed (7 downto 0));
Then there will be no error.
:D
You have to set these variables to some data types.
Example :
x=int8(x);
y=int8(y);
then
x0 = x(1) = 255; % first value of Cosinus;
y0 = y(1) = 0; % first value of Sinus;
and in 2^(-i) , i must be constant --> it is define how many times shift to the left in digital systems.
Try it...
a = [0 0 1 2 3];
x=0; % circular shift up or down. up when positive, down when negative, no shift when 0;
y=-1; % circular shift left or right. right when positive, left when negative, no shift when 0;
a=circshift(a,[x y]);
Try it...
in 4-FSK. you will send datas by 2 bits. 00,01,10 and 11.
therefore that combinations will switch f1,f2,f3,f4 frequencies. You have to choose that frequencies before use.
example:
f1 = 10KHz --> sends when current data is 00.
f2 = 20KHz --> sends when current data is 01.
f3 = 30KHz --> sends...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.