| Electronic Components Datasheet Search |
|
MCP2200T-I/SS Datasheet(PDF) 22 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
MCP2200T-I/SS Datasheet(HTML) 22 Page - Microchip Technology |
|
22 / 44 page ![]() MCP2200 DS20002228C-page 22 2011-2015 Microchip Technology Inc. 2.3.1.23 SetPin Function: bool SimpleIOClass::SetPin(unsigned int pin) EXAMPLE 2-23: 2.3.1.24 WriteEEPROM Function: int SimpleIOClass::WriteEEPROM(unsigned int uiEEPAddress, unsigned char ucValue) EXAMPLE 2-24: Summary: Sets the specified pin. Description: Sets the specified pin to logic ‘1’. Precondition: Must be previously configured as an output via a ConfigureIO or ConfigureIoDefaultOutput call. VID and PID must be previously set via a call to InitMCP2200(VID, PID). Parameters: pin - the pin number to set (0-7) Returns: This function returns True if the transmission is successful and returns False if the transmission fails. Remarks: None. Summary: Writes a byte into the MCP2200 device’s EEPROM. Description: Writes a byte at the given address into the internal 256 bytes EEPROM. 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 to write to (must be from 0 to 255 inclusively). • ucValue - the byte value required for writing to the given location. Returns: This function returns ‘0’ if the write command was successfully sent to the device, otherwise it returns: • 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. Remarks: The function will send the write EEPROM command, but has no confirmation whether the EEPROM location was actually written. In order to verify the correctness of the EEPROM write, the user can issue a SimpleIOClass::ReadEEPROM() and check if the returned value matches the written one. if (SimpleIOClass::SetPin (2)) { lblStatusBar->Text = “Success”; } else lblStatusBar->Text = “Invalid command ” + SimpleIOClass::LastError; int iRetValue = SimpleIOClass::WriteEEPROM(0x01, 0xAB); if (iRetValue == 0) { lblStatusBar->Text = “Success”; } else lblStatusBar->Text = “Error writting to EEPROM” + SimpleIOClass::LastError; |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |