如何使用MAXQ串行驱动程序开发应用-How to Use
[09-13 17:04:22] 来源:http://www.88dzw.com 控制技术 阅读:8871次
文章摘要:Click on the RTS text in the BlackBox GUI. This event signals the EV kit to stop transmitting the characters. Notice that the printing in the BlackBox stops. Click again on the RTS text to enable the MAXQ to send characters, and see that the test string continues to update.Signaling the PC to Stop S
如何使用MAXQ串行驱动程序开发应用-How to Use,标签:计算机控制技术,工厂电气控制技术,http://www.88dzw.comClick on the RTS text in the BlackBox GUI. This event signals the EV kit to stop transmitting the characters. Notice that the printing in the BlackBox stops. Click again on the RTS text to enable the MAXQ to send characters, and see that the test string continues to update.
Signaling the PC to Stop Sending the Characters
Press the SW4 switch on the MAXQ EV kit. This signals the PC (BlackBox application) to stop sending the characters. The CTS text on the GUI should turn from green to black. Enter some characters in the BlackBox application and see that the characters are not echoed back. Press the SW4 switch again which turns the CTS signal back to green. The characters that were typed before should echo back.
Figure 2. The BlackBox sample application to run on your PC.
Application Overview
The file sample_serial.c contains the application's main routine and interrupt service routines (ISR) for servicing the serial interrupts and external interrupts. The firmware does the following:- serial_init() initializes the serial driver.
- serial_setparameters() configures the serial driver for 115200/8/1/N. You can configure these parameters according to your application needs.
- Configures the external interrupts 10 (Int10 is connected to RTS line) and 11 (SW6 #3 is ON).
- Enables the interrupts for module 1 (external interrupts) and module 2 (UART).
- Enables global interrupts.
- Reads and writes from/to the serial port in a loop through serial_read() and serial_write().
- The interrupt service routine handles RTS/CTS control flow. (Pressing the SW4 button asserts or deasserts the RTS line from the EV kit; the RTS line from the PC stops/restarts the serial transmission.)
Limitations and Development Issues
- The MAXQ serial driver does not support flow control (software/hardware). It is the responsibility of the application to implement the flow control. The sample application provided in this application note describes the hardware (RTS/CTS) flow control.
- The MAXQ serial driver provided is compiled for MAXQ2000 and 16MHz crystal configurations. Changing the crystal frequency will alter the driver's baud rate computation.
- The MAXQ serial-driver internal transmit-and-receive buffers' sizes are fixed at compile time as 256 bytes.
Conclusion
The MAXQ compiler provided by IAR and Rowley Associates and the libraries provided by Maxim allow applications written in C to access the power and functionality of MAXQ devices. The MAXQ serial will enable users to deploy applications that use the MAXQ UART.IAR Embedded Workbench is a registered trademark of IAR Systems AB.
Java is a trademark of Sun Microsystems, Inc.
MAXQ is a registered trademark of Maxim Integrated Products, Inc.
<-- END: DB HTML -->
Tag:控制技术,计算机控制技术,工厂电气控制技术,控制技术
《如何使用MAXQ串行驱动程序开发应用-How to Use》相关文章
- › 如何使用MAXQ串行驱动程序开发应用-How to Use
- › 网站是如何使用Cookie的?
- › 如何使用BitTorrent下载文件
- › 如何使用增量编码器
- › 如何使用eclipse进行嵌入式Linux的开发
- 在百度中搜索相关文章:如何使用MAXQ串行驱动程序开发应用-How to Use
- 在谷歌中搜索相关文章:如何使用MAXQ串行驱动程序开发应用-How to Use
- 在soso中搜索相关文章:如何使用MAXQ串行驱动程序开发应用-How to Use
- 在搜狗中搜索相关文章:如何使用MAXQ串行驱动程序开发应用-How to Use
分类导航
最新更新