public ushort ReadAdcVcc() { lock (syncRoot) { EnterEngMode(0x00, 0xC2); return(EEPROM_SNOEC.readadc(DUT_USB_Port, 0xA0, 0x82)); } }
public ushort ReadAdcRxP(int channel) { lock (syncRoot) { try { EnterEngMode(0x00, 0xC2); ushort adcrxp = 0; switch (channel) { case 1: adcrxp = EEPROM_SNOEC.readadc(DUT_USB_Port, 0xA0, 0xA4); break; case 2: adcrxp = EEPROM_SNOEC.readadc(DUT_USB_Port, 0xA0, 0xA6); break; case 3: adcrxp = EEPROM_SNOEC.readadc(DUT_USB_Port, 0xA0, 0xA8); break; case 4: adcrxp = EEPROM_SNOEC.readadc(DUT_USB_Port, 0xA0, 0xAA); break; case 5: adcrxp = EEPROM_SNOEC.readadc(DUT_USB_Port, 0xA0, 0xAC); break; case 6: adcrxp = EEPROM_SNOEC.readadc(DUT_USB_Port, 0xA0, 0xAE); break; case 7: adcrxp = EEPROM_SNOEC.readadc(DUT_USB_Port, 0xA0, 0xB0); break; case 8: adcrxp = EEPROM_SNOEC.readadc(DUT_USB_Port, 0xA0, 0xB2); break; default: break; } return(adcrxp); } catch { //Log.SaveLogToTxt(ex.ToString()); return(Algorithm.MyNaN); } } }
public ushort ReadADC(NameOfADC enumName, int channel) { lock (syncRoot) { try { string name = enumName.ToString(); DUTCoeffControlByPN.CoeffInfo coeffInfo = dataTable_DUTCoeffControlByPN.GetOneInfoFromTable(name, channel); EnterEngMode(coeffInfo.Page); UInt16 valueADC = EEPROM_SNOEC.readadc(DUT_USB_Port, 0xA0, coeffInfo.StartAddress); //Log.SaveLogToTxt("Current TXPOWERADC is " + valueADC); return(valueADC); } catch (Exception ex) { //Log.SaveLogToTxt(ex.ToString()); return(Algorithm.MyNaN); } } }