<< Chapter < Page Chapter >> Page >
Lab 8 deals with the benifits of using DMA and using RS232 as a communication protocol.

Direct memory access is a system to transfer data between peripheral modules and memory without using processor instructions. While its operation does occupy the memory bus, far fewer instructions require CPU interaction. This allows the CPU to work on other tasks simultaneously, or it may be be put into a low power mode.

Dma powered voltmeter

The DMA module allows you to automatically move data between memory locations. This will also allow us to automate much of your program's execution.

  • Set up the DMA module to automatically transfer the data from the ADC to the DAC. Transfer the input from the ADC1 to DAC0 and ADC0 to DAC1. Sampling should be interrupt enabled.
  • Measure the peak-to-peak amplitude of the input signal to ADC0 using the processor. Units are irrelevant. Display the amplitude on the seven segment display. You should have at least 4 different possible levels.

Got questions? Get instant answers now!

Rs232

We will configure the serial port (RS232) to transmit data. Just like before create a new project and do the following: disable the watchdog timer, and initialize the master clock and i2c. This should now be standard for all new projects. To set up the UART to use RS232 we must set the following registers:

  • Reset UICTL (on its own line of code)
  • Set the character length to 8-bits
  • Set U1TCTL to enable ACLK as the BRCLK clock.
  • The baud rate should have the following settings: U1BR0 = 0x7c; and U1BR1 = 0x01; This will set the baud rate at 19,200 bits per second.
  • Set ME2 to enable both transmit and receive.
  • Enable UART_TX and UART_RX on the msp (Hint: use P3SEL)
  • Set UART_TX as an output pin.

To transmit data, check if the UTXIFG1 flag is set in UTXIFG1. Once the flag is set you may write directly to TXBUF1, and that data will be transmitted. Now, come up with an array of ASCII characters in hexadecimal notation, and load each character in the TXBUF1 one at a time. Don't for get to add a new line character, /n , at the end of your message.

To test your project open up HyperTerminal, and set the correct baud rate (19200). All other default settings should be fine. If you correctly configured the UART then you should see your message in the terminal.

Got questions? Get instant answers now!

Once you have verified that you can transmit data to the serial port, load the TXBUF1 via DMA. You may trigger the DMA any way you wish. This will eliminate most of the work that the processor has to do.

Modify the first problem so that you input something into ADC0 and DMA the samples to the serial port. Come up with some way for a computer to read those values, HyperTerminal or otherwise.

Got questions? Get instant answers now!

Questions & Answers

what is biology
Hajah Reply
the study of living organisms and their interactions with one another and their environments
AI-Robot
what is biology
Victoria Reply
HOW CAN MAN ORGAN FUNCTION
Alfred Reply
the diagram of the digestive system
Assiatu Reply
allimentary cannel
Ogenrwot
How does twins formed
William Reply
They formed in two ways first when one sperm and one egg are splited by mitosis or two sperm and two eggs join together
Oluwatobi
what is genetics
Josephine Reply
Genetics is the study of heredity
Misack
how does twins formed?
Misack
What is manual
Hassan Reply
discuss biological phenomenon and provide pieces of evidence to show that it was responsible for the formation of eukaryotic organelles
Joseph Reply
what is biology
Yousuf Reply
the study of living organisms and their interactions with one another and their environment.
Wine
discuss the biological phenomenon and provide pieces of evidence to show that it was responsible for the formation of eukaryotic organelles in an essay form
Joseph Reply
what is the blood cells
Shaker Reply
list any five characteristics of the blood cells
Shaker
lack electricity and its more savely than electronic microscope because its naturally by using of light
Abdullahi Reply
advantage of electronic microscope is easily and clearly while disadvantage is dangerous because its electronic. advantage of light microscope is savely and naturally by sun while disadvantage is not easily,means its not sharp and not clear
Abdullahi
cell theory state that every organisms composed of one or more cell,cell is the basic unit of life
Abdullahi
is like gone fail us
DENG
cells is the basic structure and functions of all living things
Ramadan
What is classification
ISCONT Reply
is organisms that are similar into groups called tara
Yamosa
in what situation (s) would be the use of a scanning electron microscope be ideal and why?
Kenna Reply
A scanning electron microscope (SEM) is ideal for situations requiring high-resolution imaging of surfaces. It is commonly used in materials science, biology, and geology to examine the topography and composition of samples at a nanoscale level. SEM is particularly useful for studying fine details,
Hilary
cell is the building block of life.
Condoleezza Reply
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, Microcontroller and embedded systems laboratory. OpenStax CNX. Feb 11, 2006 Download for free at http://cnx.org/content/col10215/1.29
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Microcontroller and embedded systems laboratory' conversation and receive update notifications?

Ask