Summary use AT89LV52 microcontroller made controller, based on the company's RF chip RFWaves RFWl22-M short-range wireless data communication system; analysis of RF chip RFWl22-M and MCU interface chip RFW-D100; gives the system hardware principle diagram of Xiamen software flowchart.
Corresponds to the device for wireless data transfer protocol analysis and CSMA for firmware programming configuration be achieved,Keywords for wireless data communication system RFWl22-M RFW-D100 AT89LV52 CSMA Protocol
Currently, short-range radio frequency communication technology is a hot technology, has been widely used in practice.
Mainly in wireless local area network (WLAN), personal area network (PAN) and wireless distance consumer products (such as application and low speed data transmission, is within a valid range in the 30m). The communication technology standards Ⅲ E E 802.11 a, Hiperlan2, Bluetooth (TEEE802.15, 1), HomeRF and IEEE802.11b (WI-FI), etc. Support for these standards devices generally have relatively high power consumption, the structure is complex, expensive, and therefore not suitable for low-end products. RFWaves company launch for existing market development for low-end for short-range wireless communication of RF communication, in line with the chipset RFWl22-M United States Federal Communications Commission (FCC) specification.This system uses radio frequency chip RFWl22-M and MCU interface chip RFW-D100, under the control of single-chip AT89LV52 for short-distance wireless data communication.
1 RF chip RFW-D100 RFWl22-M and interface chip
RFWl22-M Wireless Transceiver IC is a half-duplex, using direct sequence spread spectrum (DSSS) technology for Wireless Transceiver-IC, work center frequency 2.44 GHz (ISM band), using ASK modulation, the working voltage of 2.4 ~ 3 .6V.
In the idle state, little power consumption (O £ ® 1 μ A @ VCC = 3V). RFW122-M can add a 200 Ω differential impedance off line (printed edition antenna) or with a matching circuit for other antennas, in BER as lO-3, receiver sensitivity of-77dBm. The module has 3 root data control line, and its data I/O port is a serial digital interface. It's wake-up time is 20 μ s, synchronization time is 1.2 μ s. Maximum data transfer rate of 1 Mbps, at which time the working current of 33mA.In order to reduce the MCU real-time processing requirements of Mac protocols, RFWl22-M chipset provides RFWl22-M and MCU interface chip RFW-D100 between.
The chip in the MCU and RFWl22-M provides a parallel interface between; while providing support for CSMA Protocol. RFW-D100 uses two technologies to gain a better carrier sense ability of: RSSI (RF signal strength detection), can detect any strength of wireless transmission, avoid conflict; another is to use RF-Wayes network carrier sense algorithm. This technology can avoid this network or other network RFWaves site conflict.(1) RSSI (RF signal strength detection)
RSSI mechanism used to compare a non-transmission of power RFWaves site exceeds a certain threshold (by using an external resistor to set this value, the RFW-D100 gives the threshold of the reference voltage and formula), comparison of results on the registers SSR [7]-COMP_IN.
When there is data transmission within the MCU, went to read the registers, the status of the according to the Register determines the channel is in use by the State to determine whether data is being transmitted.(2) internal/external RFWayes network carrier sniffing algorithm
It is mainly used to monitor similar RFWaves network.
RFWD100 use carrier sense algorithm whether external monitor foot similar RFWaves network is transmitting data. If external RFWaves network is the data transmitted, the internal flag bit is 1, indicating that the channel is in use by the State; if the channel is in use by the State to idle state, will produce an interrupt to tell the MCU, MCU for data transmission.2 hardware design
System of microprocessor Atmel company AT89LV52 used.
It is based on 51 series low-power microprocessors that support compilation and C language, development environment using Keil company Keil C51 (51 microcontroller assembler and c-language development tools); support for compilation, the c language and mixed language programming with powerful software simulation and hardware emulation. The system contains two MCU and RFWl22-M and RFW-D100 connection relationship as shown in Figure 2.
3 communication protocol and software process
System used by the data-link layer protocol is carrier sense multiple access protocols (CSMA).
LAN generally use a common medium for this when multiple sites to access the media, will control. CSMA is commonly used. When the network platform to send data to detect whether another platform takes the transmission media. By: first carrier sense, if you find that media (media) is idle, the send data immediately; otherwise, according to the different policies Backoff resend.Since this system work in 2.44GHz ISM band, the band exists greater interference,
So when designing packet structure, the most important principle is that as far as possible short time consuming channel. to reduce the probability of a potential conflict. In the transmission, the packet is the probability that overlap with each send node uses shared channel proportional to the amount of time. Therefore, if the FLVs transmission packets, improves data half-duplex communication terminal, from the top of the data from the serial port to MCU, MCU and then the data to be sent to RFW-D100. After the data packaged RFW-D100 sent to modulate RFWl22-M, then sent via antenna. System block diagram shown in Figure 1.The probability of being properly received.
RFW-DlOO highest air data transmission speed of 1Mbps, it can be configured to a variety of transfer rate. In the data sheet RFW-D100, lower the data rate is not reduced error rate, therefore in order to shorten the packet transmission time in the air, reducing the probability of collision data, recommendations in agreement with the highest rate of data transmission. If the data is divided into small packages, each packet is properly received and will increase the probability of. Then, when the interference occurs, only a small part of the agreement will be lost, and have the ability to locate the specific package corrupted data. It can therefore be concluded that the high data rate transmission short packets will enhance the protocol handling corrupted data.3.1 packet format
A packet format as shown in Figure 3.
① P R E A M B L E: RFW-D100 send PREAMBLE of the receiver and transmitter in sync.
20 bits long, high 4 bits are 1111, other 16-bit can be configured. Send order from highest to lowest.② N E F I T _ R S T: 1 byte, the network address of the byte.
③ N E S E C T _: 1 byte, the network address of the byte.
④ I D S T _ D: 1 byte, the packet is sent to the address of the destination node.
⑤ S R C _ I D: 1 byte, the packet's source address.
⑥ S E Q U E N C E: l bytes.
This segment consists of two values: high 4-bit indicates that the data sequence number, the lower 4 bits packet type. Low 4 bits means: 0000b is handshake packet, a handshake response package 0001b, 0010b 0011h for packets to the response packet, the packet 0100b to remove chain package, remove chain OlOlb to respond to a package.⑦ S I Z E: l bytes.
This section describes the size of the package. When setting the packet size to a fixed SIZE does not make sense.⑧ P A Y L O A D: 1 byte.
From the upper layer of the software.⑨ C R C: 1 byte.
RFW-D100 on the sending end to each package adds CRC information, allows the receiver to receive data for testing.In this system of agreements in the design process, using small packet transport mode, from the serial number in the received data (in bytes) is equal to 10, will these data package sent.
If you receive data count is less than 10, and serial data send has ended, the system will also be the data packaged and sent.3.2 system state transition diagram
The system of State transition as shown in Figure 4, contains four States, namely the idle state, handshake State, transmit and receive State.
Idle state: If no serial port handshake interrupt or external signal, the system has been idle.
Handshake State: If serial port interrupt occurs, which indicates the packets need to transfer the upper, the system into the hands of the State.
Transfer-State: System the data received from the serial port via wireless channel sent.
Receiving State: System for processing the received packets sent to the serial port and packet from the serial port arrival do drop.
3.3 4 State processes
System 4 State of the process shown in Figure 5 ~ shown in Figure 8.
System receive serial data in the buffer pool size to 15 bytes.
Figure 6 the significance of the various flags are as follows:
New_flag serial data comes in a new (serial data coming in, will be reset in 1 New_flag serial [1] [2]
No comments:
Post a Comment