Definition:
#include <aGPM.tea>
| int aGPM_GetAnalogInput( | char addr, char n); |
Parameters:
| addr | - | IIC address of the specified GPM. |
| n | - | Index of the A2D channel. |
Return Value:
An int with the value of one of the A2D channels from the specified GPM.
Description:
This routine reads the value of one of the A2D channels from a GPM. The GPM has four 8-bit A2D channels. The index is zero-based and ranges from 0 to 3. This routine converts the 1-byte A2D result to a 2-byte integer. See the documentation for the GPS Module for more details regarding GPM registers and functions.
Example:
#include <aGPM.tea>
x=aGPM_GetAnalogInput((unsigned char)0xD0, 3);
This would set variable x to the value of A2D channel 3 of the GPM.
Related:
aGPM_Get2DigitInt, aGPM_Get3DigitInt, aGPM_GetYear, aGPM_GetAltitude, aGPM_GetHours, aGPM_GetMinutes, aGPM_GetSeconds, aGPM_GetDay, aGPM_GetMonth, aGPM_GetLatitudeDegrees, aGPM_GetLatitudeMinutes, aGPM_GetLatitudeFrac, aGPM_GetLatitudeDirChar, aGPM_GetLongitudeDegrees, aGPM_GetLongitudeMinutes, aGPM_GetLongitudeFrac, aGPM_GetLongitudeDirChar, aGPM_GetGPSQuality, aGPM_GetSatellitesInUse, aGPM_GetHDOP, aGPM_GetTrueHeading, aGPM_GetTrueHeadingFrac, aGPM_GetMagHeading, aGPM_GetMagHeadingFrac, aGPM_GetSpeed, aGPM_GetSpeedFrac, aGPM_GetSatelliteID, aGPM_GetSatelliteSignalLevel, aGPM_GetDigitalIO, aGPM_GetPosFoundFlag, aGPM_GetStatus, aGPM_SetPortDir, aGPM_SetPortBits
version: 1.0, build 80903
© Copyright 1994-2008 Acroname, Inc., Boulder, Colorado. All rights reserved.