Saturday, January 8, 2011

MSP430 system application architecture design and selection (1)

1 Introduction to the MSP430

TI MSP430 is the company launched a 16-bit microcontroller series products, battery-powered low-power applications with unique advantages.

Its working voltage 1.8 ~ 3.6 V, typical power consumption can be controlled at about 200 μ, A low-power mode for 2 μ A even O. 1 μ A low power consumption. MSP430 series single-chip MCU as excellent performance in China has been widely used. MSP430 with highly integrated, usually on a single chip with integrated 12-bit a/d converter, comparator, multiple timers and chip USART, on-chip Watchdog, DCO, etc. General single-chip to meet the needs of most applications.

MSP430 microcontroller Flash program memory is the memory and supports JTAG programming online, you can easily implement the program downloads, simulation, testing and upgrading.

The present integrated best MSP430F44X series, with 60 KB program memory (can record data), 2 KB on-chip RAM, 6 I/O port (P1 and P2 has the interrupt capability), 160 segment LCD driver, 2 serial ports, 4 timer (including TB with seven capture/comparators, including watchdog), analog comparators, hardware multiplier, 8-channel 12-bit A/D converters, frequency adjustment circuit FLL and system reset SVS module, etc.

The basic type of MSP430F1101 and MSP430C1101 only 1 KB program memory, 128 byte chip RAM, analog comparator and 2 timer, etc.

MSP430F44X and MSP430F11X in hardware structure, system integration, on a large difference; difference of MSP430F41X and MSP430F11X is not great.

But the 3 series chip prices by 10 dollars to tens of dollars, so how to choose System chip? to 3 chip, for example, the system function block diagrams are shown in Figure 1, Figure 2, shown in Figure 3.

  

  

  

  

  

  

  

  

  

2 common MSP430 application system design

As shown in Figure 4, is in the system, the analog input pulse acquisition, calendar, clock, LCD display, keyboard, and peripheral device control, etc.

You can use the following options for MSP430 selection.

  

  

  

(1) selection of MSP430F44X series

This design is the most simple, because there is integration MSP430F44X series chips.

The series of any chips are capable (General procedure bytes will not be greater than 32 KB).

(2) choose MSP430F41X series

If the program within the 8 KB, so this is a better option.

MSP430F41X series, while not directly A/D conversion, but the entire system affordable.

(3) selection of MSP430F11XX series

The series chip cannot directly driven LCD, and programs in smaller, or direct A/D conversion capabilities.

And compared to the previous two scenarios, this is obvious, but its price is the lowest.

3 in this scenario, if the requirements of the production cost is not high, the best first scenario; if you want to take into account the volume of production costs, the first three programmes best, cost-effective.

If you use the bulk price MSP430F1121A to $ 9, suitable for mass production, cost-sensitive products, to get the best price/performance ratio. But the first three programmes exist many problems to be solved.

3 the cost-effective solution for MSP430 application system

Figure 4 is a more classic application system block diagram of MSP430.

If you use the most economical MSP430 series devices MSP430F11XX series, to solve problems: die 5/number conversion issues, LCD display problems, problems of small programs, calendar clock of the procedural issues and serial communication problems.

3.1 mold number conversion problem solution/

MSP430F11XX series single-chip-chip analog comparator Comparator_A and powerful timer Time_A, can constitute a slope (Slope) A/D conversion from analog to digital conversion.

Specific principles as shown in Figure 5 (here to resistance analog to digital conversion, for example).

  

  

  

In Figure 5, Rref, Rmeas respectively standard reference resistor and the measured resistance, capacitance ca0 up charge and discharge.

Comparator output CAOUT for driving timer capture. MSP430 internal analog comparator can produce is used to compare analog voltage (close the internal reference voltage, use an external reference voltage O.25Vcc, O.5Vcc and diode pipe pressure drop). The negative end select comparators O.25Vcc.

First of all, standard resistance Rref on capacitance CAO charging to VCC, then by reference resistor Rref discharge while recording timer value T1; when the capacitor discharge to O.5Vcc, comparator produce output, CAOUT trigger timer have captured the action, will read the T2 timer value.

Second, use the measured resistance to the capacitor charging RmeasVcc, and then through the discharge, while read Rmeas timer value T3; when the capacitance discharge to 0.5Vcc, comparator output signal capture timer data again, the T4 capacitor discharge of linear region can have been measuring the resistance of resistance:

  

On the other voltage measurement of physical quantities, can also be used this way.

3.2 LCD display problem solution

MSP430F11XX no LCD drive capability, you must have an external expansion.

As shown in Figure 6, you can use direct drive I/O output cheap LCD driver chips to display information. If so, why choose onboard LCD prices expensive MSP430F43X or MSP430F44X?

  

For example, use the MSP430 Px.x two i/o port and driver chips for CLK, DATA communications, you can achieve the desired display information.

You can save this do not more i/o port to be used for other purposes.

Amount of small problems 3.3 program solutions

MSP430F11XX series MCU's largest program capacity only 4 KB, for more complex applications program space.

For the MSP430 series microcontroller has an ingenious solution to the MSP430 microcontroller: due to memory with linear characteristics of the uniform addressing, microcomputer operation program can in addition to on-chip peripheral module space outside storage space, RAM used as program memory. And since RAM contents can be variable, the program stored in the external storage, you need to add to the RAM, and then do one of the programs in RAM. External memory can choose Serial E2PROM 24C series, which reduces the system volume, you can make the program space increase 32 KB or more, and total system cost very little. 24C E2PROM and MSP430 microcontroller series of interface, you only need 2 root I/O port and 2 a pull-up resistor.

First, you need to be kept in E2PROM applications into smaller modules.

Here for MSP430F1121A will each module's size is limited to 128 bytes. MSP430F1121A chip RAM 256 bytes, and the other half is used to store the data in the process, the other half is used for staging program scheduling programs.

Secondly, the on-chip memory MSP430F1121A to hold on 24C series storage in read and write operations procedures, and the most common handler and the interrupt service program.

Each small module applications stored in E2PROM, at the same time, each small module of the application in the starting position in E2PROM and module length in the MSP430 program memory in the form of a table with data. Whenever you want to call in the small module E2PROM, you find in the table. Use the read program, E2PROM E2PROM reads all of the small module program data to the MSP430 RAM 128 bytes in the back.

Finally, the program counter (PC pointer) stack, and then change the PC content to 280H (RAM 128 bytes after the beginning), the program will then start running.

After the module has finished running, the last sentence is RET, will just stack PC pointer recovery. The program continues to run in the main program of the MSP430 Flash.

3.4 calendar clock program of problem solution

Due to the MSP430 series single-chip ultra-low power consumption characteristics, use its internal timer module comparison mode calendar clock, clock source use watches 32 768 Hz ACLK signal generated by the crystal oscillator.

The timer module is set to 1 s interrupted once in the interrupt service program write calendar clock program. As long as the writing process took note of the various projections of the Gregorian calendar, you can even use an algorithm to prepare for Lunar also. After the end of the interrupt routine immediately into a low-power mode when the system LMP3 power consumption is less than 1 μ A, than most of the private calendar clock chip power consumption. Material selection, as long as the selection of high precision, made of crystal oscillator clock is very accurate, but use the SCM will calendar clock program in every way (reliability, power consumption, cost, size, etc.) are a good solution.

3.5 serial communication problem solution

Serial sent relatively simple point: set Time_A comparison to compare mode, the data reflect each of [1] [2]

No comments:

Post a Comment