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

MCP2200-ISO 参数 Datasheet PDF下载

MCP2200-ISO图片预览
型号: MCP2200-ISO
PDF下载: 下载PDF文件 查看货源
内容描述: USB 2.0 UART协议转换器,具有GPIO [USB 2.0 to UART Protocol Converter with GPIO]
分类和应用: 转换器
文件页数/大小: 44 页 / 503 K
品牌: MICROCHIP [ MICROCHIP ]
 浏览型号MCP2200-ISO的Datasheet PDF文件第15页浏览型号MCP2200-ISO的Datasheet PDF文件第16页浏览型号MCP2200-ISO的Datasheet PDF文件第17页浏览型号MCP2200-ISO的Datasheet PDF文件第18页浏览型号MCP2200-ISO的Datasheet PDF文件第20页浏览型号MCP2200-ISO的Datasheet PDF文件第21页浏览型号MCP2200-ISO的Datasheet PDF文件第22页浏览型号MCP2200-ISO的Datasheet PDF文件第23页  
MCP2200  
EXAMPLE 2-16:  
unsigned int rv;  
if (SimpleIOClass::IsConnected ())  
{
lblStatusBar->Text = “Device connected”;  
}
else  
lblStatusBar->Text = “Device Disconnected”;  
2.3.1.17  
Function:  
ReadEEPROM  
int SimpleIOClass::ReadEEPROM (unsigned int uiEEPAddress)  
Summary:  
Reads a byte from the EEPROM.  
Description:  
Reads a byte from the EEPROM at the given address.  
Precondition: At least one call to the InitMCP2200()is required in order to initiate a DLL search for the compatible  
devices. VID and PID must be previously set via a call to InitMCP2200(VID, PID).  
Parameters:  
uiEEPAddress- the EEPROM address location we need to write to (must be from 0 to 255, inclu-  
sively).  
Returns:  
This function returns any positive value as being the EEPROM’s location value:  
E_WRONG_ADDRESS (-3)- in case the given EEPROM address is out of range  
E_CANNOT_SEND_DATA (-4)- in case the function cannot send the command to the device  
None.  
Remarks:  
EXAMPLE 2-17:  
int iRetValue = SimpleIOClass::ReadEEPROM(0x01);  
if (iRetValue >= 0)  
{
lblStatusBar->Text = “Success”;  
}
else  
lblStatusBar->Text = “Error reading to EEPROM” + SimpleIOClass::LastError;  
2.3.1.18  
Function:  
ReadPin  
bool SimpleIOClass::ReadPin (unsigned int pin, unsigned int *returnvalue)  
Summary:  
Reads the specified pin.  
Description:  
Reads the specified pin and returns the value in returnvalue. If the pin has been configured as a  
digital input, the return value will be either ‘0’ or ‘1’.  
Precondition: Must be previously configured as an input via a ConfigureIOcall.  
VID and PID must be previously set via a call to InitMCP2200(VID, PID).  
Parameters:  
pin- the pin number to set (0-7)  
returnvalue- the value read on the pin (‘0’ or ‘1’)  
Returns:  
This function returns True if the transmission is successful and returns False if the transmission fails.  
None.  
Remarks:  
EXAMPLE 2-18:  
unsigned int rv;  
if (SimpleIOClass::ReadGPIOn (0, &rv))  
{
lblStatusBar->Text = “Success”;  
}
else  
lblStatusBar->Text = “Invalid command ” + SimpleIOClass::LastError;  
2011 Microchip Technology Inc.  
DS22228B-page 19