欢迎访问ic37.com |
会员登录 免费注册
发布采购

MCP2200_13 参数 Datasheet PDF下载

MCP2200_13图片预览
型号: MCP2200_13
PDF下载: 下载PDF文件 查看货源
内容描述: USB 2.0 UART协议转换器,具有GPIO [USB 2.0 to UART Protocol Converter with GPIO]
分类和应用: 转换器
文件页数/大小: 44 页 / 503 K
品牌: MICROCHIP [ MICROCHIP ]
 浏览型号MCP2200_13的Datasheet PDF文件第10页浏览型号MCP2200_13的Datasheet PDF文件第11页浏览型号MCP2200_13的Datasheet PDF文件第12页浏览型号MCP2200_13的Datasheet PDF文件第13页浏览型号MCP2200_13的Datasheet PDF文件第15页浏览型号MCP2200_13的Datasheet PDF文件第16页浏览型号MCP2200_13的Datasheet PDF文件第17页浏览型号MCP2200_13的Datasheet PDF文件第18页  
MCP2200  
2.3.1.4  
ConfigureMCP2200  
Function:  
bool SimpleIOClass::ConfigureIoDefaultOutput (unsigned long BaudRateParam, unsigned int RxLEDMode,  
unsigned int TxLEDMode, bool FLOW, bool ULOAD, bool SSPND)  
Summary:  
Configures the device.  
Description:  
Sets the default GPIO designation, baud rate, TX/RX LED modes, flow control.  
Precondition: VID and PID must be previously set via a call to InitMCP2200(VID, PID).  
Parameters:  
1. IOMap- A byte which represents the input/output state of the pins (each bit may be either a ‘1’ for input, and ‘0’  
for output.  
2. BaudRateParam- the default communication baud rate.  
3. RxLEDMode - can take one of the constant values (OFF, ON, TOGGLE, BLINKSLOW, BLINKFAST) to define the  
behavior of the Rx LED.  
OFF= 0  
ON= 1  
TOGGLE= 3  
BLINKSLOW= 4  
BLINKFAST= 5  
4. TxLEDMode- can take one of the defined values (OFF, ON, TOGGLE, BLINKSLOW, BLINKFAST) in order to define the  
behavior of the Tx LED.  
5. FLOW- this parameter establishes the default flow control method (False - no HW flow control, True - RTS/CTS  
flow control).  
6. ULOAD- this parameter establishes when USB has loaded the configuration.  
7. SSPND- this parameter establishes when USB send us the Suspend mode.  
Returns:  
This function returns True if the transmission is successful and returns False if the transmission fails.  
None.  
Remarks:  
EXAMPLE 2-4:  
if (SimpleIOClass::ConfigureMCP2200(0x43, 9600, BLINKSLOW, BLINKFAST, false, false, false)  
== SUCCESS)  
lblStatusBar->Text = “Success”;  
else  
lblStatusBar->Text = “Invalid command ”  
2.3.1.5  
fnHardwareFlowControl  
Function:  
bool SimpleIOClass::fnHardwareFlowControl (unsigned int onOff)  
Summary:  
Configures the flow control of the MCP2200. The flow control configuration will be stored in NVRAM.  
Sets the flow control to HW flow control (RTS/CTS) or No flow control.  
Description:  
Precondition: VID and PID must be previously set via a call to InitMCP2200(VID, PID).  
Parameters:  
onOff:  
• ‘1’ if HW flow control is required  
• ‘0’ if no flow control is required  
Returns:  
This function returns True if the transmission is successful and returns False if the transmission fails.  
Error code is returned in LastError.  
Remarks:  
EXAMPLE 2-5:  
if (SimpleIOClass::fnHardwareFlowControl(1) == SUCCESS)  
lblStatusBar->Text = “Success”;  
else  
lblStatusBar->Text = “Invalid command ” + SimpleIOClass::LastError;  
DS22228B-page 14  
2011 Microchip Technology Inc.