Design of wireless USB interface transceiver based on PDIUSBD12

Publisher:camuspycLatest update time:2012-03-13 Source: 现代电子技术 Keywords:USB  PDIUSBD12  89C52 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1 Introduction
Universal Serial Bus ( USB ) provides a new way for personal computer peripheral input and output. of Interface standard. It enables the equipment to have fast, hot-swappable, plug-and-play, and automatic configuration capabilities, and standardizes the equipment At the same time, the USB cascade star topology not only allows up to 127 external devices to be connected , but also solves resource conflicts. ,middle The traditional transceiver generally communicates with the PC via RS232 interface . If the USB interface is used instead , the wireless / wired transceiver will have many advantages of USB communication.
PDIUSBD12 is a USB device that fully complies with the USB11 specification and is optimized for performance . It is usually used in microcontroller-based Tie The device uses a module to communicate with the microcontroller through a high-speed universal parallel interface and also supports local DMA transfer. change This allows the selection of the most suitable microcontroller as the system microcontroller from among the many available microcontrollers . Allows use of existing architecture and minimizes firmware investment. This flexibility reduces development time, risk, and cost , is the fastest way to develop low-cost and efficient USB peripheral device solutions.
According to the actual situation on site, select TDX230RTMD radio and matching antenna, which can provide voice or data signals Transparent transmission, can adapt to various point-to-point and point-to-multipoint wireless data communication methods, with integrated transceiver and easy installation , simple to use, cost-effective, stable and reliable, and is widely used in remote data collection and control systems.
Combining the advantages of the above two technologies, a wireless USB interface transceiver is designed to transmit data over long distances without Line transmission.

2 Hardware Circuit Design
The overall block diagram of the hardware circuit of the wireless USB interface transceiver designed in this paper is shown in Figure 1 .
Philips ' PDIUSBD12 chip complies with USB1.1 specification and adopts 28- pin SO or TSSOP package. It can work at 3.3 ± 0.3V or 3.6 ~ 5.5V , and has internal integrated SIE and 320B FIFO buffer . , transceiver, voltage adjustment circuit and termination resistor, providing a 2 MB/s parallel interface with fully autonomous local DM A achievement The chip also provides a programmable clock, Power-on reset and low voltage reset circuits. The chip provides double input and output buffers, reaching 1 MB/s in batch mode Data transfer rate, synchronous mode can also reach 1 MB/s data transfer rate.
The microcontroller MCU uses Atmel 's 89C52 . The MCU 's serial port is directly connected to the modular wireless data transmission and receiving modules RXD and TXD PDIUSBD12 is connected to the data bus of the MCU , and the interrupt pin INTN is connected to the interrupt input of the MCU . . 2 It will automatically process the data on the USB bus, write the event into its own interrupt register, and pull down INTN to notify M CU The MCU responds to the interrupt and reads the contents of the interrupt register for judgment and processing. If data is required to be sent, the data The data is sent to the modular wireless data transmission transceiver module through the serial port, and then transmitted. After receiving the data, the serial port interrupt is triggered, and the MCU responds to the interrupt and sends the data to the USB bus. , the whole system uses self-powered mode.


Figure 2 shows the interconnection diagram of an 89C52 microcontroller and a PDIUSBD12 integrated circuit . use A widely used single-chip microcontroller, software developers develop a large number of software development platforms based on it. Most electronic engineers are familiar with it. Therefore, users can use the familiar microprocessor (89C52) for core The core program is designed to use 89C52 to realize the required functions, specifically converting data signals into signals that comply with USB rules. , it is completely completed by PDIUSBD12 . In this way, we can use the rich software resources in 89C52 and USB The plug-and-play and hot-swap features of bus technology reduce the cost of developing equipment and shorten the development cycle. [page]

3. Software design
The software design mainly includes two parts: one is the MCU software on the USB device side, which mainly completes USB protocol processing and data exchange. The second is the upper management program, which is composed of the USB communication program and the user service program . The device communicates with the system through the USB communication program, and the system completes the USB protocol processing and data transmission.
3.1 MCU software design
The microcontroller control program consists of three parts: initializing the microcontroller and all peripheral circuits (including PDIUSBD12 ); Follow The tasks of the loop part are interruptible; the tasks of the read and write interrupt service routine are time-sensitive and must be executed immediately.
The communication between the MCU and PDIUSBD12 is mainly realized by the MCU sending commands and data to PDIUSBD12 . life The command words can be divided into three types: initialization command words, data flow command words and general command words. PDIUSBD12 provides various command words . The microcontroller first sends a command to the command address of PDIUSBD12 , and then sends and Therefore, you can write functions with different functions, use functions to implement various commands, and then directly call the functions. Just count.
Background D12 interrupt service program and modular wireless data transmission and reception module interrupt service program and foreground main loop program Between Data exchange is achieved through event flags and data buffers. The background interrupt service routine is triggered by an interrupt. Flags Communicate with the main module. The main module cyclically scans each flag bit and processes the corresponding flag bit. For example, the module Wireless Digital After the transceiver module receives valid data, it sends it to the serial port to trigger the serial port interrupt, and enters the modular wireless data transmission transceiver module interrupt The service program receives the data and puts it into the data buffer, then sets the UART_DATA flag and exits. When the main module finds that UART_DATA is set, it calls the writendpoint () program to send the data to the PC .
According to the USB protocol, any transfer is initiated by the host, so the 89C52 does its foreground work and waits for interrupts. First, a token packet must be sent to PDIUSBD12 . After receiving the token packet , D12 sends an interrupt to 89C52 . Enter the interrupt service routine, first read the interrupt register of D12 , determine the type of USB token packet, and then perform the corresponding operation Therefore, the 89C52 program of USB is mainly the writing of interrupt service program. In the 89C52 program of USB, various interrupt service programs must be completed. The response of the token packet, among which the more difficult to process is the Setup packet, which is mainly the programming of terminal 0. MCU software flow chart As shown in Figure 3 .

3.2 Host software design
The host computer program mainly calls four API functions . According to the host computer 's use of the USB port, use Delphi to call these four This function can realize the host computer's operation on the USB port.
Philips provides users with the driver for D12 , but users need to modify the inf file according to their own requirements. Then recompile and link in Windows DDK to generate a new driver to meet the needs of actual applications.
When writing a host application, pay attention to the operation of the host terminal and increase the data cache in the program. Philips The provided driver supports 64 B~64 kB of cache, which can effectively reduce the handshake time between the device and the host and provide High transmission speed. When compiling the program, you need to pay attention to maintaining the compiled path.

4 Conclusion
This paper combines the advantages of USB interface and wireless communication technology and applies them to multi-point temperature measurement control system to provide a reference for PC and smart It provides a fast and convenient way to exchange data between instruments.
Directly expand the USB interface technology of the single-chip microprocessor With the continuous development of USB technology, USB will be widely used like serial port.

References

1 ] He Limin. Design of MCS51 series single chip microcomputer application system[ M ]. Beijing: Beijing Institute of Aeronautics and Astronautics Publishing House, 1999 .
[ 2 ] PDIUSBD12 Technical Document. Guangzhou Zhouligong Single Chip Microcomputer Development Co., Ltd.
[
3 ] Zhang Hong. USB Interface Design [ M ]. Xi'an: Xi'an University of Electronic Science and Technology Press, 2002.
[ 4 ] Xu Yonghe. USB Peripheral Device Design and Application [ M ]. Beijing: China Electric Power Press, 200 02 .
[ 5 ] Shen Hongwei. Single chip microcomputer application system design example and analysis [ M ]. Beijing: Beijing Institute of Aeronautics and Astronautics Tianjin University Press, 2003
6 Philips Corp PDIUSB12 Users Manual 2001
7 Jan Axelson . Universal Serial Bus Complete M ]. Beijing: China Electric Power Press, 2002.

Keywords:USB  PDIUSBD12  89C52 Reference address:Design of wireless USB interface transceiver based on PDIUSBD12

Previous article:Electronic calendar design suitable for school use
Next article:Improved design of DDJ-Ⅱ multi-function single chip computer timer

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

Intel and Apple to adopt new USB 3.0 alternative
Intel and Apple's many partners recently said that the two companies will introduce the input/output technology previously known as Light Peak and name it Thunderbolt, which will provide a high-end, high-performance alternative to the USB 3.0 standard. According to the well-known technology blog igitimes, Intel bega
[Mobile phone portable]
Design of intelligent locomotive temperature measurement system using CH375 USB interface chip
introduction This article comes from a locomotive intelligent temperature measurement project (the functional module is shown in Figure 1). In trains or other important electrical occasions, the temperature changes of important components are safety parameters that require great attention, and an intelligent temperatu
[Microcontroller]
Design of intelligent locomotive temperature measurement system using CH375 USB interface chip
stm32usb library bug and solution
When I was developing the stm32usb device for my project, I found that the usb sending would often block the main function, or the program could not run smoothly, and the real-time performance was greatly reduced. It was normal for it to be stuck for tens of milliseconds. I don't understand why st would write such a u
[Microcontroller]
stm32usb library bug and solution
Design of USB-CAN Converter Based on ARM7 Processor LPC2119
Introduction The controller area network (CAN) is a multi-host local network launched by the German BOSCH company in the 1980s for modern automotive applications. Due to the advantages of high reliability, complete functions, reasonable cost, and real-time performance, the CAN bus is no longer limited to the
[Microcontroller]
Design of USB-CAN Converter Based on ARM7 Processor LPC2119
Design of USB interface based on DSP platform
introduction The USB interface (Universal Serial Bus) is a universal high-speed serial interface. Its main feature is its high-speed transmission characteristics. The theoretical speed limit of USB1.1 can reach 12Mb/s, and USB2.0 can reach 480Mb/s. In this way, it can well solve the problem of transferring
[Embedded]
Circuit design of car USB charger with line compensation function
  With the popularity of smartphones and tablets and the high power consumption that comes with them, the batteries of such devices can only last for one day of use. More and more occasions and devices are equipped with one or more USB charging ports, and car USB chargers are an important part of them. Due to the larg
[Power Management]
Circuit design of car USB charger with line compensation function
Qorvo® Provides USB Fast Charger PMIC for Mobile Devices in Vehicles
Qorvo® (Nasdaq: QRVO), a leading provider of RF solutions that connect the world, today introduced the ACT4751M, a power management integrated circuit (PMIC) that further expands the company's portfolio of in-vehicle charging solutions for fast charging of mobile phones, tablets and laptops. The Qorvo ACT4751M is the
[Embedded]
Qorvo® Provides USB Fast Charger PMIC for Mobile Devices in Vehicles
Colorful LED Fantasy DIY for Enthusiasts: Zero Programming, USB Powered LED Matrix
This is a detailed step-by-step tutorial that teaches you how to make a zero-programming, USB-powered LED matrix. The DIY uses colorful LEDs that automatically change colors without an external signal (the timing circuit inside these LEDs is relatively simple and imprecise, so they can produce a random pattern effect)
[Power Management]
Colorful LED Fantasy DIY for Enthusiasts: Zero Programming, USB Powered LED Matrix
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号