ARM (Advanced RISC Machines) is a reduced instruction set computer that integrates typical RISC structural features. In addition, the ARM architecture also has features such as addressing modes with automatic increase and decrease of addresses, multi-register load and store instructions, etc.
Since its initial development, ARM has gone through 5 major ARM instruction set architectures, represented by version numbers V1~V5. Common ARM7, ARM9, ARM10, and SecurCore series chips are all architectures above ARM V4. The ARM7TDMI series chips are currently the most widely used ARM chips. They are widely used in multimedia and embedded devices, including Internet devices, network and modem equipment, as well as wireless devices such as mobile phones and PDAs.
PLC2214 is a cost-effective ARM7TDMI (-S) chip produced by Philips, mainly used in Internet gateways, serial protocol conversion, access control and other fields.
1 System structure and hardware composition of home smart terminals
1.1 System structure of home smart terminals
Home smart terminals are the core equipment of home intelligence and the transfer station between the home internal network and the external network. It realizes various functions through various protocol conversion modules and networking methods. The home intelligent terminal proposed in this paper mainly has the following functions: security protection, linkage control, remote control and monitoring, information collection, and home information management. The external network uses the local area network to transmit information with remote terminals (user terminals, community management terminals, charging terminals, etc.). In addition, considering the instability of the Internet, the system also reserves a PSTN interface to increase system redundancy. RS-485 bus and Bluetooth technology are used to realize the internal network of the home, combining wireless and wired to meet the needs of more devices. The network system of the home intelligent terminal is shown in Figure 1.
1.2 Hardware Implementation of Home Smart Terminal
This paper uses LPC2214-S as the central control chip. LPC2214-S is a microcontroller based on a 16/32-bit ARM7TDMI-S CPU with real-time simulation and tracing, and has 256KB of high-speed on-chip Flash memory. The on-chip 128-bit wide memory interface and accelerator structure can achieve an operating frequency of up to 60MHz. LPC2214 also integrates 16KB of SRAM on the chip and provides rich interface resources, including 2 16C550 industrial standard UART asynchronous serial ports, 1 high-speed I
2
C interface (400Kbps), 2 SPI interfaces and 112 GPIO ports. Its on-chip Boot loader can realize in-system programming (ISP) and in-application programming (IAP). In addition, the chip provides two low-power modes: idle and power-down.
It can be seen that LPC2214-S has the characteristics of high performance, low power consumption and rich interface resources. These characteristics can better meet the design needs of network-based home smart terminals.
As the control center of home automation, the home intelligent terminal has not only LAN interface, PSTN interface, RS-485 interface, and Bluetooth interface, but also provides audio and video interface, HUB interface, RS-232 interface, alarm sensor interface, etc. These interfaces can realize functions such as automatic switching of audio and video, simultaneous Internet access of multiple PCs, and combining with PC to complete family affairs management. Figure 2 is a hardware implementation diagram of the main control module of the home intelligent terminal.
1.3 Working Principle of Home Smart Terminal
Using a remote control device based on Bluetooth technology or a wired keyboard based on RS-485 bus, you can set various parameters of the home smart terminal, turn on or off the 485 bus or electrical equipment with Bluetooth module, set the alarm mode of the alarm module, and disarm and arm. In addition, there is an emergency help button on the remote control device and keyboard, which can send an alarm signal to the remote management center via telephone and network. The home smart terminal also has a linkage control module. When a device on the 485 bus or Bluetooth network takes a certain action, it can trigger other devices to make a set state change, thereby achieving the effect of convenience for users and saving energy. The above is an introduction to the working principle of local operation. Regarding remote control and remote monitoring, this article provides two methods: based on the telephone network and based on the Internet. Since there have been a lot of introductions to remote control and remote monitoring based on the telephone network, this article mainly introduces remote control and monitoring based on the Internet. [page][page]
{
OS_TCB *ptcb;
switch(SWI_Num)
{
case 0x02:/*Disable interrupt function OS_ENTER_CRIIICAL()*/
__asm
{
MRS R0,SPSR
ORR R0,R0,#NoInt
MSR SPSR_c,R0
}
OsEnterSum++;
break;
case 0x03:/*Enable interrupt function OS_EXIT_CRIIICAL()*/
if (--OsEnterSum == 0)
{
__asm
{
MRS R0,SPSR
BIC R0,R0,#NoInt
MSR SPSR_c,R0
}
}
break;
…
}
In addition, this file also includes the function void OSStartHighRdy(void) that calls the highest priority task before the system starts when running multiple tasks, as well as several Hook functions for users to write.
OS_CPU_A.ASM includes four simple assembly language functions: calling the highest priority task function before startup, OSStartHighRdy(), OSCtxSw() and OSIntCtxSw(), and OSTickISR(). The task switching function uses the stack to save the useful state of the switched task before the task switching. LPC2214 has 17 registers, but not all registers need to be put into the stack. In order to save stack space and reduce the time overhead during switching, a stack structure for task switching is established, as shown in Figure 4.
2.3 Remote monitoring and remote control
The software design of remote monitoring and remote control adopts the client-server mode. The transport layer of the TCP/IP protocol has two data transmission protocols: the Transmission Control Protocol TCP and the User Datagram Transport Protocol UDP, each with its own characteristics. The UDP protocol is a protocol that provides the least service and cost. It does not transmit data based on a connection, so the data transmitted by UDP is unreliable. The TCP protocol is a reliable data transmission protocol for bidirectional transmission based on a connection, but the cost of using the TCP protocol is relatively high. In the design of the intelligent terminal, the convenience and reliability of data transmission are fully considered, and in view of the fact that the ARM system can provide sufficient resources, different transport layer protocols are adopted according to different data requirements. In the software design, the Socket API function is used to write UDP and TCP communication tasks. When TCP and UDP communicate, the application process of the Socket API is shown in Figure 5.
The home smart terminal is a platform for information exchange and home appliance control inside and outside the home. This paper uses Philipes' ARM7 chip LPC2214 to design hardware and software, overcoming the limitations of slow processing speed, insufficient interface resources and storage resources of 8-bit microcontrollers. RS-485 and Bluetooth networks are used as the internal network of the home, and the local area network and telephone network are used as the external network to ensure the stability and reliability of large data transmission, and take into account the traditional telephone network remote control method. Practice shows that the system has good real-time performance and stability, and has great development potential in the field of high-end home smart terminals.
Previous article:Design of autonomous mobile robot based on LPC2119
Next article:Application of SPI bus technology based on LPC2103
Recommended ReadingLatest update time:2024-11-16 22:36
- Popular Resources
- Popular amplifiers
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
- Four-axis special PID parameter tuning method and principle
- [Hua Diao Experience] 10-line empty board hardware control pinpong library series test (Part 3)
- Electromagnetic Interference (EMI) and Electromagnetic Compatibility (EMC)
- How to deal with unused pins of STM32L151 low power consumption
- What is the principle of this temperature measuring water cup? Doesn't it need to replace the battery?
- Creative Cube
- 10 ways to dissipate heat from PCB!!!
- LOTO Lesson 3: Frequency Response Curve Plotting --- 3 groups of RC low-pass filter tests with different parameters
- [Shanghai Hangxin ACM32F070 development board + touch function evaluation board evaluation] Transplant RT-Thread Nano
- Since it is so similar to inductors, why can you only use ferrite beads in your circuit?