<< Chapter < Page Chapter >> Page >

Writing to the frequency registers is accomplished using the portw instruction. To write to the frequency or phase registers on the DDS, the second operand of the portw instruction must be 10xxxxxx , where the lower six bits are the address of the specific register to be written to. Theaddress of the most significant frequency register on the DDS is 04h , and the address of the second most significant frequency register on the DDS is 05h (see page 26 in the data sheet). It is important to note that the way our DDS boardswere built, you will not be allowed to make two consecutive writes. To solve this problem, a subroutine called nullop is called to waste some CPU time between writes. nullop does this by simply repeating the nop instruction 128 times.

After the program returns from the setcarrier subroutine, it enters an infinite loop in which it waits for a serial interrupt to occur. The serial interrupt occursevery time a new sample is acquired from one of the two input channels and is transmitted to the DSP via the serialport. When the interrupt occurs, an interrupt service routine called ANALOG_IFC (see core_mod.asm executes and calls the handle_sample subroutine. The handle_sample subroutine reads in the acquired sample from the serial port and scales that sample so thatit can be "mapped" to a frequency in the range of75 kHz

In FM radio, the amplitude of the message signal being transmitted determines the amount offrequency deviation from the carrier frequency of the passband signal.75 kHz is the largest frequency deviation allowed.
. The scaled sample therefore determines the frequency deviation and is added to 6Dh . The last step is to write the result to the second most significant frequency register so that thefrequency of the DDS output can be updated.

Programming the phase

The process for changing the phase of the DDS output is the same as it was for changing the frequency of the DDS output.To change the phase, you need to write a phase word to a phase-adjust register on the DDS. The phase-adjust registeris 14 bits wide and is split up into two smaller registers that you can write to (see page 26 in the data sheet). The upper 6 bits have address 00h , and the lower 8 bits have address 01h . The phase word can be calculated using :

Phase word Carrier phase 2 2 14
Once you've calculated the phase word, you can write it to the DDS using the portw instruction as before. Just make sure you use the correct address for the phaseregister.

Programming the amplitude

The DDS also allows you to program the amplitude, but this functionality is not addressed in this lab. You will beable to implement a digital communication system in ECE320 without having to program the amplitude. Interested readersare referred to the data sheet.

Fsk exercise

Now that you know how to use the DDS in single-tone mode, implement a simple FSK system that uses 2 frequencies: 120.005MHz, and 120.011 MHz. You don't need to encode any data for this exercise. In other words, your DDS output should justcontinuously alternate between the two frequency symbols. Also, the DDS automatically ensures continuous phase, so youwon't have to keep track of it. Use a symbol length of approximately 725s (the same length as your lab 5 symbols). Timer interrupts are an elegant way to control thesymbol lengths, but in this lab we will keep things simple and control the symbol lengths by creating a second (longer) nullop subroutine and calling it between writes to the DDS. The second nullop subroutine should waste approximately 725s worth of time.

Since we're not using input or output from the DSP, you don't need to use the WaitData or WaitAudiomacros.

Testing

Note that the corresponding baseband frequencies for 120.005 MHz and 120.011 MHz are 5 kHz, and 11 kHz, respectively.Since these baseband frequencies lie within the 22.05 kHz bandwidth of the DSP, you will be able to view your FSKsignal in real time on the oscilloscope without the contribution from the spectral replicas. Just feed the output of the DDS into asecond DSP (the anti-aliasing filter on the DSP will get rid of the spectral replicas), and pass it through to the outputand the scope. You should be able to verify that there is continuous phase between frequency symbols, and that yoursymbol length is approximately 725s. You should also view the spectrum of your DDS output on the VSA to verifythat your symbols have the correct frequencies.

Appendix

FM.asm

Questions & Answers

differentiate between demand and supply giving examples
Lambiv Reply
differentiated between demand and supply using examples
Lambiv
what is labour ?
Lambiv
how will I do?
Venny Reply
how is the graph works?I don't fully understand
Rezat Reply
information
Eliyee
devaluation
Eliyee
t
WARKISA
hi guys good evening to all
Lambiv
multiple choice question
Aster Reply
appreciation
Eliyee
explain perfect market
Lindiwe Reply
In economics, a perfect market refers to a theoretical construct where all participants have perfect information, goods are homogenous, there are no barriers to entry or exit, and prices are determined solely by supply and demand. It's an idealized model used for analysis,
Ezea
What is ceteris paribus?
Shukri Reply
other things being equal
AI-Robot
When MP₁ becomes negative, TP start to decline. Extuples Suppose that the short-run production function of certain cut-flower firm is given by: Q=4KL-0.6K2 - 0.112 • Where is quantity of cut flower produced, I is labour input and K is fixed capital input (K-5). Determine the average product of lab
Kelo
Extuples Suppose that the short-run production function of certain cut-flower firm is given by: Q=4KL-0.6K2 - 0.112 • Where is quantity of cut flower produced, I is labour input and K is fixed capital input (K-5). Determine the average product of labour (APL) and marginal product of labour (MPL)
Kelo
yes,thank you
Shukri
Can I ask you other question?
Shukri
what is monopoly mean?
Habtamu Reply
What is different between quantity demand and demand?
Shukri Reply
Quantity demanded refers to the specific amount of a good or service that consumers are willing and able to purchase at a give price and within a specific time period. Demand, on the other hand, is a broader concept that encompasses the entire relationship between price and quantity demanded
Ezea
ok
Shukri
how do you save a country economic situation when it's falling apart
Lilia Reply
what is the difference between economic growth and development
Fiker Reply
Economic growth as an increase in the production and consumption of goods and services within an economy.but Economic development as a broader concept that encompasses not only economic growth but also social & human well being.
Shukri
production function means
Jabir
What do you think is more important to focus on when considering inequality ?
Abdisa Reply
any question about economics?
Awais Reply
sir...I just want to ask one question... Define the term contract curve? if you are free please help me to find this answer 🙏
Asui
it is a curve that we get after connecting the pareto optimal combinations of two consumers after their mutually beneficial trade offs
Awais
thank you so much 👍 sir
Asui
In economics, the contract curve refers to the set of points in an Edgeworth box diagram where both parties involved in a trade cannot be made better off without making one of them worse off. It represents the Pareto efficient allocations of goods between two individuals or entities, where neither p
Cornelius
In economics, the contract curve refers to the set of points in an Edgeworth box diagram where both parties involved in a trade cannot be made better off without making one of them worse off. It represents the Pareto efficient allocations of goods between two individuals or entities,
Cornelius
Suppose a consumer consuming two commodities X and Y has The following utility function u=X0.4 Y0.6. If the price of the X and Y are 2 and 3 respectively and income Constraint is birr 50. A,Calculate quantities of x and y which maximize utility. B,Calculate value of Lagrange multiplier. C,Calculate quantities of X and Y consumed with a given price. D,alculate optimum level of output .
Feyisa Reply
Answer
Feyisa
c
Jabir
the market for lemon has 10 potential consumers, each having an individual demand curve p=101-10Qi, where p is price in dollar's per cup and Qi is the number of cups demanded per week by the i th consumer.Find the market demand curve using algebra. Draw an individual demand curve and the market dema
Gsbwnw Reply
suppose the production function is given by ( L, K)=L¼K¾.assuming capital is fixed find APL and MPL. consider the following short run production function:Q=6L²-0.4L³ a) find the value of L that maximizes output b)find the value of L that maximizes marginal product
Abdureman
types of unemployment
Yomi Reply
What is the difference between perfect competition and monopolistic competition?
Mohammed
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Ece 320 spring 2004. OpenStax CNX. Aug 24, 2004 Download for free at http://cnx.org/content/col10225/1.12
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Ece 320 spring 2004' conversation and receive update notifications?

Ask