MCP2200-I/NQ MICROCHIP [Microchip Technology], MCP2200-I/NQ Datasheet - Page 13

no-image

MCP2200-I/NQ

Manufacturer Part Number
MCP2200-I/NQ
Description
USB 2.0 to UART Protocol Converter with GPIO
Manufacturer
MICROCHIP [Microchip Technology]
Datasheet
Precondition:
The Vendor and Product ID must have been
specified by SimpleIOInit.
Parameters:
IOMap - one byte, with each bit corresponding
to each GP pin.
Returns:
Function returns true if the transmission is
successful, returns False if there the
transmission fails.
Example:
(SimpleIOClass::ConfigureGPIO(OutputPacketBuf
fer) == SUCCESS)
" + SimpleIOClass::LastError;
2.3.1.14
bool SimpleIOClass::SetPin(unsigned int pin)
Summary:
Sets the specified pin.
Description:
Sets the specified pin to one.
Precondition:
Must have previously been configured as an
output via a ConfigureGPIO call.
Parameters:
pin - The pin number to set (0-7)
Returns:
Function returns true if the transmission is
successful, returns False if there the
transmission fails.
Example:
" +
 2010 Microchip Technology Inc.
<code>
</code>
<code>
</code>
Remarks:
if
else
if (SimpleIOClass::SetPin (2))
{
}
else
none
SimpleIOClass::LastError;
lblStatusBar->Text = "Success";
lblStatusBar->Text = "Invalid command
lblStatusBar->Text = "Success";
lblStatusBar->Text = "Invalid command
SetPin
0 for output, 1 for input.
2.3.1.15
bool SimpleIOClass::ClearPin(unsigned int
pin)
Summary:
Clears the specified pin.
Description:
Sets the specified pin to zero.
Precondition:
Must have previously been configured as an
output via a ConfigureGPIO call.
Parameters:
pin - The pin number to set (0-7)
Returns:
Function returns true if the transmission is
successful, returns False if there the
transmission fails.
Example:
" +
2.3.1.16
bool SimpleIOClass::ReadPin(unsigned int pin,
unsigned int *returnvalue)
Summary:
Description:
Reads the specified pin and returns the value
in returnvalue.
configured as Digital Input, the return value
will be either 0 or 1.
configured as Analog Input, the pin will be
read by the ADC and return a 10 bit value,
right justified.
Precondition:
Must have previously been configured as an
input via a ConfigureGPIO call.
Parameters:
pin - The pin number to set (0-7)
returnvalue - the value read on the pin (0 or
1)
<code>
</code>
Remarks:
if (SimpleIOClass::ClearPin (2))
{
}
else
none
Reads the specified pin.
SimpleIOClass::LastError;
lblStatusBar->Text = "Success";
lblStatusBar->Text = "Invalid command
ClearPin
ReadPin
If the pin has been
If the pin has been
MCP2200
DS22228A-page 13

Related parts for MCP2200-I/NQ