MAX3110E Maxim, MAX3110E Datasheet - Page 28
![no-image](/images/no-image-200.jpg)
MAX3110E
Manufacturer Part Number
MAX3110E
Description
SPI/MICROWIRE-Compatible UART and 15kV ESDProtected RS-232 Transceivers with Internal Capacitors
Manufacturer
Maxim
Datasheet
1.MAX3110E.pdf
(32 pages)
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
Part Number:
MAX3110ECNI
Manufacturer:
MAXIM/美信
Quantity:
20 000
Company:
Part Number:
MAX3110ECNI+G36
Manufacturer:
Maxim
Quantity:
774
Part Number:
MAX3110ECWI
Manufacturer:
MAXIM/美信
Quantity:
20 000
Company:
Part Number:
MAX3110ECWI+G36
Manufacturer:
Maxim
Quantity:
1 096
Company:
Part Number:
MAX3110EENI+G36
Manufacturer:
Maxim Integrated Products
Quantity:
135
Part Number:
MAX3110EEWI
Manufacturer:
MAXIM/美信
Quantity:
20 000
Company:
Part Number:
MAX3110EEWI+G36
Manufacturer:
Maxim
Quantity:
219
Part Number:
MAX3110EWI
Manufacturer:
MAXIM/美信
Quantity:
20 000
SPI/MICROWIRE-Compatible UART and ±15kV ESD-
Protected RS-232 Transceivers with Internal Capacitors
Listing 1. Outline for a MAX3110E/MAX3111E Software Driver
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.
initialized before this driver is called.
char is an 8 bit character.
& is the bitwise Boolean AND operator.
/* High level interface routine to put a character to the MAX3110E/MAX3111E. */
PutChar ( char c )
{
}
/* High level interface routine to get a character from the MAX3110E/MAX3111E.
** Wait for a character to be received, if necessary.
*/
char GetChar ( )
{
}
/* Configure the MAX3110E/MAX3111E with the specified baud rate.
ConfigureMAX3110E/MAX3111E ( int baud_rate_index )
{
}
/* 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 )
{
}
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 );
while ( IsQueueEmpty ( rxqueue ) )
return DeQueue ( rxqueue );
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 );
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 */
/* wait for data to be received */ ;
int is a 16 bit unsigned integer.
The interrupt control hardware must be
| is the bitwise Boolean OR operator.
*/