ADM00310 Microchip Technology, ADM00310 Datasheet - Page 20

no-image

ADM00310

Manufacturer Part Number
ADM00310
Description
BOARD EVAL FOR MCP3903 AFE
Manufacturer
Microchip Technology
Series
-r
Datasheets

Specifications of ADM00310

Design Resources
MCP3903 Eval Brd BOM MCP3903 Eval Brd Schematic
Main Purpose
Interface, Analog Front End (AFE)
Embedded
Yes, MCU, 16-Bit
Utilized Ic / Part
MCP3903, PIC24F, PIC24H, dsPIC33, MCP2200
Primary Attributes
-
Secondary Attributes
-
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
MCP2200
2.3.1.19
Function:
int SimpleIOClass::ReadPinValue(unsigned int pin)
EXAMPLE 2-19:
2.3.1.20
Function:
b
EXAMPLE 2-20:
DS22228B-page 20
Summary:
Description:
Precondition:
Parameters:
Returns:
Remarks:
Summary:
Description:
Precondition:
Parameters:
Returns:
Remarks:
ool SimpleIOClass::ReadPort(unsigned int *returnvalue)
unsigned int rv;
if (SimpleIOClass::ReadPinValue(0) != 0x8000)
{
}
else
if (SimpleIOClass::ReadGPIOPort (0, &rv))
{
}
else
unsigned int rv;
lblStatusBar->Text = “Success”;
lblStatusBar->Text = “Invalid command ” +
lblStatusBar->Text = “Success”;
lblStatusBar->Text = “Invalid command ” +
ReadPinValue
ReadPort
Reads the specified pin.
Reads the specified pin and returns the value as the return value. If the pin has been configured as a
digital input, the return value will be either ‘
of 0x8000.
Must be previously configured as an input via a
VID and PID must be previously set via a call to
pin
This function returns the read value of the pin, or returns a value of 0x8000, if an error occurs.
None.
Reads the GPIO port as digital input.
Reads the GPIO port and returns the value in
simultaneously, instead of one-by-one.
Must be previously configured as an input via a
VID and PID must be previously set via a call to
• returnvalue - the value read on the pin (‘
This function returns True if the transmission is successful and returns False if the transmission fails.
Pins configured for output return the current state of the port. Pins configured as input read as zero.
pin
- the pin number to set (0-7)
- the pin number to set (0-7)
0
’ or ‘
SimpleIOClass::LastError;
SimpleIOClass::LastError;
returnvalue
0
’ or ‘
ConfigureIO
ConfigureIO
1
InitMCP2200(VID, PID)
InitMCP2200(VID, PID)
’. If an error occurs, the function will return a value
1
’)
. This provides a means to read all pins
call.
call.
 2011 Microchip Technology Inc.
.
.

Related parts for ADM00310