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

MCP2200-ISS 参数 Datasheet PDF下载

MCP2200-ISS图片预览
型号: MCP2200-ISS
PDF下载: 下载PDF文件 查看货源
内容描述: USB 2.0 UART协议转换器,具有GPIO [USB 2.0 to UART Protocol Converter with GPIO]
分类和应用: 转换器
文件页数/大小: 44 页 / 503 K
品牌: MICROCHIP [ MICROCHIP ]
 浏览型号MCP2200-ISS的Datasheet PDF文件第9页浏览型号MCP2200-ISS的Datasheet PDF文件第10页浏览型号MCP2200-ISS的Datasheet PDF文件第11页浏览型号MCP2200-ISS的Datasheet PDF文件第12页浏览型号MCP2200-ISS的Datasheet PDF文件第14页浏览型号MCP2200-ISS的Datasheet PDF文件第15页浏览型号MCP2200-ISS的Datasheet PDF文件第16页浏览型号MCP2200-ISS的Datasheet PDF文件第17页  
MCP2200  
2.3.1.2  
ConfigureIO  
Function:  
bool SimpleIOClass::ConfigureIO (unsigned char IOMap)  
Summary:  
Configures the GPIO pins for Digital Input, Digital Output.  
GPIO Pins can be configured as Digital Input, Digital Output.  
Description:  
Precondition: VID and PID must be previously set via a call to InitMCP2200(VID, PID).  
Parameters:  
IOMap- a byte that represents a bitmap of the GPIO configuration:  
• a bit set to ‘1’ will be a digital input  
• a bit set to ‘0’ will be a digital output  
• MSB  
LSB  
GP7 GP6 GP5 GP4 GP3 GP2 GP1 GP0  
Returns:  
This function returns True if the transmission is successful and returns False if the transmission fails.  
Remarks:  
Error code is returned in LastError.  
EXAMPLE 2-2:  
if (SimpleIOClass::ConfigureIO(0xA5) == SUCCESS)  
lblStatusBar->Text = “Success”;  
else  
lblStatusBar->Text = “Invalid command ” + SimpleIOClass::LastError;  
2.3.1.3  
Function:  
ConfigureIoDefaultOutput  
bool SimpleIOClass::ConfigureIoDefaultOutput (unsigned char ucIoMap, unsigned char ucDefValue)  
Summary:  
Configures the IO pins for Digital Input, Digital Output and also the default output latch value.  
Description:  
IO Pins can be configured as Digital Input, Digital Output. The default output latch value is received  
as a parameter.  
Precondition: VID and PID must be previously set via a call to InitMCP2200(VID, PID).  
Parameters:  
1. ucIoMap- a byte that represents a bitmap used to set the GPIOs as either input or output.  
• ‘1’ configures GPIO as input  
• ‘0’ configures GPIO as output  
• MSB  
LSB  
GP7 GP6 GP5 GP4 GP3 GP2 GP1 GP0  
2. ucDefValue - the default value that will be loaded to the output latch (affects only the pins configured as  
outputs).  
Returns:  
This function returns True if the transmission is successful and returns False if the transmission fails.  
Remarks:  
Error code is returned in LastError.  
EXAMPLE 2-3:  
if (SimpleIOClass::ConfigureIoDefaultOutput(IoMap, DefValue) == SUCCESS)  
lblStatusBar->Text = “Success”;  
else  
lblStatusBar->Text = “Invalid command ” + SimpleIOClass::LastError;  
2011 Microchip Technology Inc.  
DS22228B-page 13  
 复制成功!