CART
  • Cart is empty.

    ItemQuantityPrice

    Total: $0

Analog Digital Converter on DAQ-128


This examples demonstrates reading the Analog to Digital Converter of MAX128 on the DAQ-128 board. The example relies on Soft_Get_MAX12X() function from BiPOM Library. All 64 channels ( up to 8 DAQ-128 boards ) are supported in this example.

Toolkit:ARM Development System

Location:/bipom/devtools/GCC/LPC2000/examples/adc/LPC

Code Example


int main (void)
{
	UBYTE channel;
	UINT value;

	/* Initialize the system */
	Initialize();

	/* Send messages */
	uart0Puts("\n\rBIPOM MINI-MAX/ARM");
	uart0Puts("\n\rMAX128  EXAMPLE");

    /*************** ANALOG-DIGITAL-CONVERTER TEST ********************/

	/* Loop forever */
    for(;;) 
	{
		tiprintf( "\n\r\n\r*** MAX128 TEST ***" );

		/* For all channels */
		for( channel=0; channel<64; channel++ )
		{
			/* Every board has 8 channels; up to 8 boards can be stacked */
			if( !(channel %8) ) tiprintf ("\n\rBOARD #%d", (channel>>3) );

			/* Measure the voltage */
			if( Soft_Get_MAX12X(channel, &value) == SUCCESS )
			{
				tiprintf( " Ch%02d=%04d", channel&7, value );
			}
			else
			{
				tiprintf( " Ch%02d= BAD", channel&7 );
			}
		} 
		
		delayMs(1000);
	}
}