This is a guide to the
atod_test C example project included in the EMAC OE SDK.
This application reads all channels of an indexed atod device and reports the values read from those channels to the console. Examples of this type of device are the processor AtoDs on the SoM-9260/9G20 and the IPAC-9302; and the mcp3208 external AtoD devices on the SoM-150ES carrier (see hardware requirements, below).
atod_test project builds one executable:
Opening, Building and Uploading the Project Files
For information on opening the project from within Eclipse, please see Importing the EMAC OE SDK Projects with Eclipse. Then, follow Using the EMAC OE SDK Projects with Eclipse for information on how to build, upload and execute the example.
Makefile can be used with the
make command from the commandline to build and upload the example. For more information on this method, please see Using EMAC OE SDK Example Projects.
Usage and Behavior
atod_test project requires a device with indexed atod functionality, ie: A SoM-9260, a SoM-9G20 or an IPAC-9302.
You can also use a SoM-150ES carrier (using the mcp3208 external AtoD device through /dev/mcp3208-gpio). This interface uses the EMAC ioex class to provide a GPIO-like device where each channel can be read directly (see also the egpc example project).
indexed_atod_test DEVICE CHANNELS
Where DEVICE is the path to the device to read and CHANNELS is the number of channels to read.
root@som9g20:/tmp# ./indexed_atod_test /dev/indexed_atod 4  = 19  = 76  = 18  = 22
atod_test C example project demonstrates reading the channels of an indexed atod device.