參數(shù)資料
型號: MAX3110E-MAX3111E
廠商: Maxim Integrated Products, Inc.
元件分類: RS-232
英文描述: 5V High-Speed RS-232 Transceivers with 0.1uF Capacitors
中文描述: 5V的高速RS - 232收發(fā)器與0.1uF電容
文件頁數(shù): 28/32頁
文件大?。?/td> 413K
代理商: MAX3110E-MAX3111E
M
SPI/MICROWIRE-Compatible UART and ±15kV ESD-
Protected RS-232 Transceivers with Internal Capacitors
28
______________________________________________________________________________________
This is a C-language outline of an interrupt-driven software driver that interfaces
to a MAX3110E/MAX3111E, providing an intermediate layer between the bit-manipulation
subroutine and the familiar PutChar / GetChar subroutines.
User must supply code for managing the transmit and receive queues, as well as the
low-level hardware interface itself. The interrupt control hardware must be
initialized before this driver is called.
char is an 8 bit character. int is a 16 bit unsigned integer.
& is the bitwise Boolean AND operator. | is the bitwise Boolean OR operator.
/* High level interface routine to put a character to the MAX3110E/MAX3111E. */
PutChar ( char c )
{
EnQueue ( txqueue, c );
/* enable the transmit-buffer-empty interrupt */
config = config | 0x0800; /* set the TM bit */
config = config | 0xC000; /* set bits 15 and 14 */
MAX3110E/MAX3111E ( config );
}
/* High level interface routine to get a character from the MAX3110E/MAX3111E.
** Wait for a character to be received, if necessary.
*/
char GetChar ( )
{
while ( IsQueueEmpty ( rxqueue ) )
/* wait for data to be received */ ;
return DeQueue ( rxqueue );
}
/* Configure the MAX3110E/MAX3111E with the specified baud rate. */
ConfigureMAX3110E/MAX3111E ( int baud_rate_index )
{
baud_rate_index = baud_rate_index & 0x000F; /* restrict to a 4 bit field */
config = 0xC400 + baud_rate_index; /* enable received data interrupt */
MAX3110E/MAX3111E ( config );
}
/* private variable that stores the configuration settings for the MAX3110E/MAX3111E
*/
int config;
/* Low level communication routine between the computer and the MAX3110E/MAX3111E.
** This is a PRIVATE routine to be used only within the driver software.
*/
int MAX3110E/MAX3111E ( int mosi )
{
int miso;
/* this is interface-specific.
** Transmit 16 bits of master-out, slave-in data, MSB first,
** while simultaneously receiving 16 bits of master-in, slave-out data.
** If and SPI hardware interface is available, use (CPOL=0,CPHA=0) mode.
** Lacking specialized hardware, just set and clear I/O bits to generate
** the waveform in figures 2 and 3 in the MAX3110E/MAX311E data sheet.
*/
return miso; /* return 16 bits of master-in, slave-out data, MSB first */
}
Listing 1. Outline for a MAX3110E/MAX3111E Software Driver
相關PDF資料
PDF描述
MAX3110E 5V High-Speed RS-232 Transceivers with 0.1uF Capacitors
MAX3111E 5V High-Speed RS-232 Transceivers with 0.1uF Capacitors
MAX3111ECNI 5V High-Speed RS-232 Transceivers with 0.1uF Capacitors
MAX3111ECWI 5V High-Speed RS-232 Transceivers with 0.1uF Capacitors
MAX3110EEWI 5V High-Speed RS-232 Transceivers with 0.1uF Capacitors
相關代理商/技術參數(shù)
參數(shù)描述
MAX3111ECNI 功能描述:UART 接口集成電路 RoHS:否 制造商:Texas Instruments 通道數(shù)量:2 數(shù)據(jù)速率:3 Mbps 電源電壓-最大:3.6 V 電源電壓-最小:2.7 V 電源電流:20 mA 最大工作溫度:+ 85 C 最小工作溫度:- 40 C 封裝 / 箱體:LQFP-48 封裝:Reel
MAX3111ECNI+G36 功能描述:UART 接口集成電路 5V SPI/uWire Compatible RoHS:否 制造商:Texas Instruments 通道數(shù)量:2 數(shù)據(jù)速率:3 Mbps 電源電壓-最大:3.6 V 電源電壓-最小:2.7 V 電源電流:20 mA 最大工作溫度:+ 85 C 最小工作溫度:- 40 C 封裝 / 箱體:LQFP-48 封裝:Reel
MAX3111ECW1+G36 制造商:IC'S/TRANSISTORS/DIO 功能描述: 制造商:IC'S/TRANSISTORS/DIODES 功能描述:
MAX3111ECWI 功能描述:UART 接口集成電路 RoHS:否 制造商:Texas Instruments 通道數(shù)量:2 數(shù)據(jù)速率:3 Mbps 電源電壓-最大:3.6 V 電源電壓-最小:2.7 V 電源電流:20 mA 最大工作溫度:+ 85 C 最小工作溫度:- 40 C 封裝 / 箱體:LQFP-48 封裝:Reel
MAX3111ECWI+ 制造商:Maxim Integrated Products 功能描述:LINE TRNSCVR 2TR 2TX 2RX 28SOIC W - Rail/Tube