(1) Introduction to msp430f5529 Learning

Source: Internet
Author: User

For beginners who want to learn MSP430 MCU, or, you are just transferred to the electronic hardware embedded development, if your electronic basic course has been completed, want to master MSP430 microcontroller, and how to break into the MSP430 learning process as soon as possible, Now summarizes some problems that the novice starts to learn MSP430, and the attention matters and methods in the study. For the heart to learn MSP430 single-chip children's shoes reference bar.

Of course, break into MSP430 study, you need to have some SCM theoretical foundation, and strong C language skills, learning MSP430 single-chip computer The best method is man-mo:"Wen" refers to learning the module of the resource knowledge; "WU" refers to the ability of hands-on. Basic knowledge + hands-on exercise is a very effective learning method. Man and man will learn something.

Access to various electronic products company's website, the recruitment of embedded occupy the majority of the engineer position. The generalized embedded is nothing more than: what is the traditional 51 single-chip microcomputer, MSP430 called the Embedded microcontroller ; arm is an embedded microprocessor ; Of course there are DSP;FPGA. We do not say anything else, say MSP430 single-chip microcomputer, most want to learn MSP430 children's shoes, 89c51 core series of single-chip microcomputer is very familiar with, in order to deepen the understanding of MSP430 Series microcontroller, quickly break into the MSP430 learning process, you must thoroughly understand the MSP430 SCM, We might as well compare the 51 single-chip microcomputer with the MSP430.

1th, the 51-Core microcontroller is a 8-bit single-chip computer . The instruction is a complex instruction set called "CISC" , with a total of 111 instructions. And the MSP430 microcontroller is a 16-bit microcontroller, using a simplified instruction set ( RISC ) structure, only a concise 27 instructions, a large number of instructions are analog instructions, Numerous registers and on-chip data memory can participate in a variety of operations. These kernel instructions are single-cycle instructions, which are powerful and run faster.

2nd, MCU is mainly divided into two modes: standby and execution . 51 Core SCM normally consumes a current of Ma class, in the power-down state, its current consumption is still about 3mA, even in the power-down mode, the supply voltage can be reduced to 2V, but in order to save data in internal RAM, but also to provide about 50uA of current.

While the 430 MCU power consumption is in the UA class , the operating current is very small, and ultra-low power consumption, the shutdown state of the current is only 0.1μa, standby current of 0.8μa, conventional mode (250μa/[email protected]), The port leakage current is less than 0 NA and power-down (BOR) isdissipated. In addition, the chip is a low-power device, only need to 1.8~3.6v voltage supply, which can effectively reduce the system power consumption. The MSP430 extends the low-power mode to 7 , which corresponds to the low-power mode for different applications and tasks. Take sleep mode for example, including deep sleep mode RTC: Only the clock is running and the rest is not moving , currently TI announces its MSP430 in RTC mode with a minimum power consumption of only 360nA. It also includes intermittent sleep mode that requires dozens of milliseconds of refresh, such as a liquid crystal display driver. Therefore, MSP430 's ultra-low power consumption is more suitable for use in battery-powered instruments, instrumentation products.

3rd, the 51 core microcontroller because its internal bus is 8-bit, by its structure itself is very limited, analog function control function is restricted. MSP430 series its basic architecture is 16-bit, while in its internal data bus through the transformation of the existence of 8-bit bus, in addition to itself is a hybrid structure, so for it such an open architecture, regardless of the expansion of the 8-bit function module, or 16-bit function module, even if the expansion of the mode/number conversion or number/ Module conversion is also very convenient for this kind of function modules.

4th, there are two kinds of storage structure of typical MCU. Neumann structure-Program memory and data memory unified coding ; Harvard structure-Program memory and data memory ; MSP430 series SCM belongs to the former, while the common 51-core MCU series belongs to the latter.

The 5th is on the development tools. For the 51-core microcontroller, many of the development tools for our use. But how to achieve online programming is still a big problem. For the MSP430 series, the introduction of Flash program memory and JTAG technology not only makes development tools easy and inexpensive, but also enables online programming.

So the above, as a novice, in the end how to learn 430 of this 16-bit low-power microcontroller it? Or is there any good way to do something, the answer is yes.

Online has a lot of introduction MSP430 single-chip learning method, must combine their own learning characteristics, set hundred family of long, good at summing up others, their learning methods and results, and actively practice. Of course, the methods of learning are interlinked. This is probably a brief summary of these methods, namely the following points:

  1. As 430 novice, first see whether we are ready for the following hardware: computer (with the same port) 1 units, Msp430fet Simulator 1 sets, MSP430 development test Board 1 sets, and some MSP430 tutorials or electronic tutorial materials.
  2. Select the MSP430 emulator. Buy ready-made Msp430jtag emulators such as Ti-msp430jtag
  3. Selecting the MSP430 board or target board is an important tool for learning, and it is recommended to purchase a development board or a target board, as well as a good technical support. If you make it yourself, it is not yet, it is personal level.
  4. Software tools, because there are now Learning Board tool software, such as the IAR EW430 learning version, 430GCC software or free. The proposal or the use of IAR software is more convenient, because the use of more people, there are problems can be consulted, easy to solve.
  5. MSP430 Learning materials and tutorials,<<msp430 series 16-bit ultra-low power single chip microcomputer principle and application >> Tsinghua University Press and a book on the application of 430C language programming << MSP430 Series SCM Practical C language Programming >>.
  6. The hardware source in the MSP430 series is very rich. There are watchdog (WDT), timer A (timer_a), Timer B (Timer_b), Comparator, serial 0 (Usarto), serial 1 (USART1), hardware multiplier, LCD driver, 10-bit/12-bit ADC, 14-bit ADC, Dozens of parallel input and output ports, base timers (Basic timer)for direction setting and interrupt function.
  7. The following parts of the module hardware resources are to be learned as a beginner must learn.
    ①WDT Watchdog timer: Novice will see many programming examples, beginning with "Wdtctl = Wdtpw + wdthold;" Statement. This is the meaning of the cup execution off timer . At first, we don't have to care about this, we can skip this chapter, as long as we know what he's doing. Watchdog timers are generally used to prevent program failures and are generally used in complete programs. The main program can continuously clear the watchdog timer count value, in case the timer value is automatically full after the CPU reset and restart the work. The watchdog timer count overflows to generate a CPU reset when a program error fails to properly clear the watchdog timing value.

②io module: For IO modules can be divided into primary and improve two stages, you can not need to understand the same time period.
A beginner must understand several common registers used such as the P1out,p1in,p1dir,p1sel register.
b understand the MSP430 IO Port common programming syntax, which can be viewed in reference routines.
C combine a book presentation with a personal understanding and then experiment on the Development Board. For example, such as LED, noise and other primary experiments.
D for IO modules: Learn how to use IO interrupts, and the use of IO interrupt related registers . If it is not necessary, you can skip the use of IO interrupts, but instead learn the basic parts of other chapters, and go back to learning this part when other chapters are based on a certain program. In addition, we need to figure out when the IO module is high-impedance state? What is the leakage current at high-impedance state? What is the IO drive current capability? And so on, we all need to develop the habit of proactively viewing the device manuals.

    interrupts are a feature of the 430 processor, as almost every peripheral module can be generated, 430 can enter a low-power state when there is no task, interrupt the CPU when there is an event, and go into a low-power state again after processing. The entire interrupt response process is like this,when there is an interrupt request, if the CPU is active, the current command is completed first, if the power is low, the PC value of the next instruction is pressed into the stack, and if there are multiple interrupt requests, the first response is high, and after execution, wait for the interrupt request flag bit to be reset. The interrupt request flag bit of single interrupt source is automatically reset, and the multi-interrupt flag bit requires software reset, then the total system interrupt allows bit sr.gie reset, the corresponding interrupt vector value is loaded into the PC, and the program continues execution from this address. It is important to note that interrupts allow bit sr.gie and interrupt nesting issues. If you want to be able to respond to a higher-level interrupt request while you are executing the interrupt program, you must place the Sr.gie on the first interrupt. In fact, other peripheral module clocks follow the clock and interrupt the core to execute. I don't have a specific structure, but I can refer to the 430 series manual.
③ Clock module:system Clockis a program to run the commanders, timing and interrupts are also the core and the central axis of the entire program. 430 Up tothree oscillator, DCO internal oscillator, LFXT1 external low frequency oscillator, the common 32768HZ, without external load capacitance, can also be connected to high-frequency 450khz-8m, need to connect the load capacitance, XT2 high-frequency 450khz-8m, plus external capacitors. Beginners use a different clock for almost all of the modules in the slice. The clock module is a source of clock occurrence for each module in the whole microcontroller, so this chapter is very important to understand carefully.
⑴. It must be understood that 430 has several clock signals:MCLK system Master Clock,can be divided 1 2 4 8 for CPU use, other peripheral modules can also be used in selected cases;SMCLK System sub-clock,for peripheral module use, optional clock signal generated by different oscillators;ACLK Auxiliary Clock,can only be produced by LFXT1, for peripheral modules.

⑵.DCO,SMCLK,MCLK,ACLK what are the advantages and disadvantages of each clock?
⑶.4 a clock signal, what is the usual frequency range for each clock.
⑷. General time-base control register settings and how clocks are output from pins and so on.
④timaa module: ⑴. Beginners need to figure out the relationship between TA, CCR1, CCR2 and CCR0 in the three different working modes of Timera. ⑵. Understand the interrupt vector relationship between TA, CCR1, CCR2 and CCR0 . ⑶. Combined with the above understanding, we can combine the Timera routines for validation, which can be effectively remembered only by doing it in person. ⑷. Using Timera to achieve PWM signal output, capturing signals using capture/compare functions, etc.

    1. In addition to learning more than 430 single-chip computer forum, and netizens to exchange, consulting, to see other people appear to solve the problem.

Can say, as long as through the above aspects of serious toss study, in fact, MSP430 microcontroller programming application has a basic entry stage, it can be said that has broken into the MSP430 single-chip effective learning process, to continue to learn other relevant module application is not difficult. Then some of the rest of the modules can be used on demand, and learn as needed. But the premise is to be familiar with a few common module basic applications, to use the most 14x series as an example, beginners must learn to have IO module, time-base module, timer module , etc., can continue to strengthen learning such as ADC12 analog-to- digital conversion, UART serial asynchronous communication module, Comparator a module and so on.

Article excerpt from: http://blog.lehu.shu.edu.cn/879836630/A448888.html

(1) Introduction to msp430f5529 Learning

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.