Design of Intelligent Vehicle Instrument Based on WinCE

Publisher:HeavenlyMelodyLatest update time:2013-05-23 Source: dzscKeywords:WinCE Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
  introduction

  With the development of high-performance electronic display technology, the degree of electronicization of automobile instruments is getting higher and higher. High-tech products such as multifunctional all-electronic display instruments, head-up display instruments, car navigation systems, and driving recorders have been developed at home and abroad. In the future, electronic embedded instruments for automobiles will have the following advantages: providing a large amount of complex information, making the degree of electronic control of automobiles higher and higher; meeting the requirements of small and lightweight, making limited driving space more humane; realizing the electronicization of automobile instruments with high precision and high reliability, reducing the occurrence rate of failures; equipped with an online fault diagnosis system, once a car fails, the source of the fault can be found, which is convenient for maintenance; the appearance design has a high degree of freedom, and the automobile dashboard is beautiful. Based on the above advantages, more and more automobiles will adopt electronic instruments for various purposes. Embedded electronic instruments with novel shapes and powerful functions will be the development trend and trend of automotive instruments in the future.

  1 Intelligent vehicle instrument system structure

  The intelligent vehicle instrument has the functions of most traditional vehicle instruments. The driver can obtain the current vehicle status information, such as vehicle speed, oil pressure, oil temperature, water temperature, engine oil pressure or battery power, through the display interface of the vehicle instrument.

  Traditional vehicle instruments are directly connected to the vehicle's sensors. The instrument system obtains the current state of the vehicle through the analog quantity of the sensor, which is not very accurate. The intelligent vehicle instrument designed in this paper is not simply connected to the sensor, but connects the entire vehicle into a network structure through the CAN controller. The vehicle components are equipped with CAN controllers, and the vehicle components are connected through twisted pair cables to form a network system to realize the electrification of the components. At the same time, the electrification of vehicle instruments and automotive components also improves the accuracy and reliability of the vehicle and reduces the occurrence of failures.

  The vehicle-mounted intelligent instrument is mainly divided into two parts: the hardware system based on the S3C2440 processor and the software system under the WinCE environment. The hardware system provides the basis for the entire control system and is responsible for CAN bus communication. The software system provides the hardware driver of the CAN bus and the instrument upper application under WinCE.

  2 Hardware Design

  The hardware system is based on S3C2440, with RAM memory, NOR Flash and NAND Flash as storage media, and some peripheral devices are extended to be responsible for the input and output of system information, such as CAN bus communication unit, LCD display, touch screen, universal serial port, USB device, Ethernet interface, etc. The system hardware structure is shown in Figure 1.

System hardware structure diagram

  Figure 1 System hardware structure diagram

  Among many interfaces, the CAN bus communication unit is a key part in the whole vehicle communication process. In each important part of the car, a corresponding CAN control unit is configured, and each CAN bus control unit is connected by a twisted pair. Each component of the car sends the current status information of the component through the CAN control unit, which is sent to the CAN unit of the intelligent vehicle instrument through the twisted pair, and the data is sent to the system through the CAN interface of the system. After the vehicle instrument system obtains the data, it processes the data to obtain the current status information of the vehicle components.

  The CAN bus interface circuit is shown in Figure 2. Microchip's CAN bus controller MCP2515 is used. MCP2515 fully supports CAN 2.0A/B technical specifications and has a speed of 1 Mbps. The SPI interface standard makes it easier to connect with S3C2440. It can send and receive standard and extended data frames and remote frames. It has 2 acceptance mask registers and 6 acceptance filter registers to filter out unwanted messages, reducing the microprocessor's overhead. The CAN bus transceiver uses TJA1050, which provides the interface between the CAN controller and the physical bus and the differential sending and receiving functions of the CAN bus.

CAN bus interface circuit

  Figure 2 CAN bus interface circuit

  In order to enhance the anti-interference ability of the CAN bus node and improve the stability of the system, an optocoupler isolator 6N137 is added between the CAN controller and the CAN transceiver, instead of connecting the TXCAN and RXCAN terminals directly to the transceiver, so that the electrical isolation between the CAN nodes on the bus is achieved. At the same time, this also solves the problem of level compatibility between MCP2515 and TJA1050, and can also suppress spike pulses and noise interference in the CAN network. The two power supplies used in the optocoupler part of the circuit must be completely isolated, otherwise it will lose its meaning. The isolation of the power supply can be achieved by using a low-power power isolation module or a switching power supply module with multiple 5 V isolated outputs. Although these parts increase the complexity of the interface circuit, they improve the stability and safety of the node.

  At the CAN interface, the two 60 Ω resistors (total 120 Ω) on the CAN communication line play a role in increasing the load and reducing echo reflection, which is a remedial measure for impedance matching. A capacitor is connected between the middle part of the two 60 Ω and the ground terminal to resist interference. [page]

    3 Software Design

  The overall environment of the software is WinCE programming environment. The corresponding WinCE operating system is customized for the vehicle-mounted intelligent instrument hardware system to realize the hardware driver. Then the application program is written to realize the operation of the system hardware through the specific operation of the application program, that is, to realize the function of the system. Among them, the key is to write the driver of the CAN controller. The CAN driver realizes the operation of the application software on the CAN control unit and reads the data code in the CAN control unit.

  3.1 System development and migration

  Embedded system development is the design of the system driver layer, the most important of which is the development and debugging of BSP. Therefore, the development of the underlying driver of the intelligent vehicle instrument is particularly important.

  Since the WinCE operating system is used, the WinCE operating system image is customized using Platform Builder. In Platform Builder, you can add drivers for some system hardware (such as LCD screen, RAM), which have been written by Microsoft. Then start the Bootloader, download the image file to the Flash memory, and configure the operating system startup file boot.ini.

  3.2 CAN bus driver development

  Since CAN is an external device, the CAN driver needs to be written as a stream interface driver. The stream interface driver function is designed to closely match the usual file system API (such as ActivateDevice, ReadFile, WriteFile, and IOControl, etc.), that is, the stream interface driver appears as a system file in the application, and the application completes the operation of the device by operating the special files of the system file. The writing of stream interface files mainly uses stream interface functions, which are the entry points of the stream interface driver, such as XXX_Init, XXX_Read, and XXX_Open. These stream interface files correspond to the corresponding API functions, so that the application can access the external device through the corresponding functions.

  As a stream interface driver, the CAN bus driver also has a set of standard functions to complete I/O operations. These functions are provided to the WinCE operating system kernel, and they are all DLL files of the stream interface driver. When dynamically loading the CAN bus driver, the system must register it. CAN driver registry information:

  WCHAR *szRegKey=L"DriversBuiltInCAN";

  WCHAR * szPrefix=L"CAN";

  WCHAR * szDLL=L"can.dll";

  WCHAR *szFriendlyName=L"CANDriver";

  DWORD * DrvIndex=1;

  DWORD * DrvOrder=0;

  After completing the registration through the above code, call the ActivateDeviceEx() function to load the driver.

  3.3 CAN bus driver communication process

  The CAN bus controller driver is mainly used to set the baud rate of MCP2515, the acceptance filter of MCP2515, the CAN message transmission mode and the CAN data transmission and reception mode. The driver is an intermediate link between the upper application and the hardware. The intelligent vehicle instrument system is developed in the EVC++ environment.

  The stream driver opens the function CreateFile() as a file: After the driver is successfully opened, the CreateFile() function returns a handle that is not INVALID-HANDLE-VALUE, which is also the parameter of the driver closing function CloseHandle(). The CAN setting function DeviceIoControl() receives the handle and control command code obtained by the CreateFile() function, sets the input/output buffer and the size of the buffer. After the function is executed, it returns the actual output buffer size, etc. The CAN bus sending and receiving functions WriteFile() and ReadFile() use the driver file handle, send and receive buffer and other parameters to complete the sending and receiving of data. After the operation is successful, the actual number of bytes sent and received is returned.

  In order to prevent the main thread from being in a state of waiting for data to arrive and to allow the main thread to have a time token to operate other things, the program adopts a multi-threaded design and creates a data receiving thread. The data receiving thread is an infinite loop that continuously queries the CAN bus data exit flag. If the exit flag is valid, the loop ends and exits. The driver process is shown in Figure 3.

CAN bus driver communication process

  Figure 3 CAN bus driver communication process

  Conclusion

  At present, vehicle-mounted instruments based on embedded technology are gradually becoming popular. This article uses the ARM9 microprocessor based on WinCE as the development platform, which has fast processing speed and powerful functions; uses CAN bus technology for mutual transmission of signals, and the CAN bus receives information sent by automobile components in real time, and processes and analyzes it; uses WinCE operating system, which has a friendly interface. This intelligent vehicle-mounted instrument system can save costs, reduce power consumption, and has strong maintainability and is easy to expand and upgrade.

Keywords:WinCE Reference address:Design of Intelligent Vehicle Instrument Based on WinCE

Previous article:Design of Embedded Audio System Based on S3C2410 and UDAl341
Next article:Design and implementation of communication interface between S3C44B0X and multi-channel simulator control board based on ARM 7

Recommended ReadingLatest update time:2024-11-16 21:27

Programming of a single network node in WinCE system
1. Single network node system A node is simply a computer or other device that has the function of sending and receiving data. A good node requires both good hardware support and suitable software control . This paper selects the S3C6410 Arm11 chip as the node CPU and WindowsCE 6.0 as the embedded operating system run
[Power Management]
Programming of a single network node in WinCE system
Porting u-boot-2010.09 to S3C2440 (Part 2) - The difference between LDR and ADR in ARM assembly
I saw the following code when looking at the lowlevel_init.S file of U-BOOT: lowlevel_init: ldr r0, =SMRDATA ldr r1, _TEXT_BASE sub r0, r0, r1 ldr r1, =BWSCON add r2, r0, #13*4 0: ldr r3, , #4 str r3, , #4 cmp r2, r0 bne 0b mov pc, lr This code implements the register initialization of the memory controller part of
[Microcontroller]
Porting the kernel to s3c2440
Try to port the kernel to s3c2440 1. Environment Construction: 1. Download resource pack: linux-3.0.12.tar.gz (https://www.kernel.org/pub/linux/kernel/v3.0/) ARM-Linux GCC 4.4.3(http://arm9download.cncncn.com/mini2440/linux/arm-linux-gcc-4.4.3-20100728.tar.gz) 2. Unzip the kernel: 1.tar -xzvf  linux-3.0.12
[Microcontroller]
Network video collection system based on S3C2440 and USB camera
  According to the needs of network video collection, this paper combines network transmission with video collection, and designs a USB camera video collection with S3C2440 as the core and a video server under the embedded Linux system, thereby realizing remote network video information collection.   1 Overall syste
[Microcontroller]
Network video collection system based on S3C2440 and USB camera
VGA Display Technology Based on ARM Processor S3C2440
At present, many SOC manufacturers' microprocessor chips have integrated LCD controllers, such as Samsung's S3C2410 and S3C2440, Intel's Xscale series, etc. Most embedded systems also use popular LCD display technology. However, in places where large-screen display is required and resolution is not required, such as
[Power Management]
VGA Display Technology Based on ARM Processor S3C2440
Analysis of the Linux boot process of S3C2440 (I)——SC2440 processor structure
1.1.S3C2440 processor structure The structure of S3C2440 processor is shown in the figure below. Its core unit is ARM9TDMI processor core, which mainly includes 16K instruction cache and 16K data cache, as well as separate instruction and data MMU units. CP15 is a co-processor. It is connected to external devices thro
[Microcontroller]
Analysis of the Linux boot process of S3C2440 (I)——SC2440 processor structure
ARM Video Monitoring System Based on WinCE
Digital video surveillance system is centered on computer or embedded system and based on video processing technology. It is in line with the international standard of image data compression. It is a new type of monitoring system that comprehensively utilizes technologies such as image sensors, computer networks, autom
[Microcontroller]
ARM Video Monitoring System Based on WinCE
JZ2440 Development Board Introduction (S3C2440)
1. Physical picture of the development board 2. Hardware on the development board 3. When using the development board, the JTAG interface, USB and USB-COM1 interface, NAND and NOR mode selection switch, and power switch are generally used. JTAG interface: used for J-LINK connection. ETH: Ethernet port;
[Microcontroller]
JZ2440 Development Board Introduction (S3C2440)
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号