1 Introduction
Embedded systems are application-centric, computer-based, software and hardware-customizable special-purpose computer systems that meet the strict requirements of application systems for functions, reliability, cost, volume, and power consumption. In recent years, with the development of computer, microelectronics, communication, and network technologies, embedded systems have penetrated into various fields. Since embedded systems are usually built with microcontroller chips, microcontroller manufacturers usually only provide compilers and connectors for chips, but not complete development platforms; application developers often build their own application products based on microcontrollers, and usually do not provide complete, especially general, embedded system development platforms; development platforms provided by foreign third-party companies are generally single-function, simple in structure, and expensive. Domestic development platforms are generally just simple evaluation boards and debugging platforms, and usually cannot support high-end microcontrollers. Therefore, in order to meet the needs of developing various application systems, this paper proposes the design and implementation method of embedded system development platform.
In terms of hardware, the embedded system development platform is a hardware design and debugging platform built with various microcontrollers as the core and the union of common components of embedded systems as the basic elements. As a general development platform, the platform supports 1~2 representative microcontrollers in the 8-bit, 16-bit, and 32-bit microcontroller families as the core, and includes common components such as network communication, USB high-speed serial communication, memory system expansion, large-screen LCD/touch screen controller, etc. In terms of software, the embedded system development platform is based on an embedded microkernel real-time operating system, provides various software and hardware resource management programs, rich function libraries and debugging tools, and standardized application design routines for various functional modules, and constructs a basic debugging and development platform. When developing specific embedded system applications, you only need to appropriately tailor and assemble the software and hardware based on this platform to complete an actual embedded system.
2 EVB2107 Evaluation Board Resources and Development Environment
The EVB2107 evaluation board is based on the 32-bit microcontroller MMC2107, and expands the memory, OnCE interface, serial interface, power circuit and other modules to form a basic board-level system. Its logical structure is shown in Figure 1.
The EVB2107 evaluation board provides 1MB of SRAM and 2MB of FLASH memory, which greatly expands the memory capacity of the board. The programmable logic device CPLD is used to implement various control logic circuits in the board, which can control the LED indicator display on the evaluation board; the sampling jumper switch setting value realizes the system configuration; generates memory address and control signal, and realizes the 16-bit or 32-bit access of MMC2107 to the external memory on the evaluation board. The 3 peripheral port lead-out sockets are used to lead out the signals of SPI, serial communication interface, timer interface, external interrupt request signal, and analog signal for analog-to-digital conversion using the on-chip QADC. Users can choose a 20-wire double-row flat cable or other connecting wire to connect it to the expansion board. The user expansion area (i.e., breadboard) is provided for users to add their own devices. 2 RS232 serial communication interfaces and OnCE interface are used for debugging; the 12V DC input power is converted into various working power supplies (such as 5V, 3.3V) in the board, which can power each module on the expansion board.
The EVB2107 evaluation board is connected to the host through EBDI (Embedded Background Debug Interface). The host uses the CodeWarrior IDE integrated development environment provided by Metrowerks and SysDS (M·CORE System Development Software) provided by Motorola to form a software debugging environment. EBDI is the hardware interface between the EVB2107 evaluation board and CodeWarrior IDE. The OnCE interface on the EVB2107 evaluation board is connected to EBDI, and EBDI is connected to the serial interface of the host through a serial line. When debugging, CodeWarrior uses the EBDI connection path to download the program to the EVB2107 evaluation board, and then the Debug function in CodeWarrior IDE can be used to debug the code.
3 USB interface module
The development is connected to external devices through the USB interface. The USB system consists of a host, a hub, and a device. They are connected through the USB bus to form a star topology. In a USB system, there must be one and only one host. The host uses the USB host controller to manipulate the data transmission between the host and the USB device. The host controller is hung under the system bus (PCI bus) like other I/O devices. The hub attached to the host controller is the root hub of the USB system. Each level of the hub provides several downstream ports for connecting other devices. USB devices are logically divided into several levels, namely devices, configurations, interfaces, and endpoints. The structure is shown in Figure 2.
Each USB device has one or more logical connection points, called endpoints. An endpoint is a buffer that stores multiple bytes and is used as a data buffer. The device exchanges data with the host through the endpoint. Each device endpoint consists of an endpoint number and a data direction. The number ranges from 00h to 0Fh. If the direction is input (IN), it means it flows to the host. If it is output (OUT), it means it flows out of the host. Endpoint 0 is used to transmit configuration and control information and can transmit data in both directions. Other endpoints are unidirectional data channels, that is, receiving endpoints or sending endpoints. USB provides four data transmission modes: control; isochronous; interrupt; bulk. In addition to endpoint 0, which is fixed to use control transmission, other endpoints can be configured as the other three transmission modes according to the characteristics of the actual data transmission.
The combination of a group of endpoints of the same nature is called an interface. If a device contains more than one interface, it is called a composite device. For most devices, one interface is enough, but some devices can have multiple interfaces in effect at the same time, and multiple interfaces can be enabled at the same time. Similarly, the combination of interfaces of the same type is called a configuration. Each configuration must support at least one interface. Most devices have only one configuration, but some devices can support multiple configurations, but only one configuration is enabled at the same time. Once the configuration is activated, the interfaces and endpoints in it can be used. A descriptor is a data structure that is formatted information for the host to understand the device. When the host detects the device, it requires the device to return a descriptor in order to understand the device and configure the device. The host first requires the device descriptor of the device, then the configuration descriptor and the interface descriptor of each configuration, and finally the endpoint descriptor, and there may be an optional string descriptor.
4 Human-computer interaction module
In order to provide users with a good human-computer interaction interface, a human-computer interaction module consisting of a liquid crystal display module and a touch screen control module is designed on this development platform, as shown in Figure 3. The liquid crystal display module consists of three parts: LCD (liquid crystal display) screen, LCD controller and display buffer memory. The LCD screen uses the MG320240 black and white LCD screen of Truly, which is covered with a four-wire resistive touch screen. The LCD controller uses the S1D13305 chip of EPSON, and the display buffer memory is composed of two 62L256 chips, totaling 64KB; the touch screen controller in the touch screen control module uses the ADS7846 of BB, and the ADS7846 and MMC2107 are connected through a standard SPI port. [page]
4.1 LCD Module
S1D13305 supports text (i.e. character) display, graphic display, and display mode combining text and graphics; LCD display resolution can reach 640×256 pixels; LCD drive duty cycle varies from 1/2 to 1/256; the internal mask has a character generator ROM with 160 characters and 5×7 pixel dot matrix; supports setting up a character generator ROM or RAM with 256 characters and a maximum of 8×16 pixel dot matrix outside the chip; the off-chip display RAM (also known as display buffer) can reach 64KB; the cursor position and shape can be programmable; the entire display screen or part of the display screen can scroll smoothly in the horizontal or vertical direction; can interface with 6800 series and 8080 series microcontrollers; wide operating voltage range (2.7~5.5V); low power consumption, the operating current is 3.5mA when VDD=3.5V, and the backup current is 0.05μA.
S1D13305 has three interfaces: microcontroller, display memory (including external character generator) and LCD module. It accepts and executes commands from the microcontroller to complete various display control functions, a total of 13 commands. It receives display data (character code or bit-mapped graphic data) from the microcontroller and generates a signal to write access to the memory, writes the display data to the display memory, then reads the display data and converts it into display pixels and generates various timing signals for the LCD, and sends the display pixel data to the LCD for display. The microcontroller only needs to send commands to the S1D13305 and send display data to the S1D13305 when updating the display content. The work of reading/writing the display memory and controlling the LCD scanning display is all completed by the S1D13305.
The design scheme of the hardware interface between MMC2107 and LCD is shown in Figure 3. S1D13305 can interface with two types of microprocessors, 8080 or 6800. Here, according to the interface requirements of MMC2107, the former is selected. During the design, the data line of S1D13305 is connected to the data line D[31:24] of MMC2107, the address A0 of S1D13305 is connected to the address line ADDR1 of MMC2107, and chip select 3 (CS3#) is used as the chip select signal of S1D13305. In the program, the command port address and data port address are defined as follows:
#define lcd_command (*(INT8U*)(0x81800002)) // Command port
#define lcd_data (*(INT8U*)(0x81800000)) // data port
4.2 Touch screen module
In addition to the basic X and Y coordinate measurement functions, the ADS7846 can also measure the system power supply battery voltage, chip temperature, touch pressure and external analog quantity. The core of the ADS7846 is a 12-bit successive approximation A/D converter. The internal 6-to-1 analog multiplexer sends one of X+, Y+, Y-, VBAT (battery voltage), TEMP (temperature) and AUXIN (external analog quantity) to the A/D converter according to the control word sent by the microcontroller. The ADS7846 can provide an internal reference voltage of 2.5V for A/D conversion, and also supports inputting an external reference voltage from the VREF pin.
ADS7846 is connected to the microcontroller via a standard SPI interface. It takes three SPI transmissions to complete one communication with the microcontroller. For example, for coordinate measurement, the microcontroller first transmits a coordinate reading command in the control word format. ADS7846 receives the command and measures and converts the corresponding coordinates. Then the microcontroller starts two SPI reads to obtain the coordinate values. The first read gets the first 7 bits of data, and the second reads the last 5 bits of data. ADS7846 is also equipped with a touch recognition circuit. When a touch is detected, the circuit outputs a low-level signal called PENIRQ# (pen interrupt). The microcontroller can use this signal as the interrupt request signal of ADS7846. When there is no touch, PENIRQ# is output high by the external pull-up resistor. After the pen interrupt becomes low, MMC2107 detects this signal and issues a start conversion command. During the conversion, MMC2107 must maintain the pen interrupt low.
5 Summary of innovations
The innovation of this paper is to organically combine various microcontrollers with embedded microkernel real-time operating systems to develop an embedded development platform, which can greatly shorten the development cycle of application systems, reduce system development cost investment, and reduce system development risks. At the same time, it can meet the requirements of application system functions, reliability, cost, volume, etc., and has very broad application prospects in the future mobile computer platforms, information appliances, wireless communication equipment, and industrial/commercial control.
References:
1 萧世文编著. USB2.0硬件设计. 北京:清华大学出版社,2002
2 Wang Tianmiao, ed. Embedded System Design and Case Development. Beijing: Tsinghua University Press, 2002
3 邵贝贝,刘慧银编著. 微控制器原理与开发技术. 北京:清华大学出版社,1997
4 Mo Chuanmeng, Feng Xiaoyun, Dual CAN Communication Component Based on Embedded System μC/OS-II, Beijing, Microcomputer Computing Information, 2004.No.3
Previous article:Research and Implementation of Hard Real-time Performance of Embedded Linux Based on RTAI
Next article:MapInfo format map display based on embedded Linux
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- The area cannot be covered with copper and cannot have electrical wiring
- The xcl file of MSP430FR6972 cannot change the heap DATA16_HEAP starting address
- [Flower carving DIY] Interesting and fun music visualization series project (24) - infinite LED mirror light
- A contactless power supply circuit suitable for wireless mouse
- Can MPAX extended memory and memory protection be changed dynamically while the program is running?
- [AT32WB415 Review] 04 Software and Hardware IIC to obtain AHT20 temperature and humidity sensor data and extended test interface
- Free application evaluation: Defining the next industry standard for humidity sensing - SHT31 Smart Gadget
- Qorvo's high-performance BAW filters support Band 41 5G base station deployment
- Operational Amplifier Key Terms
- How does condensation water in dry sealed spaces occur?