Chinaunix首页 | 论坛 | 博客
  • 博客访问: 21255
  • 博文数量: 6
  • 博客积分: 315
  • 博客等级: 二等列兵
  • 技术积分: 85
  • 用 户 组: 普通用户
  • 注册时间: 2011-05-27 10:14
文章分类

全部博文(6)

文章存档

2012年(1)

2011年(5)

我的朋友
最近访客

分类: 服务器与存储

2011-10-11 17:40:37

AVR microcontroller, compared with the traditional type, in addition to the IC chip decryption technology must be able to achieve the original some of the basic features of its architecture, features, performance and reliability, and many have greatly improved and improved.
However, the device only for the use of better designed and implemented a good system to create a good foundation and possibility,
TPS76333DBVR if it is adopted and followed the previous tradition of hardware and software design ideas and methods, then, is not good use of the AVR, even AVR can not really understand the characteristics and strengths.
Function better devices, requires higher skills and capabilities of people to use and manage it. IC chip decryption as a good F1 car, the driver only with superior technology in order to fully appreciate the car's features, and to maximize the performance out of the bus.

AVR has started started fast, easy development of simple features, but to fully appreciate the advantages of the AVR and play, but also require the application of hardware and software design engineers to develop their own ability to decrypt the IC chip learning, practice improvement.
"Lay watch the fun, professional and subtle," there is some basis for the development of embedded and microcontroller system design engineers, may wish to simply try AVR.
Development
environment and tools: PC + line + download the actual system board
Developing software on the PC:
AVR Studio (Free) compile + compiling high-level language debugging debug + + Software Simulation
ICC, CVAVR, BASCOM-AVR high-level language program development + download. One of the purchase of genuine full-featured as the main development environment, using the DEMO version of other, as auxiliary and reference.
AVR ISP download cable:
STK200 and STK200 + and STK300 ISP programmer. PC's printer port, using ISP technology system operation code (HEX, BIN) and write data to Flash and EEProm AVR chip, the AVR's configuration fuses programmed and encrypted bit. Support the overwhelming majority of the AVR chip, compatible chip, and 51 ATMEL 89S8252, 89S52, etc. In the ICC, CVAVR, BASCOM-AVR, BASCOM-8051 are included in the download cable support program. Free download special: SLISP, PonyProg2000 and so on.
Try not to use the emulator's recommendations:

In the development and debugging system programs, IC chip decryption, there are many people totally dependent on the IC chip decryption, once when he left the simulator feel no start. In fact, the AVR's Flash memory can be easily repeated using ISP technology online flash, it is recommended not to use as much as possible (dependent) to develop and debug emulator program.
In the actual development process, debugging is available from several aspects:
Now the high-level language compiler (such as the C compiler) can produce very efficient machine code, it is recommended that you use an advanced system programming language.
Atmel's AVR Studio using the provided software simulation environment, and other software simulation environment (BASCOM-AVR).
Whenever possible, use high-level language system programs.
Target board using LED, LCD, or asynchronous serial port. See Annex "There is no case of emulator how to develop AVR" introduction.
Improve the hardware design is reasonable:
As reasonable as possible and make full use of AVR on-chip resources, such as EEPROM, A / D, the internal RC oscillator.
Maximize the use of peripheral devices connected to serial communication, large-capacity memory, LCD controller, printer, not 8279 (LED digital tube + keyboard) and use 7279 and so on. In addition to foreign expansion RAM (such as voice and video), generally do not promote the use of parallel expansion (573 + decoding circuit),
reducing hardware and connections and the emergence of the error probability of the PCB, but also improve the reliability of the system . Parallel Extensions to the serial expansion is the development trend. There are a large number of new high-speed serial peripheral device interfaces such as A / D, D / A, RTC, memory and so on.
To make use of the target board and set aside ISP program download interface, or using the IAP technique.
Advantages: ISP interface and I / O more compatible than JETAG good.
Disadvantages: not online debugging

Note that the configuration and control AVR fuse bits to use:
Make reasonable use of advanced language writing system design process. Many people write programs that use the assembly more streamlined and high-level language development program will waste a lot of space, in fact, this is a misunderstanding. For an experienced and very familiar with the compilation of a single-chip master, he is able to write more streamlined than the high-level language code. While the assembly is not very familiar with the developer, or the sudden replacement of a new chip, you can guarantee will be able to write high-level language is more concise than the code?
Now the high-level language compiler (such as the C compiler) to generate the code has been very efficient machine code, it is recommended to achieve high-level language you can use as much as possible high-level language programs written in the speed and timing of special occasions strict can be used to solve the hybrid programming approach.
More in-depth
and comprehensive grasp of the various serial communication protocol procedures:
Embedded systems are to a large number of peripheral chips use the serial interface and a variety of communication interfaces such as RS232, two-wire (I2C), three-wire (SPI), a single bus, USB, CAN, TCP / IP and so on. Developers and programmers should be aware of low-level protocol, how familiar and how to achieve lower hardware protocol, how to define the upper and reliable application protocol, as well as with low-level protocol driver interface between the upper layer application protocol design (the middle layer software implementation), etc.
Hardware engineers, software development, the ability to improve, using standard programming methods, improving the overall framework of software design,
good data structure and program structure system. (Computer software professional programmers are not familiar with the hardware, mostly under the aegis of the operating system software, interface and protocol for low-level driver layer and the interface does not understand, often not a good SCM system written procedures.)
Communication interface should be prepared as much as possible
. Using interrupt + buffer,
. Hierarchical + structure design,
As far as possible not to use Round Robin (to reduce the efficiency of the AVR). See URAT (RS232) driver + middle-tier software examples.
The use of good system design:
Try not to use the traditional front and back (break) system design, interaction and interference between the tasks, not timed operation. Such as the design of a dynamic scan mode to drive the 8-bit LED digital display + dynamic scan 4 * 4 matrix keyboard.

State machine design using TimeTip + + CASE structure, multi-tasking operating system design. Or time-triggered system design. (See: "time-triggered embedded system design," China Electric Power Press, 2004.6)
Transplant small embedded operating systems, such as UCOS-II. Some free online simple AVR-based operating system.
Improve the C language programming skills and software application level:
Familiar and good use of C data structures, pointers application, memory management and other more advanced applications.
Knowledge and understanding of your development platform using high-level language features. The platform for a class of processors, including many special extension is not compatible with the structure of the statement and, statements, functions and so on. Although easy to use, but because of its opacity and the uncertainty of the time, and therefore fair use. Such as C's getchar (), putchar () and so on.
AVR has multiple development platforms, each has its own characteristics and weaknesses. To the integrated use of these platforms complement each other, can improve development efficiency. Such as through the ICC, CVAVR program generator CodeWizard learn and understand the AVR hardware setup, simplify the calculation, the program quickly generate the basic modules, such as "a URAT (RS232) + lower middle layer software driver examples."

Tags;
阅读(1228) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~